diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.yaml b/.github/ISSUE_TEMPLATE/1-bug-report.yaml index 3e62bb5cf5..9b651cb0b5 100644 --- a/.github/ISSUE_TEMPLATE/1-bug-report.yaml +++ b/.github/ISSUE_TEMPLATE/1-bug-report.yaml @@ -1,5 +1,5 @@ name: Bug Report -description: Report a bug in the Atala PRISM Cloud Agent +description: Report a bug in the Identus Cloud Agent body: - type: dropdown @@ -7,8 +7,8 @@ body: attributes: label: Is this a regression? options: - - 'Yes' - - 'No' + - "Yes" + - "No" validations: required: true @@ -23,13 +23,13 @@ body: id: exception-or-error attributes: label: Please provide the exception or error you saw - render: true + render: "Markdown" - type: textarea id: environment attributes: label: Please provide the environment you discovered this bug in - render: true + render: "Markdown" - type: textarea id: other diff --git a/.github/ISSUE_TEMPLATE/2-feature-request.yaml b/.github/ISSUE_TEMPLATE/2-feature-request.yaml index 721be36b55..7a8b1c0ea6 100644 --- a/.github/ISSUE_TEMPLATE/2-feature-request.yaml +++ b/.github/ISSUE_TEMPLATE/2-feature-request.yaml @@ -1,5 +1,5 @@ name: 'Feature Request' -description: Suggest a new feature for Atala PRISM Cloud Agent +description: Suggest a new feature for Identus Cloud Agent body: - type: textarea diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 445ad5003c..73121c15b6 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -49,15 +49,15 @@ jobs: version: v2.12.2 # defaults to 'latest' legacy: true # will also install in PATH as `docker-compose` - - name: Build local version of PRISM Agent - id: build_local_prism_agent + - name: Build local version of Cloud Agent + id: build_local_cloud_agent env: - PRISM_AGENT_PATH: "../.." + CLOUD_AGENT_PATH: "../.." ENV_FILE: "infrastructure/local/.env" GITHUB_ACTOR: ${{ secrets.ATALA_GITHUB_ACTOR }} GITHUB_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }} run: | - cd "${PRISM_AGENT_PATH}" || exit 129 + cd "${CLOUD_AGENT_PATH}" || exit 129 sbt docker:publishLocal echo "open_enterprise_agent_version=$(cut -d'=' -f2 version.sbt | tr -d '" ')" >> "${GITHUB_OUTPUT}" echo "prism_node_version=$(grep PRISM_NODE_VERSION infrastructure/local/.env | cut -d'=' -f2 | tr -d ' ')" >> "${GITHUB_OUTPUT}" @@ -69,8 +69,8 @@ jobs: - name: Run integration tests env: - PRISM_NODE_VERSION: ${{ steps.build_local_prism_agent.outputs.prism_node_version }} - OPEN_ENTERPRISE_AGENT_VERSION: ${{ steps.build_local_prism_agent.outputs.open_enterprise_agent_version }} + PRISM_NODE_VERSION: ${{ steps.build_local_cloud_agent.outputs.prism_node_version }} + OPEN_ENTERPRISE_AGENT_VERSION: ${{ steps.build_local_cloud_agent.outputs.open_enterprise_agent_version }} ATALA_GITHUB_ACTOR: ${{ secrets.ATALA_GITHUB_ACTOR }} ATALA_GITHUB_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }} continue-on-error: true diff --git a/.github/workflows/performance-tests.yml b/.github/workflows/performance-tests.yml index 1ad723a607..6a85eaaf81 100644 --- a/.github/workflows/performance-tests.yml +++ b/.github/workflows/performance-tests.yml @@ -12,7 +12,7 @@ on: workflow_dispatch: env: - BENCHMARKING_DIR: "tests/performance-tests/atala-performance-tests-k6" + BENCHMARKING_DIR: "tests/performance-tests/agent-performance-tests-k6" NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_ACTOR: ${{ github.actor }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -45,13 +45,13 @@ jobs: with: version: "2.14.2" - - name: Build local version of PRISM Agent + - name: Build local version of Cloud Agent env: ENV_FILE: "infrastructure/local/.env" run: | sbt docker:publishLocal - PRISM_AGENT_VERSION=$(cut version.sbt -d '=' -f2 | tr -d '" ') - sed -i.bak "s/PRISM_AGENT_VERSION=.*/PRISM_AGENT_VERSION=${PRISM_AGENT_VERSION}/" "${ENV_FILE}" && rm -f "${ENV_FILE}.bak" + AGENT_VERSION=$(cut version.sbt -d '=' -f2 | tr -d '" ') + sed -i.bak "s/AGENT_VERSION=.*/AGENT_VERSION=${AGENT_VERSION}/" "${ENV_FILE}" && rm -f "${ENV_FILE}.bak" cat "${ENV_FILE}" - name: Start services for issuer diff --git a/.mega-linter.yml b/.mega-linter.yml index 67433327e0..9c6e9cd614 100644 --- a/.mega-linter.yml +++ b/.mega-linter.yml @@ -47,7 +47,7 @@ PRE_COMMANDS: MARKDOWN_MARKDOWN_LINK_CHECK_FILTER_REGEX_EXCLUDE: "CHANGELOG.md" MARKDOWN_MARKDOWNLINT_FILTER_REGEX_EXCLUDE: "CHANGELOG.md" SQL_SQL_LINT_ARGUMENTS: -d postgres --ignore-errors=postgres-invalid-alter-option,postgres-invalid-create-option,postgres-invalid-drop-option -YAML_YAMLLINT_FILTER_REGEX_EXCLUDE: "infrastructure/charts/agent/*" -YAML_PRETTIER_FILTER_REGEX_EXCLUDE: "infrastructure/charts/agent/*" +YAML_YAMLLINT_FILTER_REGEX_EXCLUDE: "infrastructure/charts/agent/*|cloud-agent/service/api/http/*" +YAML_PRETTIER_FILTER_REGEX_EXCLUDE: "infrastructure/charts/agent/*|cloud-agent/service/api/http/*" YAML_V8R_FILTER_REGEX_EXCLUDE: "infrastructure/charts/agent/*" -JAVASCRIPT_STANDARD_FILTER_REGEX_EXCLUDE: "tests/performance-tests/atala-performance-tests-k6/src/k6chaijs.js" +JAVASCRIPT_STANDARD_FILTER_REGEX_EXCLUDE: "tests/performance-tests/agent-performance-tests-k6/src/k6chaijs.js" diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 9fc08ec88a..7b208b8e3e 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,6 +1,6 @@ Code of Conduct =============== -Atala PRISM follows Hyperledger [Code of Conduct](https://wiki.hyperledger.org/community/hyperledger-project-code-of-conduct). +Identus follows Hyperledger [Code of Conduct](https://wiki.hyperledger.org/community/hyperledger-project-code-of-conduct). Please, read before contributing to the project. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 480ca729d4..a4f3e52535 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ -# Contributing to Atala PRISM +# Contributing to Identus -We would love for you to contribute to Atala PRISM and help make it even better than it is today! +We would love for you to contribute to Identus and help make it even better than it is today! As a contributor, here are the guidelines we would like you to follow: - [DCO](#dco) @@ -13,7 +13,7 @@ As a contributor, here are the guidelines we would like you to follow: ## Developer Certificate of Origin (DCO) -PRISM Cloud Agent enforces the Developer Certificate of Origin (DCO). It requires all commit messages to contain the `Signed-off-by` line with an email address that matches the commit author and the name on your GitHub account. +Cloud Agent enforces the Developer Certificate of Origin (DCO). It requires all commit messages to contain the `Signed-off-by` line with an email address that matches the commit author and the name on your GitHub account. Please read and follow set up [DCO](./DCO.md). @@ -43,13 +43,13 @@ If you would like to *implement* a new feature, please consider the size of the Before you submit an issue, please search the issue tracker. An issue for your problem might already exist and the discussion might inform you of workarounds readily available. -You can file new issues by selecting a `Bug Report` template on our [Issues submition page](https://github.com/input-output-hk/atala-prism-building-blocks/issues/new/choose). +You can file new issues by selecting a `Bug Report` template on our [Issues submition page](https://github.com/hyperledger/identus-cloud-agent/issues/new/choose). ### Submitting a Pull Request (PR) Before you submit your Pull Request (PR) consider the following guidelines: -1. Search [GitHub](https://github.com/input-output-hk/atala-prism-building-blocks/pulls) for an open or closed PR that relates to your submission. +1. Search [GitHub](https://github.com/hyperledger/identus-cloud-agent/pulls) for an open or closed PR that relates to your submission. You don't want to duplicate existing efforts. 2. Be sure that an issue describes the problem you're fixing, or documents the design for the feature you'd like to add. @@ -57,7 +57,7 @@ Before you submit your Pull Request (PR) consider the following guidelines: 3. Make sure all your commits have DCO sign-off line with an email address that matches the commit author and the name on your GitHub account. -4. [Fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the https://github.com/input-output-hk/atala-prism-building-blocks repo. +4. [Fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the https://github.com/hyperledger/identus-cloud-agent repo. 5. In your forked repository, make your changes in a new git branch: @@ -85,7 +85,7 @@ Before you submit your Pull Request (PR) consider the following guidelines: git push origin my-fix-branch ``` -11. In GitHub, send a pull request to `atala-prism-building-blocks:main`. +11. In GitHub, send a pull request to `identus-cloud-agent:main`. That's it! Thank you for your contribution! diff --git a/DCO.md b/DCO.md index 243038c4f9..e1b90b53b7 100644 --- a/DCO.md +++ b/DCO.md @@ -1,6 +1,6 @@ # Developer Certificate of Origin (DCO) -PRISM Cloud Agent enforces the Developer Certificate of Origin (DCO). It requires all commit messages to contain the `Signed-off-by` line with an email address that matches the commit author and the name on your GitHub account. +Identus Cloud Agent enforces the Developer Certificate of Origin (DCO). It requires all commit messages to contain the `Signed-off-by` line with an email address that matches the commit author and the name on your GitHub account. The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO, reformatted for readability: diff --git a/README.md b/README.md index 9c899610f8..b86d7c505d 100644 --- a/README.md +++ b/README.md @@ -7,17 +7,17 @@

Coverage Status - Unit tests - End-to-end tests - Performance tests + Unit tests + End-to-end tests + Performance tests


## Overview -The Enterprise Cloud Agent is a W3C/Aries standards-based cloud agent written in Scala that provides self-sovereign identity services to build products and solutions based on it. The term "cloud" indicates that it operates on servers and is not intended for use on mobile devices. +The Cloud Agent is a W3C/Aries standards-based cloud agent written in Scala that provides self-sovereign identity services to build products and solutions based on it. The term "cloud" indicates that it operates on servers and is not intended for use on mobile devices. -Enterprise Cloud Agent supports standard-based protocols built on top of DIDComm V2 for issuing, verifying, and holding verifiable credentials using both JWT and Hyperledger AnonCreds (coming soon) formats. +Cloud Agent supports standard-based protocols built on top of DIDComm V2 for issuing, verifying, and holding verifiable credentials using both JWT and Hyperledger AnonCreds (coming soon) formats. In order to use the Cloud Agent, you establish a business logic controller responsible for communicating with the agent (initiating HTTP requests and processing webhook notifications). This controller can be created using any programming language capable of sending and receiving HTTP requests. @@ -48,15 +48,15 @@ As a result, you can concentrate on crafting self-sovereign identity solutions u Before starting to use the Cloud Agent, it is important to understand the basic concepts of self-sovereign identity (SSI). The following resources provide a good introduction to SSI: -* [Atala PRISM SSI introduction](https://docs.atalaprism.io/docs/category/concepts/) +* [Identus SSI introduction](https://docs.atalaprism.io/docs/category/concepts/) * [Linux Foundation Course: Getting Started with SSI](https://www.edx.org/learn/computer-programming/the-linux-foundation-getting-started-with-self-sovereign-identity) ### Architecture The next diagram offers a concise architectural overview, depicting a Cloud Agent instance, a controller, the interconnections linking the controller and agent, as well as the external routes to other agents and public ledgers across the Internet. -![Enterprise Cloud Agent architecture](docs/images/cloud-agent-architecture-dark.png#gh-dark-mode-only) -![Enterprise Cloud Agent architecture](docs/images/cloud-agent-architecture-light.png#gh-light-mode-only) +![Cloud Agent architecture](docs/images/cloud-agent-architecture-dark.png#gh-dark-mode-only) +![Cloud Agent architecture](docs/images/cloud-agent-architecture-light.png#gh-light-mode-only) ### Running the Cloud Agent locally on MacOS or Linux #### Prerequisites @@ -64,7 +64,7 @@ The next diagram offers a concise architectural overview, depicting a Cloud Agen - Java (OpenJDK 21) - SBT (latest version) - Git (for cloning the repository) -- Docker (for running the PostgreSQL database, Hashicorp Vault, APISIX, and PRISM Node) +- Docker (for running the PostgreSQL database, Hashicorp Vault, APISIX, and PRISM Node) - [GITHUB_TOKEN](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) environment variable (required for SBT plugins and access to the GitHub packages) #### Login to GitHub packages @@ -87,23 +87,23 @@ sbt clean compile test docker:publishLocal ### Installation and usage -Enterprise Cloud Agent is distributed as a Docker image to be run in a containerized environment. All versions can be found [here](https://github.com/orgs/input-output-hk/packages/container/package/prism-agent). +Cloud Agent is distributed as a Docker image to be run in a containerized environment. All versions can be found [here](https://github.com/orgs/input-output-hk/packages/container/package/cloud-agent). -The following sections describe how to run the Enterprise Cloud Agent in different configurations. +The following sections describe how to run the Cloud Agent in different configurations. #### Configuration -The Enterprise Cloud Agent can be configured to use different types of ledger, secret storage and DID persistence. Any combination of options is available, but the most common configurations are: +The Cloud Agent can be configured to use different types of ledger, secret storage and DID persistence. Any combination of options is available, but the most common configurations are: -| Configuration | Secret Storage | DIDs persistence | VDR | -| -------------- | -------------- | ---------------- | ------------------------------------ | -| Dev | PostgreSQL | No | In-memory | -| Pre-production | PostgreSQL | Yes | Cardano testnet (preview or preprod) | -| Production | Hashicorp | Yes | Cardano mainnet | +| Configuration | Secret Storage | DIDs persistence | Prism Node | +| -------------- | -------------- | ---------------- |-------------------------------------------------| +| Dev | PostgreSQL | No | In-memory | +| Pre-production | PostgreSQL | Yes | Distributed Ledger testnet (preview or preprod) | +| Production | Hashicorp | Yes | Distributed Ledger mainnet | -To start playing with Cloud Agent, we recommend using the Dev configuration. Pre-production and production configurations are intended for real-world use cases and require additional more complex configurations of the Cardano stack setup. +To start playing with Cloud Agent, we recommend using the Dev configuration. Pre-production and production configurations are intended for real-world use cases and require additional more complex configurations of the Distributed Ledger stack setup. -> If you're interested in a hosted version of Enterprise Cloud Agent, please, contact us at [atalaprism.io](https://atalaprism.io). +> If you're interested in a hosted version of Cloud Agent, please, contact us at [atalaprism.io](https://atalaprism.io). #### System requirements @@ -118,19 +118,19 @@ System requirements can vary depending on the use case. The following are the mi Here is a general example of running a Cloud Agent locally: ```bash -PORT=${PORT} PRISM_AGENT_VERSION=${PRISM_AGENT_VERSION} PRISM_NODE_VERSION=${PRISM_NODE_VERSION} \ +PORT=${PORT} AGENT_VERSION=${AGENT_VERSION} PRISM_NODE_VERSION=${PRISM_NODE_VERSION} \ docker compose \ -p "${AGENT_ROLE}" \ -f ./infrastructure/shared/docker-compose-demo.yml \ up --wait ``` -The `PORT` variable is used to specify the port number for the Cloud Agent to listen on. The `PRISM_AGENT_VERSION` and `PRISM_NODE_VERSION` variables are used to specify the versions of the Cloud Agent and PRISM Node to use. The `AGENT_ROLE` variable is used to specify the role of the Cloud Agent. The `AGENT_ROLE` variable can be set to `issuer`, `verifier` or `holder`. +The `PORT` variable is used to specify the port number for the Cloud Agent to listen on. The `AGENT_VERSION` and `PRISM_NODE_VERSION` variables are used to specify the versions of the Cloud Agent and PRISM Node to use. The `AGENT_ROLE` variable is used to specify the role of the Cloud Agent. The `AGENT_ROLE` variable can be set to `issuer`, `verifier` or `holder`. In real life, you will need to start at least two Cloud Agent instances with different roles. For example, you can start one instance with the `issuer` role and another one with the `holder` role. The `issuer` instance will be used to issue verifiable credentials (VCs) and the `holder` instance will be used to hold VCs. Here is an example of how you can do this: - + ```bash -PORT=8080 PRISM_AGENT_VERSION=${PRISM_AGENT_VERSION} PRISM_NODE_VERSION=2.2.1 \ +PORT=8080 AGENT_VERSION=${AGENT_VERSION} PRISM_NODE_VERSION=2.2.1 \ docker compose \ -p "issuer" \ -f ./infrastructure/shared/docker-compose-demo.yml \ @@ -138,7 +138,7 @@ PORT=8080 PRISM_AGENT_VERSION=${PRISM_AGENT_VERSION} PRISM_NODE_VERSION=2.2.1 \ ``` ```bash -PORT=8090 PRISM_AGENT_VERSION=${PRISM_AGENT_VERSION} PRISM_NODE_VERSION=2.2.1 \ +PORT=8090 AGENT_VERSION=${AGENT_VERSION} PRISM_NODE_VERSION=2.2.1 \ docker compose \ -p "holder" \ -f ./infrastructure/shared/docker-compose-demo.yml \ @@ -146,29 +146,29 @@ PORT=8090 PRISM_AGENT_VERSION=${PRISM_AGENT_VERSION} PRISM_NODE_VERSION=2.2.1 \ ``` If the Cloud Agent is started successfully, all the running containers should achieve `Healthy` state, and Cloud Agent Rest API should be available at the specified port, for example: -* `http://localhost:8080/prism-agent` for the `issuer` instance -* `http://localhost:8090/prism-agent` for the `holder` instance +* `http://localhost:8080/cloud-agent` for the `issuer` instance +* `http://localhost:8090/cloud-agent` for the `holder` instance You can check the status of the running containers using the [health endpoint](https://docs.atalaprism.io/agent-api/#tag/System/operation/systemHealth): ```bash -$ curl http://localhost:8080/prism-agent/_system/health +$ curl http://localhost:8080/cloud-agent/_system/health {"version":"1.19.1"} ``` > For more information about all available configuration parameters, please, check [Cloud Agent configuration](https://docs.atalaprism.io/docs/atala-prism/prism-cloud-agent/environment-variables) section at the documentation portal and edit the `docker-compose-demo.yml` file accordingly. -#### Compatibility between Cloud Agent and PRISM Node +#### Compatibility between Cloud Agent and PRISM Node -There could be some incompatibilities between the most latest versions of Enterprise Cloud Agent and PRISM Node. Please, use the following table to check the compatibility between the versions: +There could be some incompatibilities between the most latest versions of Cloud Agent and PRISM Node. Please, use the following table to check the compatibility between the versions: | Cloud Agent | PRISM Node | |-------------|------------| | >=1.9.2 | 2.2.1 | | <1.9.2 | 2.1.1 | -> Please note: it is not guaranteed that the latest version of Enterprise Cloud Agent will work with the latest version of PRISM Node. We recommend using the versions from the table above. +> Please note: it is not guaranteed that the latest version of Cloud Agent will work with the latest version of PRISM Node. We recommend using the versions from the table above. -### Following the Enterprise Cloud Agent tutorials +### Following the Cloud Agent tutorials The following tutorials will help you get started with the Cloud Agent and issue your first credentials: @@ -179,13 +179,13 @@ The following tutorials will help you get started with the Cloud Agent and issue ## User documentation -All extended documentation, tutorials and API references for the PRISM ecosystem can be found at https://docs.atalaprism.io/ +All extended documentation, tutorials and API references for the Identus ecosystem can be found at https://docs.atalaprism.io/ ## Contributing Please read our [contributions guidelines](./CONTRIBUTING.md) and submit your PRs. We enforce [developer certificate of origin (DCO) commit signing](./DCO.md). -We also welcome issues submitted about problems you encounter in using Enterprise Cloud Agent. +We also welcome issues submitted about problems you encounter in using Cloud Agent. ## License diff --git a/SECURITY.md b/SECURITY.md index a0bac7350f..1edd6ab1b2 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,7 +2,7 @@ # Reporting Security Issues -The Open Enterprise Agent (OEA) team and community take security bugs in the components of the OEA ecosystem seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions. +The Identus Cloud Agent (ICA) team and community take security bugs in the components of the OEA ecosystem seriously. We appreciate your efforts to disclose your findings responsibly and will make every effort to acknowledge your contributions. To report a security issue, please use the GitHub Security Advisory ["Report a Vulnerability"](https://github.com/hyperledger/identus-cloud-agent/security/advisories/new) tab. @@ -12,4 +12,4 @@ Report security bugs in third-party modules to the person or team maintaining th ## Security Notification Process -Security notifications will be sent to the dedicated [open-enterprise-agent-security-notices](https://discordapp.com/channels/905194001349627914/1199354196944748614) channel in the Hyper Ledger discord server +Security notifications will be sent to the dedicated [open-cloud-agent-security-notices](https://discordapp.com/channels/905194001349627914/1199354196944748614) channel in the Hyper Ledger discord server diff --git a/build.sbt b/build.sbt index a4bde4d552..63d0843fd5 100644 --- a/build.sbt +++ b/build.sbt @@ -6,7 +6,7 @@ import sbtbuildinfo.BuildInfoPlugin.autoImport.* inThisBuild( Seq( organization := "org.hyperledger", - scalaVersion := "3.3.1", + scalaVersion := "3.3.3", fork := true, run / connectInput := true, releaseUseGlobalVersion := false, @@ -352,7 +352,7 @@ lazy val D_Pollux_AnonCreds = new { val baseDependencies: Seq[ModuleID] = Seq(D.zio, D.zioJson) } -lazy val D_PrismAgent = new { +lazy val D_CloudAgent = new { val logback = "ch.qos.logback" % "logback-classic" % V.logback val tapirSwaggerUiBundle = "com.softwaremill.sttp.tapir" %% "tapir-swagger-ui-bundle" % V.tapir @@ -467,8 +467,6 @@ val commonSetttings = Seq( lazy val shared = (project in file("shared/core")) .settings(commonSetttings) .settings( - organization := "io.iohk.atala", - organizationName := "Input Output Global", name := "shared", crossPaths := false, libraryDependencies ++= D_Shared.dependencies @@ -477,8 +475,6 @@ lazy val shared = (project in file("shared/core")) lazy val sharedCrypto = (project in file("shared/crypto")) .settings(commonSetttings) .settings( - organization := "io.iohk.atala", - organizationName := "Input Output Global", name := "shared-crypto", crossPaths := false, libraryDependencies ++= D_SharedCrypto.dependencies @@ -488,8 +484,6 @@ lazy val sharedCrypto = (project in file("shared/crypto")) lazy val sharedTest = (project in file("shared/test")) .settings(commonSetttings) .settings( - organization := "io.iohk.atala", - organizationName := "Input Output Global", name := "shared-test", crossPaths := false, libraryDependencies ++= D_SharedTest.dependencies @@ -505,7 +499,7 @@ lazy val sharedTest = (project in file("shared/test")) * This module must not depend on external libraries! */ lazy val models = project - .in(file("mercury/mercury-library/models")) + .in(file("mercury/models")) .settings(name := "mercury-data-models") .settings( libraryDependencies ++= Seq(D.zio), @@ -531,7 +525,7 @@ models implementation for didcommx () */ // ################# lazy val protocolConnection = project - .in(file("mercury/mercury-library/protocol-connection")) + .in(file("mercury/protocol-connection")) .settings(name := "mercury-protocol-connection") .settings(libraryDependencies += D.zio) .settings(libraryDependencies ++= Seq(D.circeCore, D.circeGeneric, D.circeParser)) @@ -539,7 +533,7 @@ lazy val protocolConnection = project .dependsOn(models, protocolInvitation) lazy val protocolCoordinateMediation = project - .in(file("mercury/mercury-library/protocol-coordinate-mediation")) + .in(file("mercury/protocol-coordinate-mediation")) .settings(name := "mercury-protocol-coordinate-mediation") .settings(libraryDependencies += D.zio) .settings(libraryDependencies ++= Seq(D.circeCore, D.circeGeneric, D.circeParser)) @@ -547,14 +541,14 @@ lazy val protocolCoordinateMediation = project .dependsOn(models) lazy val protocolDidExchange = project - .in(file("mercury/mercury-library/protocol-did-exchange")) + .in(file("mercury/protocol-did-exchange")) .settings(name := "mercury-protocol-did-exchange") .settings(libraryDependencies += D.zio) .settings(libraryDependencies ++= Seq(D.circeCore, D.circeGeneric, D.circeParser)) .dependsOn(models, protocolInvitation) lazy val protocolInvitation = project - .in(file("mercury/mercury-library/protocol-invitation")) + .in(file("mercury/protocol-invitation")) .settings(name := "mercury-protocol-invitation") .settings(libraryDependencies += D.zio) .settings( @@ -569,13 +563,13 @@ lazy val protocolInvitation = project .dependsOn(models) lazy val protocolMercuryMailbox = project - .in(file("mercury/mercury-library/protocol-mercury-mailbox")) + .in(file("mercury/protocol-mercury-mailbox")) .settings(name := "mercury-protocol-mailbox") .settings(libraryDependencies += D.zio) .dependsOn(models, protocolInvitation, protocolRouting) lazy val protocolLogin = project - .in(file("mercury/mercury-library/protocol-outofband-login")) + .in(file("mercury/protocol-outofband-login")) .settings(name := "mercury-protocol-outofband-login") .settings(libraryDependencies += D.zio) .settings(libraryDependencies += D.zio) @@ -584,19 +578,19 @@ lazy val protocolLogin = project .dependsOn(models) lazy val protocolReportProblem = project - .in(file("mercury/mercury-library/protocol-report-problem")) + .in(file("mercury/protocol-report-problem")) .settings(name := "mercury-protocol-report-problem") .settings(libraryDependencies += D.munitZio) .dependsOn(models) lazy val protocolRouting = project - .in(file("mercury/mercury-library/protocol-routing")) + .in(file("mercury/protocol-routing")) .settings(name := "mercury-protocol-routing-2-0") .settings(libraryDependencies += D.zio) .dependsOn(models) lazy val protocolIssueCredential = project - .in(file("mercury/mercury-library/protocol-issue-credential")) + .in(file("mercury/protocol-issue-credential")) .settings(name := "mercury-protocol-issue-credential") .settings(libraryDependencies += D.zio) .settings(libraryDependencies ++= Seq(D.circeCore, D.circeGeneric, D.circeParser)) @@ -604,7 +598,7 @@ lazy val protocolIssueCredential = project .dependsOn(models) lazy val protocolRevocationNotification = project - .in(file("mercury/mercury-library/protocol-revocation-notification")) + .in(file("mercury/protocol-revocation-notification")) .settings(name := "mercury-protocol-revocation-notification") .settings(libraryDependencies += D.zio) .settings(libraryDependencies ++= Seq(D.circeCore, D.circeGeneric, D.circeParser)) @@ -612,7 +606,7 @@ lazy val protocolRevocationNotification = project .dependsOn(models) lazy val protocolPresentProof = project - .in(file("mercury/mercury-library/protocol-present-proof")) + .in(file("mercury/protocol-present-proof")) .settings(name := "mercury-protocol-present-proof") .settings(libraryDependencies += D.zio) .settings(libraryDependencies ++= Seq(D.circeCore, D.circeGeneric, D.circeParser)) @@ -620,12 +614,12 @@ lazy val protocolPresentProof = project .dependsOn(models) lazy val vc = project - .in(file("mercury/mercury-library/vc")) + .in(file("mercury/vc")) .settings(name := "mercury-verifiable-credentials") .dependsOn(protocolIssueCredential, protocolPresentProof) //TODO merge those two modules into this one lazy val protocolTrustPing = project - .in(file("mercury/mercury-library/protocol-trust-ping")) + .in(file("mercury/protocol-trust-ping")) .settings(name := "mercury-protocol-trust-ping") .settings(libraryDependencies += D.zio) .settings(libraryDependencies ++= Seq(D.circeCore, D.circeGeneric, D.circeParser)) @@ -638,7 +632,7 @@ lazy val protocolTrustPing = project // TODO move stuff to the models module lazy val resolver = project // maybe merge into models - .in(file("mercury/mercury-library/resolver")) + .in(file("mercury/resolver")) .settings(name := "mercury-resolver") .settings( libraryDependencies ++= Seq( @@ -657,7 +651,7 @@ lazy val resolver = project // maybe merge into models // ############## lazy val agent = project // maybe merge into models - .in(file("mercury/mercury-library/agent")) + .in(file("mercury/agent")) .settings(name := "mercury-agent-core") .settings(libraryDependencies ++= Seq(D.zioLog, D.zioSLF4J)) .dependsOn( @@ -679,7 +673,7 @@ lazy val agent = project // maybe merge into models /** agents implementation with didcommx */ lazy val agentDidcommx = project - .in(file("mercury/mercury-library/agent-didcommx")) + .in(file("mercury/agent-didcommx")) .settings(name := "mercury-agent-didcommx") .settings(libraryDependencies += D.didcommx) .settings(libraryDependencies += D.munitZio) @@ -688,13 +682,13 @@ lazy val agentDidcommx = project // ///** TODO Demos agents and services implementation with did-scala */ // lazy val agentDidScala = // project -// .in(file("mercury/mercury-library/agent-did-scala")) +// .in(file("mercury/agent-did-scala")) // .settings(name := "mercury-agent-didscala") // .settings(skip / publish := true) // .dependsOn(agent) // #################### -// ### prismNode #### +// ### Prism Node #### // #################### val prismNodeClient = project .in(file("prism-node/client/scala-client")) @@ -715,7 +709,7 @@ val prismNodeClient = project // ##################### lazy val castorCore = project - .in(file("castor/lib/core")) + .in(file("castor")) .settings(commonSetttings) .settings( name := "castor-core", @@ -729,7 +723,7 @@ lazy val castorCore = project // ##################### lazy val polluxVcJWT = project - .in(file("pollux/lib/vc-jwt")) + .in(file("pollux/vc-jwt")) .settings(commonSetttings) .settings( name := "pollux-vc-jwt", @@ -738,19 +732,19 @@ lazy val polluxVcJWT = project .dependsOn(castorCore) lazy val polluxCore = project - .in(file("pollux/lib/core")) + .in(file("pollux/core")) .settings(commonSetttings) .settings( name := "pollux-core", libraryDependencies ++= D_Pollux.coreDependencies ) .dependsOn(shared) - .dependsOn(prismAgentWalletAPI) + .dependsOn(agentWalletAPI) .dependsOn(polluxVcJWT) .dependsOn(vc, resolver, agentDidcommx, eventNotification, polluxAnoncreds) lazy val polluxDoobie = project - .in(file("pollux/lib/sql-doobie")) + .in(file("pollux/sql-doobie")) .settings(commonSetttings) .settings( name := "pollux-sql-doobie", @@ -765,7 +759,7 @@ lazy val polluxDoobie = project // ######################## lazy val polluxAnoncreds = project - .in(file("pollux/lib/anoncreds")) + .in(file("pollux/anoncreds")) .enablePlugins(BuildInfoPlugin) .enablePlugins(JavaAppPackaging) .settings( @@ -774,12 +768,11 @@ lazy val polluxAnoncreds = project Compile / unmanagedResourceDirectories ++= Seq( baseDirectory.value / "native-lib" / "NATIVE" ), - // libraryDependencies += "io.iohk.atala.prism.anoncredskmp" % "anoncreds-kmp-jvm" % "0.3.5-M2", libraryDependencies ++= D_Pollux_AnonCreds.baseDependencies ) lazy val polluxAnoncredsTest = project - .in(file("pollux/lib/anoncredsTest")) + .in(file("pollux/anoncredsTest")) .settings(libraryDependencies ++= Seq("org.scalatest" %% "scalatest" % "3.2.15" % Test)) .dependsOn(polluxAnoncreds % "compile->test") @@ -788,7 +781,7 @@ lazy val polluxAnoncredsTest = project // ##################### lazy val connectCore = project - .in(file("connect/lib/core")) + .in(file("connect/core")) .settings(commonSetttings) .settings( name := "connect-core", @@ -799,7 +792,7 @@ lazy val connectCore = project .dependsOn(protocolConnection, protocolReportProblem, eventNotification) lazy val connectDoobie = project - .in(file("connect/lib/sql-doobie")) + .in(file("connect/sql-doobie")) .settings(commonSetttings) .settings( name := "connect-sql-doobie", @@ -822,18 +815,18 @@ lazy val eventNotification = project .dependsOn(shared) // ##################### -// #### Prism Agent #### +// #### Cloud Agent #### // ##################### -lazy val prismAgentWalletAPI = project - .in(file("prism-agent/service/wallet-api")) +lazy val agentWalletAPI = project + .in(file("cloud-agent/service/wallet-api")) .settings(commonSetttings) .settings( - name := "prism-agent-wallet-api", + name := "cloud-agent-wallet-api", libraryDependencies ++= - D_PrismAgent.keyManagementDependencies ++ - D_PrismAgent.iamDependencies ++ - D_PrismAgent.postgresDependencies ++ + D_CloudAgent.keyManagementDependencies ++ + D_CloudAgent.iamDependencies ++ + D_CloudAgent.postgresDependencies ++ Seq(D.zioMock) ) .dependsOn( @@ -844,32 +837,32 @@ lazy val prismAgentWalletAPI = project .dependsOn(sharedTest % "test->test") .dependsOn(sharedCrypto % "compile->compile;test->test") -lazy val prismAgentServer = project - .in(file("prism-agent/service/server")) +lazy val cloudAgentServer = project + .in(file("cloud-agent/service/server")) .settings(commonSetttings) .settings( name := "identus-cloud-agent", fork := true, - libraryDependencies ++= D_PrismAgent.serverDependencies, + libraryDependencies ++= D_CloudAgent.serverDependencies, excludeDependencies ++= Seq( // Exclude `protobuf-javalite` from all dependencies since we're using scalapbRuntime which already include `protobuf-java` // Having both may introduce conflict on some api https://github.com/protocolbuffers/protobuf/issues/8104 ExclusionRule("com.google.protobuf", "protobuf-javalite") ), - Compile / mainClass := Some("io.iohk.atala.agent.server.MainApp"), + Compile / mainClass := Some("org.hyperledger.identus.agent.server.MainApp"), Docker / maintainer := "atala-coredid@iohk.io", - Docker / dockerUsername := Some("hyperledger"), + Docker / dockerUsername := Some("hyperledger"), // https://github.com/hyperledger Docker / dockerRepository := Some("ghcr.io"), dockerExposedPorts := Seq(8080, 8085, 8090), // Official docker image for openjdk 21 with curl and bash dockerBaseImage := "openjdk:21-jdk", buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion), - buildInfoPackage := "io.iohk.atala.agent.server.buildinfo", + buildInfoPackage := "org.hyperledger.identus.agent.server.buildinfo", Compile / packageDoc / publishArtifact := false ) .enablePlugins(JavaAppPackaging, DockerPlugin) .enablePlugins(BuildInfoPlugin) - .dependsOn(prismAgentWalletAPI % "compile->compile;test->test") + .dependsOn(agentWalletAPI % "compile->compile;test->test") .dependsOn( agent, polluxCore, @@ -892,7 +885,7 @@ releaseProcess := Seq[ReleaseStep]( runClean, runTest, setReleaseVersion, - ReleaseStep(releaseStepTask(prismAgentServer / Docker / stage)), + ReleaseStep(releaseStepTask(cloudAgentServer / Docker / stage)), setNextVersion ) @@ -925,8 +918,8 @@ lazy val aggregatedProjects: Seq[ProjectReference] = Seq( polluxAnoncredsTest, connectCore, connectDoobie, - prismAgentWalletAPI, - prismAgentServer, + agentWalletAPI, + cloudAgentServer, eventNotification, ) diff --git a/castor/lib/CHANGELOG.md b/castor/CHANGELOG.md similarity index 100% rename from castor/lib/CHANGELOG.md rename to castor/CHANGELOG.md diff --git a/castor/lib/README.md b/castor/README.md similarity index 100% rename from castor/lib/README.md rename to castor/README.md diff --git a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/repository/DIDOperationRepository.scala b/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/repository/DIDOperationRepository.scala deleted file mode 100644 index 2606066f36..0000000000 --- a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/repository/DIDOperationRepository.scala +++ /dev/null @@ -1,7 +0,0 @@ -package io.iohk.atala.castor.core.repository - -import io.iohk.atala.castor.core.model.did.PrismDID - -trait DIDOperationRepository[F[_]] { - def getConfirmedPublishedDIDOperations(did: PrismDID): F[Unit] -} diff --git a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/ProtoModelHelper.scala b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/ProtoModelHelper.scala similarity index 98% rename from castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/ProtoModelHelper.scala rename to castor/src/main/scala/org/hyperledger/identus/castor/core/model/ProtoModelHelper.scala index 067d8ba4a9..ab19920c9d 100644 --- a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/ProtoModelHelper.scala +++ b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/ProtoModelHelper.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.castor.core.model +package org.hyperledger.identus.castor.core.model import com.google.protobuf.ByteString import io.circe.Json -import io.iohk.atala.castor.core.model.did.ServiceEndpoint.UriOrJsonEndpoint -import io.iohk.atala.castor.core.model.did.{ +import org.hyperledger.identus.castor.core.model.did.ServiceEndpoint.UriOrJsonEndpoint +import org.hyperledger.identus.castor.core.model.did.{ DIDData, EllipticCurve, InternalKeyPurpose, @@ -25,8 +25,8 @@ import io.iohk.atala.prism.protos.common_models.OperationStatus import io.iohk.atala.prism.protos.node_models.KeyUsage import io.iohk.atala.prism.protos.node_models.PublicKey.KeyData import io.iohk.atala.prism.protos.{common_models, node_api, node_models} -import io.iohk.atala.shared.models.Base64UrlString -import io.iohk.atala.shared.utils.Traverse.* +import org.hyperledger.identus.shared.models.Base64UrlString +import org.hyperledger.identus.shared.utils.Traverse.* import java.time.Instant import scala.language.implicitConversions import zio.* diff --git a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/DID.scala b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/DID.scala similarity index 96% rename from castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/DID.scala rename to castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/DID.scala index 2976308135..9d71ae4f5f 100644 --- a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/DID.scala +++ b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/DID.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.castor.core.model.did +package org.hyperledger.identus.castor.core.model.did import scala.util.matching.Regex diff --git a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/DIDData.scala b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/DIDData.scala similarity index 89% rename from castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/DIDData.scala rename to castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/DIDData.scala index ce00f8c8c4..30d5d4bbdb 100644 --- a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/DIDData.scala +++ b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/DIDData.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.castor.core.model.did +package org.hyperledger.identus.castor.core.model.did import java.time.Instant import scala.collection.immutable.ArraySeq diff --git a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/DIDUrl.scala b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/DIDUrl.scala similarity index 71% rename from castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/DIDUrl.scala rename to castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/DIDUrl.scala index e7db8524ef..c28e443897 100644 --- a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/DIDUrl.scala +++ b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/DIDUrl.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.castor.core.model.did +package org.hyperledger.identus.castor.core.model.did final case class DIDUrl( did: DID, diff --git a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/EllipticCurve.scala b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/EllipticCurve.scala similarity index 91% rename from castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/EllipticCurve.scala rename to castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/EllipticCurve.scala index a45986022f..49e9dd05d8 100644 --- a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/EllipticCurve.scala +++ b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/EllipticCurve.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.castor.core.model.did +package org.hyperledger.identus.castor.core.model.did // EC Name is used in JWK https://w3c-ccg.github.io/security-vocab/#publicKeyJwk // It MUST match the curve name in https://www.iana.org/assignments/jose/jose.xhtml diff --git a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/PrismDID.scala b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/PrismDID.scala similarity index 95% rename from castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/PrismDID.scala rename to castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/PrismDID.scala index eaa88d7e16..a929f65bc0 100644 --- a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/PrismDID.scala +++ b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/PrismDID.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.castor.core.model.did +package org.hyperledger.identus.castor.core.model.did -import io.iohk.atala.castor.core.model.ProtoModelHelper +import org.hyperledger.identus.castor.core.model.ProtoModelHelper import io.iohk.atala.prism.crypto.{Sha256, Sha256Digest} import io.iohk.atala.prism.protos.node_models import io.iohk.atala.prism.protos.node_models.AtalaOperation.Operation -import io.iohk.atala.shared.models.Base64UrlString -import io.iohk.atala.shared.models.HexString +import org.hyperledger.identus.shared.models.Base64UrlString +import org.hyperledger.identus.shared.models.HexString import scala.util.Try import scala.util.matching.Regex diff --git a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/PrismDIDOperation.scala b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/PrismDIDOperation.scala similarity index 95% rename from castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/PrismDIDOperation.scala rename to castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/PrismDIDOperation.scala index 43f2c18c1c..42cb8ec1e3 100644 --- a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/PrismDIDOperation.scala +++ b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/PrismDIDOperation.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.castor.core.model.did +package org.hyperledger.identus.castor.core.model.did -import io.iohk.atala.castor.core.model.ProtoModelHelper +import org.hyperledger.identus.castor.core.model.ProtoModelHelper import io.iohk.atala.prism.crypto.Sha256 import scala.collection.compat.immutable.ArraySeq diff --git a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/PublicKey.scala b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/PublicKey.scala similarity index 85% rename from castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/PublicKey.scala rename to castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/PublicKey.scala index 5dd050b589..496b71abb3 100644 --- a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/PublicKey.scala +++ b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/PublicKey.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.castor.core.model.did +package org.hyperledger.identus.castor.core.model.did -import io.iohk.atala.shared.models.Base64UrlString +import org.hyperledger.identus.shared.models.Base64UrlString final case class PublicKey( id: String, diff --git a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/Service.scala b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/Service.scala similarity index 79% rename from castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/Service.scala rename to castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/Service.scala index d2ce528890..36fe203d6e 100644 --- a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/Service.scala +++ b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/Service.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.castor.core.model.did +package org.hyperledger.identus.castor.core.model.did final case class Service( id: String, diff --git a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/ServiceEndpoint.scala b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/ServiceEndpoint.scala similarity index 93% rename from castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/ServiceEndpoint.scala rename to castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/ServiceEndpoint.scala index 3120dcd06e..56167dca22 100644 --- a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/ServiceEndpoint.scala +++ b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/ServiceEndpoint.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.castor.core.model.did +package org.hyperledger.identus.castor.core.model.did import io.circe.JsonObject -import io.iohk.atala.castor.core.util.UriUtils +import org.hyperledger.identus.castor.core.util.UriUtils sealed trait ServiceEndpoint { def normalize(): ServiceEndpoint diff --git a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/ServiceType.scala b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/ServiceType.scala similarity index 92% rename from castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/ServiceType.scala rename to castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/ServiceType.scala index 159bc52f89..b9f9314d49 100644 --- a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/ServiceType.scala +++ b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/ServiceType.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.castor.core.model.did +package org.hyperledger.identus.castor.core.model.did sealed trait ServiceType diff --git a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/VerificationRelationship.scala b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/VerificationRelationship.scala similarity index 92% rename from castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/VerificationRelationship.scala rename to castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/VerificationRelationship.scala index 797ee0d51b..7fc04d18fc 100644 --- a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/VerificationRelationship.scala +++ b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/VerificationRelationship.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.castor.core.model.did +package org.hyperledger.identus.castor.core.model.did enum VerificationRelationship(val name: String) { case Authentication extends VerificationRelationship("authentication") diff --git a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/w3c/DIDDocumentRepr.scala b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/w3c/DIDDocumentRepr.scala similarity index 93% rename from castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/w3c/DIDDocumentRepr.scala rename to castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/w3c/DIDDocumentRepr.scala index 37dc1d23ff..4bdaca0c71 100644 --- a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/w3c/DIDDocumentRepr.scala +++ b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/w3c/DIDDocumentRepr.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.castor.core.model.did.w3c +package org.hyperledger.identus.castor.core.model.did.w3c import io.circe.Json diff --git a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/w3c/DIDMetadata.scala b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/w3c/DIDMetadata.scala similarity index 94% rename from castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/w3c/DIDMetadata.scala rename to castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/w3c/DIDMetadata.scala index a2e5cdb72b..89b84d3711 100644 --- a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/w3c/DIDMetadata.scala +++ b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/w3c/DIDMetadata.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.castor.core.model.did.w3c +package org.hyperledger.identus.castor.core.model.did.w3c // errors are based on https://www.w3.org/TR/did-spec-registries/#error enum DIDResolutionErrorRepr(val value: String, val errorMessage: Option[String]) { diff --git a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/w3c/W3CModelHelper.scala b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/w3c/W3CModelHelper.scala similarity index 94% rename from castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/w3c/W3CModelHelper.scala rename to castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/w3c/W3CModelHelper.scala index 45dd3bd47c..ff1e4210b9 100644 --- a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/w3c/W3CModelHelper.scala +++ b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/w3c/W3CModelHelper.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.castor.core.model.did.w3c +package org.hyperledger.identus.castor.core.model.did.w3c import io.circe.Json -import io.iohk.atala.castor.core.model.did.* -import io.iohk.atala.castor.core.model.did.ServiceEndpoint.UriOrJsonEndpoint -import io.iohk.atala.shared.crypto.Apollo -import io.iohk.atala.shared.models.Base64UrlString -import io.iohk.atala.shared.models.HexString +import org.hyperledger.identus.castor.core.model.did.* +import org.hyperledger.identus.castor.core.model.did.ServiceEndpoint.UriOrJsonEndpoint +import org.hyperledger.identus.shared.crypto.Apollo +import org.hyperledger.identus.shared.models.Base64UrlString +import org.hyperledger.identus.shared.models.HexString import java.time.Instant import java.time.ZoneOffset diff --git a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/w3c/package.scala b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/w3c/package.scala similarity index 87% rename from castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/w3c/package.scala rename to castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/w3c/package.scala index a32f1aaa1d..af2ffbd8a8 100644 --- a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/did/w3c/package.scala +++ b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/w3c/package.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.castor.core.model.did +package org.hyperledger.identus.castor.core.model.did -import io.iohk.atala.castor.core.model.error.DIDResolutionError -import io.iohk.atala.castor.core.service.DIDService +import org.hyperledger.identus.castor.core.model.error.DIDResolutionError +import org.hyperledger.identus.castor.core.service.DIDService import zio.* package object w3c { diff --git a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/error/package.scala b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/error/package.scala similarity index 96% rename from castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/error/package.scala rename to castor/src/main/scala/org/hyperledger/identus/castor/core/model/error/package.scala index 5bd17373f9..e0f5297fd9 100644 --- a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/model/error/package.scala +++ b/castor/src/main/scala/org/hyperledger/identus/castor/core/model/error/package.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.castor.core.model +package org.hyperledger.identus.castor.core.model package object error { diff --git a/castor/src/main/scala/org/hyperledger/identus/castor/core/repository/DIDOperationRepository.scala b/castor/src/main/scala/org/hyperledger/identus/castor/core/repository/DIDOperationRepository.scala new file mode 100644 index 0000000000..9c82b74a6d --- /dev/null +++ b/castor/src/main/scala/org/hyperledger/identus/castor/core/repository/DIDOperationRepository.scala @@ -0,0 +1,7 @@ +package org.hyperledger.identus.castor.core.repository + +import org.hyperledger.identus.castor.core.model.did.PrismDID + +trait DIDOperationRepository[F[_]] { + def getConfirmedPublishedDIDOperations(did: PrismDID): F[Unit] +} diff --git a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/service/DIDService.scala b/castor/src/main/scala/org/hyperledger/identus/castor/core/service/DIDService.scala similarity index 93% rename from castor/lib/core/src/main/scala/io/iohk/atala/castor/core/service/DIDService.scala rename to castor/src/main/scala/org/hyperledger/identus/castor/core/service/DIDService.scala index 9e865be572..0b069c0e69 100644 --- a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/service/DIDService.scala +++ b/castor/src/main/scala/org/hyperledger/identus/castor/core/service/DIDService.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.castor.core.service +package org.hyperledger.identus.castor.core.service -import io.iohk.atala.castor.core.model.ProtoModelHelper -import io.iohk.atala.castor.core.model.did.{ +import org.hyperledger.identus.castor.core.model.ProtoModelHelper +import org.hyperledger.identus.castor.core.model.did.{ CanonicalPrismDID, DIDData, DIDMetadata, @@ -13,13 +13,13 @@ import io.iohk.atala.castor.core.model.did.{ ScheduledDIDOperationDetail, SignedPrismDIDOperation } -import io.iohk.atala.castor.core.model.error.OperationValidationError -import io.iohk.atala.castor.core.model.error.{DIDOperationError, DIDResolutionError} -import io.iohk.atala.castor.core.util.DIDOperationValidator +import org.hyperledger.identus.castor.core.model.error.OperationValidationError +import org.hyperledger.identus.castor.core.model.error.{DIDOperationError, DIDResolutionError} +import org.hyperledger.identus.castor.core.util.DIDOperationValidator import io.iohk.atala.prism.protos.node_api.NodeServiceGrpc.NodeService import io.iohk.atala.prism.protos.node_models.OperationOutput.OperationMaybe import io.iohk.atala.prism.protos.{node_api, node_models} -import io.iohk.atala.shared.models.HexString +import org.hyperledger.identus.shared.models.HexString import java.time.Instant import scala.collection.immutable.ArraySeq import zio.* diff --git a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/service/MockDIDService.scala b/castor/src/main/scala/org/hyperledger/identus/castor/core/service/MockDIDService.scala similarity index 91% rename from castor/lib/core/src/main/scala/io/iohk/atala/castor/core/service/MockDIDService.scala rename to castor/src/main/scala/org/hyperledger/identus/castor/core/service/MockDIDService.scala index 1da4d59758..890a2e209b 100644 --- a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/service/MockDIDService.scala +++ b/castor/src/main/scala/org/hyperledger/identus/castor/core/service/MockDIDService.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.castor.core.service +package org.hyperledger.identus.castor.core.service -import io.iohk.atala.castor.core.model.did.* -import io.iohk.atala.castor.core.model.error -import io.iohk.atala.shared.crypto.Apollo -import io.iohk.atala.shared.crypto.Secp256k1KeyPair -import io.iohk.atala.shared.models.Base64UrlString +import org.hyperledger.identus.castor.core.model.did.* +import org.hyperledger.identus.castor.core.model.error +import org.hyperledger.identus.shared.crypto.Apollo +import org.hyperledger.identus.shared.crypto.Secp256k1KeyPair +import org.hyperledger.identus.shared.models.Base64UrlString import zio.mock.{Expectation, Mock, Proxy} import zio.test.Assertion import zio.{IO, URLayer, ZIO, ZLayer, mock} diff --git a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/util/DIDOperationValidator.scala b/castor/src/main/scala/org/hyperledger/identus/castor/core/util/DIDOperationValidator.scala similarity index 97% rename from castor/lib/core/src/main/scala/io/iohk/atala/castor/core/util/DIDOperationValidator.scala rename to castor/src/main/scala/org/hyperledger/identus/castor/core/util/DIDOperationValidator.scala index 80b0a6a557..33401840e2 100644 --- a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/util/DIDOperationValidator.scala +++ b/castor/src/main/scala/org/hyperledger/identus/castor/core/util/DIDOperationValidator.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.castor.core.util +package org.hyperledger.identus.castor.core.util -import io.iohk.atala.castor.core.model.did.* -import io.iohk.atala.castor.core.model.error.OperationValidationError -import io.iohk.atala.castor.core.util.DIDOperationValidator.Config -import io.iohk.atala.castor.core.util.Prelude.* -import io.iohk.atala.shared.crypto.Apollo +import org.hyperledger.identus.castor.core.model.did.* +import org.hyperledger.identus.castor.core.model.error.OperationValidationError +import org.hyperledger.identus.castor.core.util.DIDOperationValidator.Config +import org.hyperledger.identus.castor.core.util.Prelude.* +import org.hyperledger.identus.shared.crypto.Apollo import zio.* import scala.collection.immutable.ArraySeq @@ -319,7 +319,7 @@ private trait BaseOperationValidator { protected def validateServiceTypeLength[T <: PrismDIDOperation]( config: Config )(operation: T, serviceTypeExtractor: ServiceTypeExtractor[T]): Either[OperationValidationError, Unit] = { - import io.iohk.atala.castor.core.model.ProtoModelHelper.* + import org.hyperledger.identus.castor.core.model.ProtoModelHelper.* val serviceTypes = serviceTypeExtractor(operation) val invalidServiceTypes = serviceTypes.filter(_._2.toProto.length > config.maxServiceTypeSize) if (invalidServiceTypes.isEmpty) Right(()) @@ -334,7 +334,7 @@ private trait BaseOperationValidator { protected def validateServiceEndpointLength[T <: PrismDIDOperation]( config: Config )(operation: T, serviceEndpointExtractor: ServiceEndpointExtractor[T]): Either[OperationValidationError, Unit] = { - import io.iohk.atala.castor.core.model.ProtoModelHelper.* + import org.hyperledger.identus.castor.core.model.ProtoModelHelper.* val serviceEndpoints = serviceEndpointExtractor(operation) val invalidServiceEndpoints = serviceEndpoints.filter(_._2.toProto.length > config.maxServiceEndpointSize) if (invalidServiceEndpoints.isEmpty) Right(()) diff --git a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/util/Prelude.scala b/castor/src/main/scala/org/hyperledger/identus/castor/core/util/Prelude.scala similarity index 76% rename from castor/lib/core/src/main/scala/io/iohk/atala/castor/core/util/Prelude.scala rename to castor/src/main/scala/org/hyperledger/identus/castor/core/util/Prelude.scala index 5414dce4d3..4f05098950 100644 --- a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/util/Prelude.scala +++ b/castor/src/main/scala/org/hyperledger/identus/castor/core/util/Prelude.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.castor.core.util +package org.hyperledger.identus.castor.core.util // consider moving this to shared library object Prelude { diff --git a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/util/UriUtils.scala b/castor/src/main/scala/org/hyperledger/identus/castor/core/util/UriUtils.scala similarity index 99% rename from castor/lib/core/src/main/scala/io/iohk/atala/castor/core/util/UriUtils.scala rename to castor/src/main/scala/org/hyperledger/identus/castor/core/util/UriUtils.scala index 4fe0f0eda0..06ee467f47 100644 --- a/castor/lib/core/src/main/scala/io/iohk/atala/castor/core/util/UriUtils.scala +++ b/castor/src/main/scala/org/hyperledger/identus/castor/core/util/UriUtils.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.castor.core.util +package org.hyperledger.identus.castor.core.util import io.lemonlabs.uri.{Uri, Url, Urn, QueryString} import io.lemonlabs.uri.config.UriConfig diff --git a/castor/lib/core/src/test/scala/io/iohk/atala/castor/core/model/ProtoModelHelperSpec.scala b/castor/src/test/scala/org/hyperledger/identus/castor/core/model/ProtoModelHelperSpec.scala similarity index 97% rename from castor/lib/core/src/test/scala/io/iohk/atala/castor/core/model/ProtoModelHelperSpec.scala rename to castor/src/test/scala/org/hyperledger/identus/castor/core/model/ProtoModelHelperSpec.scala index 7d2bd094e3..91475c86ce 100644 --- a/castor/lib/core/src/test/scala/io/iohk/atala/castor/core/model/ProtoModelHelperSpec.scala +++ b/castor/src/test/scala/org/hyperledger/identus/castor/core/model/ProtoModelHelperSpec.scala @@ -1,13 +1,13 @@ -package io.iohk.atala.castor.core.model +package org.hyperledger.identus.castor.core.model import com.google.protobuf.timestamp.Timestamp import io.circe.Json import io.circe.JsonObject -import io.iohk.atala.castor.core.model.did.ServiceEndpoint -import io.iohk.atala.castor.core.model.did.ServiceEndpoint.UriOrJsonEndpoint -import io.iohk.atala.castor.core.model.did.ServiceEndpoint.UriValue -import io.iohk.atala.castor.core.model.did.ServiceType -import io.iohk.atala.castor.core.util.GenUtils +import org.hyperledger.identus.castor.core.model.did.ServiceEndpoint +import org.hyperledger.identus.castor.core.model.did.ServiceEndpoint.UriOrJsonEndpoint +import org.hyperledger.identus.castor.core.model.did.ServiceEndpoint.UriValue +import org.hyperledger.identus.castor.core.model.did.ServiceType +import org.hyperledger.identus.castor.core.util.GenUtils import io.iohk.atala.prism.protos.common_models.Ledger import io.iohk.atala.prism.protos.node_models import java.time.Instant @@ -15,6 +15,7 @@ import scala.language.implicitConversions import zio.* import zio.test.* import zio.test.Assertion.* +import org.hyperledger.identus.castor.core.model.ProtoModelHelper object ProtoModelHelperSpec extends ZIOSpecDefault { diff --git a/castor/lib/core/src/test/scala/io/iohk/atala/castor/core/model/did/DIDSpec.scala b/castor/src/test/scala/org/hyperledger/identus/castor/core/model/did/DIDSpec.scala similarity index 98% rename from castor/lib/core/src/test/scala/io/iohk/atala/castor/core/model/did/DIDSpec.scala rename to castor/src/test/scala/org/hyperledger/identus/castor/core/model/did/DIDSpec.scala index b5cbb49104..90781225e2 100644 --- a/castor/lib/core/src/test/scala/io/iohk/atala/castor/core/model/did/DIDSpec.scala +++ b/castor/src/test/scala/org/hyperledger/identus/castor/core/model/did/DIDSpec.scala @@ -1,9 +1,10 @@ -package io.iohk.atala.castor.core.model.did +package org.hyperledger.identus.castor.core.model.did import zio.* import zio.test.* import zio.test.Assertion.* -import io.iohk.atala.castor.core.util.GenUtils +import org.hyperledger.identus.castor.core.util.GenUtils +import org.hyperledger.identus.castor.core.model.did.{DID, PrismDID} object DIDSpec extends ZIOSpecDefault { diff --git a/castor/lib/core/src/test/scala/io/iohk/atala/castor/core/model/did/PrismDIDSpec.scala b/castor/src/test/scala/org/hyperledger/identus/castor/core/model/did/PrismDIDSpec.scala similarity index 95% rename from castor/lib/core/src/test/scala/io/iohk/atala/castor/core/model/did/PrismDIDSpec.scala rename to castor/src/test/scala/org/hyperledger/identus/castor/core/model/did/PrismDIDSpec.scala index 71dfdb5e4e..54a18c23ed 100644 --- a/castor/lib/core/src/test/scala/io/iohk/atala/castor/core/model/did/PrismDIDSpec.scala +++ b/castor/src/test/scala/org/hyperledger/identus/castor/core/model/did/PrismDIDSpec.scala @@ -1,12 +1,13 @@ -package io.iohk.atala.castor.core.model.did +package org.hyperledger.identus.castor.core.model.did import com.google.protobuf.ByteString import io.iohk.atala.prism.crypto.{Sha256, Sha256Digest} import io.iohk.atala.prism.protos.node_models -import io.iohk.atala.shared.models.Base64UrlString +import org.hyperledger.identus.shared.models.Base64UrlString import zio.* import zio.test.* import zio.test.Assertion.* +import org.hyperledger.identus.castor.core.model.did.PrismDID object PrismDIDSpec extends ZIOSpecDefault { diff --git a/castor/lib/core/src/test/scala/io/iohk/atala/castor/core/model/did/ServiceEndpointSpec.scala b/castor/src/test/scala/org/hyperledger/identus/castor/core/model/did/ServiceEndpointSpec.scala similarity index 88% rename from castor/lib/core/src/test/scala/io/iohk/atala/castor/core/model/did/ServiceEndpointSpec.scala rename to castor/src/test/scala/org/hyperledger/identus/castor/core/model/did/ServiceEndpointSpec.scala index 4c73a9871b..5a2bc72bb2 100644 --- a/castor/lib/core/src/test/scala/io/iohk/atala/castor/core/model/did/ServiceEndpointSpec.scala +++ b/castor/src/test/scala/org/hyperledger/identus/castor/core/model/did/ServiceEndpointSpec.scala @@ -1,8 +1,9 @@ -package io.iohk.atala.castor.core.model.did +package org.hyperledger.identus.castor.core.model.did import zio.* import zio.test.* import zio.test.Assertion.* +import org.hyperledger.identus.castor.core.model.did.ServiceEndpoint object ServiceEndpointSpec extends ZIOSpecDefault { diff --git a/castor/lib/core/src/test/scala/io/iohk/atala/castor/core/model/did/ServiceTypeSpec.scala b/castor/src/test/scala/org/hyperledger/identus/castor/core/model/did/ServiceTypeSpec.scala similarity index 93% rename from castor/lib/core/src/test/scala/io/iohk/atala/castor/core/model/did/ServiceTypeSpec.scala rename to castor/src/test/scala/org/hyperledger/identus/castor/core/model/did/ServiceTypeSpec.scala index 844f9945dc..f1868c8fed 100644 --- a/castor/lib/core/src/test/scala/io/iohk/atala/castor/core/model/did/ServiceTypeSpec.scala +++ b/castor/src/test/scala/org/hyperledger/identus/castor/core/model/did/ServiceTypeSpec.scala @@ -1,8 +1,9 @@ -package io.iohk.atala.castor.core.model.did +package org.hyperledger.identus.castor.core.model.did import zio.* import zio.test.* import zio.test.Assertion.* +import org.hyperledger.identus.castor.core.model.did.ServiceType object ServiceTypeSpec extends ZIOSpecDefault { diff --git a/castor/lib/core/src/test/scala/io/iohk/atala/castor/core/model/did/w3c/W3CModelHelperSpec.scala b/castor/src/test/scala/org/hyperledger/identus/castor/core/model/did/w3c/W3CModelHelperSpec.scala similarity index 95% rename from castor/lib/core/src/test/scala/io/iohk/atala/castor/core/model/did/w3c/W3CModelHelperSpec.scala rename to castor/src/test/scala/org/hyperledger/identus/castor/core/model/did/w3c/W3CModelHelperSpec.scala index f24a54f88f..57f874f451 100644 --- a/castor/lib/core/src/test/scala/io/iohk/atala/castor/core/model/did/w3c/W3CModelHelperSpec.scala +++ b/castor/src/test/scala/org/hyperledger/identus/castor/core/model/did/w3c/W3CModelHelperSpec.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.castor.core.model.did.w3c +package org.hyperledger.identus.castor.core.model.did.w3c -import io.iohk.atala.castor.core.model.did.{ +import org.hyperledger.identus.castor.core.model.did.{ CanonicalPrismDID, DIDData, InternalKeyPurpose, @@ -8,10 +8,11 @@ import io.iohk.atala.castor.core.model.did.{ PrismDIDOperation, VerificationRelationship } -import io.iohk.atala.castor.core.util.GenUtils +import org.hyperledger.identus.castor.core.util.GenUtils import zio.* import zio.test.* import zio.test.Assertion.* +import org.hyperledger.identus.castor.core.model.did.w3c.W3CModelHelper object W3CModelHelperSpec extends ZIOSpecDefault { diff --git a/castor/lib/core/src/test/scala/io/iohk/atala/castor/core/service/DIDServiceSpec.scala b/castor/src/test/scala/org/hyperledger/identus/castor/core/service/DIDServiceSpec.scala similarity index 93% rename from castor/lib/core/src/test/scala/io/iohk/atala/castor/core/service/DIDServiceSpec.scala rename to castor/src/test/scala/org/hyperledger/identus/castor/core/service/DIDServiceSpec.scala index ed5259dd76..3935bff5f5 100644 --- a/castor/lib/core/src/test/scala/io/iohk/atala/castor/core/service/DIDServiceSpec.scala +++ b/castor/src/test/scala/org/hyperledger/identus/castor/core/service/DIDServiceSpec.scala @@ -1,9 +1,10 @@ -package io.iohk.atala.castor.core.service +package org.hyperledger.identus.castor.core.service import com.google.protobuf.ByteString -import io.iohk.atala.castor.core.model.did.{DIDData, PrismDID, PrismDIDOperation} -import io.iohk.atala.castor.core.model.error.DIDResolutionError -import io.iohk.atala.castor.core.util.{DIDOperationValidator, GenUtils} +import org.hyperledger.identus.castor.core.model.did.{DIDData, PrismDID, PrismDIDOperation} +import org.hyperledger.identus.castor.core.model.error.DIDResolutionError +import org.hyperledger.identus.castor.core.util.{GenUtils} +import org.hyperledger.identus.castor.core.util.DIDOperationValidator import io.iohk.atala.prism.protos.common_models.{HealthCheckRequest, HealthCheckResponse} import io.iohk.atala.prism.protos.node_api import io.iohk.atala.prism.protos.node_models @@ -31,6 +32,7 @@ import zio.test.* import zio.test.Assertion.* import scala.concurrent.Future +import org.hyperledger.identus.castor.core.service.{DIDService, DIDServiceImpl} object DIDServiceSpec extends ZIOSpecDefault { @@ -43,7 +45,7 @@ object DIDServiceSpec extends ZIOSpecDefault { private def mockNodeService( createOperation: PrismDIDOperation.Create ): ULayer[node_api.NodeServiceGrpc.NodeService] = { - import io.iohk.atala.castor.core.model.ProtoModelHelper.* + import org.hyperledger.identus.castor.core.model.ProtoModelHelper.* val operationProto = createOperation.toProto val didData = node_models.DIDData( diff --git a/castor/lib/core/src/test/scala/io/iohk/atala/castor/core/util/DIDOperationValidatorSpec.scala b/castor/src/test/scala/org/hyperledger/identus/castor/core/util/DIDOperationValidatorSpec.scala similarity index 98% rename from castor/lib/core/src/test/scala/io/iohk/atala/castor/core/util/DIDOperationValidatorSpec.scala rename to castor/src/test/scala/org/hyperledger/identus/castor/core/util/DIDOperationValidatorSpec.scala index a4477f4df5..12fb2cf02a 100644 --- a/castor/lib/core/src/test/scala/io/iohk/atala/castor/core/util/DIDOperationValidatorSpec.scala +++ b/castor/src/test/scala/org/hyperledger/identus/castor/core/util/DIDOperationValidatorSpec.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.castor.core.util +package org.hyperledger.identus.castor.core.util -import io.iohk.atala.castor.core.model.did.* -import io.iohk.atala.castor.core.model.error.OperationValidationError -import io.iohk.atala.castor.core.util.DIDOperationValidator.Config -import io.iohk.atala.shared.models.Base64UrlString +import org.hyperledger.identus.castor.core.model.did.* +import org.hyperledger.identus.castor.core.model.error.OperationValidationError +import org.hyperledger.identus.castor.core.util.DIDOperationValidator.Config +import org.hyperledger.identus.shared.models.Base64UrlString import zio.* import zio.test.* import zio.test.Assertion.* diff --git a/castor/lib/core/src/test/scala/io/iohk/atala/castor/core/util/GenUtils.scala b/castor/src/test/scala/org/hyperledger/identus/castor/core/util/GenUtils.scala similarity index 90% rename from castor/lib/core/src/test/scala/io/iohk/atala/castor/core/util/GenUtils.scala rename to castor/src/test/scala/org/hyperledger/identus/castor/core/util/GenUtils.scala index f1e911498b..5113a2f015 100644 --- a/castor/lib/core/src/test/scala/io/iohk/atala/castor/core/util/GenUtils.scala +++ b/castor/src/test/scala/org/hyperledger/identus/castor/core/util/GenUtils.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.castor.core.util +package org.hyperledger.identus.castor.core.util import io.circe.Json -import io.iohk.atala.castor.core.model.did.* -import io.iohk.atala.castor.core.model.did.ServiceEndpoint.UriOrJsonEndpoint -import io.iohk.atala.castor.core.model.did.ServiceEndpoint.UriValue -import io.iohk.atala.shared.crypto.Apollo -import io.iohk.atala.shared.models.Base64UrlString +import org.hyperledger.identus.castor.core.model.did.* +import org.hyperledger.identus.castor.core.model.did.ServiceEndpoint.UriOrJsonEndpoint +import org.hyperledger.identus.castor.core.model.did.ServiceEndpoint.UriValue +import org.hyperledger.identus.shared.crypto.Apollo +import org.hyperledger.identus.shared.models.Base64UrlString import zio.* import zio.test.Gen diff --git a/prism-agent/client/.gitignore b/cloud-agent/client/.gitignore similarity index 100% rename from prism-agent/client/.gitignore rename to cloud-agent/client/.gitignore diff --git a/prism-agent/client/README.md b/cloud-agent/client/README.md similarity index 100% rename from prism-agent/client/README.md rename to cloud-agent/client/README.md diff --git a/prism-agent/client/generator/clean.sh b/cloud-agent/client/generator/clean.sh similarity index 100% rename from prism-agent/client/generator/clean.sh rename to cloud-agent/client/generator/clean.sh diff --git a/cloud-agent/client/generator/generate-clients.sh b/cloud-agent/client/generator/generate-clients.sh new file mode 100755 index 0000000000..c937a2a9c6 --- /dev/null +++ b/cloud-agent/client/generator/generate-clients.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -e + +# generate kotlin models +yarn openapi-generator-cli generate \ + -g kotlin \ + -i ../../service/api/http/cloud-agent-openapi-spec.yaml \ + -o ../kotlin \ + --ignore-file-override ../kotlin/.openapi-generator-ignore \ + --additional-properties=packageName=io.iohk.atala.prism,serializationLibrary=gson,enumPropertyNaming=UPPERCASE + +# generate typescript models +yarn openapi-generator-cli generate \ + -g typescript \ + -i ../../service/api/http/cloud-agent-openapi-spec.yaml \ + -o ../typescript \ + --ignore-file-override ../typescript/.openapi-generator-ignore + +# generate python models +# yarn openapi-generator-cli generate -g python -i oas.yml --skip-validate-spec -o ../python --ignore-file-override ../python/.openapi-generator-ignore diff --git a/prism-agent/client/generator/openapitools.json b/cloud-agent/client/generator/openapitools.json similarity index 100% rename from prism-agent/client/generator/openapitools.json rename to cloud-agent/client/generator/openapitools.json diff --git a/prism-agent/client/generator/package.json b/cloud-agent/client/generator/package.json similarity index 92% rename from prism-agent/client/generator/package.json rename to cloud-agent/client/generator/package.json index 12a07a2520..79c2bf504e 100644 --- a/prism-agent/client/generator/package.json +++ b/cloud-agent/client/generator/package.json @@ -1,5 +1,5 @@ { - "name": "prism-agent-clients-generator", + "name": "cloud-agent-clients-generator", "version": "1.0.0", "description": "Generates the clients based on the OAS for many languages", "author": "Allain Magyar", diff --git a/cloud-agent/client/generator/publish-clients.sh b/cloud-agent/client/generator/publish-clients.sh new file mode 100755 index 0000000000..820e5aa3e2 --- /dev/null +++ b/cloud-agent/client/generator/publish-clients.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -e + +AGENT_VERSION=${VERSION_TAG:13} + +# install dependencies +yarn + +# kotlin +gradle -p ../kotlin -Pversion=${AGENT_VERSION} publish + +# typescript +yarn --cwd ../typescript +yarn --cwd ../typescript publish --new-version ${AGENT_VERSION} --no-git-tag-version + +# python diff --git a/prism-agent/client/generator/yarn.lock b/cloud-agent/client/generator/yarn.lock similarity index 100% rename from prism-agent/client/generator/yarn.lock rename to cloud-agent/client/generator/yarn.lock diff --git a/prism-agent/client/kotlin/.openapi-generator-ignore b/cloud-agent/client/kotlin/.openapi-generator-ignore similarity index 100% rename from prism-agent/client/kotlin/.openapi-generator-ignore rename to cloud-agent/client/kotlin/.openapi-generator-ignore diff --git a/prism-agent/client/kotlin/build.gradle b/cloud-agent/client/kotlin/build.gradle similarity index 100% rename from prism-agent/client/kotlin/build.gradle rename to cloud-agent/client/kotlin/build.gradle diff --git a/prism-agent/client/kotlin/gradle.properties b/cloud-agent/client/kotlin/gradle.properties similarity index 100% rename from prism-agent/client/kotlin/gradle.properties rename to cloud-agent/client/kotlin/gradle.properties diff --git a/prism-agent/client/kotlin/gradle/wrapper/gradle-wrapper.jar b/cloud-agent/client/kotlin/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from prism-agent/client/kotlin/gradle/wrapper/gradle-wrapper.jar rename to cloud-agent/client/kotlin/gradle/wrapper/gradle-wrapper.jar diff --git a/prism-agent/client/kotlin/gradle/wrapper/gradle-wrapper.properties b/cloud-agent/client/kotlin/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from prism-agent/client/kotlin/gradle/wrapper/gradle-wrapper.properties rename to cloud-agent/client/kotlin/gradle/wrapper/gradle-wrapper.properties diff --git a/prism-agent/client/kotlin/gradlew b/cloud-agent/client/kotlin/gradlew similarity index 100% rename from prism-agent/client/kotlin/gradlew rename to cloud-agent/client/kotlin/gradlew diff --git a/prism-agent/client/kotlin/gradlew.bat b/cloud-agent/client/kotlin/gradlew.bat similarity index 100% rename from prism-agent/client/kotlin/gradlew.bat rename to cloud-agent/client/kotlin/gradlew.bat diff --git a/prism-agent/client/kotlin/settings.gradle b/cloud-agent/client/kotlin/settings.gradle similarity index 100% rename from prism-agent/client/kotlin/settings.gradle rename to cloud-agent/client/kotlin/settings.gradle diff --git a/prism-agent/client/kotlin/src/main/kotlin/io/iohk/atala/prism/models/CredentialSubject.kt b/cloud-agent/client/kotlin/src/main/kotlin/io/iohk/atala/prism/models/CredentialSubject.kt similarity index 96% rename from prism-agent/client/kotlin/src/main/kotlin/io/iohk/atala/prism/models/CredentialSubject.kt rename to cloud-agent/client/kotlin/src/main/kotlin/io/iohk/atala/prism/models/CredentialSubject.kt index ecd87cc164..dc0ae8c901 100644 --- a/prism-agent/client/kotlin/src/main/kotlin/io/iohk/atala/prism/models/CredentialSubject.kt +++ b/cloud-agent/client/kotlin/src/main/kotlin/io/iohk/atala/prism/models/CredentialSubject.kt @@ -13,7 +13,7 @@ "UnusedImport" ) -package io.iohk.atala.prism.models +package org.hyperledger.identus.prism.models import com.google.gson.annotations.SerializedName diff --git a/prism-agent/client/kotlin/src/main/kotlin/io/iohk/atala/prism/models/Service.kt b/cloud-agent/client/kotlin/src/main/kotlin/io/iohk/atala/prism/models/Service.kt similarity index 91% rename from prism-agent/client/kotlin/src/main/kotlin/io/iohk/atala/prism/models/Service.kt rename to cloud-agent/client/kotlin/src/main/kotlin/io/iohk/atala/prism/models/Service.kt index 95592cba35..806e3d4025 100644 --- a/prism-agent/client/kotlin/src/main/kotlin/io/iohk/atala/prism/models/Service.kt +++ b/cloud-agent/client/kotlin/src/main/kotlin/io/iohk/atala/prism/models/Service.kt @@ -13,9 +13,9 @@ "UnusedImport" ) -package io.iohk.atala.prism.models +package org.hyperledger.identus.prism.models -import io.iohk.atala.prism.models.Json +import org.hyperledger.identus.prism.models.Json import com.google.gson.annotations.SerializedName diff --git a/prism-agent/client/kotlin/src/main/kotlin/io/iohk/atala/prism/models/UpdateManagedDIDServiceAction.kt b/cloud-agent/client/kotlin/src/main/kotlin/io/iohk/atala/prism/models/UpdateManagedDIDServiceAction.kt similarity index 89% rename from prism-agent/client/kotlin/src/main/kotlin/io/iohk/atala/prism/models/UpdateManagedDIDServiceAction.kt rename to cloud-agent/client/kotlin/src/main/kotlin/io/iohk/atala/prism/models/UpdateManagedDIDServiceAction.kt index f9c1c5e2b4..494146bcf1 100644 --- a/prism-agent/client/kotlin/src/main/kotlin/io/iohk/atala/prism/models/UpdateManagedDIDServiceAction.kt +++ b/cloud-agent/client/kotlin/src/main/kotlin/io/iohk/atala/prism/models/UpdateManagedDIDServiceAction.kt @@ -13,9 +13,9 @@ "UnusedImport" ) -package io.iohk.atala.prism.models +package org.hyperledger.identus.prism.models -import io.iohk.atala.prism.models.Json +import org.hyperledger.identus.prism.models.Json import com.google.gson.annotations.SerializedName diff --git a/prism-agent/client/python/.openapi-generator-ignore b/cloud-agent/client/python/.openapi-generator-ignore similarity index 100% rename from prism-agent/client/python/.openapi-generator-ignore rename to cloud-agent/client/python/.openapi-generator-ignore diff --git a/prism-agent/client/python/setup.py b/cloud-agent/client/python/setup.py similarity index 100% rename from prism-agent/client/python/setup.py rename to cloud-agent/client/python/setup.py diff --git a/prism-agent/client/typescript/.openapi-generator-ignore b/cloud-agent/client/typescript/.openapi-generator-ignore similarity index 100% rename from prism-agent/client/typescript/.openapi-generator-ignore rename to cloud-agent/client/typescript/.openapi-generator-ignore diff --git a/prism-agent/client/typescript/models/Service.ts b/cloud-agent/client/typescript/models/Service.ts similarity index 100% rename from prism-agent/client/typescript/models/Service.ts rename to cloud-agent/client/typescript/models/Service.ts diff --git a/prism-agent/client/typescript/models/UpdateManagedDIDServiceAction.ts b/cloud-agent/client/typescript/models/UpdateManagedDIDServiceAction.ts similarity index 100% rename from prism-agent/client/typescript/models/UpdateManagedDIDServiceAction.ts rename to cloud-agent/client/typescript/models/UpdateManagedDIDServiceAction.ts diff --git a/prism-agent/client/typescript/package.json b/cloud-agent/client/typescript/package.json similarity index 100% rename from prism-agent/client/typescript/package.json rename to cloud-agent/client/typescript/package.json diff --git a/prism-agent/service/CHANGELOG.md b/cloud-agent/service/CHANGELOG.md similarity index 100% rename from prism-agent/service/CHANGELOG.md rename to cloud-agent/service/CHANGELOG.md diff --git a/prism-agent/service/README.md b/cloud-agent/service/README.md similarity index 100% rename from prism-agent/service/README.md rename to cloud-agent/service/README.md diff --git a/prism-agent/service/api/http/prism-agent-openapi-spec.yaml b/cloud-agent/service/api/http/cloud-agent-openapi-spec.yaml similarity index 64% rename from prism-agent/service/api/http/prism-agent-openapi-spec.yaml rename to cloud-agent/service/api/http/cloud-agent-openapi-spec.yaml index e21bba00ee..d0076a76b7 100644 --- a/prism-agent/service/api/http/prism-agent-openapi-spec.yaml +++ b/cloud-agent/service/api/http/cloud-agent-openapi-spec.yaml @@ -1,24 +1,24 @@ openapi: 3.0.3 info: - title: Open Enterprise Agent API Reference + title: Identus Cloud Agent API Reference version: 1.31.0 description: |2 - The Open Enterprise Agent API facilitates the integration and management of self-sovereign identity capabilities within applications. + The Identus Cloud Agent API facilitates the integration and management of self-sovereign identity capabilities within applications. It supports DID (Decentralized Identifiers) management, verifiable credential exchange, and secure messaging based on DIDComm standards. The API is designed to be interoperable with various blockchain and DLT (Distributed Ledger Technology) platforms, ensuring wide compatibility and flexibility. Key features include connection management, credential issuance and verification, and secure, privacy-preserving communication between entities. - Additional information and the full list of capabilities can be found in the [Open Enterprise Agent documentation](https://docs.atalaprism.io/docs/category/prism-cloud-agent) + Additional information and the full list of capabilities can be found in the [Identus Cloud Agent documentation](https://docs.atalaprism.io/docs/category/prism-cloud-agent) termsOfService: |2 - Users of the Open Enterprise Agent API must adhere to the terms and conditions outlined in [Link to Terms of Service](/). + Users of the Identus Cloud Agent API must adhere to the terms and conditions outlined in [Link to Terms of Service](/). This includes compliance with relevant data protection regulations, responsible usage policies, and adherence to the principles of decentralized identity management. license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0 tags: -- name: Connections Management - description: |2 + - name: Connections Management + description: |2 The __Connections Management__ endpoints facilitate the initiation of connection flows between the current Agent and peer Agents, regardless of whether they reside in Cloud Agent or edge environments. This implementation adheres to the DIDComm Messaging v2.0 - [Out of Band Messages](https://identity.foundation/didcomm-messaging/spec/v2.0/#out-of-band-messages) specification [section 9.5.4](https://identity.foundation/didcomm-messaging/spec/v2.0/#invitation) - to generate invitations. @@ -27,9 +27,9 @@ tags: Upon accepting an invitation, the invitee sends a connection request to the inviter's DIDComm messaging service endpoint. The connection request's 'type' attribute must be specified as "https://atalaprism.io/mercury/connections/1.0/request". The inviter agent responds with a connection response message, indicated by a 'type' attribute of "https://atalaprism.io/mercury/connections/1.0/response". - Both request and response types are proprietary to the Open Enterprise Agent ecosystem. -- name: Issue Credentials Protocol - description: |2 + Both request and response types are proprietary to the Identus Cloud Agent ecosystem. + - name: Issue Credentials Protocol + description: |2 The __Issue Credentials Protocol__ endpoints facilitate the initiation of credential issuance flows between the current Agent and peer Agents, regardless of whether they reside in Cloud Agent or edge environments. This implementation adheres to the [Issue Credential Protocol 3.0](https://github.com/decentralized-identity/waci-didcomm/tree/main/issue_credential) specification to execute credential issuance flows. @@ -37,8 +37,8 @@ tags: Upon accepting the received offer, the holder sends a [credential request](https://github.com/decentralized-identity/waci-didcomm/tree/main/issue_credential#request-credential) to the issuer. The issuer agent will then issue the credential (JWT or AnonCreds) and send an [issue credential](https://github.com/decentralized-identity/waci-didcomm/tree/main/issue_credential#issue-credential) message containing the verifiable credential to the holder. The current implementation only supports one of the three alternative beginnings proposed in the spec, which is "the Issuer begin with an offer". -- name: Verification - description: |2- + - name: Verification + description: |2- The __Verification__ endpoints enable the management and lookup of verification policies,which are applied to W3C Verifiable Credentials in JWT format. @@ -49,8 +49,8 @@ tags: This functionality ensures the system's integrity and adherence to specific verification requirements. Endpoints are secured by __apiKeyAuth__ or __jwtAuth__ authentication. -- name: Schema Registry - description: |2 + - name: Schema Registry + description: |2 The __Schema Registry__ is a REST API that allows to publish and lookup credential schemas in [W3C](https://w3c.github.io/vc-json-schema/) and [AnonCreds](https://hyperledger.github.io/anoncreds-spec/#term:schema) formats. @@ -72,11 +72,11 @@ tags: The __Credential Schema__ is referenced via `schemaId` field in the issuance and verification flows. Endpoints are secured by __apiKeyAuth__ or __jwtAuth__ authentication. - externalDocs: - url: https://docs.atalaprism.io/tutorials/schemas/credential-schema - description: Credential Schema documentation -- name: Credential Definition Registry - description: |2 + externalDocs: + url: https://docs.atalaprism.io/tutorials/schemas/credential-schema + description: Credential Schema documentation + - name: Credential Definition Registry + description: |2 The __Credential Definition Registry__ is a REST API that allows to publish and lookup [Anoncreds Credential Definition](https://hyperledger.github.io/anoncreds-spec/#term:credential-definition) entities. @@ -85,19 +85,19 @@ tags: The secret data includes the private keys necessary to generate signed verifiable credentials that can be presented and verified using the published credential definition. Endpoints are secured by __apiKeyAuth__ or __jwtAuth__ authentication. - externalDocs: - url: https://docs.atalaprism.io/tutorials/category/credential-definition - description: Credential Definition documentation -- name: DID - description: |2 + externalDocs: + url: https://docs.atalaprism.io/tutorials/category/credential-definition + description: Credential Definition documentation + - name: DID + description: |2 The __DID__ endpoints expose publicly available DID operations. The key distinction from the __DID Registrar__ endpoints is that it directly exposes the DID resources interfacing with the [VDR](https://www.w3.org/TR/did-core/#dfn-verifiable-data-registry). It is independent of the key management and the exposed operations are not part of the tenancy within the Agent. It serves as a proxy for interacting with the VDR, facilitating actions like resolving DIDs. -- name: DID Registrar - description: |2 + - name: DID Registrar + description: |2 The __DID Registrar__ endpoints facilitate the management of [PRISM DIDs](https://github.com/input-output-hk/prism-did-method-spec) hosted in the cloud agent. @@ -107,8 +107,8 @@ tags: These DIDs can be utilized for various operations during issuance and verification processes. More examples and tutorials can be found in this [documentation](https://docs.atalaprism.io/tutorials/category/dids/). -- name: Wallet Management - description: |2 + - name: Wallet Management + description: |2 The __Wallet Management__ endpoints enable both users and administrators to manage [wallets](https://docs.atalaprism.io/docs/concepts/multi-tenancy#wallet). @@ -121,8 +121,8 @@ tags: Wallet permissions are controlled by [UMA](https://docs.atalaprism.io/docs/concepts/glossary#uma) configuration which the agent exposes endpoints to easily configure wallet access using `uma-permissions` resource. The permissions can also be configured out-of-band directly on the external IAM provider that supports the UMA standard. -- name: System - description: |2 + - name: System + description: |2 The __System__ is a REST API that allows to check the system health and scrap the runtime metrics. @@ -132,94 +132,98 @@ tags: The __metrics__ endpoint returns the runtime metrics of the running service scraped from the internal prometheus registry. This information is collected by the prometheus server and can be used to monitor the running service. servers: -- url: http://localhost:8085 - description: Local Prism Agent -- url: http://localhost/prism-agent - description: Local Prism Agent with APISIX proxy -- url: https://k8s-dev.atalaprism.io/prism-agent - description: Prism Agent on the Staging Environment + - url: http://localhost:8085 + description: Local Prism Agent + - url: http://localhost/prism-agent + description: Local Prism Agent with APISIX proxy + - url: https://k8s-dev.atalaprism.io/prism-agent + description: Prism Agent on the Staging Environment paths: /credential-definition-registry/definitions: get: tags: - - Credential Definition Registry + - Credential Definition Registry summary: Lookup credential definitions by indexed fields - description: 'Lookup credential definitions by `author`, `name`, `tag` parameters - and control the pagination by `offset` and `limit` parameters ' + description: + "Lookup credential definitions by `author`, `name`, `tag` parameters + and control the pagination by `offset` and `limit` parameters " operationId: lookupCredentialDefinitionsByQuery parameters: - - name: author - in: query - required: false - schema: - type: string - example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff - - name: name - in: query - required: false - schema: - type: string - example: DrivingLicense - - name: version - in: query - required: false - schema: - type: string - example: 1.0.0 - - name: tag - in: query - required: false - schema: - type: string - example: licence - - name: offset - in: query - description: The number of items to skip before returning results. Default - is 0 if not specified. - required: false - schema: - type: integer - format: int32 - - name: limit - in: query - description: The maximum number of items to return. Defaults to 100 if not - specified. - required: false - schema: - type: integer - format: int32 - - name: order - in: query - required: false - schema: - type: string + - name: author + in: query + required: false + schema: + type: string + example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff + - name: name + in: query + required: false + schema: + type: string + example: DrivingLicense + - name: version + in: query + required: false + schema: + type: string + example: 1.0.0 + - name: tag + in: query + required: false + schema: + type: string + example: licence + - name: offset + in: query + description: + The number of items to skip before returning results. Default + is 0 if not specified. + required: false + schema: + type: integer + format: int32 + - name: limit + in: query + description: + The maximum number of items to return. Defaults to 100 if not + specified. + required: false + schema: + type: integer + format: int32 + - name: order + in: query + required: false + schema: + type: string responses: - '200': + "200": description: Collection of CredentialDefinitions records. content: application/json: schema: - $ref: '#/components/schemas/CredentialDefinitionResponsePage' - '400': + $ref: "#/components/schemas/CredentialDefinitionResponsePage" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] post: tags: - - Credential Definition Registry + - Credential Definition Registry summary: Publish new definition to the definition registry - description: Create the new credential definition record with metadata and internal + description: + Create the new credential definition record with metadata and internal JSON Schema on behalf of Cloud Agent. The credential definition will be signed by the keys of Cloud Agent and issued by the DID that corresponds to it. operationId: createCredentialDefinition @@ -228,209 +232,215 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CredentialDefinitionInput' + $ref: "#/components/schemas/CredentialDefinitionInput" required: true responses: - '201': + "201": description: The new credential definition record is successfully created content: application/json: schema: - $ref: '#/components/schemas/CredentialDefinitionResponse' - '400': + $ref: "#/components/schemas/CredentialDefinitionResponse" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] /credential-definition-registry/definitions/{guid}: get: tags: - - Credential Definition Registry + - Credential Definition Registry summary: Fetch the credential definition from the registry by `guid` description: Fetch the credential definition by the unique identifier operationId: getCredentialDefinitionById parameters: - - name: guid - in: path - description: Globally unique identifier of the credential definition record - required: true - schema: - type: string - format: uuid + - name: guid + in: path + description: Globally unique identifier of the credential definition record + required: true + schema: + type: string + format: uuid responses: - '200': + "200": description: CredentialDefinition found by `guid` content: application/json: schema: - $ref: '#/components/schemas/CredentialDefinitionResponse' - '400': + $ref: "#/components/schemas/CredentialDefinitionResponse" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" /credential-definition-registry/definitions/{guid}/definition: get: tags: - - Credential Definition Registry - summary: Fetch the inner definition field of the credential definition from + - Credential Definition Registry + summary: + Fetch the inner definition field of the credential definition from the registry by `guid` - description: Fetch the inner definition fields of the credential definition + description: + Fetch the inner definition fields of the credential definition by the unique identifier operationId: getCredentialDefinitionInnerDefinitionById parameters: - - name: guid - in: path - required: true - schema: - type: string - format: uuid + - name: guid + in: path + required: true + schema: + type: string + format: uuid responses: - '200': + "200": description: CredentialDefinition found by `guid` content: application/json: schema: {} - '400': + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" /schema-registry/schemas: get: tags: - - Schema Registry + - Schema Registry summary: Lookup schemas by indexed fields - description: 'Lookup schemas by `author`, `name`, `tags` parameters and control - the pagination by `offset` and `limit` parameters ' + description: + "Lookup schemas by `author`, `name`, `tags` parameters and control + the pagination by `offset` and `limit` parameters " operationId: lookupSchemasByQuery parameters: - - name: author - in: query - required: false - schema: - type: string - example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff - - name: name - in: query - required: false - schema: - type: string - example: DrivingLicense - - name: version - in: query - required: false - schema: - type: string - example: 1.0.0 - - name: tags - in: query - required: false - schema: - type: string - example: driving - - name: offset - in: query - description: The number of items to skip before returning results. Default - is 0 if not specified. - required: false - schema: - type: integer - format: int32 - - name: limit - in: query - description: The maximum number of items to return. Defaults to 100 if not - specified. - required: false - schema: - type: integer - format: int32 - - name: order - in: query - required: false - schema: - type: string + - name: author + in: query + required: false + schema: + type: string + example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff + - name: name + in: query + required: false + schema: + type: string + example: DrivingLicense + - name: version + in: query + required: false + schema: + type: string + example: 1.0.0 + - name: tags + in: query + required: false + schema: + type: string + example: driving + - name: offset + in: query + description: + The number of items to skip before returning results. Default + is 0 if not specified. + required: false + schema: + type: integer + format: int32 + - name: limit + in: query + description: + The maximum number of items to return. Defaults to 100 if not + specified. + required: false + schema: + type: integer + format: int32 + - name: order + in: query + required: false + schema: + type: string responses: - '200': + "200": description: Collection of CredentialSchema records. content: application/json: schema: - $ref: '#/components/schemas/CredentialSchemaResponsePage' - '400': + $ref: "#/components/schemas/CredentialSchemaResponsePage" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] post: tags: - - Schema Registry + - Schema Registry summary: Publish new schema to the schema registry - description: Create the new credential schema record with metadata and internal + description: + Create the new credential schema record with metadata and internal JSON Schema on behalf of Cloud Agent. The credential schema will be signed by the keys of Cloud Agent and issued by the DID that corresponds to it. operationId: createSchema @@ -439,251 +449,256 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CredentialSchemaInput' + $ref: "#/components/schemas/CredentialSchemaInput" required: true responses: - '201': + "201": description: The new credential schema record is successfully created content: application/json: schema: - $ref: '#/components/schemas/CredentialSchemaResponse' - '400': + $ref: "#/components/schemas/CredentialSchemaResponse" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] /schema-registry/{author}/{id}: put: tags: - - Schema Registry + - Schema Registry summary: Publish the new version of the credential schema to the schema registry - description: Publish the new version of the credential schema record with metadata + description: + Publish the new version of the credential schema record with metadata and internal JSON Schema on behalf of Cloud Agent. The credential schema will be signed by the keys of Cloud Agent and issued by the DID that corresponds to it. operationId: updateSchema parameters: - - name: author - in: path - description: DID of the identity which authored the credential schema. A piece - of Metadata. - required: true - schema: - type: string - - name: id - in: path - description: A locally unique identifier to address the schema. UUID is generated - by the backend. - required: true - schema: - type: string - format: uuid + - name: author + in: path + description: + DID of the identity which authored the credential schema. A piece + of Metadata. + required: true + schema: + type: string + - name: id + in: path + description: + A locally unique identifier to address the schema. UUID is generated + by the backend. + required: true + schema: + type: string + format: uuid requestBody: description: JSON object required for the credential schema update content: application/json: schema: - $ref: '#/components/schemas/CredentialSchemaInput' + $ref: "#/components/schemas/CredentialSchemaInput" required: true responses: - '200': + "200": description: The credential schema record is successfully updated content: application/json: schema: - $ref: '#/components/schemas/CredentialSchemaResponse' - '400': + $ref: "#/components/schemas/CredentialSchemaResponse" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] /schema-registry/schemas/{guid}: get: tags: - - Schema Registry + - Schema Registry summary: Fetch the schema from the registry by `guid` description: Fetch the credential schema by the unique identifier operationId: getSchemaById parameters: - - name: guid - in: path - description: Globally unique identifier of the credential schema record - required: true - schema: - type: string - format: uuid + - name: guid + in: path + description: Globally unique identifier of the credential schema record + required: true + schema: + type: string + format: uuid responses: - '200': + "200": description: CredentialSchema found by `guid` content: application/json: schema: - $ref: '#/components/schemas/CredentialSchemaResponse' - '400': + $ref: "#/components/schemas/CredentialSchemaResponse" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" /schema-registry/schemas/{guid}/schema: get: tags: - - Schema Registry + - Schema Registry summary: Fetch the schema from the registry by `guid` description: Fetch the credential schema by the unique identifier operationId: getRawSchemaById parameters: - - name: guid - in: path - required: true - schema: - type: string - format: uuid + - name: guid + in: path + required: true + schema: + type: string + format: uuid responses: - '200': + "200": description: Raw JSON response of the CredentialSchema content: application/json: schema: {} - '400': + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" /verification/policies: get: tags: - - Verification + - Verification summary: Lookup verification policies by query - description: Lookup verification policies by `name`, and control the pagination + description: + Lookup verification policies by `name`, and control the pagination by `offset` and `limit` parameters operationId: lookupVerificationPoliciesByQuery parameters: - - name: name - in: query - description: A human-readable name for the verification policy. The `name` - cannot be empty. - required: false - schema: - type: string - - name: offset - in: query - required: false - schema: - type: integer - format: int32 - - name: limit - in: query - required: false - schema: - type: integer - format: int32 - - name: order - in: query - required: false - schema: - type: string + - name: name + in: query + description: + A human-readable name for the verification policy. The `name` + cannot be empty. + required: false + schema: + type: string + - name: offset + in: query + required: false + schema: + type: integer + format: int32 + - name: limit + in: query + required: false + schema: + type: integer + format: int32 + - name: order + in: query + required: false + schema: + type: string responses: - '200': - description: '' + "200": + description: "" content: application/json: schema: - $ref: '#/components/schemas/VerificationPolicyResponsePage' - '400': + $ref: "#/components/schemas/VerificationPolicyResponsePage" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] post: tags: - - Verification + - Verification summary: Create the new verification policy description: Create the new verification policy operationId: createVerificationPolicy @@ -692,195 +707,196 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/VerificationPolicyInput' + $ref: "#/components/schemas/VerificationPolicyInput" required: true responses: - '201': + "201": description: Created verification policy entity content: application/json: schema: - $ref: '#/components/schemas/VerificationPolicyResponse' - '400': + $ref: "#/components/schemas/VerificationPolicyResponse" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] /verification/policies/{id}: get: tags: - - Verification + - Verification summary: Fetch the verification policy by id description: Get the verification policy by id operationId: getVerificationPolicyById parameters: - - name: id - in: path - description: Get the verification policy by id - required: true - schema: - type: string - format: uuid + - name: id + in: path + description: Get the verification policy by id + required: true + schema: + type: string + format: uuid responses: - '200': - description: '' + "200": + description: "" content: application/json: schema: - $ref: '#/components/schemas/VerificationPolicyResponse' - '400': + $ref: "#/components/schemas/VerificationPolicyResponse" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] put: tags: - - Verification + - Verification summary: Update the verification policy object by id description: Update the verification policy entry operationId: updateVerificationPolicy parameters: - - name: id - in: path - required: true - schema: - type: string - format: uuid - - name: nonce - in: query - description: Nonce of the previous VerificationPolicy - required: true - schema: - type: integer - format: int32 + - name: id + in: path + required: true + schema: + type: string + format: uuid + - name: nonce + in: query + description: Nonce of the previous VerificationPolicy + required: true + schema: + type: integer + format: int32 requestBody: description: Update verification policy object content: application/json: schema: - $ref: '#/components/schemas/VerificationPolicyInput' + $ref: "#/components/schemas/VerificationPolicyInput" required: true responses: - '200': - description: '' + "200": + description: "" content: application/json: schema: - $ref: '#/components/schemas/VerificationPolicyResponse' - '400': + $ref: "#/components/schemas/VerificationPolicyResponse" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] delete: tags: - - Verification + - Verification summary: Deleted the verification policy by id description: Delete the verification policy by id operationId: deleteVerificationPolicyById parameters: - - name: id - in: path - description: Delete the verification policy by id - required: true - schema: - type: string - format: uuid + - name: id + in: path + description: Delete the verification policy by id + required: true + schema: + type: string + format: uuid responses: - '200': + "200": description: Verification policy deleted successfully - '400': + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] /connections: get: tags: - - Connections Management - summary: Retrieves the list of connection flow records available from the Agent's + - Connections Management + summary: + Retrieves the list of connection flow records available from the Agent's database. description: |2 @@ -890,62 +906,67 @@ paths: Pagination support is available, allowing for efficient handling of large datasets. operationId: getConnections parameters: - - name: offset - in: query - description: The number of items to skip before returning results. Default - is 0 if not specified. - required: false - schema: - type: integer - format: int32 - - name: limit - in: query - description: The maximum number of items to return. Defaults to 100 if not - specified. - required: false - schema: - type: integer - format: int32 - - name: thid - in: query - description: The `thid`, shared between the inviter and the invitee, that - uniquely identifies a connection flow. - required: false - schema: - type: string + - name: offset + in: query + description: + The number of items to skip before returning results. Default + is 0 if not specified. + required: false + schema: + type: integer + format: int32 + - name: limit + in: query + description: + The maximum number of items to return. Defaults to 100 if not + specified. + required: false + schema: + type: integer + format: int32 + - name: thid + in: query + description: + The `thid`, shared between the inviter and the invitee, that + uniquely identifies a connection flow. + required: false + schema: + type: string responses: - '200': - description: The list of connection flow records available from the Agent's + "200": + description: + The list of connection flow records available from the Agent's database content: application/json: schema: - $ref: '#/components/schemas/ConnectionsPage' - '400': + $ref: "#/components/schemas/ConnectionsPage" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] post: tags: - - Connections Management - summary: Create a new connection invitation that can be delivered out-of-band + - Connections Management + summary: + Create a new connection invitation that can be delivered out-of-band to a peer Agent. description: |2 @@ -961,42 +982,44 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateConnectionRequest' + $ref: "#/components/schemas/CreateConnectionRequest" required: true responses: - '201': - description: The connection record was created successfully, and is returned + "201": + description: + The connection record was created successfully, and is returned in the response body. content: application/json: schema: - $ref: '#/components/schemas/Connection' - '400': + $ref: "#/components/schemas/Connection" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] /connections/{connectionId}: get: tags: - - Connections Management - summary: Retrieves a specific connection flow record from the Agent's database + - Connections Management + summary: + Retrieves a specific connection flow record from the Agent's database based on its unique `connectionId`. description: |2 @@ -1004,52 +1027,53 @@ paths: The returned item includes essential metadata such as connection ID, thread ID, state, role, participant information, and other relevant details. operationId: getConnection parameters: - - name: connectionId - in: path - description: The `connectionId` uniquely identifying the connection flow record. - required: true - schema: - type: string - format: uuid + - name: connectionId + in: path + description: The `connectionId` uniquely identifying the connection flow record. + required: true + schema: + type: string + format: uuid responses: - '200': + "200": description: The specific connection flow record. content: application/json: schema: - $ref: '#/components/schemas/Connection' - '400': + $ref: "#/components/schemas/Connection" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] /connection-invitations: post: tags: - - Connections Management - summary: Accept a new connection invitation received out-of-band from another + - Connections Management + summary: + Accept a new connection invitation received out-of-band from another peer Agent. description: |2 @@ -1060,45 +1084,46 @@ paths: A connection request will then be sent to the peer Agent to actually establish the connection, moving the record state to `ConnectionRequestSent`, and waiting the connection response from the peer Agent. operationId: acceptConnectionInvitation requestBody: - description: The request used by an invitee to accept a connection invitation + description: + The request used by an invitee to accept a connection invitation received from an inviter, using out-of-band mechanism. content: application/json: schema: - $ref: '#/components/schemas/AcceptConnectionInvitationRequest' + $ref: "#/components/schemas/AcceptConnectionInvitationRequest" required: true responses: - '200': + "200": description: The invitation was successfully accepted. content: application/json: schema: - $ref: '#/components/schemas/Connection' - '400': + $ref: "#/components/schemas/Connection" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] /dids/{didRef}: get: tags: - - DID + - DID summary: Resolve Prism DID to a W3C representation description: | Resolve Prism DID to a W3C DID document representation. @@ -1107,141 +1132,143 @@ paths: The response is implemented according to [resolver HTTP binding](https://w3c-ccg.github.io/did-resolution/#bindings-https) in the DID resolution spec. operationId: getDID parameters: - - name: didRef - in: path - description: Prism DID according to [the Prism DID method syntax](https://github.com/input-output-hk/prism-did-method-spec/blob/main/w3c-spec/PRISM-method.md#prism-did-method-syntax) - required: true - schema: - type: string - example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff + - name: didRef + in: path + description: Prism DID according to [the Prism DID method syntax](https://github.com/input-output-hk/prism-did-method-spec/blob/main/w3c-spec/PRISM-method.md#prism-did-method-syntax) + required: true + schema: + type: string + example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff responses: - '200': - description: '' + "200": + description: "" content: application/ld+json; profile=https://w3id.org/did-resolution: schema: - $ref: '#/components/schemas/DIDResolutionResult' + $ref: "#/components/schemas/DIDResolutionResult" application/did+ld+json: schema: - $ref: '#/components/schemas/DIDDocument' - '400': + $ref: "#/components/schemas/DIDDocument" + "400": description: Invalid value content: text/plain: schema: type: string - '404': - description: '' + "404": + description: "" content: application/ld+json; profile=https://w3id.org/did-resolution: schema: - $ref: '#/components/schemas/DIDResolutionResult' + $ref: "#/components/schemas/DIDResolutionResult" application/did+ld+json: schema: type: string description: Empty representation - example: '' - '406': - description: '' + example: "" + "406": + description: "" content: application/ld+json; profile=https://w3id.org/did-resolution: schema: - $ref: '#/components/schemas/DIDResolutionResult' + $ref: "#/components/schemas/DIDResolutionResult" application/did+ld+json: schema: type: string description: Empty representation - example: '' - '410': - description: '' + example: "" + "410": + description: "" content: application/ld+json; profile=https://w3id.org/did-resolution: schema: - $ref: '#/components/schemas/DIDResolutionResult' + $ref: "#/components/schemas/DIDResolutionResult" application/did+ld+json: schema: type: string description: Empty representation - example: '' - '500': - description: '' + example: "" + "500": + description: "" content: application/ld+json; profile=https://w3id.org/did-resolution: schema: - $ref: '#/components/schemas/DIDResolutionResult' + $ref: "#/components/schemas/DIDResolutionResult" application/did+ld+json: schema: type: string description: Empty representation - example: '' - '501': - description: '' + example: "" + "501": + description: "" content: application/ld+json; profile=https://w3id.org/did-resolution: schema: - $ref: '#/components/schemas/DIDResolutionResult' + $ref: "#/components/schemas/DIDResolutionResult" application/did+ld+json: schema: type: string description: Empty representation - example: '' + example: "" /did-registrar/dids: get: tags: - - DID Registrar + - DID Registrar summary: List all DIDs stored in the agent's wallet description: |- List all DIDs stored in the agent's wallet. Return a paginated items ordered by created timestamp. operationId: getDid-registrarDids parameters: - - name: offset - in: query - description: The number of items to skip before returning results. Default - is 0 if not specified. - required: false - schema: - type: integer - format: int32 - - name: limit - in: query - description: The maximum number of items to return. Defaults to 100 if not - specified. - required: false - schema: - type: integer - format: int32 + - name: offset + in: query + description: + The number of items to skip before returning results. Default + is 0 if not specified. + required: false + schema: + type: integer + format: int32 + - name: limit + in: query + description: + The maximum number of items to return. Defaults to 100 if not + specified. + required: false + schema: + type: integer + format: int32 responses: - '200': + "200": description: List the agent managed DIDs in the wallet content: application/json: schema: - $ref: '#/components/schemas/ManagedDIDPage' - '400': + $ref: "#/components/schemas/ManagedDIDPage" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] post: tags: - - DID Registrar + - DID Registrar summary: Create an unpublished PRISM DID and store it in the agent's wallet description: |- Create an unpublished PRISM DID and store it in the agent's wallet. @@ -1253,101 +1280,101 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateManagedDidRequest' + $ref: "#/components/schemas/CreateManagedDidRequest" required: true responses: - '201': + "201": description: Created an unpublished PRISM DID content: application/json: schema: - $ref: '#/components/schemas/CreateManagedDIDResponse' - '400': + $ref: "#/components/schemas/CreateManagedDIDResponse" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '422': + $ref: "#/components/schemas/ErrorResponse" + "422": description: Unable to process the request content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] /did-registrar/dids/{didRef}: get: tags: - - DID Registrar + - DID Registrar summary: Get a specific DID stored in the agent's wallet description: Get a specific DID stored in the agent's wallet operationId: getDid-registrarDidsDidref parameters: - - name: didRef - in: path - description: Prism DID according to [the Prism DID method syntax](https://github.com/input-output-hk/prism-did-method-spec/blob/main/w3c-spec/PRISM-method.md#prism-did-method-syntax) - required: true - schema: - type: string - example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff + - name: didRef + in: path + description: Prism DID according to [the Prism DID method syntax](https://github.com/input-output-hk/prism-did-method-spec/blob/main/w3c-spec/PRISM-method.md#prism-did-method-syntax) + required: true + schema: + type: string + example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff responses: - '200': + "200": description: Get a DID in the agent's wallet content: application/json: schema: - $ref: '#/components/schemas/ManagedDID' - '400': + $ref: "#/components/schemas/ManagedDID" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] /did-registrar/dids/{didRef}/publications: post: tags: - - DID Registrar + - DID Registrar summary: Publish the DID stored in the agent's wallet to the VDR description: | Initiate the publication of the DID stored in the agent's wallet to the VDR. @@ -1358,51 +1385,51 @@ paths: In case of a failed DID publication, the status is reverted to `CREATED`. operationId: postDid-registrarDidsDidrefPublications parameters: - - name: didRef - in: path - description: Prism DID according to [the Prism DID method syntax](https://github.com/input-output-hk/prism-did-method-spec/blob/main/w3c-spec/PRISM-method.md#prism-did-method-syntax) - required: true - schema: - type: string - example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff + - name: didRef + in: path + description: Prism DID according to [the Prism DID method syntax](https://github.com/input-output-hk/prism-did-method-spec/blob/main/w3c-spec/PRISM-method.md#prism-did-method-syntax) + required: true + schema: + type: string + example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff responses: - '202': + "202": description: Publishing DID to the VDR initiated content: application/json: schema: - $ref: '#/components/schemas/DIDOperationResponse' - '400': + $ref: "#/components/schemas/DIDOperationResponse" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] /did-registrar/dids/{didRef}/updates: post: tags: - - DID Registrar + - DID Registrar summary: Update DID in the agent's wallet and post update operation to the VDR description: |- Update DID in the agent's wallet and post the update operation to the VDR. @@ -1412,70 +1439,71 @@ paths: a new update request if the previous operation is not yet comfirmed. operationId: postDid-registrarDidsDidrefUpdates parameters: - - name: didRef - in: path - description: Prism DID according to [the Prism DID method syntax](https://github.com/input-output-hk/prism-did-method-spec/blob/main/w3c-spec/PRISM-method.md#prism-did-method-syntax) - required: true - schema: - type: string - example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff + - name: didRef + in: path + description: Prism DID according to [the Prism DID method syntax](https://github.com/input-output-hk/prism-did-method-spec/blob/main/w3c-spec/PRISM-method.md#prism-did-method-syntax) + required: true + schema: + type: string + example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff requestBody: content: application/json: schema: - $ref: '#/components/schemas/UpdateManagedDIDRequest' + $ref: "#/components/schemas/UpdateManagedDIDRequest" required: true responses: - '202': + "202": description: DID update operation accepted content: application/json: schema: - $ref: '#/components/schemas/DIDOperationResponse' - '400': + $ref: "#/components/schemas/DIDOperationResponse" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '409': + $ref: "#/components/schemas/ErrorResponse" + "409": description: Cannot process due to conflict with current state of the resource content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '422': + $ref: "#/components/schemas/ErrorResponse" + "422": description: Unable to process the request content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] /did-registrar/dids/{didRef}/deactivations: post: tags: - - DID Registrar - summary: Deactivate DID in the agent's wallet and post deactivate operation + - DID Registrar + summary: + Deactivate DID in the agent's wallet and post deactivate operation to the VDR description: |- Deactivate DID in the agent's wallet and post deactivate operation to the VDR. @@ -1484,58 +1512,59 @@ paths: a new deactivate request if the previous operation is not yet comfirmed. operationId: postDid-registrarDidsDidrefDeactivations parameters: - - name: didRef - in: path - description: Prism DID according to [the Prism DID method syntax](https://github.com/input-output-hk/prism-did-method-spec/blob/main/w3c-spec/PRISM-method.md#prism-did-method-syntax) - required: true - schema: - type: string - example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff + - name: didRef + in: path + description: Prism DID according to [the Prism DID method syntax](https://github.com/input-output-hk/prism-did-method-spec/blob/main/w3c-spec/PRISM-method.md#prism-did-method-syntax) + required: true + schema: + type: string + example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff responses: - '202': + "202": description: DID deactivation operation accepted content: application/json: schema: - $ref: '#/components/schemas/DIDOperationResponse' - '400': + $ref: "#/components/schemas/DIDOperationResponse" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '422': + $ref: "#/components/schemas/ErrorResponse" + "422": description: Unable to process the request content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] /issue-credentials/credential-offers: post: tags: - - Issue Credentials Protocol - summary: As a credential issuer, create a new credential offer that will be + - Issue Credentials Protocol + summary: + As a credential issuer, create a new credential offer that will be sent to a holder Agent. description: |2 @@ -1548,46 +1577,46 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateIssueCredentialRecordRequest' + $ref: "#/components/schemas/CreateIssueCredentialRecordRequest" required: true responses: - '201': + "201": description: The issue credential record. content: application/json: schema: - $ref: '#/components/schemas/IssueCredentialRecord' - '400': + $ref: "#/components/schemas/IssueCredentialRecord" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] /issue-credentials/records: get: tags: - - Issue Credentials Protocol + - Issue Credentials Protocol summary: Retrieves the list of issue credential records from the Agent's database. description: |2 @@ -1596,63 +1625,68 @@ paths: The returned items include essential metadata such as record ID, thread ID, state, role, issued credential, and other relevant details. operationId: getCredentialRecords parameters: - - name: offset - in: query - description: The number of items to skip before returning results. Default - is 0 if not specified. - required: false - schema: - type: integer - format: int32 - - name: limit - in: query - description: The maximum number of items to return. Defaults to 100 if not - specified. - required: false - schema: - type: integer - format: int32 - - name: thid - in: query - description: The thread ID associated with a specific credential issue flow - execution. - required: false - schema: - type: string + - name: offset + in: query + description: + The number of items to skip before returning results. Default + is 0 if not specified. + required: false + schema: + type: integer + format: int32 + - name: limit + in: query + description: + The maximum number of items to return. Defaults to 100 if not + specified. + required: false + schema: + type: integer + format: int32 + - name: thid + in: query + description: + The thread ID associated with a specific credential issue flow + execution. + required: false + schema: + type: string responses: - '200': - description: The list of issue credential records available found in the + "200": + description: + The list of issue credential records available found in the Agent's database. content: application/json: schema: - $ref: '#/components/schemas/IssueCredentialRecordPage' - '400': + $ref: "#/components/schemas/IssueCredentialRecordPage" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] /issue-credentials/records/{recordId}: get: tags: - - Issue Credentials Protocol - summary: Retrieves a specific issue credential flow record from the Agent's + - Issue Credentials Protocol + summary: + Retrieves a specific issue credential flow record from the Agent's database based on its unique `recordId`. description: |2 @@ -1661,52 +1695,54 @@ paths: The returned items include essential metadata such as record ID, thread ID, state, role, issued credential, and other relevant details. operationId: getCredentialRecord parameters: - - name: recordId - in: path - description: The `recordId` uniquely identifying the issue credential flow - record. - required: true - schema: - type: string + - name: recordId + in: path + description: + The `recordId` uniquely identifying the issue credential flow + record. + required: true + schema: + type: string responses: - '200': + "200": description: The specific issue credential flow record. content: application/json: schema: - $ref: '#/components/schemas/IssueCredentialRecord' - '400': + $ref: "#/components/schemas/IssueCredentialRecord" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] /issue-credentials/records/{recordId}/accept-offer: post: tags: - - Issue Credentials Protocol - summary: As a holder, accept a new credential offer received from another issuer + - Issue Credentials Protocol + summary: + As a holder, accept a new credential offer received from another issuer Agent. description: |2 @@ -1714,60 +1750,63 @@ paths: The subsequent credential request message sent to the issuer adheres to the [Issue Credential Protocol 3.0 - Request Credential](https://github.com/decentralized-identity/waci-didcomm/tree/main/issue_credential#request-credential) specification. operationId: acceptCredentialOffer parameters: - - name: recordId - in: path - description: The `recordId` uniquely identifying the issue credential flow - record. - required: true - schema: - type: string + - name: recordId + in: path + description: + The `recordId` uniquely identifying the issue credential flow + record. + required: true + schema: + type: string requestBody: description: The accept credential offer request object. content: application/json: schema: - $ref: '#/components/schemas/AcceptCredentialOfferRequest' + $ref: "#/components/schemas/AcceptCredentialOfferRequest" required: true responses: - '200': - description: The issue credential offer was successfully accepted, and the + "200": + description: + The issue credential offer was successfully accepted, and the updated record is returned in the response body. content: application/json: schema: - $ref: '#/components/schemas/IssueCredentialRecord' - '400': + $ref: "#/components/schemas/IssueCredentialRecord" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] /issue-credentials/records/{recordId}/issue-credential: post: tags: - - Issue Credentials Protocol - summary: As an issuer, issues the verifiable credential related the identified + - Issue Credentials Protocol + summary: + As an issuer, issues the verifiable credential related the identified issuance flow record. description: |2 @@ -1776,15 +1815,16 @@ paths: Note that this endpoint should only be called when automatic issuance is disabled for this record (i.e. `automaticIssuance` attribute set to `false` at offer creation time). operationId: issueCredential parameters: - - name: recordId - in: path - description: The `recordId` uniquely identifying the issue credential flow - record. - required: true - schema: - type: string + - name: recordId + in: path + description: + The `recordId` uniquely identifying the issue credential flow + record. + required: true + schema: + type: string responses: - '200': + "200": description: |2 The issue credential request was successfully processed, and the updated record is returned in the response body. @@ -1792,176 +1832,181 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/IssueCredentialRecord' - '400': + $ref: "#/components/schemas/IssueCredentialRecord" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] /credential-status/{id}: get: tags: - - Credential status list + - Credential status list summary: Fetch credential status list by its ID description: Fetch credential status list by its ID operationId: getCredentialStatusListEndpoint parameters: - - name: id - in: path - description: Globally unique identifier of the credential status list - required: true - schema: - type: string - format: uuid + - name: id + in: path + description: Globally unique identifier of the credential status list + required: true + schema: + type: string + format: uuid responses: - '200': + "200": description: Status List credential with embedded proof found by ID content: application/json: schema: - $ref: '#/components/schemas/StatusListCredential' - '400': + $ref: "#/components/schemas/StatusListCredential" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" /credential-status/revoke-credential/{id}: patch: tags: - - Credential status list + - Credential status list summary: Revoke a credential by its ID - description: Marks credential to be ready for revocation, it will be revoked + description: + Marks credential to be ready for revocation, it will be revoked automatically operationId: patchCredential-statusRevoke-credentialId parameters: - - name: id - in: path - description: Revoke a credential by its ID - required: true - schema: - type: string + - name: id + in: path + description: Revoke a credential by its ID + required: true + schema: + type: string responses: - '200': - description: '' - '400': + "200": + description: "" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] /present-proof/presentations: get: tags: - - Present Proof + - Present Proof summary: Gets the list of proof presentation records. description: list of presentation statuses operationId: getAllPresentation parameters: - - name: offset - in: query - description: The number of items to skip before returning results. Default - is 0 if not specified. - required: false - schema: - type: integer - format: int32 - - name: limit - in: query - description: The maximum number of items to return. Defaults to 100 if not - specified. - required: false - schema: - type: integer - format: int32 - - name: thid - in: query - required: false - schema: - type: string + - name: offset + in: query + description: + The number of items to skip before returning results. Default + is 0 if not specified. + required: false + schema: + type: integer + format: int32 + - name: limit + in: query + description: + The maximum number of items to return. Defaults to 100 if not + specified. + required: false + schema: + type: integer + format: int32 + - name: thid + in: query + required: false + schema: + type: string responses: - '200': + "200": description: The list of proof presentation records. content: application/json: schema: - $ref: '#/components/schemas/PresentationStatusPage' - '400': + $ref: "#/components/schemas/PresentationStatusPage" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] post: tags: - - Present Proof - summary: As a Verifier, create a new proof presentation request and send it + - Present Proof + summary: + As a Verifier, create a new proof presentation request and send it to the Prover. - description: Holder presents proof derived from the verifiable credential to + description: + Holder presents proof derived from the verifiable credential to verifier. operationId: requestPresentation requestBody: @@ -1969,259 +2014,266 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RequestPresentationInput' + $ref: "#/components/schemas/RequestPresentationInput" required: true responses: - '201': - description: The proof presentation request was created successfully and + "201": + description: + The proof presentation request was created successfully and will be sent asynchronously to the Prover. content: application/json: schema: - $ref: '#/components/schemas/PresentationStatus' - '400': + $ref: "#/components/schemas/PresentationStatus" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] /present-proof/presentations/{presentationId}: get: tags: - - Present Proof - summary: Gets an existing proof presentation record by its unique identifier. + - Present Proof + summary: + Gets an existing proof presentation record by its unique identifier. More information on the error can be found in the response body. description: Returns an existing presentation record by id. operationId: getPresentation parameters: - - name: presentationId - in: path - description: The unique identifier of the presentation record. - required: true - schema: - type: string - format: uuid + - name: presentationId + in: path + description: The unique identifier of the presentation record. + required: true + schema: + type: string + format: uuid responses: - '200': + "200": description: The proof presentation record. content: application/json: schema: - $ref: '#/components/schemas/PresentationStatus' - '400': + $ref: "#/components/schemas/PresentationStatus" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] patch: tags: - - Present Proof - summary: Updates the proof presentation record matching the unique identifier, + - Present Proof + summary: + Updates the proof presentation record matching the unique identifier, with the specific action to perform. description: Accept or reject presentation of proof request. operationId: updatePresentation parameters: - - name: presentationId - in: path - description: The unique identifier of the presentation record. - required: true - schema: - type: string - format: uuid + - name: presentationId + in: path + description: The unique identifier of the presentation record. + required: true + schema: + type: string + format: uuid requestBody: description: The action to perform on the proof presentation record. content: application/json: schema: - $ref: '#/components/schemas/RequestPresentationAction' + $ref: "#/components/schemas/RequestPresentationAction" required: true responses: - '200': + "200": description: The proof presentation record was successfully updated. content: application/json: schema: - $ref: '#/components/schemas/PresentationStatus' - '400': + $ref: "#/components/schemas/PresentationStatus" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] /_system/health: get: tags: - - System + - System summary: Check the health status of the running service description: Returns the health info object of the running service operationId: systemHealth responses: - '200': + "200": description: The health info object. content: application/json: schema: - $ref: '#/components/schemas/HealthInfo' - '400': + $ref: "#/components/schemas/HealthInfo" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" /_system/metrics: get: tags: - - System + - System summary: Collect the runtime metrics of the running service - description: Returns the metrics of the running service from the internal Prometheus + description: + Returns the metrics of the running service from the internal Prometheus registry operationId: systemMetrics responses: - '200': + "200": description: The metrics as plain strings. content: text/plain: schema: type: string - '400': + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" /iam/entities: get: tags: - - Identity and Access Management + - Identity and Access Management summary: Get all entities - description: 'Get all entities with the pagination by `offset` and `limit` parameters ' + description: "Get all entities with the pagination by `offset` and `limit` parameters " operationId: getAllEntities parameters: - - name: offset - in: query - description: The number of items to skip before returning results. Default - is 0 if not specified. - required: false - schema: - type: integer - format: int32 - - name: limit - in: query - description: The maximum number of items to return. Defaults to 100 if not - specified. - required: false - schema: - type: integer - format: int32 + - name: offset + in: query + description: + The number of items to skip before returning results. Default + is 0 if not specified. + required: false + schema: + type: integer + format: int32 + - name: limit + in: query + description: + The maximum number of items to return. Defaults to 100 if not + specified. + required: false + schema: + type: integer + format: int32 responses: - '200': + "200": description: Collection of Entity records content: application/json: schema: - $ref: '#/components/schemas/EntityResponsePage' - '400': + $ref: "#/components/schemas/EntityResponsePage" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - adminApiKeyAuth: [] - - jwtAuth: [] + - adminApiKeyAuth: [] + - jwtAuth: [] post: tags: - - Identity and Access Management + - Identity and Access Management summary: Create a new entity record - description: Create the new entity record. The entity record is a representation + description: + Create the new entity record. The entity record is a representation of the account in the system. operationId: createEntity requestBody: @@ -2229,249 +2281,249 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateEntityRequest' + $ref: "#/components/schemas/CreateEntityRequest" required: true responses: - '201': + "201": description: The new entity is successfully created content: application/json: schema: - $ref: '#/components/schemas/EntityResponse' - '400': + $ref: "#/components/schemas/EntityResponse" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - adminApiKeyAuth: [] - - jwtAuth: [] + - adminApiKeyAuth: [] + - jwtAuth: [] /iam/entities/{id}/name: put: tags: - - Identity and Access Management + - Identity and Access Management summary: Update the entity record name by `id` description: Update the entity record name by `id` operationId: updateEntityName parameters: - - name: id - in: path - required: true - schema: - type: string - format: uuid + - name: id + in: path + required: true + schema: + type: string + format: uuid requestBody: description: JSON object required for the entity name update content: application/json: schema: - $ref: '#/components/schemas/UpdateEntityNameRequest' + $ref: "#/components/schemas/UpdateEntityNameRequest" required: true responses: - '200': + "200": description: The entity record is successfully updated content: application/json: schema: - $ref: '#/components/schemas/EntityResponse' - '400': + $ref: "#/components/schemas/EntityResponse" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - adminApiKeyAuth: [] - - jwtAuth: [] + - adminApiKeyAuth: [] + - jwtAuth: [] /iam/entities/{id}/walletId: put: tags: - - Identity and Access Management + - Identity and Access Management summary: Update the entity record `walletId` by `id` description: Update the entity record `walletId` field by `id` operationId: updateEntityWalletId parameters: - - name: id - in: path - required: true - schema: - type: string - format: uuid + - name: id + in: path + required: true + schema: + type: string + format: uuid requestBody: description: JSON object required for the entity walletId update content: application/json: schema: - $ref: '#/components/schemas/UpdateEntityWalletIdRequest' + $ref: "#/components/schemas/UpdateEntityWalletIdRequest" required: true responses: - '200': + "200": description: The entity record is successfully updated content: application/json: schema: - $ref: '#/components/schemas/EntityResponse' - '400': + $ref: "#/components/schemas/EntityResponse" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - adminApiKeyAuth: [] - - jwtAuth: [] + - adminApiKeyAuth: [] + - jwtAuth: [] /iam/entities/{id}: get: tags: - - Identity and Access Management + - Identity and Access Management summary: Get the entity by the `id` description: Get the entity by the unique identifier operationId: getEntityById parameters: - - name: id - in: path - description: Identifier of the entity - required: true - schema: - type: string - format: uuid + - name: id + in: path + description: Identifier of the entity + required: true + schema: + type: string + format: uuid responses: - '200': + "200": description: Entity found by `id` content: application/json: schema: - $ref: '#/components/schemas/EntityResponse' - '400': + $ref: "#/components/schemas/EntityResponse" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - adminApiKeyAuth: [] - - jwtAuth: [] + - adminApiKeyAuth: [] + - jwtAuth: [] delete: tags: - - Identity and Access Management + - Identity and Access Management summary: Delete the entity by `id` description: Delete the entity by the unique identifier operationId: deleteEntityById parameters: - - name: id - in: path - description: Identifier of the entity - required: true - schema: - type: string - format: uuid + - name: id + in: path + description: Identifier of the entity + required: true + schema: + type: string + format: uuid responses: - '200': + "200": description: Entity deleted successfully - '400': + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - adminApiKeyAuth: [] - - jwtAuth: [] + - adminApiKeyAuth: [] + - jwtAuth: [] /iam/apikey-authentication: post: tags: - - Identity and Access Management + - Identity and Access Management summary: Register the `apikey` for the entity description: Register the `apikey` for the entity. operationId: addEntityApiKeyAuthentication @@ -2480,41 +2532,41 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ApiKeyAuthenticationRequest' + $ref: "#/components/schemas/ApiKeyAuthenticationRequest" required: true responses: - '201': + "201": description: The new `apikey` is successfully registered for the entity - '400': + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - adminApiKeyAuth: [] - - jwtAuth: [] + - adminApiKeyAuth: [] + - jwtAuth: [] delete: tags: - - Identity and Access Management + - Identity and Access Management summary: Unregister the `apikey` for the entity description: Unregister the `apikey` for the entity. operationId: deleteEntityApiKeyAuthentication @@ -2523,97 +2575,101 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ApiKeyAuthenticationRequest' + $ref: "#/components/schemas/ApiKeyAuthenticationRequest" required: true responses: - '200': + "200": description: The new `apikey` is successfully unregistered for the entity - '400': + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - adminApiKeyAuth: [] - - jwtAuth: [] + - adminApiKeyAuth: [] + - jwtAuth: [] /wallets: get: tags: - - Wallet Management + - Wallet Management summary: List all permitted wallets - description: List all permitted wallets. If the role is admin, returns all the + description: + List all permitted wallets. If the role is admin, returns all the wallets. If the role is tenant, only return permitted wallets. operationId: getWallets parameters: - - name: offset - in: query - description: The number of items to skip before returning results. Default - is 0 if not specified. - required: false - schema: - type: integer - format: int32 - - name: limit - in: query - description: The maximum number of items to return. Defaults to 100 if not - specified. - required: false - schema: - type: integer - format: int32 + - name: offset + in: query + description: + The number of items to skip before returning results. Default + is 0 if not specified. + required: false + schema: + type: integer + format: int32 + - name: limit + in: query + description: + The maximum number of items to return. Defaults to 100 if not + specified. + required: false + schema: + type: integer + format: int32 responses: - '200': + "200": description: Successfully list all permitted wallets content: application/json: schema: - $ref: '#/components/schemas/WalletDetailPage' - '400': + $ref: "#/components/schemas/WalletDetailPage" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - adminApiKeyAuth: [] - - apiKeyAuth: [] - - jwtAuth: [] + - adminApiKeyAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] post: tags: - - Wallet Management + - Wallet Management summary: Create a new wallet - description: "Create a new wallet with the option to provide the seed.\nThe\ + description: + "Create a new wallet with the option to provide the seed.\nThe\ \ seed will be used for all PRISM DID keypair derivation within the wallet.\n\ \nIf the role is admin, a wallet can be created at any time.\nIf the role\ \ is tenant, a wallet can only be created if there is no existing wallet permission\ @@ -2624,312 +2680,317 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateWalletRequest' + $ref: "#/components/schemas/CreateWalletRequest" required: true responses: - '201': + "201": description: Successfully create a new wallet content: application/json: schema: - $ref: '#/components/schemas/WalletDetail' - '400': + $ref: "#/components/schemas/WalletDetail" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - adminApiKeyAuth: [] - - apiKeyAuth: [] - - jwtAuth: [] + - adminApiKeyAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] /wallets/{walletId}: get: tags: - - Wallet Management + - Wallet Management summary: Get the wallet by ID - description: Get the wallet by ID. If the role is tenant, only search the ID + description: + Get the wallet by ID. If the role is tenant, only search the ID of permitted wallets. operationId: getWalletsWalletid parameters: - - name: walletId - in: path - required: true - schema: - type: string - format: uuid + - name: walletId + in: path + required: true + schema: + type: string + format: uuid responses: - '200': + "200": description: Successfully get the wallet content: application/json: schema: - $ref: '#/components/schemas/WalletDetail' - '400': + $ref: "#/components/schemas/WalletDetail" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - adminApiKeyAuth: [] - - apiKeyAuth: [] - - jwtAuth: [] + - adminApiKeyAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] /wallets/{walletId}/uma-permissions: post: tags: - - Wallet Management - summary: Create a UMA resource permission on an authorization server for the + - Wallet Management + summary: + Create a UMA resource permission on an authorization server for the wallet. - description: "Create a UMA resource permission on an authorization server for\ + description: + "Create a UMA resource permission on an authorization server for\ \ the wallet.\nThis grants the wallet permission to the specified `subject`,\ \ where the `subject` denotes the identity of the tenant on an authorization\ \ server.\n " operationId: createWalletUmaPermission parameters: - - name: walletId - in: path - required: true - schema: - type: string - format: uuid + - name: walletId + in: path + required: true + schema: + type: string + format: uuid requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateWalletUmaPermissionRequest' + $ref: "#/components/schemas/CreateWalletUmaPermissionRequest" required: true responses: - '200': + "200": description: UMA resource permission is created on an authorization server - '400': + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - adminApiKeyAuth: [] - - apiKeyAuth: [] - - jwtAuth: [] + - adminApiKeyAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] delete: tags: - - Wallet Management - summary: Delete a UMA resource permission on an authorization server for the + - Wallet Management + summary: + Delete a UMA resource permission on an authorization server for the wallet. - description: "Remove a UMA resource permission on an authorization server for\ + description: + "Remove a UMA resource permission on an authorization server for\ \ the wallet.\nThis remove the wallet permission to the specified `subject`,\ \ where the `subject` denotes the identity of the tenant on an authorization\ \ server.\n " operationId: deleteWalletUmaPermission parameters: - - name: walletId - in: path - required: true - schema: - type: string - format: uuid - - name: subject - in: query - required: true - schema: - type: string - format: uuid + - name: walletId + in: path + required: true + schema: + type: string + format: uuid + - name: subject + in: query + required: true + schema: + type: string + format: uuid responses: - '200': + "200": description: UMA resource permission is removed from an authorization server. - '400': + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - adminApiKeyAuth: [] - - apiKeyAuth: [] - - jwtAuth: [] + - adminApiKeyAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] /events/webhooks: get: tags: - - Events + - Events summary: List wallet webhook notifications operationId: getEventsWebhooks responses: - '200': + "200": description: List wallet webhook notifications content: application/json: schema: - $ref: '#/components/schemas/WebhookNotificationPage' - '400': + $ref: "#/components/schemas/WebhookNotificationPage" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] post: tags: - - Events + - Events summary: Create wallet webhook notifications operationId: postEventsWebhooks requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateWebhookNotification' + $ref: "#/components/schemas/CreateWebhookNotification" required: true responses: - '200': + "200": description: Webhook notification has been created successfully content: application/json: schema: - $ref: '#/components/schemas/WebhookNotification' - '400': + $ref: "#/components/schemas/WebhookNotification" + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '409': + $ref: "#/components/schemas/ErrorResponse" + "409": description: Cannot process due to conflict with current state of the resource content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] /events/webhooks/{id}: delete: tags: - - Events + - Events summary: Delete the wallet webhook notification by `id` operationId: deleteEventsWebhooksId parameters: - - name: id - in: path - description: ID of the webhook notification to delete. - required: true - schema: - type: string - format: uuid + - name: id + in: path + description: ID of the webhook notification to delete. + required: true + schema: + type: string + format: uuid responses: - '200': + "200": description: Webhook notification has been deleted. - '400': + "400": description: Invalid request parameters content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '403': + $ref: "#/components/schemas/ErrorResponse" + "403": description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '404': + $ref: "#/components/schemas/ErrorResponse" + "404": description: Resource could not be found content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - '500': + $ref: "#/components/schemas/ErrorResponse" + "500": description: Internal server error content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: "#/components/schemas/ErrorResponse" security: - - apiKeyAuth: [] - - jwtAuth: [] + - apiKeyAuth: [] + - jwtAuth: [] components: schemas: AcceptConnectionInvitationRequest: required: - - invitation + - invitation type: object properties: invitation: @@ -2949,15 +3010,15 @@ components: ActionType: type: string enum: - - ADD_KEY - - ADD_SERVICE - - PATCH_CONTEXT - - REMOVE_KEY - - REMOVE_SERVICE - - UPDATE_SERVICE + - ADD_KEY + - ADD_SERVICE + - PATCH_CONTEXT + - REMOVE_KEY + - REMOVE_SERVICE + - UPDATE_SERVICE AnoncredCredentialProofV1: required: - - credential + - credential type: object properties: credential: @@ -2976,8 +3037,9 @@ components: credentialProofs: type: array items: - $ref: '#/components/schemas/AnoncredCredentialProofV1' - description: A list of proofs from the Anoncred library, each corresponding + $ref: "#/components/schemas/AnoncredCredentialProofV1" + description: + A list of proofs from the Anoncred library, each corresponding to a credential. AnoncredNonRevokedIntervalV1: type: object @@ -2990,17 +3052,17 @@ components: format: int32 AnoncredPresentationRequestV1: required: - - requested_attributes - - requested_predicates - - name - - nonce - - version + - requested_attributes + - requested_predicates + - name + - nonce + - version type: object properties: requested_attributes: - $ref: '#/components/schemas/Map_AnoncredRequestedAttributeV1' + $ref: "#/components/schemas/Map_AnoncredRequestedAttributeV1" requested_predicates: - $ref: '#/components/schemas/Map_AnoncredRequestedPredicateV1' + $ref: "#/components/schemas/Map_AnoncredRequestedPredicateV1" name: type: string nonce: @@ -3008,15 +3070,16 @@ components: version: type: string non_revoked: - $ref: '#/components/schemas/AnoncredNonRevokedIntervalV1' + $ref: "#/components/schemas/AnoncredNonRevokedIntervalV1" description: Anoncred Presentation Request - example: AnoncredPresentationRequestV1(Map(attribute1 -> AnoncredRequestedAttributeV1(Attribute + example: + AnoncredPresentationRequestV1(Map(attribute1 -> AnoncredRequestedAttributeV1(Attribute 1,List(Map(cred_def_id -> credential_definition_id_of_attribute1)),Some(AnoncredNonRevokedIntervalV1(Some(1635734400),Some(1735734400))))),Map(predicate1 -> AnoncredRequestedPredicateV1(Predicate 1,>=,18,List(Map(schema_id -> schema_id_of_predicate1)),Some(AnoncredNonRevokedIntervalV1(Some(1635734400),None)))),Example Presentation Request,1234567890,1.0,None) AnoncredRequestedAttributeV1: required: - - name + - name type: object properties: name: @@ -3024,14 +3087,14 @@ components: restrictions: type: array items: - $ref: '#/components/schemas/Map_String' + $ref: "#/components/schemas/Map_String" non_revoked: - $ref: '#/components/schemas/AnoncredNonRevokedIntervalV1' + $ref: "#/components/schemas/AnoncredNonRevokedIntervalV1" AnoncredRequestedPredicateV1: required: - - name - - p_type - - p_value + - name + - p_type + - p_value type: object properties: name: @@ -3044,13 +3107,13 @@ components: restrictions: type: array items: - $ref: '#/components/schemas/Map_String' + $ref: "#/components/schemas/Map_String" non_revoked: - $ref: '#/components/schemas/AnoncredNonRevokedIntervalV1' + $ref: "#/components/schemas/AnoncredNonRevokedIntervalV1" ApiKeyAuthenticationRequest: required: - - entityId - - apiKey + - entityId + - apiKey type: object properties: entityId: @@ -3072,22 +3135,22 @@ components: items: {} Bool: required: - - value + - value type: object properties: value: type: boolean Connection: required: - - connectionId - - thid - - role - - state - - invitation - - createdAt - - metaRetries - - self - - kind + - connectionId + - thid + - role + - state + - invitation + - createdAt + - metaRetries + - self + - kind type: object properties: connectionId: @@ -3097,7 +3160,8 @@ components: example: 0527aea1-d131-3948-a34d-03af39aba8b4 thid: type: string - description: The unique identifier of the thread this connection record + description: + The unique identifier of the thread this connection record belongs to. The value will identical on both sides of the connection (inviter and invitee) example: 0527aea1-d131-3948-a34d-03af39aba8b4 @@ -3107,23 +3171,27 @@ components: example: Peter goalCode: type: string - description: A self-attested code the receiver may want to display to the + description: + A self-attested code the receiver may want to display to the user or use in automatically deciding what to do with the out-of-band message. example: issue-vc goal: type: string - description: A self-attested string that the receiver may want to display + description: + A self-attested string that the receiver may want to display to the user about the context-specific goal of the out-of-band message. example: To issue a Faber College Graduate credential myDid: type: string - description: The DID representing me as the inviter or invitee in this specific + description: + The DID representing me as the inviter or invitee in this specific connection. example: did:peer:12345 theirDid: type: string - description: The DID representing the other peer as the an inviter or invitee + description: + The DID representing the other peer as the an inviter or invitee in this specific connection. example: did:peer:67890 role: @@ -3131,26 +3199,26 @@ components: description: The role played by the Prism agent in the connection flow. example: Inviter enum: - - Inviter - - Invitee + - Inviter + - Invitee state: type: string description: The current state of the connection protocol execution. example: InvitationGenerated enum: - - InvitationGenerated - - InvitationReceived - - ConnectionRequestPending - - ConnectionRequestSent - - ConnectionRequestReceived - - ConnectionResponsePending - - ConnectionResponseSent - - ConnectionResponseReceived - - ProblemReportPending - - ProblemReportSent - - ProblemReportReceived + - InvitationGenerated + - InvitationReceived + - ConnectionRequestPending + - ConnectionRequestSent + - ConnectionRequestReceived + - ConnectionResponsePending + - ConnectionResponseSent + - ConnectionResponseReceived + - ProblemReportPending + - ProblemReportSent + - ProblemReportReceived invitation: - $ref: '#/components/schemas/ConnectionInvitation' + $ref: "#/components/schemas/ConnectionInvitation" createdAt: type: string description: The date and time the connection record was created. @@ -3163,7 +3231,8 @@ components: example: 2022-03-10T12:00Z metaRetries: type: integer - description: The maximum background processing attempts remaining for this + description: + The maximum background processing attempts remaining for this record format: int32 example: 5 @@ -3177,74 +3246,84 @@ components: example: Connection ConnectionInvitation: required: - - id - - type - - from - - invitationUrl + - id + - type + - from + - invitationUrl type: object properties: id: type: string - description: The unique identifier of the invitation. It should be used + description: + The unique identifier of the invitation. It should be used as parent thread ID (pthid) for the Connection Request message that follows. format: uuid example: 0527aea1-d131-3948-a34d-03af39aba8b4 type: type: string - description: The DIDComm Message Type URI (MTURI) the invitation message + description: + The DIDComm Message Type URI (MTURI) the invitation message complies with. example: https://didcomm.org/out-of-band/2.0/invitation from: type: string - description: The DID representing the sender to be used by recipients for + description: + The DID representing the sender to be used by recipients for future interactions. example: did:peer:1234457 invitationUrl: type: string - description: The invitation message encoded as a URL. This URL follows the + description: + The invitation message encoded as a URL. This URL follows the Out of [Band 2.0 protocol](https://identity.foundation/didcomm-messaging/spec/v2.0/#out-of-band-messages) and can be used to generate a QR code for example. example: https://my.domain.com/path?_oob=eyJAaWQiOiIzZmE4NWY2NC01NzE3LTQ1NjItYjNmYy0yYzk2M2Y2NmFmYTYiLCJAdHlwZSI6Imh0dHBzOi8vZGlkY29tbS5vcmcvbXktZmFtaWx5LzEuMC9teS1tZXNzYWdlLXR5cGUiLCJkaWQiOiJXZ1d4cXp0ck5vb0c5MlJYdnhTVFd2IiwiaW1hZ2VVcmwiOiJodHRwOi8vMTkyLjE2OC41Ni4xMDEvaW1nL2xvZ28uanBnIiwibGFiZWwiOiJCb2IiLCJyZWNpcGllbnRLZXlzIjpbIkgzQzJBVnZMTXY2Z21NTmFtM3VWQWpacGZrY0pDd0R3blpuNnozd1htcVBWIl0sInJvdXRpbmdLZXlzIjpbIkgzQzJBVnZMTXY2Z21NTmFtM3VWQWpacGZrY0pDd0R3blpuNnozd1htcVBWIl0sInNlcnZpY2VFbmRwb2ludCI6Imh0dHA6Ly8xOTIuMTY4LjU2LjEwMTo4MDIwIn0= description: The invitation for this connection ConnectionsPage: required: - - kind - - self - - pageOf + - kind + - self + - pageOf type: object properties: contents: type: array items: - $ref: '#/components/schemas/Connection' - description: "\nArray of resources (Connection)\nA sequence of Connection\ + $ref: "#/components/schemas/Connection" + description: + "\nArray of resources (Connection)\nA sequence of Connection\ \ resources representing the list of connections that the paginated response\ \ contains.\n " example: [] kind: type: string - description: A string that identifies the type of resource being returned + description: + A string that identifies the type of resource being returned in the response. example: ConnectionsPage self: type: string - description: The URL that uniquely identifies the resource being returned + description: + The URL that uniquely identifies the resource being returned in the response. example: /prism-agent/connections?offset=10&limit=10 pageOf: type: string - description: A string field indicating the type of resource that the contents + description: + A string field indicating the type of resource that the contents field contains. - example: '' + example: "" next: type: string - description: An optional string field containing the URL of the next page + description: + An optional string field containing the URL of the next page of results. If the API response does not contain any more pages, this field should be set to None. example: /prism-agent/connections?offset=20&limit=10 previous: type: string - description: An optional string field containing the URL of the previous + description: + An optional string field containing the URL of the previous page of results. If the API response is the first page of results, this field should be set to None. example: /prism-agent/connections?offset=0&limit=10 @@ -3257,48 +3336,54 @@ components: example: Peter goalCode: type: string - description: A self-attested code the receiver may want to display to the + description: + A self-attested code the receiver may want to display to the user or use in automatically deciding what to do with the out-of-band message. example: issue-vc goal: type: string - description: A self-attested string that the receiver may want to display + description: + A self-attested string that the receiver may want to display to the user about the context-specific goal of the out-of-band message. example: To issue a Faber College Graduate credential CreateEntityRequest: required: - - name + - name type: object properties: id: type: string - description: The new `id` of the entity to be created. If this field is + description: + The new `id` of the entity to be created. If this field is not provided, the server will generate a new UUID for the entity format: uuid example: 00000000-0000-0000-0000-000000000000 name: type: string - description: The new `name` of the entity to be created. If this field is + description: + The new `name` of the entity to be created. If this field is not provided, the server will generate a random name for the entity example: John Doe minLength: 1 maxLength: 128 walletId: type: string - description: The new `walletId` of the entity to be created. If this field + description: + The new `walletId` of the entity to be created. If this field is not provided, the server will set the default `walletId` format: uuid example: 00000000-0000-0000-0000-000000000000 CreateIssueCredentialRecordRequest: required: - - claims - - connectionId + - claims + - connectionId type: object properties: validityPeriod: type: number - description: The validity period in seconds of the verifiable credential + description: + The validity period in seconds of the verifiable credential that will be issued. format: double example: 3600.0 @@ -3356,7 +3441,7 @@ components: example: d9569cec-c81e-4779-aa86-0d5994d82676 CreateManagedDIDResponse: required: - - longFormDid + - longFormDid type: object properties: longFormDid: @@ -3365,22 +3450,22 @@ components: example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff:Cr4BCrsBElsKBmF1dGgtMRAEQk8KCXNlY3AyNTZrMRIg0opTuxu-zt6aRbT1tPniG4eu4CYsQPM3rrLzvzNiNgwaIIFTnyT2N4U7qCQ78qtWC3-p0el6Hvv8qxG5uuEw-WgMElwKB21hc3RlcjAQAUJPCglzZWNwMjU2azESIKhBU0eCOO6Vinz_8vhtFSAhYYqrkEXC8PHGxkuIUev8GiAydFHLXb7c22A1Uj_PR21NZp6BCDQqNq2xd244txRgsQ CreateManagedDidRequest: required: - - documentTemplate + - documentTemplate type: object properties: documentTemplate: - $ref: '#/components/schemas/CreateManagedDidRequestDocumentTemplate' + $ref: "#/components/schemas/CreateManagedDidRequestDocumentTemplate" CreateManagedDidRequestDocumentTemplate: type: object properties: publicKeys: type: array items: - $ref: '#/components/schemas/ManagedDIDKeyTemplate' + $ref: "#/components/schemas/ManagedDIDKeyTemplate" services: type: array items: - $ref: '#/components/schemas/Service' + $ref: "#/components/schemas/Service" contexts: type: array items: @@ -3389,12 +3474,13 @@ components: example: https://didcomm.org/messaging/contexts/v2 CreateWalletRequest: required: - - name + - name type: object properties: seed: type: string - description: A BIP32 seed encoded in hexadecimal string. It is expected + description: + A BIP32 seed encoded in hexadecimal string. It is expected to represent 64-bytes binary seed (128 hex characters). example: c9994785ce6d548134020f610b76102ca1075d3bb672a75ec8c9a27a7b8607e3b9b384e43b77bb08f8d5159651ae38b98573f7ecc79f2d7e1f1cc371ce60cf8a name: @@ -3410,68 +3496,75 @@ components: example: 00000000-0000-0000-0000-000000000000 CreateWalletUmaPermissionRequest: required: - - subject + - subject type: object properties: subject: type: string - description: The subject ID that should be granted the permission to the + description: + The subject ID that should be granted the permission to the wallet. This can be found in the `sub` claim of a JWT token. format: uuid example: 00000000-0000-0000-0000-000000000000 CreateWebhookNotification: required: - - url + - url type: object properties: url: type: string customHeaders: - $ref: '#/components/schemas/Map_String' + $ref: "#/components/schemas/Map_String" CredentialDefinitionInput: required: - - name - - version - - tag - - author - - schemaId - - signatureType - - supportRevocation + - name + - version + - tag + - author + - schemaId + - signatureType + - supportRevocation type: object properties: name: type: string - description: A human-readable name for the credential definition. A piece + description: + A human-readable name for the credential definition. A piece of Metadata. example: DrivingLicense minLength: 1 description: type: string description: A human-readable description of the credential definition - example: Simple credential definition for the driving licence verifiable + example: + Simple credential definition for the driving licence verifiable credential. minLength: 1 version: type: string - description: Denotes the revision of a given Credential Definition. It should + description: + Denotes the revision of a given Credential Definition. It should follow semantic version convention to describe the impact of the credential definition evolution. example: 1.0.0 pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ tag: type: string - description: Token that allow to lookup and filter the credential definition + description: + Token that allow to lookup and filter the credential definition records. example: licence author: type: string - description: DID of the identity which authored the credential definition. + description: + DID of the identity which authored the credential definition. A piece of Metadata. example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff pattern: ^did:(?[a-z0-9]+(:[a-z0-9]+)*)\:(?[^#?]*)$ schemaId: type: string - description: The unique identifier of the schema used for this credential + description: + The unique identifier of the schema used for this credential definition. example: https://agent-host.com/prism-agent/schema-registry/schemas/d9569cec-c81e-4779-aa86-0d5994d82676 signatureType: @@ -3480,95 +3573,108 @@ components: example: CL supportRevocation: type: boolean - description: Boolean flag indicating whether revocation is supported for + description: + Boolean flag indicating whether revocation is supported for this CredentialDefinition. example: false CredentialDefinitionResponse: required: - - guid - - id - - name - - version - - tag - - description - - author - - authored - - schemaId - - definition - - keyCorrectnessProof - - signatureType - - supportRevocation - - kind - - self + - guid + - id + - name + - version + - tag + - description + - author + - authored + - schemaId + - definition + - keyCorrectnessProof + - signatureType + - supportRevocation + - kind + - self type: object properties: guid: type: string - description: 'Globally unique id of the credential definition.It''s composed + description: + "Globally unique id of the credential definition.It's composed from the bytes of the string that contain the `author`, `name`, and `version` - values.The string format looks like the resource identifier: `author`/`id`?version=`version`' + values.The string format looks like the resource identifier: `author`/`id`?version=`version`" format: uuid example: 0527aea1-d131-3948-a34d-03af39aba8b4 id: type: string - description: A locally unique identifier to address the credential definition. + description: + A locally unique identifier to address the credential definition. UUID is generated by the backend. example: 0527aea1-d131-3948-a34d-03af39aba8b5 longId: type: string - description: Resource id of the credential definition. Contains the `author`'s + description: + Resource id of the credential definition. Contains the `author`'s DID, `id` and `version` fields. example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff/0527aea1-d131-3948-a34d-03af39aba8b4?version=1.0.0 name: type: string - description: A human-readable name for the credential definition. A piece + description: + A human-readable name for the credential definition. A piece of Metadata. example: DrivingLicense version: type: string - description: Denotes the revision of a given Credential Definition. It should + description: + Denotes the revision of a given Credential Definition. It should follow semantic version convention to describe the impact of the credential definition evolution. example: 1.0.0 tag: type: string - description: Token that allow to lookup and filter the credential definition + description: + Token that allow to lookup and filter the credential definition records. example: licence description: type: string description: A human-readable description of the credential definition - example: Simple credential definition for the driving licence verifiable + example: + Simple credential definition for the driving licence verifiable credential. author: type: string - description: DID of the identity which authored the credential definition. + description: + DID of the identity which authored the credential definition. A piece of Metadata. example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff authored: type: string - description: '[RFC3339](https://www.rfc-editor.org/rfc/rfc3339) date on - which the credential definition was created. A piece of Metadata.' + description: + "[RFC3339](https://www.rfc-editor.org/rfc/rfc3339) date on + which the credential definition was created. A piece of Metadata." format: date-time example: 2022-03-10T12:00Z schemaId: type: string - description: The unique identifier of the schema used for this credential + description: + The unique identifier of the schema used for this credential definition. example: https://agent-host.com/prism-agent/schema-registry/schemas/d9569cec-c81e-4779-aa86-0d5994d82676 definition: - description: Definition object that represents the actual definition of + description: + Definition object that represents the actual definition of the credential. example: credentialSubject: emailAddress: alice@wonderland.com givenName: Alice familyName: Wonderland - dateOfIssuance: '2000-01-01T10:00:00Z' - drivingLicenseID: '12345' + dateOfIssuance: "2000-01-01T10:00:00Z" + drivingLicenseID: "12345" drivingClass: 5 keyCorrectnessProof: - description: A proof that validates the correctness of the key within the + description: + A proof that validates the correctness of the key within the context of the credential definition. signatureType: type: string @@ -3576,38 +3682,43 @@ components: example: CL supportRevocation: type: boolean - description: Boolean flag indicating whether revocation is supported for + description: + Boolean flag indicating whether revocation is supported for this CredentialDefinition. example: false proof: - $ref: '#/components/schemas/Proof' + $ref: "#/components/schemas/Proof" kind: type: string - description: A string that identifies the type of resource being returned + description: + A string that identifies the type of resource being returned in the response. example: CredentialDefinition self: type: string - description: The URL that uniquely identifies the resource being returned + description: + The URL that uniquely identifies the resource being returned in the response. example: /prism-agent/credential-definition-registry/schemas/0527aea1-d131-3948-a34d-03af39aba8b4 CredentialDefinitionResponsePage: required: - - kind - - self - - pageOf + - kind + - self + - pageOf type: object properties: contents: type: array items: - $ref: '#/components/schemas/CredentialDefinitionResponse' - description: A sequence of CredentialSchemaResponse objects representing + $ref: "#/components/schemas/CredentialDefinitionResponse" + description: + A sequence of CredentialSchemaResponse objects representing the list of credential schemas that the API response contains example: [] kind: type: string - description: A string field indicating the type of the API response. In + description: + A string field indicating the type of the API response. In this case, it will always be set to `CredentialSchemaPage` example: CredentialSchemaPage self: @@ -3616,39 +3727,44 @@ components: example: /prism-agent/schema-registry/schemas?skip=10&limit=10 pageOf: type: string - description: A string field indicating the type of resource that the contents + description: + A string field indicating the type of resource that the contents field contains example: /prism-agent/schema-registry/schemas next: type: string - description: An optional string field containing the URL of the next page + description: + An optional string field containing the URL of the next page of results. If the API response does not contain any more pages, this field should be set to None. example: /prism-agent/schema-registry/schemas?skip=20&limit=10 previous: type: string - description: An optional string field containing the URL of the previous + description: + An optional string field containing the URL of the previous page of results. If the API response is the first page of results, this field should be set to None. example: /prism-agent/schema-registry/schemas?skip=0&limit=10 CredentialSchemaInput: required: - - name - - version - - type - - schema - - author + - name + - version + - type + - schema + - author type: object properties: name: type: string - description: A human-readable name for the credential schema. A piece of + description: + A human-readable name for the credential schema. A piece of Metadata. example: DrivingLicense minLength: 1 version: type: string - description: Denotes the revision of a given Credential Schema. It should + description: + Denotes the revision of a given Credential Schema. It should follow semantic version convention to describe the impact of the schema evolution. example: 1.0.0 @@ -3660,11 +3776,13 @@ components: minLength: 1 type: type: string - description: This field resolves to a JSON schema with details about the + description: + This field resolves to a JSON schema with details about the schema metadata that applies to the schema. A piece of Metadata. example: https://w3c-ccg.github.io/vc-json-schemas/schema/2.0/schema.json schema: - description: Valid JSON Schema where the Credential Schema data fields are + description: + Valid JSON Schema where the Credential Schema data fields are defined. A piece of Metadata example: $id: https://example.com/driving-license-1.0 @@ -3687,68 +3805,75 @@ components: drivingClass: type: integer required: - - emailAddress - - familyName - - dateOfIssuance - - drivingLicenseID - - drivingClass + - emailAddress + - familyName + - dateOfIssuance + - drivingLicenseID + - drivingClass additionalProperties: false tags: type: array items: type: string - description: Tokens that allow to lookup and filter the credential schema + description: + Tokens that allow to lookup and filter the credential schema records. example: - - driving - - licence - - id + - driving + - licence + - id author: type: string - description: DID of the identity which authored the credential schema. A + description: + DID of the identity which authored the credential schema. A piece of Metadata. example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff pattern: ^did:(?[a-z0-9]+(:[a-z0-9]+)*)\:(?[^#?]*)$ CredentialSchemaResponse: required: - - guid - - id - - name - - version - - description - - type - - schema - - author - - authored - - kind - - self + - guid + - id + - name + - version + - description + - type + - schema + - author + - authored + - kind + - self type: object properties: guid: type: string - description: 'Globally unique id of the credential schema.It''s composed + description: + "Globally unique id of the credential schema.It's composed from the bytes of the string that contain the `author`, `name`, and `version` - values.The string format looks like the resource identifier: `author`/`id`?version=`version`' + values.The string format looks like the resource identifier: `author`/`id`?version=`version`" format: uuid example: 0527aea1-d131-3948-a34d-03af39aba8b4 id: type: string - description: A locally unique identifier to address the schema. UUID is + description: + A locally unique identifier to address the schema. UUID is generated by the backend. example: 0527aea1-d131-3948-a34d-03af39aba8b5 longId: type: string - description: Resource id of the credential schema. Contains the `author`'s + description: + Resource id of the credential schema. Contains the `author`'s DID, `id` and `version` fields. example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff/0527aea1-d131-3948-a34d-03af39aba8b4?version=1.0.0 name: type: string - description: A human-readable name for the credential schema. A piece of + description: + A human-readable name for the credential schema. A piece of Metadata. example: DrivingLicense version: type: string - description: Denotes the revision of a given Credential Schema. It should + description: + Denotes the revision of a given Credential Schema. It should follow semantic version convention to describe the impact of the schema evolution. example: 1.0.0 @@ -3756,23 +3881,26 @@ components: type: array items: type: string - description: Tokens that allow to lookup and filter the credential schema + description: + Tokens that allow to lookup and filter the credential schema records. example: - - driving - - licence - - id + - driving + - licence + - id description: type: string description: A human-readable description of the credential schema example: Simple credential schema for the driving licence verifiable credential. type: type: string - description: This field resolves to a JSON schema with details about the + description: + This field resolves to a JSON schema with details about the schema metadata that applies to the schema. A piece of Metadata. example: https://w3c-ccg.github.io/vc-json-schemas/schema/2.0/schema.json schema: - description: Valid JSON Schema where the Credential Schema data fields are + description: + Valid JSON Schema where the Credential Schema data fields are defined. A piece of Metadata example: $id: https://example.com/driving-license-1.0 @@ -3795,52 +3923,58 @@ components: drivingClass: type: integer required: - - emailAddress - - familyName - - dateOfIssuance - - drivingLicenseID - - drivingClass + - emailAddress + - familyName + - dateOfIssuance + - drivingLicenseID + - drivingClass additionalProperties: false author: type: string - description: DID of the identity which authored the credential schema. A + description: + DID of the identity which authored the credential schema. A piece of Metadata. example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff authored: type: string - description: '[RFC3339](https://www.rfc-editor.org/rfc/rfc3339) date on - which the credential schema was created. A piece of Metadata.' + description: + "[RFC3339](https://www.rfc-editor.org/rfc/rfc3339) date on + which the credential schema was created. A piece of Metadata." format: date-time example: 2022-03-10T12:00Z proof: - $ref: '#/components/schemas/Proof1' + $ref: "#/components/schemas/Proof1" kind: type: string - description: A string that identifies the type of resource being returned + description: + A string that identifies the type of resource being returned in the response. example: CredentialSchema self: type: string - description: The URL that uniquely identifies the resource being returned + description: + The URL that uniquely identifies the resource being returned in the response. example: /prism-agent/schema-registry/schemas/0527aea1-d131-3948-a34d-03af39aba8b4 CredentialSchemaResponsePage: required: - - kind - - self - - pageOf + - kind + - self + - pageOf type: object properties: contents: type: array items: - $ref: '#/components/schemas/CredentialSchemaResponse' - description: A sequence of CredentialSchemaResponse objects representing + $ref: "#/components/schemas/CredentialSchemaResponse" + description: + A sequence of CredentialSchemaResponse objects representing the list of credential schemas that the API response contains example: [] kind: type: string - description: A string field indicating the type of the API response. In + description: + A string field indicating the type of the API response. In this case, it will always be set to `CredentialSchemaPage` example: CredentialSchemaPage self: @@ -3849,27 +3983,30 @@ components: example: /prism-agent/schema-registry/schemas?skip=10&limit=10 pageOf: type: string - description: A string field indicating the type of resource that the contents + description: + A string field indicating the type of resource that the contents field contains example: /prism-agent/schema-registry/schemas next: type: string - description: An optional string field containing the URL of the next page + description: + An optional string field containing the URL of the next page of results. If the API response does not contain any more pages, this field should be set to None. example: /prism-agent/schema-registry/schemas?skip=20&limit=10 previous: type: string - description: An optional string field containing the URL of the previous + description: + An optional string field containing the URL of the previous page of results. If the API response is the first page of results, this field should be set to None. example: /prism-agent/schema-registry/schemas?skip=0&limit=10 CredentialSubject: required: - - id - - type - - statusPurpose - - encodedList + - id + - type + - statusPurpose + - encodedList type: object properties: id: @@ -3881,7 +4018,7 @@ components: description: Always equals to constnat value - StatusList2021 example: StatusList2021 statusPurpose: - $ref: '#/components/schemas/StatusPurpose' + $ref: "#/components/schemas/StatusPurpose" encodedList: type: string description: base64 url encoded bitstring of credential statuses @@ -3889,10 +4026,10 @@ components: description: Object containing claims specific to status list credential DIDDocument: required: - - id + - id type: object properties: - '@context': + "@context": type: array items: type: string @@ -3906,12 +4043,12 @@ components: example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff controller: type: string - description: '[DID controller](https://www.w3.org/TR/did-core/#did-controller)' + description: "[DID controller](https://www.w3.org/TR/did-core/#did-controller)" example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff verificationMethod: type: array items: - $ref: '#/components/schemas/VerificationMethod' + $ref: "#/components/schemas/VerificationMethod" authentication: type: array items: @@ -3935,14 +4072,15 @@ components: service: type: array items: - $ref: '#/components/schemas/Service' + $ref: "#/components/schemas/Service" description: A W3C compliant Prism DID document representation. DIDDocumentMetadata: type: object properties: deactivated: type: boolean - description: If a DID has been deactivated, DID document metadata MUST include + description: + If a DID has been deactivated, DID document metadata MUST include this property with the boolean value true. If a DID has not been deactivated, this property is OPTIONAL, but if included, MUST have the boolean value false. @@ -3963,23 +4101,25 @@ components: example: 4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff created: type: string - description: The timestamp of the Cardano block that contained the first + description: + The timestamp of the Cardano block that contained the first valid SignedAtalaOperation with a CreateDIDOperation that created the DID. - example: '2023-02-04T13:52:10Z' + example: "2023-02-04T13:52:10Z" updated: type: string - description: The timestamp of the Cardano block that contained the latest + description: + The timestamp of the Cardano block that contained the latest valid SignedAtalaOperation that changed the DID's internal state. - example: '2023-02-04T13:52:10Z' - description: '[DID document metadata](https://www.w3.org/TR/did-core/#did-document-metadata)' + example: "2023-02-04T13:52:10Z" + description: "[DID document metadata](https://www.w3.org/TR/did-core/#did-document-metadata)" DIDOperationResponse: required: - - scheduledOperation + - scheduledOperation type: object properties: scheduledOperation: - $ref: '#/components/schemas/DidOperationSubmission' + $ref: "#/components/schemas/DidOperationSubmission" DIDResolutionMetadata: type: object properties: @@ -3995,28 +4135,28 @@ components: type: string description: The media type of the returned DID document example: application/did+ld+json - description: '[DID resolution metadata](https://www.w3.org/TR/did-core/#did-resolution-metadata)' + description: "[DID resolution metadata](https://www.w3.org/TR/did-core/#did-resolution-metadata)" DIDResolutionResult: required: - - '@context' - - didDocumentMetadata - - didResolutionMetadata + - "@context" + - didDocumentMetadata + - didResolutionMetadata type: object properties: - '@context': + "@context": type: string description: The JSON-LD context describing the JSON document example: https://didcomm.org/messaging/contexts/v2 didDocument: - $ref: '#/components/schemas/DIDDocument' + $ref: "#/components/schemas/DIDDocument" didDocumentMetadata: - $ref: '#/components/schemas/DIDDocumentMetadata' + $ref: "#/components/schemas/DIDDocumentMetadata" didResolutionMetadata: - $ref: '#/components/schemas/DIDResolutionMetadata' + $ref: "#/components/schemas/DIDResolutionMetadata" DidOperationSubmission: required: - - id - - didRef + - id + - didRef type: object properties: id: @@ -4029,13 +4169,13 @@ components: example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff EntityResponse: required: - - kind - - self - - id - - name - - walletId - - createdAt - - updatedAt + - kind + - self + - id + - name + - walletId + - createdAt + - updatedAt type: object properties: kind: @@ -4064,31 +4204,33 @@ components: type: string description: The `createdAt` timestamp of the entity. format: date-time - example: '2023-01-01T00:00:00Z' + example: "2023-01-01T00:00:00Z" updatedAt: type: string description: The `updatedAt` timestamp of the entity. format: date-time - example: '2023-01-01T00:00:00Z' + example: "2023-01-01T00:00:00Z" EntityResponsePage: required: - - kind - - self - - pageOf + - kind + - self + - pageOf type: object properties: contents: type: array items: - $ref: '#/components/schemas/EntityResponse' - description: A sequence of CredentialSchemaResponse objects representing + $ref: "#/components/schemas/EntityResponse" + description: + A sequence of CredentialSchemaResponse objects representing the list of credential schemas that the API response contains example: - - EntityResponse(Entity,/prism-agent/iam/entities/00000000-0000-0000-0000-000000000000,00000000-0000-0000-0000-000000000000,John - Doe,00000000-0000-0000-0000-000000000000,2023-01-01T00:00:00Z,2023-01-01T00:00:00Z) + - EntityResponse(Entity,/prism-agent/iam/entities/00000000-0000-0000-0000-000000000000,00000000-0000-0000-0000-000000000000,John + Doe,00000000-0000-0000-0000-000000000000,2023-01-01T00:00:00Z,2023-01-01T00:00:00Z) kind: type: string - description: A string field indicating the type of the API response. In + description: + A string field indicating the type of the API response. In this case, it will always be set to `CredentialSchemaPage` example: CredentialSchemaPage self: @@ -4097,27 +4239,30 @@ components: example: /prism-agent/schema-registry/schemas?skip=10&limit=10 pageOf: type: string - description: A string field indicating the type of resource that the contents + description: + A string field indicating the type of resource that the contents field contains example: /prism-agent/schema-registry/schemas next: type: string - description: An optional string field containing the URL of the next page + description: + An optional string field containing the URL of the next page of results. If the API response does not contain any more pages, this field should be set to None. example: /prism-agent/schema-registry/schemas?skip=20&limit=10 previous: type: string - description: An optional string field containing the URL of the previous + description: + An optional string field containing the URL of the previous page of results. If the API response is the first page of results, this field should be set to None. example: /prism-agent/schema-registry/schemas?skip=0&limit=10 ErrorResponse: required: - - status - - type - - title - - instance + - status + - type + - title + - instance type: object properties: status: @@ -4131,22 +4276,25 @@ components: example: https://example.org/doc/#model-MalformedEmail/ title: type: string - description: A short, human-readable summary of the problem type. It does + description: + A short, human-readable summary of the problem type. It does not change from occurrence to occurrence of the problem. example: Malformed email detail: type: string - description: A human-readable explanation specific to this occurrence of + description: + A human-readable explanation specific to this occurrence of the problem. example: The received '{}à!è@!.b}' email does not conform to the email format instance: type: string - description: A URI reference that identifies the specific occurrence of + description: + A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. example: The received '{}à!è@!.b}' email does not conform to the email format HealthInfo: required: - - version + - version type: object properties: version: @@ -4155,14 +4303,14 @@ components: example: 1.1.0 IssueCredentialRecord: required: - - recordId - - thid - - credentialFormat - - claims - - createdAt - - role - - protocolState - - metaRetries + - recordId + - thid + - credentialFormat + - claims + - createdAt + - role + - protocolState + - metaRetries type: object properties: recordId: @@ -4185,8 +4333,8 @@ components: description: The credential format for this offer. example: JWT enum: - - JWT - - AnonCreds + - JWT + - AnonCreds subjectId: type: string description: |2 @@ -4221,10 +4369,11 @@ components: type: string description: The date and time when the issue credential record was created. format: date-time - example: '2024-03-20T18:35:17.903237532Z' + example: "2024-03-20T18:35:17.903237532Z" updatedAt: type: string - description: The date and time when the issue credential record was last + description: + The date and time when the issue credential record was last updated. format: date-time role: @@ -4232,30 +4381,31 @@ components: description: The role played by the agent in the credential issuance flow. example: Issuer enum: - - Issuer - - Holder + - Issuer + - Holder protocolState: type: string description: The current state of the issue credential protocol execution. example: CredentialSent enum: - - OfferPending - - OfferSent - - OfferReceived - - RequestPending - - RequestGenerated - - RequestSent - - RequestReceived - - CredentialPending - - CredentialGenerated - - CredentialSent - - CredentialReceived - - ProblemReportPending - - ProblemReportSent - - ProblemReportReceived + - OfferPending + - OfferSent + - OfferReceived + - RequestPending + - RequestGenerated + - RequestSent + - RequestReceived + - CredentialPending + - CredentialGenerated + - CredentialSent + - CredentialReceived + - ProblemReportPending + - ProblemReportSent + - ProblemReportReceived credential: type: string - description: The base64-encoded credential that was issued by the issuer + description: + The base64-encoded credential that was issued by the issuer agent, in 'JWT' or 'AnonCreds' format depending on the offer type. example: eyJzY2hlbWFfaWQiOiJodHRwOi8vaG9zdC5kb2NrZXIuaW50ZXJuYWw6ODA4MC9wcmlzbS1hZ2VudC9zY2hlbWEtcmVnaXN0cnkvc2NoZW1hcy8zOTZmZDE2OC02YmVmLTMyNDItYTJiNy1hNTZlYWM1MDc2OWMvc2NoZW1hIiwiY3JlZF9kZWZfaWQiOiJodHRwOi8vMTkyLjE2OC4wLjE0OjgwODAvcHJpc20tYWdlbnQvY3JlZGVudGlhbC1kZWZpbml0aW9uLXJlZ2lzdHJ5L2RlZmluaXRpb25zLzNhZmQxZWJkLWIzN2ItMzRiNC1iMWQ2LWYwMDQ5ZmU5ZmQ1Mi9kZWZpbml0aW9uIiwicmV2X3JlZ19pZCI6bnVsbCwidmFsdWVzIjp7ImdpdmVuTmFtZSI6eyJyYXciOiJBbGljZSIsImVuY29kZWQiOiIyNzAzNDY0MDAyNDExNzMzMTAzMzA2MzEyODA0NDAwNDMxODIxODQ4NjgxNjkzMTUyMDg4NjQwNTUzNTY1OTkzNDQxNzQzODc4MTUwNyJ9LCJlbWFpbEFkZHJlc3MiOnsicmF3IjoiYWxpY2VAd29uZGVybGFuZC5jb20iLCJlbmNvZGVkIjoiNzUxMDcwNDYzNDAxNjU2NzcwMTE5NDIwNzU2NDQwMDkwNjY1NDE2NjExNDg4MjI1ODkwMzM2Nzk4NjEyMDkxODY0OTI3Njg2Njk5MjQifSwiZmFtaWx5TmFtZSI6eyJyYXciOiJXb25kZXJsYW5kIiwiZW5jb2RlZCI6IjE2NzkwODQ5MzEyMzc0Nzk0NzM2ODEzMzc3NTY3MjUzODUxMzczNjA3OTcwNDczMzc3NzAxNDc3MjY5MTk0MDE5NTU3NjU0NTYyMDM1In0sImRhdGVPZklzc3VhbmNlIjp7InJhdyI6IjIwMjAtMTEtMTNUMjA6MjA6MzkrMDA6MDAiLCJlbmNvZGVkIjoiNTM4Njg1NTk1MzE3NDg0NjcwOTc1MjA4NTkwNTMwODE4MzU3NDc0MzU2MTE2MDY4NDIwNDExNDc1ODIwMDQ4NzQzNDgwNDYxNjQ2ODUifSwiZHJpdmluZ0xpY2Vuc2VJRCI6eyJyYXciOiIxMjM0NSIsImVuY29kZWQiOiIxMjM0NSJ9LCJkcml2aW5nQ2xhc3MiOnsicmF3IjoiMyIsImVuY29kZWQiOiIzIn19LCJzaWduYXR1cmUiOnsicF9jcmVkZW50aWFsIjp7Im1fMiI6IjMzNjg4ODUzNTU3NTg2MDI3MDg3OTY5ODAzMjgzMzcyNzE4Nzc5MDAzNDAzMDgwODMzMjQzNDIxMTU3MDA5NzE4MDUzMTMyNDIwODAwIiwiYSI6IjEwMjUxMTg2OTU5MTg2NDc2NDcwNzU0MTQ0MDg5NDE3MjI4OTM1Mjk0ODgxNDExMTc5ODYwNzgxODIxODY2OTcyODIyMzg1MTQ1OTcwNDA4Mzk2Mjg5OTM2NzgzNTUxMDk4NDA2MjE2MjcwNjgyNDM1ODg3NjY0OTI0MzQwMDg3NTY4MDMyNzMyMzYwMDc5MTI2ODk2MDU3NDA3MTYyMjI0NDgwODM2NTgzNjY2MzQ1MzA5NzQ0NDE5NjA0ODg5ODA1NDU3Mjc4NDE0MjgyMjA4NzIzMDIwNDQzNzk0MjM0NzU1NTgwNjA1MTE1NjU3NTQ4NjE1MTgwNTU1ODEzMjA0MzQyNjkzNjYyODQzNzY4MjQ2NDM1NjU4MjQ5MDYyMjUxMzYwNzE2MzEyNzM4MjAyMTU2NTEwNzM2NDY1ODk2NjIyNDY4MDk3OTY0OTk0NTA1NDUwMjczMzQ2Mzk4MzY4NzcxNDM3MzAzNTI2NjE0NTk4NTU4Mjg0MTAxNzk0NjYwOTAxNDMwOTI4MzY1MTk3MzA2MDIxMzQ5OTQ3MDI2MzIzMzEwOTE3MjgzODM0ODY2NzI1MzgyMDg4NDIzNDU1NzE0MDY3MTk1NDEzMDA4MzAxNTQ2MTA1NzY4NTAxNzMxNjEwMjk3MDY5ODUyNjAxMTgxMTM3OTg2NjM2MDU2MjI4MTE4NzUzMTM1NjMxMDIwNzA0MzYxODQxNTg0MjA0NzIwMDU1NjY0ODIxMTczOTA3MzYyMTQzNTQyNjk1NTExMTMxNzU3NTE0OTUxMDY2ODQ2MzIyMDAyNzYxMzg4MzIwNjkyNSIsImUiOiIyNTkzNDQ3MjMwNTUwNjIwNTk5MDcwMjU0OTE0ODA2OTc1NzE5MzgyNzc4ODk1MTUxNTIzMDYyNDk3Mjg1ODMxMDU2NjU4MDA3MTMzMDY3NTkxNDk5ODE2OTA1NTkxOTM5ODcxNDMwMTIzNjc5MTMyMDYyOTkzMjM4OTk2OTY5NDIyMTMyMzU5NTY3NDI5Mjk4MTYwMTkzMjA4MDYyNzM5NTc5MDExNDE1Njk0NDAwMjUyMTkiLCJ2IjoiMTAwODYwMTE5NjExNDQ0MjUxODg1ODcyNzA0OTEyNDQwMTQzNTA0MDEwMDQ3NzE3MzYxNzgxMjIwOTQ0OTA3OTE3ODM0NTE3NjQyOTk5MDgxMjEzMDcyNTI4NzU5NTczMzIyNDM1NjU5NzY4OTI2NzA4MjE0NTI5Njg0Njg5NTc5MjAwNzY4MDkxMTM0OTM0MzYxNDUyNzM5ODUwMjEyODc1MDUwMzg5NjkzOTMxMjEzMDg2MTUyOTM4NzA2ODc4MzQyNjIxNjQ1MTc2NDY5NTU0NDMyNTY2MDk0MDY5NjU2ODkzNDg1NjQyNDI2MTc0MjA5MjY3OTI1MDEzODkxMTU2MzAzMzY0MzUwMzgwNTUwMzQ4OTk3MDI1Nzc3NDc5NDg3ODI0NDkzNzg4MDYwNTg1NzMxMTY2NDM5OTE1MTc3ODUyNTYwNjczMjkwODA2Mjk5ODEyOTY1NjMwNDc2OTc0NzExNDY4MDE1MzY4NzM2NTc3MDEzNDE2NjE3ODc0MTc3ODgwNjMzNTc1OTAwMzQyODM5MDUxNjc4NjExNDMxMTk5Mzk3NTIzMDE5Njc0NTA3MjM0NDAzNzcyMTcxMDM3Nzg3NzUyNTMwMjIyODYyNDg5OTMzMzczMzY1MjIwNTc4MDIzNDY2NjkyMDQ4MTA0NTE0NjczMzMwMzMwNzQ1OTEyMjUzNzQ0MDQwMjI1NTM4NjMxNDk2MjY4NDM0MDk5Njk3Nzk1NTY5MDA3MTExMjQzMTg4MTc3MzUyNjE5MTUxNzk1NjEzNTAwNjg5MzUwMzQyNTk3NjA1ODY2MjUyOTYwMjQ3ODg4OTE2NDIwNDcyMDEzNDYzMTA5NTA5MjMxNDcwNjc4MDc5MDI2Mzc3MzY4NDEwNTIyODg3NDExOTIyMzE4Njk5NzA4MjkxNzI4NTg3ODgzNjExODMyMjU4MTE5MzI2ODQ5NjkxODI1MDI2MzU2NDQ1OTM1NjYxOTkyODEyNjIwNDY4MzAxMjEwMzMwNTA1NjEwMjYyNTU5MDk5NDgwNzcxMjA0NDU0ODg0MDI5ODA3MDcwOTM4NDU5OTgxNDM1NjQyNTkzNTQyODc0ODAifSwicl9jcmVkZW50aWFsIjpudWxsfSwic2lnbmF0dXJlX2NvcnJlY3RuZXNzX3Byb29mIjp7InNlIjoiMjMwNDc5NjEzNTA0MDI5NTI3NTk3NzM3MTY4NjY0OTQ5MzQwNzk1NTg1ODM5NTQ4OTI2MTEwMjQ2NzU0NzA3OTgyNjc2MDEyMjIyMTYyNzQyNTQ2Nzg4NDI3MDA4MDQ5NzIyNDMwNDgyODAyOTYyNTgxNDE2ODI2MjEzMTgwMTE4MTA4MTA1Nzg1NjA4OTg5NjEyNTU0ODMwOTE5MjU4MTI0NDgyMzUwNTQ2MTkxOTQ5NTU5ODM2NTk4NzcxMTE0MzI1NjA5MTI4MjUxMTc1MDM4NDMxNDA2NzM2NTc1MDkwMzk5ODk0MDQzMjc3MTg5MTM3MzE1NTM5NTQ2MTE3Mjk2NTM1OTMyOTQ3NDk3NTU0Mjg0NDc1NjkxNDE1NDEzMzIzNjE2OTYyNTk1NDAzMTkxMjQ4ODY2NDE1MjI0NDY2MTU2OTgyODg4OTkyNTAxNjc1NTcwNjI0MzQ2MzMyMTE0NjMzMDQ1NzUxNDg3NzU3ODM3MDA5Mzc3ODMwNTI1MTU5MjUwNjMwMjcxNjY3NDQxMDI3MTM5MjE3Nzc5ODU5MDExMjUxOTc1OTczNjY0NTc4MjMxOTk1Mzc3OTE4Mjg4MTkyNjIyMDM5NDEzMDM0ODg5MjM3Mzg2NzU4Mzg3NTcwNTMxNDc1OTQxMDU2MTg3NzUzOTEyNDA0NzkwNzQ5NzgzMTM0OTk3MDgzODk3NjE5MTczMTg3MDg1MzE1MjQ3NTM4NjU2OTcwOTE0NzI2MzM1ODA1ODY5OTk3NzI3OTc5NTUwMjIzNjkzMDA2MjcwNjIzNTc3NjM2NTIyNjIyNTY0MTE4NTMiLCJjIjoiOTM2NzQ1MDczNzcxNzQ3MjE3OTg3OTY2OTYzMDQxNzUzMTE4NDk0NDE4NDQ0NzQ1MDI3NzAyMjI3Nzk0NzU1ODQ2Mjg3ODMzMzU4NTAifSwicmV2X3JlZyI6bnVsbCwid2l0bmVzcyI6bnVsbH0= issuingDID: @@ -4267,67 +4417,74 @@ components: example: did:prism:3bb0505d13fcb04d28a48234edb27b0d4e6d7e18a81e2c1abab58f3bbc21ce6f metaRetries: type: integer - description: The maximum background processing attempts remaining for this + description: + The maximum background processing attempts remaining for this record. format: int32 example: 5 IssueCredentialRecordPage: required: - - kind - - self - - pageOf + - kind + - self + - pageOf type: object properties: contents: type: array items: - $ref: '#/components/schemas/IssueCredentialRecord' + $ref: "#/components/schemas/IssueCredentialRecord" description: |2 An sequence of IssueCredentialRecord resources representing the list of credential records that the paginated response contains. example: [] kind: type: string - description: A string that identifies the type of resource being returned + description: + A string that identifies the type of resource being returned in the response. example: Collection self: type: string - description: The URL that uniquely identifies the resource being returned + description: + The URL that uniquely identifies the resource being returned in the response. example: /prism-agent/issue-credentials/records?offset=10&limit=10 pageOf: type: string - description: A string field indicating the type of resource that the contents + description: + A string field indicating the type of resource that the contents field contains. example: /prism-agent/issue-credentials/records next: type: string - description: An optional string field containing the URL of the next page + description: + An optional string field containing the URL of the next page of results. If the API response does not contain any more pages, this field should be set to None. example: /prism-agent/issue-credentials/records?offset=20&limit=10 previous: type: string - description: An optional string field containing the URL of the previous + description: + An optional string field containing the URL of the previous page of results. If the API response is the first page of results, this field should be set to None. example: /prism-agent/issue-credentials/records?offset=0&limit=10 Json: - description: The service endpoint. Can contain multiple possible values as described + description: + The service endpoint. Can contain multiple possible values as described in the [Create DID operation](https://github.com/input-output-hk/prism-did-method-spec/blob/main/w3c-spec/PRISM-method.md#create-did) example: https://example.com oneOf: - - $ref: '#/components/schemas/Arr' - - $ref: '#/components/schemas/Bool' - - $ref: '#/components/schemas/Null' - - $ref: '#/components/schemas/Num' - - $ref: '#/components/schemas/Obj' - - $ref: '#/components/schemas/Str' + - $ref: "#/components/schemas/Arr" + - $ref: "#/components/schemas/Bool" + - $ref: "#/components/schemas/Null" + - $ref: "#/components/schemas/Num" + - $ref: "#/components/schemas/Obj" + - $ref: "#/components/schemas/Str" ManagedDID: required: - - did - - status + - did + - status type: object properties: did: @@ -4336,7 +4493,8 @@ components: example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff longFormDid: type: string - description: A long-form DID. Mandatory when status is not `PUBLISHED` and + description: + A long-form DID. Mandatory when status is not `PUBLISHED` and optional when status is `PUBLISHED` example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff:Cr4BCrsBElsKBmF1dGgtMRAEQk8KCXNlY3AyNTZrMRIg0opTuxu-zt6aRbT1tPniG4eu4CYsQPM3rrLzvzNiNgwaIIFTnyT2N4U7qCQ78qtWC3-p0el6Hvv8qxG5uuEw-WgMElwKB21hc3RlcjAQAUJPCglzZWNwMjU2azESIKhBU0eCOO6Vinz_8vhtFSAhYYqrkEXC8PHGxkuIUev8GiAydFHLXb7c22A1Uj_PR21NZp6BCDQqNq2xd244txRgsQ status: @@ -4347,8 +4505,8 @@ components: example: CREATED ManagedDIDKeyTemplate: required: - - id - - purpose + - id + - purpose type: object properties: id: @@ -4356,13 +4514,13 @@ components: description: Identifier of a verification material in the DID Document example: key-1 purpose: - $ref: '#/components/schemas/Purpose' + $ref: "#/components/schemas/Purpose" description: A key-pair template to add to DID document. ManagedDIDPage: required: - - self - - kind - - pageOf + - self + - kind + - pageOf type: object properties: self: @@ -4378,24 +4536,24 @@ components: contents: type: array items: - $ref: '#/components/schemas/ManagedDID' + $ref: "#/components/schemas/ManagedDID" Map_AnoncredRequestedAttributeV1: type: object additionalProperties: - $ref: '#/components/schemas/AnoncredRequestedAttributeV1' + $ref: "#/components/schemas/AnoncredRequestedAttributeV1" Map_AnoncredRequestedPredicateV1: type: object additionalProperties: - $ref: '#/components/schemas/AnoncredRequestedPredicateV1' + $ref: "#/components/schemas/AnoncredRequestedPredicateV1" Map_String: type: object additionalProperties: type: string - 'Null': + "Null": type: object Num: required: - - value + - value type: object properties: value: @@ -4404,8 +4562,8 @@ components: type: object Options: required: - - challenge - - domain + - challenge + - domain type: object properties: challenge: @@ -4416,7 +4574,8 @@ components: type: string description: The domain value can be any string or URI. example: https://example-verifier.com - description: The options to use when creating the proof presentation request + description: + The options to use when creating the proof presentation request (e.g., domain, challenge). PatchContextAction: type: object @@ -4429,11 +4588,11 @@ components: example: https://didcomm.org/messaging/contexts/v2 PresentationStatus: required: - - presentationId - - thid - - role - - status - - metaRetries + - presentationId + - thid + - role + - status + - metaRetries type: object properties: presentationId: @@ -4442,42 +4601,45 @@ components: example: 3c6d9fa5-d277-431e-a6cb-d3956e47e610 thid: type: string - description: The unique identifier of the thread this presentation record + description: + The unique identifier of the thread this presentation record belongs to. The value will identical on both sides of the presentation flow (verifier and prover) example: 0527aea1-d131-3948-a34d-03af39aba8b4 role: type: string - description: The role played by the Prism agent in the proof presentation + description: + The role played by the Prism agent in the proof presentation flow. example: Verifier enum: - - Verifier - - Prover + - Verifier + - Prover status: type: string description: The current state of the proof presentation record. example: RequestPending enum: - - RequestPending - - RequestSent - - RequestReceived - - RequestRejected - - PresentationPending - - PresentationGenerated - - PresentationSent - - PresentationReceived - - PresentationVerified - - PresentationAccepted - - PresentationRejected - - ProblemReportPending - - ProblemReportSent - - ProblemReportReceived + - RequestPending + - RequestSent + - RequestReceived + - RequestRejected + - PresentationPending + - PresentationGenerated + - PresentationSent + - PresentationReceived + - PresentationVerified + - PresentationAccepted + - PresentationRejected + - ProblemReportPending + - ProblemReportSent + - ProblemReportReceived proofs: type: array items: - $ref: '#/components/schemas/ProofRequestAux' - description: The type of proofs requested in the context of this proof presentation + $ref: "#/components/schemas/ProofRequestAux" + description: + The type of proofs requested in the context of this proof presentation request (e.g., VC schema, trusted issuers, etc.) example: [] data: @@ -4488,26 +4650,28 @@ components: example: [] connectionId: type: string - description: The unique identifier of an established connection between + description: + The unique identifier of an established connection between the verifier and the prover. example: bc528dc8-69f1-4c5a-a508-5f8019047900 metaRetries: type: integer - description: The maximum background processing attempts remaining for this + description: + The maximum background processing attempts remaining for this record format: int32 example: 5 PresentationStatusPage: required: - - self - - kind - - pageOf + - self + - kind + - pageOf type: object properties: contents: type: array items: - $ref: '#/components/schemas/PresentationStatus' + $ref: "#/components/schemas/PresentationStatus" description: A sequence of Presentation objects. example: [] self: @@ -4525,48 +4689,53 @@ components: next: type: string description: URL of the next page (if available) - example: '' + example: "" previous: type: string description: URL of the previous page (if available) - example: '' + example: "" Proof: required: - - type - - created - - verificationMethod - - proofPurpose - - proofValue - - jws + - type + - created + - verificationMethod + - proofPurpose + - proofValue + - jws type: object properties: type: type: string - description: The type of cryptographic signature algorithm used to generate + description: + The type of cryptographic signature algorithm used to generate the proof. example: Ed25519Signature2018 created: type: string - description: The date and time at which the proof was created, in UTC format. + description: + The date and time at which the proof was created, in UTC format. This field is used to ensure that the proof was generated before or at the same time as the credential definition itself. format: date-time example: 2022-03-10T12:00Z verificationMethod: type: string - description: The verification method used to generate the proof. This is + description: + The verification method used to generate the proof. This is usually a DID and key ID combination that can be used to look up the public key needed to verify the proof. example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff#key-1 proofPurpose: type: string - description: 'The purpose of the proof (for example: `assertionMethod`). + description: + "The purpose of the proof (for example: `assertionMethod`). This indicates that the proof is being used to assert that the issuer - really issued this credential definition instance.' + really issued this credential definition instance." example: assertionMethod proofValue: type: string - description: The cryptographic signature value that was generated using + description: + The cryptographic signature value that was generated using the private key associated with the verification method, and which can be used to verify the proof. example: FiPfjknHikKmZ... @@ -4576,14 +4745,16 @@ components: example: eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il0sImt0eSI6Ik... domain: type: string - description: It specifies the domain context within which the credential + description: + It specifies the domain context within which the credential definition and proof are being used example: prims.atala.com - description: A digital signature over the Credential Definition for the sake + description: + A digital signature over the Credential Definition for the sake of asserting authorship. A piece of Metadata. example: type: Ed25519Signature2018 - created: '2022-03-10T12:00:00Z' + created: "2022-03-10T12:00:00Z" verificationMethod: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff#key-1 proofPurpose: assertionMethod proofValue: FiPfjknHikKmZ... @@ -4591,41 +4762,46 @@ components: domain: prims.atala.com Proof1: required: - - type - - created - - verificationMethod - - proofPurpose - - proofValue - - jws + - type + - created + - verificationMethod + - proofPurpose + - proofValue + - jws type: object properties: type: type: string - description: The type of cryptographic signature algorithm used to generate + description: + The type of cryptographic signature algorithm used to generate the proof. example: Ed25519Signature2018 created: type: string - description: The date and time at which the proof was created, in UTC format. + description: + The date and time at which the proof was created, in UTC format. This field is used to ensure that the proof was generated before or at the same time as the credential schema itself. format: date-time example: 2022-03-10T12:00Z verificationMethod: type: string - description: The verification method used to generate the proof. This is + description: + The verification method used to generate the proof. This is usually a DID and key ID combination that can be used to look up the public key needed to verify the proof. example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff#key-1 proofPurpose: type: string - description: 'The purpose of the proof (for example: `assertionMethod`). + description: + "The purpose of the proof (for example: `assertionMethod`). This indicates that the proof is being used to assert that the issuer - really issued this credential schema instance.' + really issued this credential schema instance." example: assertionMethod proofValue: type: string - description: The cryptographic signature value that was generated using + description: + The cryptographic signature value that was generated using the private key associated with the verification method, and which can be used to verify the proof. example: FiPfjknHikKmZ... @@ -4635,14 +4811,16 @@ components: example: eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il0sImt0eSI6Ik... domain: type: string - description: It specifies the domain context within which the credential + description: + It specifies the domain context within which the credential schema and proof are being used example: prims.atala.com - description: A digital signature over the Credential Schema for the sake of + description: + A digital signature over the Credential Schema for the sake of asserting authorship. A piece of Metadata. example: type: Ed25519Signature2018 - created: '2022-03-10T12:00:00Z' + created: "2022-03-10T12:00:00Z" verificationMethod: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff#key-1 proofPurpose: assertionMethod proofValue: FiPfjknHikKmZ... @@ -4650,7 +4828,7 @@ components: domain: prims.atala.com ProofRequestAux: required: - - schemaId + - schemaId type: object properties: schemaId: @@ -4661,15 +4839,16 @@ components: type: array items: type: string - description: One or more issuers that are trusted by the verifier emitting + description: + One or more issuers that are trusted by the verifier emitting the proof presentation request. example: - - did:web:atalaprism.io/users/testUser - - did.prism:123 - - did:prism:... + - did:web:atalaprism.io/users/testUser + - did.prism:123 + - did:prism:... PublicKeyJwk: required: - - kty + - kty type: object properties: crv: @@ -4685,21 +4864,21 @@ components: description: Purpose of the verification material in the DID Document example: authentication enum: - - assertionMethod - - authentication - - capabilityDelegation - - capabilityInvocation - - keyAgreement + - assertionMethod + - authentication + - capabilityDelegation + - capabilityInvocation + - keyAgreement RemoveEntryById: required: - - id + - id type: object properties: id: type: string RequestPresentationAction: required: - - action + - action type: object properties: action: @@ -4707,41 +4886,44 @@ components: description: The action to perform on the proof presentation record. example: request-accept enum: - - request-accept - - request-reject - - presentation-accept - - presentation-reject + - request-accept + - request-reject + - presentation-accept + - presentation-reject proofId: type: array items: type: string - description: The unique identifier of the issue credential record - and + description: + The unique identifier of the issue credential record - and hence VC - to use as the prover accepts the presentation request. Only applicable on the prover side when the action is `request-accept`. anoncredPresentationRequest: - $ref: '#/components/schemas/AnoncredCredentialProofsV1' + $ref: "#/components/schemas/AnoncredCredentialProofsV1" RequestPresentationInput: required: - - connectionId + - connectionId type: object properties: connectionId: type: string - description: The unique identifier of an established connection between + description: + The unique identifier of an established connection between the verifier and the prover. format: uuid example: bc528dc8-69f1-4c5a-a508-5f8019047900 options: - $ref: '#/components/schemas/Options' + $ref: "#/components/schemas/Options" proofs: type: array items: - $ref: '#/components/schemas/ProofRequestAux' - description: The type of proofs requested in the context of this proof presentation + $ref: "#/components/schemas/ProofRequestAux" + description: + The type of proofs requested in the context of this proof presentation request (e.g., VC schema, trusted issuers, etc.) example: [] anoncredPresentationRequest: - $ref: '#/components/schemas/AnoncredPresentationRequestV1' + $ref: "#/components/schemas/AnoncredPresentationRequestV1" credentialFormat: type: string description: The credential format (default to 'JWT') @@ -4750,9 +4932,9 @@ components: type: object Service: required: - - id - - type - - serviceEndpoint + - id + - type + - serviceEndpoint type: object properties: id: @@ -4763,43 +4945,44 @@ components: Returns the full ID (with DID prefix) when resolving DID example: service-1 type: - description: Service type. Can contain multiple possible values as described + description: + Service type. Can contain multiple possible values as described in the [Create DID operation](https://github.com/input-output-hk/prism-did-method-spec/blob/main/w3c-spec/PRISM-method.md#create-did) under the construction section. example: LinkedDomains oneOf: - - type: array - items: - type: string - - type: string + - type: array + items: + type: string + - type: string serviceEndpoint: - $ref: '#/components/schemas/Json' + $ref: "#/components/schemas/Json" description: A service that should appear in the DID document. https://www.w3.org/TR/did-core/#services StatusListCredential: required: - - issuer - - id - - issuanceDate - - credentialSubject - - proof + - issuer + - id + - issuanceDate + - credentialSubject + - proof type: object properties: - '@context': + "@context": type: array items: type: string description: List of JSON-LD contexts example: - - https://www.w3.org/2018/credentials/v1 - - https://w3id.org/vc/status-list/2021/v1 + - https://www.w3.org/2018/credentials/v1 + - https://w3id.org/vc/status-list/2021/v1 type: type: array items: type: string description: List of credential types example: - - VerifiableCredential - - StatusList2021Credential + - VerifiableCredential + - StatusList2021Credential issuer: type: string description: DID of the issuer of status list credential @@ -4812,29 +4995,30 @@ components: type: string description: Issuance timestamp of status list credential format: date-time - example: '2024-03-20T18:35:17.949576647Z' + example: "2024-03-20T18:35:17.949576647Z" credentialSubject: - $ref: '#/components/schemas/CredentialSubject' + $ref: "#/components/schemas/CredentialSubject" proof: - description: Embedded proof to verify data integrity of status list credential, + description: + Embedded proof to verify data integrity of status list credential, includes "type" property which defines an algorithm to be used for proof verification example: type: DataIntegrityProof proofPurpose: assertionMethod verificationMethod: data:application/json;base64,eyJAY29udGV4dCI6WyJodHRwczovL3czaWQub3JnL3NlY3VyaXR5L211bHRpa2V5L3YxIl0sInR5cGUiOiJNdWx0aWtleSIsInB1YmxpY0tleU11bHRpYmFzZSI6InVNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUVRUENjM1M0X0xHVXRIM25DRjZ2dUw3ekdEMS13UmVrMHRHbnB0UnZUakhIMUdvTnk1UFBIZ0FmNTZlSzNOd3B0LWNGcmhrT2pRQk1rcFRKOHNaS1pCZz09In0= - created: '2024-01-22T22:40:34.560891Z' + created: "2024-01-22T22:40:34.560891Z" proofValue: zAN1rKq8npnByRqPRxhjHEkivhN8AhA8V6MqDJga1zcCUEvPDUoqJB5Rj6ZJHTCnBZ98VXTEVd1rprX2wvP1MAaTEi7Pm241qm cryptoSuite: eddsa-jcs-2022 StatusPurpose: description: type of status list credential, either revocation or suspension example: Revocation oneOf: - - $ref: '#/components/schemas/Revocation' - - $ref: '#/components/schemas/Suspension' + - $ref: "#/components/schemas/Revocation" + - $ref: "#/components/schemas/Suspension" Str: required: - - value + - value type: object properties: value: @@ -4843,7 +5027,7 @@ components: type: object UpdateEntityNameRequest: required: - - name + - name type: object properties: name: @@ -4854,7 +5038,7 @@ components: maxLength: 128 UpdateEntityWalletIdRequest: required: - - walletId + - walletId type: object properties: walletId: @@ -4868,33 +5052,33 @@ components: actions: type: array items: - $ref: '#/components/schemas/UpdateManagedDIDRequestAction' + $ref: "#/components/schemas/UpdateManagedDIDRequestAction" UpdateManagedDIDRequestAction: required: - - actionType + - actionType type: object properties: actionType: - $ref: '#/components/schemas/ActionType' + $ref: "#/components/schemas/ActionType" addKey: - $ref: '#/components/schemas/ManagedDIDKeyTemplate' + $ref: "#/components/schemas/ManagedDIDKeyTemplate" removeKey: - $ref: '#/components/schemas/RemoveEntryById' + $ref: "#/components/schemas/RemoveEntryById" addService: - $ref: '#/components/schemas/Service' + $ref: "#/components/schemas/Service" removeService: - $ref: '#/components/schemas/RemoveEntryById' + $ref: "#/components/schemas/RemoveEntryById" updateService: - $ref: '#/components/schemas/UpdateManagedDIDServiceAction' + $ref: "#/components/schemas/UpdateManagedDIDServiceAction" patchContext: - $ref: '#/components/schemas/PatchContextAction' + $ref: "#/components/schemas/PatchContextAction" description: |- A list of actions to perform on DID document. The field `addKey`, `removeKey`, `addService`, `removeService`, `updateService`, `patchContext` must corresponds to the `actionType` specified. For example, `addKey` must be present when `actionType` is `ADD_KEY`. UpdateManagedDIDServiceAction: required: - - id + - id type: object properties: id: @@ -4905,20 +5089,21 @@ components: description: The type of the service example: LinkedDomains oneOf: - - type: array - items: - type: string - - type: string + - type: array + items: + type: string + - type: string serviceEndpoint: - $ref: '#/components/schemas/Json' - description: A patch to existing Service. 'type' and 'serviceEndpoint' cannot + $ref: "#/components/schemas/Json" + description: + A patch to existing Service. 'type' and 'serviceEndpoint' cannot both be empty. VerificationMethod: required: - - id - - type - - controller - - publicKeyJwk + - id + - type + - controller + - publicKeyJwk type: object properties: id: @@ -4934,11 +5119,11 @@ components: description: The DID that controls the verification method. example: did:prism:4a5b5cf0a513e83b598bbea25cd6196746747f361a73ef77068268bc9bd732ff publicKeyJwk: - $ref: '#/components/schemas/PublicKeyJwk' + $ref: "#/components/schemas/PublicKeyJwk" description: A cryptographic public key expressed in the DID document. https://www.w3.org/TR/did-core/#verification-methods VerificationPolicyConstraint: required: - - schemaId + - schemaId type: object properties: schemaId: @@ -4952,169 +5137,189 @@ components: type: string description: A list of DIDs of the trusted issuers. example: - - did:example:123456789abcdefghi + - did:example:123456789abcdefghi VerificationPolicyInput: required: - - name - - description + - name + - description type: object properties: id: type: string - description: A unique identifier to address the verification policy instance. + description: + A unique identifier to address the verification policy instance. UUID is generated by the backend. format: uuid example: 0527aea1-d131-3948-a34d-03af39aba8b5 name: type: string - description: A human-readable name for the verification policy. The `name` + description: + A human-readable name for the verification policy. The `name` cannot be empty. example: Trusted Issuers Verification Policy minLength: 1 description: type: string description: A human-readable description of the verification policy. - example: Verification policy that checks if the credential was issued by + example: + Verification policy that checks if the credential was issued by a trusted issuer. constraints: type: array items: - $ref: '#/components/schemas/VerificationPolicyConstraint' - description: The object that describes the constraints of the verification + $ref: "#/components/schemas/VerificationPolicyConstraint" + description: + The object that describes the constraints of the verification policy. Each constraint is a tuple of the `schemaId` and a set of DIDs of the trusted issuers. example: - - schemaId: https://example.com/driving-license-1.0 - trustedIssuers: - - did:example:123456789abcdefghi + - schemaId: https://example.com/driving-license-1.0 + trustedIssuers: + - did:example:123456789abcdefghi VerificationPolicyResponse: required: - - self - - kind - - id - - nonce - - name - - description - - createdAt - - updatedAt + - self + - kind + - id + - nonce + - name + - description + - createdAt + - updatedAt type: object properties: self: type: string - description: The URL that uniquely identifies the resource being returned + description: + The URL that uniquely identifies the resource being returned in the response. example: /prism-agent/verification/policies/0527aea1-d131-3948-a34d-03af39aba8b4 kind: type: string - description: A string that identifies the type of resource being returned + description: + A string that identifies the type of resource being returned in the response. example: VerificationPolicy id: type: string - description: A unique identifier to address the verification policy instance. + description: + A unique identifier to address the verification policy instance. UUID is generated by the backend. format: uuid example: 0527aea1-d131-3948-a34d-03af39aba8b5 nonce: type: integer - description: A number that is changed every time the verification policy + description: + A number that is changed every time the verification policy is updated. format: int32 example: 1234 name: type: string - description: A human-readable name for the verification policy. The `name` + description: + A human-readable name for the verification policy. The `name` cannot be empty. example: Trusted Issuers Verification Policy minLength: 1 description: type: string description: A human-readable description of the verification policy. - example: Verification policy that checks if the credential was issued by + example: + Verification policy that checks if the credential was issued by a trusted issuer. createdAt: type: string - description: '[RFC3339](https://www.rfc-editor.org/rfc/rfc3339) date on - which the verification policy was created.' + description: + "[RFC3339](https://www.rfc-editor.org/rfc/rfc3339) date on + which the verification policy was created." format: date-time example: 2022-03-10T12:00Z updatedAt: type: string - description: '[RFC3339](https://www.rfc-editor.org/rfc/rfc3339) date on - which the verification policy was updated.' + description: + "[RFC3339](https://www.rfc-editor.org/rfc/rfc3339) date on + which the verification policy was updated." format: date-time example: 2022-03-10T12:00Z constraints: type: array items: - $ref: '#/components/schemas/VerificationPolicyConstraint' - description: The object that describes the constraints of the verification + $ref: "#/components/schemas/VerificationPolicyConstraint" + description: + The object that describes the constraints of the verification policy. Each constraint is a tuple of the `schemaId` and a set of DIDs of the trusted issuers. example: - - schemaId: https://example.com/driving-license-1.0 - trustedIssuers: - - did:example:123456789abcdefghi + - schemaId: https://example.com/driving-license-1.0 + trustedIssuers: + - did:example:123456789abcdefghi VerificationPolicyResponsePage: required: - - self - - kind - - pageOf + - self + - kind + - pageOf type: object properties: self: type: string - description: The URL that uniquely identifies the resource being returned + description: + The URL that uniquely identifies the resource being returned in the response. example: /prism-agent/verification/policies?name=Trusted&offset=0&limit=10 kind: type: string - description: A string that identifies the type of resource being returned + description: + A string that identifies the type of resource being returned in the response. example: VerificationPolicyPage pageOf: type: string - description: A string field indicating the type of resource that the contents + description: + A string field indicating the type of resource that the contents field contains example: /prism-agent/verification/policies next: type: string - description: An optional string field containing the URL of the next page + description: + An optional string field containing the URL of the next page of results. If the API response does not contain any more pages, this field should be set to None. example: /prism-agent/verification/policies?skip=20&limit=10 previous: type: string - description: An optional string field containing the URL of the previous + description: + An optional string field containing the URL of the previous page of results. If the API response is the first page of results, this field should be set to None. example: /prism-agent/verification/policies?skip=0&limit=10 contents: type: array items: - $ref: '#/components/schemas/VerificationPolicyResponse' - description: A sequence of VerificationPolicyResponse objects representing + $ref: "#/components/schemas/VerificationPolicyResponse" + description: + A sequence of VerificationPolicyResponse objects representing the list of verification policies that the paginated response contains example: - - self: /prism-agent/verification/policies - kind: VerificationPolicy - id: 0527aea1-d131-3948-a34d-03af39aba8b4 - nonce: 0 - name: Trusted Issuers Verification Policy - description: Verification policy that checks if the credential was issued - by a trusted issuer. - createdAt: '2022-03-10T12:00:00Z' - updatedAt: '2022-03-10T12:00:00Z' - constraints: - - schemaId: https://example.com/driving-license-1.0 - trustedIssuers: - - did:example:123456789abcdefghi + - self: /prism-agent/verification/policies + kind: VerificationPolicy + id: 0527aea1-d131-3948-a34d-03af39aba8b4 + nonce: 0 + name: Trusted Issuers Verification Policy + description: + Verification policy that checks if the credential was issued + by a trusted issuer. + createdAt: "2022-03-10T12:00:00Z" + updatedAt: "2022-03-10T12:00:00Z" + constraints: + - schemaId: https://example.com/driving-license-1.0 + trustedIssuers: + - did:example:123456789abcdefghi WalletDetail: required: - - id - - name - - createdAt - - updatedAt + - id + - name + - createdAt + - updatedAt type: object properties: id: @@ -5130,17 +5335,17 @@ components: type: string description: The `createdAt` timestamp of the wallet. format: date-time - example: '2023-01-01T00:00:00Z' + example: "2023-01-01T00:00:00Z" updatedAt: type: string description: The `updateddAt` timestamp of the wallet. format: date-time - example: '2023-01-01T00:00:00Z' + example: "2023-01-01T00:00:00Z" WalletDetailPage: required: - - self - - kind - - pageOf + - self + - kind + - pageOf type: object properties: self: @@ -5156,13 +5361,13 @@ components: contents: type: array items: - $ref: '#/components/schemas/WalletDetail' + $ref: "#/components/schemas/WalletDetail" WebhookNotification: required: - - id - - url - - customHeaders - - createdAt + - id + - url + - customHeaders + - createdAt type: object properties: id: @@ -5175,17 +5380,17 @@ components: description: A URL of webhook for event notification example: http://example.com customHeaders: - $ref: '#/components/schemas/Map_String' + $ref: "#/components/schemas/Map_String" createdAt: type: string description: A time which the webhook notification resource was created. format: date-time - example: '1970-01-01T00:00:00Z' + example: "1970-01-01T00:00:00Z" WebhookNotificationPage: required: - - self - - kind - - pageOf + - self + - kind + - pageOf type: object properties: self: @@ -5201,28 +5406,31 @@ components: contents: type: array items: - $ref: '#/components/schemas/WebhookNotification' + $ref: "#/components/schemas/WebhookNotification" securitySchemes: apiKeyAuth: type: apiKey - description: API Key Authentication. The header `apikey` must be set with the + description: + API Key Authentication. The header `apikey` must be set with the API key. name: apikey in: header adminApiKeyAuth: type: apiKey - description: Admin API Key Authentication. The header `x-admin-api-key` must + description: + Admin API Key Authentication. The header `x-admin-api-key` must be set with the Admin API key. name: x-admin-api-key in: header jwtAuth: type: http - description: JWT Authentication. The header `Authorization` must be set with + description: + JWT Authentication. The header `Authorization` must be set with the JWT token using `Bearer` scheme name: Authorization in: header scheme: Bearer security: -- apiKeyAuth: [] - adminApiKeyAuth: [] - jwtAuth: [] + - apiKeyAuth: [] + adminApiKeyAuth: [] + jwtAuth: [] diff --git a/prism-agent/service/server/src/main/resources/application.conf b/cloud-agent/service/server/src/main/resources/application.conf similarity index 100% rename from prism-agent/service/server/src/main/resources/application.conf rename to cloud-agent/service/server/src/main/resources/application.conf diff --git a/prism-agent/service/server/src/main/resources/logback.xml b/cloud-agent/service/server/src/main/resources/logback.xml similarity index 100% rename from prism-agent/service/server/src/main/resources/logback.xml rename to cloud-agent/service/server/src/main/resources/logback.xml diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/LogUtils.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/LogUtils.scala similarity index 91% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/LogUtils.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/LogUtils.scala index 0edb7598c6..bfe877b818 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/LogUtils.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/LogUtils.scala @@ -1,7 +1,7 @@ -package io.iohk.atala +package org.hyperledger.identus import zio.* -import io.iohk.atala.api.http.RequestContext +import org.hyperledger.identus.api.http.RequestContext import sttp.model.Header object LogUtils { diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/notification/JsonEventEncoders.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/notification/JsonEventEncoders.scala similarity index 63% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/agent/notification/JsonEventEncoders.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/notification/JsonEventEncoders.scala index dc78bec0b1..c5971216c1 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/notification/JsonEventEncoders.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/notification/JsonEventEncoders.scala @@ -1,18 +1,18 @@ -package io.iohk.atala.agent.notification - -import io.iohk.atala.agent.walletapi.model.ManagedDIDDetail -import io.iohk.atala.castor.controller.http.ManagedDID -import io.iohk.atala.castor.controller.http.ManagedDID.* -import io.iohk.atala.connect.controller.http.Connection -import io.iohk.atala.connect.core.model.ConnectionRecord -import io.iohk.atala.event.notification.Event -import io.iohk.atala.issue.controller.http.IssueCredentialRecord -import io.iohk.atala.pollux.core.model.{ +package org.hyperledger.identus.agent.notification + +import org.hyperledger.identus.agent.walletapi.model.ManagedDIDDetail +import org.hyperledger.identus.castor.controller.http.ManagedDID +import org.hyperledger.identus.castor.controller.http.ManagedDID.* +import org.hyperledger.identus.connect.controller.http.Connection +import org.hyperledger.identus.connect.core.model.ConnectionRecord +import org.hyperledger.identus.event.notification.Event +import org.hyperledger.identus.issue.controller.http.IssueCredentialRecord +import org.hyperledger.identus.pollux.core.model.{ IssueCredentialRecord as PolluxIssueCredentialRecord, PresentationRecord as PolluxPresentationRecord } -import io.iohk.atala.presentproof.controller.http.PresentationStatus -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.presentproof.controller.http.PresentationStatus +import org.hyperledger.identus.shared.models.WalletId import zio.* import zio.json.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/notification/WebhookPublisher.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/notification/WebhookPublisher.scala similarity index 83% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/agent/notification/WebhookPublisher.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/notification/WebhookPublisher.scala index c88aa35806..7eefc95f5c 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/notification/WebhookPublisher.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/notification/WebhookPublisher.scala @@ -1,16 +1,16 @@ -package io.iohk.atala.agent.notification +package org.hyperledger.identus.agent.notification -import io.iohk.atala.agent.notification.JsonEventEncoders.* -import io.iohk.atala.agent.notification.WebhookPublisherError.UnexpectedError -import io.iohk.atala.agent.server.config.AppConfig -import io.iohk.atala.agent.walletapi.model.ManagedDIDDetail -import io.iohk.atala.agent.walletapi.service.WalletManagementService -import io.iohk.atala.connect.core.model.ConnectionRecord -import io.iohk.atala.event.notification.EventNotificationConfig -import io.iohk.atala.event.notification.{Event, EventConsumer, EventNotificationService} -import io.iohk.atala.pollux.core.model.{IssueCredentialRecord, PresentationRecord} -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.agent.notification.JsonEventEncoders.* +import org.hyperledger.identus.agent.notification.WebhookPublisherError.UnexpectedError +import org.hyperledger.identus.agent.server.config.AppConfig +import org.hyperledger.identus.agent.walletapi.model.ManagedDIDDetail +import org.hyperledger.identus.agent.walletapi.service.WalletManagementService +import org.hyperledger.identus.connect.core.model.ConnectionRecord +import org.hyperledger.identus.event.notification.EventNotificationConfig +import org.hyperledger.identus.event.notification.{Event, EventConsumer, EventNotificationService} +import org.hyperledger.identus.pollux.core.model.{IssueCredentialRecord, PresentationRecord} +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletId import zio.* import zio.http.* import zio.json.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/notification/WebhookPublisherError.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/notification/WebhookPublisherError.scala similarity index 80% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/agent/notification/WebhookPublisherError.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/notification/WebhookPublisherError.scala index 4d629c0684..13684ecb40 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/notification/WebhookPublisherError.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/notification/WebhookPublisherError.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.agent.notification +package org.hyperledger.identus.agent.notification sealed trait WebhookPublisherError diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/ControllerHelper.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/ControllerHelper.scala similarity index 66% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/ControllerHelper.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/ControllerHelper.scala index 66f79f3177..30a756285a 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/ControllerHelper.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/ControllerHelper.scala @@ -1,18 +1,21 @@ -package io.iohk.atala.agent.server +package org.hyperledger.identus.agent.server -import io.iohk.atala.agent.walletapi.model.PublicationState.Published -import io.iohk.atala.agent.walletapi.model.error.GetManagedDIDError -import io.iohk.atala.agent.walletapi.model.{ManagedDIDState, PublicationState} -import io.iohk.atala.agent.walletapi.service.ManagedDIDService -import io.iohk.atala.api.http.ErrorResponse -import io.iohk.atala.castor.core.model.did.{LongFormPrismDID, PrismDID} -import io.iohk.atala.connect.core.model.ConnectionRecord -import io.iohk.atala.connect.core.model.ConnectionRecord.{ProtocolState, Role} -import io.iohk.atala.connect.core.model.error.ConnectionServiceError -import io.iohk.atala.connect.core.model.error.ConnectionServiceError.{InvalidStateForOperation, RecordIdNotFound} -import io.iohk.atala.connect.core.service.ConnectionService -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.agent.walletapi.model.PublicationState.Published +import org.hyperledger.identus.agent.walletapi.model.error.GetManagedDIDError +import org.hyperledger.identus.agent.walletapi.model.{ManagedDIDState, PublicationState} +import org.hyperledger.identus.agent.walletapi.service.ManagedDIDService +import org.hyperledger.identus.api.http.ErrorResponse +import org.hyperledger.identus.castor.core.model.did.{LongFormPrismDID, PrismDID} +import org.hyperledger.identus.connect.core.model.ConnectionRecord +import org.hyperledger.identus.connect.core.model.ConnectionRecord.{ProtocolState, Role} +import org.hyperledger.identus.connect.core.model.error.ConnectionServiceError +import org.hyperledger.identus.connect.core.model.error.ConnectionServiceError.{ + InvalidStateForOperation, + RecordIdNotFound +} +import org.hyperledger.identus.connect.core.service.ConnectionService +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.{IO, ZIO} import java.util.UUID @@ -50,9 +53,9 @@ trait ControllerHelper { protected def extractDidCommIdFromString( maybeDidCommId: String - ): IO[ErrorResponse, io.iohk.atala.pollux.core.model.DidCommID] = + ): IO[ErrorResponse, org.hyperledger.identus.pollux.core.model.DidCommID] = ZIO - .fromTry(Try(io.iohk.atala.pollux.core.model.DidCommID(maybeDidCommId))) + .fromTry(Try(org.hyperledger.identus.pollux.core.model.DidCommID(maybeDidCommId))) .mapError(e => ErrorResponse.badRequest(detail = Some(s"Error parsing string as DidCommID: ${e.getMessage}"))) protected def extractPrismDIDFromString(maybeDid: String): IO[ErrorResponse, PrismDID] = diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/DidCommHttpServer.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/DidCommHttpServer.scala similarity index 86% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/DidCommHttpServer.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/DidCommHttpServer.scala index 80d1158384..a94f10ac26 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/DidCommHttpServer.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/DidCommHttpServer.scala @@ -1,31 +1,31 @@ -package io.iohk.atala.agent.server +package org.hyperledger.identus.agent.server import io.circe.* import io.circe.parser.* -import io.iohk.atala.agent.server.DidCommHttpServerError.{ +import org.hyperledger.identus.agent.server.DidCommHttpServerError.{ DIDCommMessageParsingError, InvalidContentTypeError, RequestBodyParsingError } -import io.iohk.atala.agent.server.config.AppConfig -import io.iohk.atala.agent.walletapi.model.error.DIDSecretStorageError -import io.iohk.atala.agent.walletapi.model.error.DIDSecretStorageError.{KeyNotFoundError, WalletNotFoundError} -import io.iohk.atala.agent.walletapi.service.ManagedDIDService -import io.iohk.atala.agent.walletapi.storage.DIDNonSecretStorage -import io.iohk.atala.connect.core.model.error.ConnectionServiceError -import io.iohk.atala.connect.core.service.ConnectionService -import io.iohk.atala.mercury.* -import io.iohk.atala.mercury.DidOps.* -import io.iohk.atala.mercury.model.* -import io.iohk.atala.mercury.model.error.* -import io.iohk.atala.mercury.protocol.connection.{ConnectionRequest, ConnectionResponse} -import io.iohk.atala.mercury.protocol.issuecredential.* -import io.iohk.atala.mercury.protocol.presentproof.* -import io.iohk.atala.mercury.protocol.revocationnotificaiton.RevocationNotification -import io.iohk.atala.pollux.core.model.error.{CredentialServiceError, PresentationError} -import io.iohk.atala.pollux.core.service.{CredentialService, PresentationService} -import io.iohk.atala.resolvers.DIDResolver -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.agent.server.config.AppConfig +import org.hyperledger.identus.agent.walletapi.model.error.DIDSecretStorageError +import org.hyperledger.identus.agent.walletapi.model.error.DIDSecretStorageError.{KeyNotFoundError, WalletNotFoundError} +import org.hyperledger.identus.agent.walletapi.service.ManagedDIDService +import org.hyperledger.identus.agent.walletapi.storage.DIDNonSecretStorage +import org.hyperledger.identus.connect.core.model.error.ConnectionServiceError +import org.hyperledger.identus.connect.core.service.ConnectionService +import org.hyperledger.identus.mercury.* +import org.hyperledger.identus.mercury.DidOps.* +import org.hyperledger.identus.mercury.model.* +import org.hyperledger.identus.mercury.error.* +import org.hyperledger.identus.mercury.protocol.connection.{ConnectionRequest, ConnectionResponse} +import org.hyperledger.identus.mercury.protocol.issuecredential.* +import org.hyperledger.identus.mercury.protocol.presentproof.* +import org.hyperledger.identus.mercury.protocol.revocationnotificaiton.RevocationNotification +import org.hyperledger.identus.pollux.core.model.error.{CredentialServiceError, PresentationError} +import org.hyperledger.identus.pollux.core.service.{CredentialService, PresentationService} +import org.hyperledger.identus.resolvers.DIDResolver +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import zio.http.* import java.util.UUID diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/DidCommHttpServerError.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/DidCommHttpServerError.scala similarity index 87% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/DidCommHttpServerError.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/DidCommHttpServerError.scala index aacbbe732e..042a9835b6 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/DidCommHttpServerError.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/DidCommHttpServerError.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.agent.server +package org.hyperledger.identus.agent.server sealed trait DidCommHttpServerError diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/Main.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/MainApp.scala similarity index 76% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/Main.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/MainApp.scala index b12d7fbdf0..6e4ac6dfd2 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/Main.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/MainApp.scala @@ -1,43 +1,47 @@ -package io.iohk.atala.agent.server +package org.hyperledger.identus.agent.server import com.nimbusds.jose.crypto.bc.BouncyCastleProviderSingleton -import io.iohk.atala.agent.server.config.AppConfig -import io.iohk.atala.agent.server.http.ZioHttpClient -import io.iohk.atala.agent.server.sql.Migrations as AgentMigrations -import io.iohk.atala.agent.walletapi.service.{ +import org.hyperledger.identus.agent.server.config.AppConfig +import org.hyperledger.identus.agent.server.http.ZioHttpClient +import org.hyperledger.identus.agent.server.sql.Migrations as AgentMigrations +import org.hyperledger.identus.agent.walletapi.service.{ EntityServiceImpl, ManagedDIDService, ManagedDIDServiceWithEventNotificationImpl, WalletManagementServiceImpl } -import io.iohk.atala.agent.walletapi.sql.{JdbcDIDNonSecretStorage, JdbcEntityRepository, JdbcWalletNonSecretStorage} -import io.iohk.atala.agent.walletapi.storage.GenericSecretStorage -import io.iohk.atala.castor.controller.{DIDControllerImpl, DIDRegistrarControllerImpl} -import io.iohk.atala.castor.core.service.DIDServiceImpl -import io.iohk.atala.castor.core.util.DIDOperationValidator -import io.iohk.atala.connect.controller.ConnectionControllerImpl -import io.iohk.atala.connect.core.service.{ConnectionServiceImpl, ConnectionServiceNotifier} -import io.iohk.atala.connect.sql.repository.{JdbcConnectionRepository, Migrations as ConnectMigrations} -import io.iohk.atala.credentialstatus.controller.CredentialStatusControllerImpl -import io.iohk.atala.event.controller.EventControllerImpl -import io.iohk.atala.event.notification.EventNotificationServiceImpl -import io.iohk.atala.iam.authentication.DefaultAuthenticator -import io.iohk.atala.iam.authentication.apikey.JdbcAuthenticationRepository -import io.iohk.atala.iam.authorization.DefaultPermissionManagementService -import io.iohk.atala.iam.authorization.core.EntityPermissionManagementService -import io.iohk.atala.iam.entity.http.controller.{EntityController, EntityControllerImpl} -import io.iohk.atala.iam.wallet.http.controller.WalletManagementControllerImpl -import io.iohk.atala.issue.controller.IssueControllerImpl -import io.iohk.atala.mercury.* -import io.iohk.atala.pollux.core.service.* -import io.iohk.atala.pollux.core.service.verification.VcVerificationServiceImpl -import io.iohk.atala.pollux.credentialdefinition.controller.CredentialDefinitionControllerImpl -import io.iohk.atala.pollux.credentialschema.controller.{ +import org.hyperledger.identus.agent.walletapi.sql.{ + JdbcDIDNonSecretStorage, + JdbcEntityRepository, + JdbcWalletNonSecretStorage +} +import org.hyperledger.identus.agent.walletapi.storage.GenericSecretStorage +import org.hyperledger.identus.castor.controller.{DIDControllerImpl, DIDRegistrarControllerImpl} +import org.hyperledger.identus.castor.core.service.DIDServiceImpl +import org.hyperledger.identus.castor.core.util.DIDOperationValidator +import org.hyperledger.identus.connect.controller.ConnectionControllerImpl +import org.hyperledger.identus.connect.core.service.{ConnectionServiceImpl, ConnectionServiceNotifier} +import org.hyperledger.identus.connect.sql.repository.{JdbcConnectionRepository, Migrations as ConnectMigrations} +import org.hyperledger.identus.credential.status.controller.CredentialStatusControllerImpl +import org.hyperledger.identus.event.controller.EventControllerImpl +import org.hyperledger.identus.event.notification.EventNotificationServiceImpl +import org.hyperledger.identus.iam.authentication.DefaultAuthenticator +import org.hyperledger.identus.iam.authentication.apikey.JdbcAuthenticationRepository +import org.hyperledger.identus.iam.authorization.DefaultPermissionManagementService +import org.hyperledger.identus.iam.authorization.core.EntityPermissionManagementService +import org.hyperledger.identus.iam.entity.http.controller.{EntityController, EntityControllerImpl} +import org.hyperledger.identus.iam.wallet.http.controller.WalletManagementControllerImpl +import org.hyperledger.identus.issue.controller.IssueControllerImpl +import org.hyperledger.identus.mercury.* +import org.hyperledger.identus.pollux.core.service.* +import org.hyperledger.identus.pollux.core.service.verification.VcVerificationServiceImpl +import org.hyperledger.identus.pollux.credentialdefinition.controller.CredentialDefinitionControllerImpl +import org.hyperledger.identus.pollux.credentialschema.controller.{ CredentialSchemaController, CredentialSchemaControllerImpl, VerificationPolicyControllerImpl } -import io.iohk.atala.pollux.sql.repository.{ +import org.hyperledger.identus.pollux.sql.repository.{ JdbcCredentialDefinitionRepository, JdbcCredentialRepository, JdbcCredentialSchemaRepository, @@ -46,10 +50,10 @@ import io.iohk.atala.pollux.sql.repository.{ JdbcVerificationPolicyRepository, Migrations as PolluxMigrations } -import io.iohk.atala.presentproof.controller.PresentProofControllerImpl -import io.iohk.atala.resolvers.DIDResolver -import io.iohk.atala.system.controller.SystemControllerImpl -import io.iohk.atala.verification.controller.VcVerificationControllerImpl +import org.hyperledger.identus.presentproof.controller.PresentProofControllerImpl +import org.hyperledger.identus.resolvers.DIDResolver +import org.hyperledger.identus.system.controller.SystemControllerImpl +import org.hyperledger.identus.verification.controller.VcVerificationControllerImpl import io.micrometer.prometheus.{PrometheusConfig, PrometheusMeterRegistry} import zio.* import zio.metrics.connectors.micrometer diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/Modules.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/Modules.scala similarity index 79% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/Modules.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/Modules.scala index 7896437f49..92e42c4e0a 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/Modules.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/Modules.scala @@ -1,41 +1,45 @@ -package io.iohk.atala.agent.server +package org.hyperledger.identus.agent.server import com.typesafe.config.ConfigFactory import doobie.util.transactor.Transactor import io.grpc.ManagedChannelBuilder -import io.iohk.atala.agent.server.config.AppConfig -import io.iohk.atala.agent.server.config.SecretStorageBackend -import io.iohk.atala.agent.server.config.ValidatedVaultConfig -import io.iohk.atala.agent.walletapi.service.EntityService -import io.iohk.atala.agent.walletapi.service.WalletManagementService -import io.iohk.atala.agent.walletapi.sql.{JdbcDIDSecretStorage, JdbcGenericSecretStorage, JdbcWalletSecretStorage} -import io.iohk.atala.agent.walletapi.storage.{DIDSecretStorage, GenericSecretStorage, WalletSecretStorage} -import io.iohk.atala.agent.walletapi.vault.* -import io.iohk.atala.agent.walletapi.vault.{ +import org.hyperledger.identus.agent.server.config.AppConfig +import org.hyperledger.identus.agent.server.config.SecretStorageBackend +import org.hyperledger.identus.agent.server.config.ValidatedVaultConfig +import org.hyperledger.identus.agent.walletapi.service.EntityService +import org.hyperledger.identus.agent.walletapi.service.WalletManagementService +import org.hyperledger.identus.agent.walletapi.sql.{ + JdbcDIDSecretStorage, + JdbcGenericSecretStorage, + JdbcWalletSecretStorage +} +import org.hyperledger.identus.agent.walletapi.storage.{DIDSecretStorage, GenericSecretStorage, WalletSecretStorage} +import org.hyperledger.identus.agent.walletapi.vault.* +import org.hyperledger.identus.agent.walletapi.vault.{ VaultDIDSecretStorage, VaultKVClient, VaultKVClientImpl, VaultWalletSecretStorage } -import io.iohk.atala.castor.core.service.DIDService -import io.iohk.atala.iam.authentication.admin.AdminApiKeyAuthenticator -import io.iohk.atala.iam.authentication.admin.AdminApiKeyAuthenticatorImpl -import io.iohk.atala.iam.authentication.admin.AdminConfig -import io.iohk.atala.iam.authentication.apikey.ApiKeyAuthenticator -import io.iohk.atala.iam.authentication.apikey.ApiKeyAuthenticatorImpl -import io.iohk.atala.iam.authentication.apikey.ApiKeyConfig -import io.iohk.atala.iam.authentication.apikey.AuthenticationRepository -import io.iohk.atala.iam.authentication.oidc.KeycloakAuthenticator -import io.iohk.atala.iam.authentication.oidc.KeycloakAuthenticatorImpl -import io.iohk.atala.iam.authentication.oidc.KeycloakClientImpl -import io.iohk.atala.iam.authentication.oidc.KeycloakConfig -import io.iohk.atala.iam.authentication.oidc.KeycloakEntity -import io.iohk.atala.iam.authorization.core.PermissionManagement -import io.iohk.atala.iam.authorization.keycloak.admin.KeycloakPermissionManagementService -import io.iohk.atala.pollux.vc.jwt.{PrismDidResolver, DidResolver as JwtDidResolver} +import org.hyperledger.identus.castor.core.service.DIDService +import org.hyperledger.identus.iam.authentication.admin.AdminApiKeyAuthenticator +import org.hyperledger.identus.iam.authentication.admin.AdminApiKeyAuthenticatorImpl +import org.hyperledger.identus.iam.authentication.admin.AdminConfig +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyAuthenticator +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyAuthenticatorImpl +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyConfig +import org.hyperledger.identus.iam.authentication.apikey.AuthenticationRepository +import org.hyperledger.identus.iam.authentication.oidc.KeycloakAuthenticator +import org.hyperledger.identus.iam.authentication.oidc.KeycloakAuthenticatorImpl +import org.hyperledger.identus.iam.authentication.oidc.KeycloakClientImpl +import org.hyperledger.identus.iam.authentication.oidc.KeycloakConfig +import org.hyperledger.identus.iam.authentication.oidc.KeycloakEntity +import org.hyperledger.identus.iam.authorization.core.PermissionManagement +import org.hyperledger.identus.iam.authorization.keycloak.admin.KeycloakPermissionManagementService +import org.hyperledger.identus.pollux.vc.jwt.{PrismDidResolver, DidResolver as JwtDidResolver} import io.iohk.atala.prism.protos.node_api.NodeServiceGrpc -import io.iohk.atala.shared.crypto.Apollo -import io.iohk.atala.shared.db.{ContextAwareTask, DbConfig, TransactorLayer} +import org.hyperledger.identus.shared.crypto.Apollo +import org.hyperledger.identus.shared.db.{ContextAwareTask, DbConfig, TransactorLayer} import org.keycloak.authorization.client.AuthzClient import zio.* import zio.config.typesafe.TypesafeConfigProvider diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/PrismAgentApp.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/PrismAgentApp.scala similarity index 76% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/PrismAgentApp.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/PrismAgentApp.scala index a8950f0c1b..84e704fda0 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/PrismAgentApp.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/PrismAgentApp.scala @@ -1,34 +1,37 @@ -package io.iohk.atala.agent.server - -import io.iohk.atala.agent.notification.WebhookPublisher -import io.iohk.atala.agent.server.config.AppConfig -import io.iohk.atala.agent.server.http.{ZHttp4sBlazeServer, ZHttpEndpoints} -import io.iohk.atala.agent.server.jobs.* -import io.iohk.atala.agent.walletapi.model.{Entity, Wallet, WalletSeed} -import io.iohk.atala.agent.walletapi.service.{EntityService, ManagedDIDService, WalletManagementService} -import io.iohk.atala.agent.walletapi.storage.DIDNonSecretStorage -import io.iohk.atala.castor.controller.{DIDRegistrarServerEndpoints, DIDServerEndpoints} -import io.iohk.atala.castor.core.service.DIDService -import io.iohk.atala.connect.controller.ConnectionServerEndpoints -import io.iohk.atala.connect.core.service.ConnectionService -import io.iohk.atala.credentialstatus.controller.CredentialStatusServiceEndpoints -import io.iohk.atala.event.controller.EventServerEndpoints -import io.iohk.atala.event.notification.EventNotificationConfig -import io.iohk.atala.iam.authentication.apikey.ApiKeyAuthenticator -import io.iohk.atala.iam.entity.http.EntityServerEndpoints -import io.iohk.atala.iam.wallet.http.WalletManagementServerEndpoints -import io.iohk.atala.issue.controller.IssueServerEndpoints -import io.iohk.atala.mercury.{DidOps, HttpClient} -import io.iohk.atala.pollux.core.service.{CredentialService, PresentationService} -import io.iohk.atala.pollux.credentialdefinition.CredentialDefinitionRegistryServerEndpoints -import io.iohk.atala.pollux.credentialschema.{SchemaRegistryServerEndpoints, VerificationPolicyServerEndpoints} -import io.iohk.atala.pollux.vc.jwt.DidResolver as JwtDidResolver -import io.iohk.atala.presentproof.controller.PresentProofServerEndpoints -import io.iohk.atala.resolvers.DIDResolver -import io.iohk.atala.shared.models.{HexString, WalletAccessContext, WalletAdministrationContext, WalletId} -import io.iohk.atala.shared.utils.DurationOps.toMetricsSeconds -import io.iohk.atala.system.controller.SystemServerEndpoints -import io.iohk.atala.verification.controller.VcVerificationServerEndpoints +package org.hyperledger.identus.agent.server + +import org.hyperledger.identus.agent.notification.WebhookPublisher +import org.hyperledger.identus.agent.server.config.AppConfig +import org.hyperledger.identus.agent.server.http.{ZHttp4sBlazeServer, ZHttpEndpoints} +import org.hyperledger.identus.agent.server.jobs.* +import org.hyperledger.identus.agent.walletapi.model.{Entity, Wallet, WalletSeed} +import org.hyperledger.identus.agent.walletapi.service.{EntityService, ManagedDIDService, WalletManagementService} +import org.hyperledger.identus.agent.walletapi.storage.DIDNonSecretStorage +import org.hyperledger.identus.castor.controller.{DIDRegistrarServerEndpoints, DIDServerEndpoints} +import org.hyperledger.identus.castor.core.service.DIDService +import org.hyperledger.identus.connect.controller.ConnectionServerEndpoints +import org.hyperledger.identus.connect.core.service.ConnectionService +import org.hyperledger.identus.credential.status.controller.CredentialStatusServiceEndpoints +import org.hyperledger.identus.event.controller.EventServerEndpoints +import org.hyperledger.identus.event.notification.EventNotificationConfig +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyAuthenticator +import org.hyperledger.identus.iam.entity.http.EntityServerEndpoints +import org.hyperledger.identus.iam.wallet.http.WalletManagementServerEndpoints +import org.hyperledger.identus.issue.controller.IssueServerEndpoints +import org.hyperledger.identus.mercury.{DidOps, HttpClient} +import org.hyperledger.identus.pollux.core.service.{CredentialService, PresentationService} +import org.hyperledger.identus.pollux.credentialdefinition.CredentialDefinitionRegistryServerEndpoints +import org.hyperledger.identus.pollux.credentialschema.{ + SchemaRegistryServerEndpoints, + VerificationPolicyServerEndpoints +} +import org.hyperledger.identus.pollux.vc.jwt.DidResolver as JwtDidResolver +import org.hyperledger.identus.presentproof.controller.PresentProofServerEndpoints +import org.hyperledger.identus.shared.models.{HexString, WalletAccessContext, WalletAdministrationContext, WalletId} +import org.hyperledger.identus.resolvers.DIDResolver +import org.hyperledger.identus.shared.utils.DurationOps.toMetricsSeconds +import org.hyperledger.identus.system.controller.SystemServerEndpoints +import org.hyperledger.identus.verification.controller.VcVerificationServerEndpoints import zio.* import zio.metrics.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/config/AppConfig.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/config/AppConfig.scala similarity index 95% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/config/AppConfig.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/config/AppConfig.scala index 9f3ab58e52..b0379ce672 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/config/AppConfig.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/config/AppConfig.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.agent.server.config +package org.hyperledger.identus.agent.server.config -import io.iohk.atala.castor.core.model.did.VerificationRelationship -import io.iohk.atala.iam.authentication.AuthenticationConfig -import io.iohk.atala.pollux.vc.jwt.* -import io.iohk.atala.shared.db.DbConfig +import org.hyperledger.identus.castor.core.model.did.VerificationRelationship +import org.hyperledger.identus.iam.authentication.AuthenticationConfig +import org.hyperledger.identus.pollux.vc.jwt.* +import org.hyperledger.identus.shared.db.DbConfig import zio.Config import zio.config.* import zio.config.magnolia.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/http/CustomServerInterceptors.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/http/CustomServerInterceptors.scala similarity index 96% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/http/CustomServerInterceptors.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/http/CustomServerInterceptors.scala index 7e52ba4ef0..1a3c46a442 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/http/CustomServerInterceptors.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/http/CustomServerInterceptors.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.agent.server.http +package org.hyperledger.identus.agent.server.http -import io.iohk.atala.api.http.ErrorResponse -import io.iohk.atala.shared.models.StatusCode +import org.hyperledger.identus.api.http.ErrorResponse +import org.hyperledger.identus.shared.models.StatusCode import org.log4s.* import sttp.tapir.* import sttp.tapir.json.zio.jsonBody diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/http/DocModels.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/http/DocModels.scala similarity index 87% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/http/DocModels.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/http/DocModels.scala index 2c54b9f308..f80c886577 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/http/DocModels.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/http/DocModels.scala @@ -1,17 +1,17 @@ -package io.iohk.atala.agent.server.http +package org.hyperledger.identus.agent.server.http -import io.iohk.atala.castor.controller.{DIDEndpoints, DIDRegistrarEndpoints} -import io.iohk.atala.connect.controller.ConnectionEndpoints -import io.iohk.atala.iam.wallet.http.WalletManagementEndpoints -import io.iohk.atala.pollux.credentialdefinition.CredentialDefinitionRegistryEndpoints -import io.iohk.atala.pollux.credentialschema.{SchemaRegistryEndpoints, VerificationPolicyEndpoints} -import io.iohk.atala.system.controller.SystemEndpoints +import org.hyperledger.identus.castor.controller.{DIDEndpoints, DIDRegistrarEndpoints} +import org.hyperledger.identus.connect.controller.ConnectionEndpoints +import org.hyperledger.identus.iam.wallet.http.WalletManagementEndpoints +import org.hyperledger.identus.pollux.credentialdefinition.CredentialDefinitionRegistryEndpoints +import org.hyperledger.identus.pollux.credentialschema.{SchemaRegistryEndpoints, VerificationPolicyEndpoints} +import org.hyperledger.identus.system.controller.SystemEndpoints import sttp.apispec.openapi.* import sttp.apispec.{SecurityScheme, Tag} import sttp.model.headers.AuthenticationScheme import scala.collection.immutable.ListMap -import io.iohk.atala.issue.controller.IssueEndpoints +import org.hyperledger.identus.issue.controller.IssueEndpoints object DocModels { diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/http/ZHttp4sBlazeServer.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/http/ZHttp4sBlazeServer.scala similarity index 93% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/http/ZHttp4sBlazeServer.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/http/ZHttp4sBlazeServer.scala index 58654aff4c..6c57437737 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/http/ZHttp4sBlazeServer.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/http/ZHttp4sBlazeServer.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.agent.server.http +package org.hyperledger.identus.agent.server.http -import io.iohk.atala.api.http.ErrorResponse -import io.iohk.atala.system.controller.SystemEndpoints +import org.hyperledger.identus.api.http.ErrorResponse +import org.hyperledger.identus.system.controller.SystemEndpoints import io.micrometer.prometheus.PrometheusMeterRegistry import org.http4s.* import org.http4s.blaze.server.BlazeServerBuilder diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/http/ZHttpEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/http/ZHttpEndpoints.scala similarity index 91% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/http/ZHttpEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/http/ZHttpEndpoints.scala index 384976e388..a280470ac3 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/http/ZHttpEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/http/ZHttpEndpoints.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.agent.server.http +package org.hyperledger.identus.agent.server.http -import io.iohk.atala.agent.server.buildinfo.BuildInfo +import org.hyperledger.identus.agent.server.buildinfo.BuildInfo import sttp.apispec.openapi.OpenAPI import sttp.tapir.redoc.RedocUIOptions import sttp.tapir.redoc.bundle.RedocInterpreter diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/http/ZioHttpClient.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/http/ZioHttpClient.scala similarity index 94% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/http/ZioHttpClient.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/http/ZioHttpClient.scala index 95a2c4779e..83ac8ade77 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/http/ZioHttpClient.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/http/ZioHttpClient.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.agent.server.http +package org.hyperledger.identus.agent.server.http -import io.iohk.atala.mercury.* +import org.hyperledger.identus.mercury.* import zio.* import zio.http.{Header as _, *} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/jobs/BackgroundJobError.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/jobs/BackgroundJobError.scala similarity index 80% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/jobs/BackgroundJobError.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/jobs/BackgroundJobError.scala index c58b1c9419..ca860b5995 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/jobs/BackgroundJobError.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/jobs/BackgroundJobError.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.agent.server.jobs +package org.hyperledger.identus.agent.server.jobs -import io.iohk.atala.mercury.HttpResponse +import org.hyperledger.identus.mercury.HttpResponse sealed trait BackgroundJobError diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/jobs/BackgroundJobsHelper.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/jobs/BackgroundJobsHelper.scala similarity index 77% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/jobs/BackgroundJobsHelper.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/jobs/BackgroundJobsHelper.scala index 37d1a3e563..d3e9ba5845 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/jobs/BackgroundJobsHelper.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/jobs/BackgroundJobsHelper.scala @@ -1,17 +1,17 @@ -package io.iohk.atala.agent.server.jobs +package org.hyperledger.identus.agent.server.jobs -import io.iohk.atala.agent.walletapi.model.error.DIDSecretStorageError.KeyNotFoundError -import io.iohk.atala.agent.walletapi.model.{ManagedDIDState, PublicationState} -import io.iohk.atala.agent.walletapi.service.ManagedDIDService -import io.iohk.atala.castor.core.model.did.{LongFormPrismDID, PrismDID, VerificationRelationship} -import io.iohk.atala.castor.core.service.DIDService -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.mercury.{AgentPeerService, DidAgent} -import io.iohk.atala.pollux.vc.jwt.{ES256KSigner, Issuer as JwtIssuer} -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.agent.walletapi.model.error.DIDSecretStorageError.KeyNotFoundError +import org.hyperledger.identus.agent.walletapi.model.{ManagedDIDState, PublicationState} +import org.hyperledger.identus.agent.walletapi.service.ManagedDIDService +import org.hyperledger.identus.castor.core.model.did.{LongFormPrismDID, PrismDID, VerificationRelationship} +import org.hyperledger.identus.castor.core.service.DIDService +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.mercury.{AgentPeerService, DidAgent} +import org.hyperledger.identus.pollux.vc.jwt.{ES256KSigner, Issuer as JwtIssuer} +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.{ZIO, ZLayer} -import io.iohk.atala.agent.walletapi.storage.DIDNonSecretStorage -import io.iohk.atala.agent.walletapi.model.error.DIDSecretStorageError.WalletNotFoundError +import org.hyperledger.identus.agent.walletapi.storage.DIDNonSecretStorage +import org.hyperledger.identus.agent.walletapi.model.error.DIDSecretStorageError.WalletNotFoundError trait BackgroundJobsHelper { @@ -57,7 +57,7 @@ trait BackgroundJobsHelper { ) (privateKey, publicKey) = ecKeyPair jwtIssuer = JwtIssuer( - io.iohk.atala.pollux.vc.jwt.DID(jwtIssuerDID.toString), + org.hyperledger.identus.pollux.vc.jwt.DID(jwtIssuerDID.toString), ES256KSigner(privateKey), publicKey ) diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/jobs/ConnectBackgroundJobs.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/jobs/ConnectBackgroundJobs.scala similarity index 87% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/jobs/ConnectBackgroundJobs.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/jobs/ConnectBackgroundJobs.scala index 117862ffb2..9bc0bc8809 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/jobs/ConnectBackgroundJobs.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/jobs/ConnectBackgroundJobs.scala @@ -1,21 +1,19 @@ -package io.iohk.atala.agent.server.jobs +package org.hyperledger.identus.agent.server.jobs -import io.iohk.atala.agent.server.config.AppConfig -import io.iohk.atala.agent.server.jobs.BackgroundJobError.ErrorResponseReceivedFromPeerAgent -import io.iohk.atala.agent.walletapi.model.error.DIDSecretStorageError -import io.iohk.atala.agent.walletapi.model.error.DIDSecretStorageError.{KeyNotFoundError, WalletNotFoundError} -import io.iohk.atala.agent.walletapi.service.ManagedDIDService -import io.iohk.atala.agent.walletapi.storage.DIDNonSecretStorage -import io.iohk.atala.connect.core.model.ConnectionRecord -import io.iohk.atala.connect.core.model.ConnectionRecord.* -import io.iohk.atala.connect.core.service.ConnectionService -import io.iohk.atala.mercury.* -import io.iohk.atala.mercury.model.* -import io.iohk.atala.mercury.model.error.* -import io.iohk.atala.resolvers.DIDResolver -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.utils.DurationOps.toMetricsSeconds -import io.iohk.atala.shared.utils.aspects.CustomMetricsAspect +import org.hyperledger.identus.agent.server.config.AppConfig +import org.hyperledger.identus.agent.server.jobs.BackgroundJobError.ErrorResponseReceivedFromPeerAgent +import org.hyperledger.identus.agent.walletapi.model.error.DIDSecretStorageError +import org.hyperledger.identus.agent.walletapi.model.error.DIDSecretStorageError.{KeyNotFoundError, WalletNotFoundError} +import org.hyperledger.identus.agent.walletapi.service.ManagedDIDService +import org.hyperledger.identus.agent.walletapi.storage.DIDNonSecretStorage +import org.hyperledger.identus.connect.core.model.ConnectionRecord +import org.hyperledger.identus.connect.core.model.ConnectionRecord.* +import org.hyperledger.identus.connect.core.service.ConnectionService +import org.hyperledger.identus.mercury.* +import org.hyperledger.identus.resolvers.DIDResolver +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.utils.DurationOps.toMetricsSeconds +import org.hyperledger.identus.shared.utils.aspects.CustomMetricsAspect import zio.* import zio.metrics.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/jobs/DIDStateSyncBackgroundJobs.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/jobs/DIDStateSyncBackgroundJobs.scala similarity index 70% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/jobs/DIDStateSyncBackgroundJobs.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/jobs/DIDStateSyncBackgroundJobs.scala index 39de8dacae..22e4e9d568 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/jobs/DIDStateSyncBackgroundJobs.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/jobs/DIDStateSyncBackgroundJobs.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.agent.server.jobs +package org.hyperledger.identus.agent.server.jobs -import io.iohk.atala.agent.walletapi.service.ManagedDIDService +import org.hyperledger.identus.agent.walletapi.service.ManagedDIDService import zio.* object DIDStateSyncBackgroundJobs { diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/jobs/IssueBackgroundJobs.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/jobs/IssueBackgroundJobs.scala similarity index 95% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/jobs/IssueBackgroundJobs.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/jobs/IssueBackgroundJobs.scala index cb25f944c1..1cb1461f85 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/jobs/IssueBackgroundJobs.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/jobs/IssueBackgroundJobs.scala @@ -1,16 +1,16 @@ -package io.iohk.atala.agent.server.jobs - -import io.iohk.atala.agent.server.config.AppConfig -import io.iohk.atala.agent.server.jobs.BackgroundJobError.ErrorResponseReceivedFromPeerAgent -import io.iohk.atala.agent.walletapi.model.error.DIDSecretStorageError.WalletNotFoundError -import io.iohk.atala.castor.core.model.did.* -import io.iohk.atala.mercury.* -import io.iohk.atala.mercury.protocol.issuecredential.* -import io.iohk.atala.pollux.core.model.* -import io.iohk.atala.pollux.core.model.error.CredentialServiceError -import io.iohk.atala.pollux.core.service.CredentialService -import io.iohk.atala.shared.utils.DurationOps.toMetricsSeconds -import io.iohk.atala.shared.utils.aspects.CustomMetricsAspect +package org.hyperledger.identus.agent.server.jobs + +import org.hyperledger.identus.agent.server.config.AppConfig +import org.hyperledger.identus.agent.server.jobs.BackgroundJobError.ErrorResponseReceivedFromPeerAgent +import org.hyperledger.identus.agent.walletapi.model.error.DIDSecretStorageError.WalletNotFoundError +import org.hyperledger.identus.castor.core.model.did.* +import org.hyperledger.identus.mercury.* +import org.hyperledger.identus.mercury.protocol.issuecredential.* +import org.hyperledger.identus.pollux.core.model.* +import org.hyperledger.identus.pollux.core.model.error.CredentialServiceError +import org.hyperledger.identus.pollux.core.service.CredentialService +import org.hyperledger.identus.shared.utils.DurationOps.toMetricsSeconds +import org.hyperledger.identus.shared.utils.aspects.CustomMetricsAspect import zio.* import zio.metrics.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/jobs/PresentBackgroundJobs.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/jobs/PresentBackgroundJobs.scala similarity index 93% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/jobs/PresentBackgroundJobs.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/jobs/PresentBackgroundJobs.scala index 6f7e3f3b00..5f2f3b4718 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/jobs/PresentBackgroundJobs.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/jobs/PresentBackgroundJobs.scala @@ -1,40 +1,40 @@ -package io.iohk.atala.agent.server.jobs +package org.hyperledger.identus.agent.server.jobs import cats.syntax.all.* import io.circe.parser.* import io.circe.syntax.* -import io.iohk.atala.agent.server.config.AppConfig -import io.iohk.atala.agent.server.jobs.BackgroundJobError.{ +import org.hyperledger.identus.agent.server.config.AppConfig +import org.hyperledger.identus.agent.server.jobs.BackgroundJobError.{ ErrorResponseReceivedFromPeerAgent, InvalidState, NotImplemented } -import io.iohk.atala.castor.core.model.did.* -import io.iohk.atala.mercury.* -import io.iohk.atala.mercury.model.* -import io.iohk.atala.mercury.protocol.presentproof.* -import io.iohk.atala.mercury.protocol.reportproblem.v2.* -import io.iohk.atala.pollux.core.model.* -import io.iohk.atala.pollux.core.model.error.PresentationError.* -import io.iohk.atala.pollux.core.model.error.{CredentialServiceError, PresentationError} -import io.iohk.atala.pollux.core.service.serdes.AnoncredCredentialProofsV1 -import io.iohk.atala.pollux.core.service.{CredentialService, PresentationService} -import io.iohk.atala.pollux.vc.jwt.{JWT, JwtPresentation, DidResolver as JwtDidResolver} -import io.iohk.atala.shared.utils.DurationOps.toMetricsSeconds -import io.iohk.atala.shared.utils.aspects.CustomMetricsAspect +import org.hyperledger.identus.castor.core.model.did.* +import org.hyperledger.identus.mercury.* +import org.hyperledger.identus.mercury.model.* +import org.hyperledger.identus.mercury.protocol.presentproof.* +import org.hyperledger.identus.mercury.protocol.reportproblem.v2.* +import org.hyperledger.identus.pollux.core.model.* +import org.hyperledger.identus.pollux.core.model.error.PresentationError.* +import org.hyperledger.identus.pollux.core.model.error.{CredentialServiceError, PresentationError} +import org.hyperledger.identus.pollux.core.service.serdes.AnoncredCredentialProofsV1 +import org.hyperledger.identus.pollux.core.service.{CredentialService, PresentationService} +import org.hyperledger.identus.pollux.vc.jwt.{JWT, JwtPresentation, DidResolver as JwtDidResolver} +import org.hyperledger.identus.shared.utils.DurationOps.toMetricsSeconds +import org.hyperledger.identus.shared.utils.aspects.CustomMetricsAspect import zio.* import zio.json.ast.Json import zio.metrics.* import zio.prelude.Validation import zio.prelude.ZValidation.* -import io.iohk.atala.agent.walletapi.storage.DIDNonSecretStorage -import io.iohk.atala.agent.walletapi.model.error.DIDSecretStorageError.WalletNotFoundError -import io.iohk.atala.resolvers.DIDResolver -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.agent.walletapi.storage.DIDNonSecretStorage +import org.hyperledger.identus.agent.walletapi.model.error.DIDSecretStorageError.WalletNotFoundError +import org.hyperledger.identus.resolvers.DIDResolver +import org.hyperledger.identus.shared.models.WalletAccessContext import java.time.{Clock, Instant, ZoneId} -import io.iohk.atala.castor.core.service.DIDService -import io.iohk.atala.agent.walletapi.service.ManagedDIDService -import io.iohk.atala.shared.http.* +import org.hyperledger.identus.castor.core.service.DIDService +import org.hyperledger.identus.agent.walletapi.service.ManagedDIDService +import org.hyperledger.identus.shared.http.* object PresentBackgroundJobs extends BackgroundJobsHelper { @@ -103,7 +103,7 @@ object PresentBackgroundJobs extends BackgroundJobsHelper { DIDNonSecretStorage & DIDService & ManagedDIDService, Unit ] = { - import io.iohk.atala.pollux.core.model.PresentationRecord.ProtocolState.* + import org.hyperledger.identus.pollux.core.model.PresentationRecord.ProtocolState.* val VerifierReqPendingToSentSuccess = counterMetric( "present_proof_flow_verifier_request_pending_to_sent_success_counter" @@ -495,15 +495,18 @@ object PresentBackgroundJobs extends BackgroundJobsHelper { credentialsValidationResult <- p.attachments.head.data match { case Base64(data) => val base64Decoded = new String(java.util.Base64.getDecoder.decode(data)) - val maybePresentationOptions - : Either[PresentationError, Option[io.iohk.atala.pollux.core.model.presentation.Options]] = + val maybePresentationOptions: Either[PresentationError, Option[ + org.hyperledger.identus.pollux.core.model.presentation.Options + ]] = mayBeRequestPresentation .map( _.attachments.headOption .map(attachment => - decode[io.iohk.atala.mercury.model.JsonData](attachment.data.asJson.noSpaces) + decode[org.hyperledger.identus.mercury.model.JsonData]( + attachment.data.asJson.noSpaces + ) .flatMap(data => - io.iohk.atala.pollux.core.model.presentation.PresentationAttachment.given_Decoder_PresentationAttachment + org.hyperledger.identus.pollux.core.model.presentation.PresentationAttachment.given_Decoder_PresentationAttachment .decodeJson(data.json.asJson) .map(_.options) .leftMap(err => diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/jobs/StatusListJobs.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/jobs/StatusListJobs.scala similarity index 89% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/jobs/StatusListJobs.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/jobs/StatusListJobs.scala index f5b090fbc7..3eb4e0625f 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/jobs/StatusListJobs.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/jobs/StatusListJobs.scala @@ -1,15 +1,15 @@ -package io.iohk.atala.agent.server.jobs +package org.hyperledger.identus.agent.server.jobs -import io.iohk.atala.agent.server.config.AppConfig -import io.iohk.atala.castor.core.model.did.VerificationRelationship -import io.iohk.atala.mercury.* -import io.iohk.atala.mercury.protocol.revocationnotificaiton.RevocationNotification -import io.iohk.atala.pollux.core.service.{CredentialService, CredentialStatusListService} -import io.iohk.atala.pollux.vc.jwt.revocation.{VCStatusList2021, VCStatusList2021Error} -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.agent.server.config.AppConfig +import org.hyperledger.identus.castor.core.model.did.VerificationRelationship +import org.hyperledger.identus.mercury.* +import org.hyperledger.identus.mercury.protocol.revocationnotificaiton.RevocationNotification +import org.hyperledger.identus.pollux.core.service.{CredentialService, CredentialStatusListService} +import org.hyperledger.identus.pollux.vc.jwt.revocation.{VCStatusList2021, VCStatusList2021Error} +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import zio.metrics.Metric -import io.iohk.atala.shared.utils.DurationOps.toMetricsSeconds +import org.hyperledger.identus.shared.utils.DurationOps.toMetricsSeconds object StatusListJobs extends BackgroundJobsHelper { diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/sql/Migrations.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/sql/Migrations.scala similarity index 89% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/sql/Migrations.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/sql/Migrations.scala index d4cda1e7af..a3a06ba70d 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/sql/Migrations.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/agent/server/sql/Migrations.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.agent.server.sql +package org.hyperledger.identus.agent.server.sql import doobie.* import doobie.implicits.* import doobie.util.transactor.Transactor -import io.iohk.atala.shared.db.ContextAwareTask -import io.iohk.atala.shared.db.DbConfig -import io.iohk.atala.shared.db.Implicits.* +import org.hyperledger.identus.shared.db.ContextAwareTask +import org.hyperledger.identus.shared.db.DbConfig +import org.hyperledger.identus.shared.db.Implicits.* import org.flywaydb.core.Flyway import zio.* import zio.interop.catz.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/EndpointOutputs.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/EndpointOutputs.scala similarity index 98% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/EndpointOutputs.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/EndpointOutputs.scala index ae91b269d6..2a36f43a75 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/EndpointOutputs.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/EndpointOutputs.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.api.http +package org.hyperledger.identus.api.http import sttp.model.StatusCode import sttp.tapir.json.zio.jsonBody diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/ErrorResponse.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/ErrorResponse.scala similarity index 96% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/ErrorResponse.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/ErrorResponse.scala index 262a0ee3a2..70b6d8cb63 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/ErrorResponse.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/ErrorResponse.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.api.http +package org.hyperledger.identus.api.http -import io.iohk.atala.api.http.ErrorResponse.annotations -import io.iohk.atala.shared.models.Failure +import org.hyperledger.identus.api.http.ErrorResponse.annotations +import org.hyperledger.identus.shared.models.Failure import sttp.model.StatusCode import sttp.tapir.Schema import sttp.tapir.Schema.annotations.{description, encodedExample} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/RequestContext.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/RequestContext.scala similarity index 68% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/RequestContext.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/RequestContext.scala index 8fd88d799f..821b2c1eb1 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/RequestContext.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/RequestContext.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.api.http +package org.hyperledger.identus.api.http import sttp.tapir.model.ServerRequest diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/codec/CirceJsonInterop.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/codec/CirceJsonInterop.scala similarity index 96% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/codec/CirceJsonInterop.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/codec/CirceJsonInterop.scala index 3a375c010c..d16f4e62af 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/codec/CirceJsonInterop.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/codec/CirceJsonInterop.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.api.http.codec +package org.hyperledger.identus.api.http.codec import io.circe.Json as CirceJson import sttp.tapir.Schema diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/codec/CustomMediaTypes.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/codec/CustomMediaTypes.scala similarity index 88% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/codec/CustomMediaTypes.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/codec/CustomMediaTypes.scala index f6dc4d45ed..28f7073f7c 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/codec/CustomMediaTypes.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/codec/CustomMediaTypes.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.api.http.codec +package org.hyperledger.identus.api.http.codec import sttp.model.MediaType diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/codec/DIDCodec.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/codec/DIDCodec.scala similarity index 93% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/codec/DIDCodec.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/codec/DIDCodec.scala index 6ccdc8a30d..8922f79829 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/codec/DIDCodec.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/codec/DIDCodec.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.api.http.codec +package org.hyperledger.identus.api.http.codec -import io.iohk.atala.castor.controller.http.{DIDDocument, DIDResolutionResult} +import org.hyperledger.identus.castor.controller.http.{DIDDocument, DIDResolutionResult} import sttp.model.MediaType import sttp.tapir.* import sttp.tapir.DecodeResult.Error diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/codec/DidCommIDCodec.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/codec/DidCommIDCodec.scala similarity index 81% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/codec/DidCommIDCodec.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/codec/DidCommIDCodec.scala index 171e3ce01f..322f8a643f 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/codec/DidCommIDCodec.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/codec/DidCommIDCodec.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.api.http.codec +package org.hyperledger.identus.api.http.codec import sttp.tapir._ import sttp.tapir.Codec.PlainCodec -import io.iohk.atala.pollux.core.model.DidCommID +import org.hyperledger.identus.pollux.core.model.DidCommID import sttp.tapir.DecodeResult.* object DidCommIDCodec { diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/codec/OrderCodec.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/codec/OrderCodec.scala similarity index 86% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/codec/OrderCodec.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/codec/OrderCodec.scala index 882ded5de1..0cdd28bd21 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/codec/OrderCodec.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/codec/OrderCodec.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.api.http.codec +package org.hyperledger.identus.api.http.codec -import io.iohk.atala.api.http.model.Order -import io.iohk.atala.api.http.model.Order.Direction +import org.hyperledger.identus.api.http.model.Order +import org.hyperledger.identus.api.http.model.Order.Direction import sttp.tapir.Codec.PlainCodec import sttp.tapir.{Codec, DecodeResult} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/model/CollectionStats.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/model/CollectionStats.scala similarity index 58% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/model/CollectionStats.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/model/CollectionStats.scala index 339e0903af..8ce21c81e8 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/model/CollectionStats.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/model/CollectionStats.scala @@ -1,3 +1,3 @@ -package io.iohk.atala.api.http.model +package org.hyperledger.identus.api.http.model case class CollectionStats(totalCount: Long, filteredCount: Long) diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/model/Order.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/model/Order.scala similarity index 87% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/model/Order.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/model/Order.scala index 57bb13a32a..6dfb248db3 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/model/Order.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/model/Order.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.api.http.model +package org.hyperledger.identus.api.http.model import scala.annotation.unused diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/model/PaginationInput.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/model/PaginationInput.scala similarity index 94% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/model/PaginationInput.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/model/PaginationInput.scala index b56112d6d4..f0754920ef 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/model/PaginationInput.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/model/PaginationInput.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.api.http.model +package org.hyperledger.identus.api.http.model import sttp.tapir.EndpointIO.annotations.{description, query} import sttp.tapir.Schema.annotations.validateEach diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/package.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/package.scala similarity index 94% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/package.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/package.scala index c4c03be20e..2a66fbdfe1 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/package.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/http/package.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.api +package org.hyperledger.identus.api import sttp.tapir.Validator diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/api/util/PaginationUtils.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/util/PaginationUtils.scala similarity index 95% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/api/util/PaginationUtils.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/util/PaginationUtils.scala index 061f7c1ee3..98c3ac01ca 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/api/util/PaginationUtils.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/api/util/PaginationUtils.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.api.util +package org.hyperledger.identus.api.util -import io.iohk.atala.api.http.model.{CollectionStats, Pagination} +import org.hyperledger.identus.api.http.model.{CollectionStats, Pagination} import scala.util.chaining.scalaUtilChainingOps diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/ConnectionController.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/connect/controller/ConnectionController.scala similarity index 72% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/ConnectionController.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/connect/controller/ConnectionController.scala index 4f8545f988..59ec27435c 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/ConnectionController.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/connect/controller/ConnectionController.scala @@ -1,14 +1,14 @@ -package io.iohk.atala.connect.controller +package org.hyperledger.identus.connect.controller -import io.iohk.atala.api.http.model.PaginationInput -import io.iohk.atala.api.http.{ErrorResponse, RequestContext} -import io.iohk.atala.connect.controller.http.{ +import org.hyperledger.identus.api.http.model.PaginationInput +import org.hyperledger.identus.api.http.{ErrorResponse, RequestContext} +import org.hyperledger.identus.connect.controller.http.{ AcceptConnectionInvitationRequest, Connection, ConnectionsPage, CreateConnectionRequest } -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import java.util.UUID diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/ConnectionControllerImpl.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/connect/controller/ConnectionControllerImpl.scala similarity index 79% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/ConnectionControllerImpl.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/connect/controller/ConnectionControllerImpl.scala index 861502e2de..bb9591d11a 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/ConnectionControllerImpl.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/connect/controller/ConnectionControllerImpl.scala @@ -1,18 +1,18 @@ -package io.iohk.atala.connect.controller +package org.hyperledger.identus.connect.controller -import io.iohk.atala.agent.server.config.AppConfig -import io.iohk.atala.agent.walletapi.service.ManagedDIDService -import io.iohk.atala.api.http.model.PaginationInput -import io.iohk.atala.api.http.{ErrorResponse, RequestContext} -import io.iohk.atala.connect.controller.http.{ +import org.hyperledger.identus.agent.server.config.AppConfig +import org.hyperledger.identus.agent.walletapi.service.ManagedDIDService +import org.hyperledger.identus.api.http.model.PaginationInput +import org.hyperledger.identus.api.http.{ErrorResponse, RequestContext} +import org.hyperledger.identus.connect.controller.http.{ AcceptConnectionInvitationRequest, Connection, ConnectionsPage, CreateConnectionRequest } -import io.iohk.atala.connect.core.model.error.ConnectionServiceError -import io.iohk.atala.connect.core.service.ConnectionService -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.connect.core.model.error.ConnectionServiceError +import org.hyperledger.identus.connect.core.service.ConnectionService +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import java.util.UUID diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/ConnectionEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/connect/controller/ConnectionEndpoints.scala similarity index 93% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/ConnectionEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/connect/controller/ConnectionEndpoints.scala index b69739b8c8..6268685b61 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/ConnectionEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/connect/controller/ConnectionEndpoints.scala @@ -1,18 +1,18 @@ -package io.iohk.atala.connect.controller +package org.hyperledger.identus.connect.controller -import io.iohk.atala.api.http.EndpointOutputs.* -import io.iohk.atala.api.http.model.PaginationInput -import io.iohk.atala.api.http.{ErrorResponse, RequestContext} -import io.iohk.atala.connect.controller.http.{ +import org.hyperledger.identus.api.http.EndpointOutputs.* +import org.hyperledger.identus.api.http.model.PaginationInput +import org.hyperledger.identus.api.http.{ErrorResponse, RequestContext} +import org.hyperledger.identus.connect.controller.http.{ AcceptConnectionInvitationRequest, Connection, ConnectionsPage, CreateConnectionRequest } -import io.iohk.atala.iam.authentication.apikey.ApiKeyCredentials -import io.iohk.atala.iam.authentication.apikey.ApiKeyEndpointSecurityLogic.apiKeyHeader -import io.iohk.atala.iam.authentication.oidc.JwtCredentials -import io.iohk.atala.iam.authentication.oidc.JwtSecurityLogic.jwtAuthHeader +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyCredentials +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyEndpointSecurityLogic.apiKeyHeader +import org.hyperledger.identus.iam.authentication.oidc.JwtCredentials +import org.hyperledger.identus.iam.authentication.oidc.JwtSecurityLogic.jwtAuthHeader import sttp.apispec.Tag import sttp.model.StatusCode import sttp.tapir.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/ConnectionServerEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/connect/controller/ConnectionServerEndpoints.scala similarity index 79% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/ConnectionServerEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/connect/controller/ConnectionServerEndpoints.scala index d6f8ff01df..90c1d828ef 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/ConnectionServerEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/connect/controller/ConnectionServerEndpoints.scala @@ -1,15 +1,15 @@ -package io.iohk.atala.connect.controller +package org.hyperledger.identus.connect.controller -import io.iohk.atala.LogUtils.* -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.api.http.RequestContext -import io.iohk.atala.api.http.model.PaginationInput -import io.iohk.atala.connect.controller.ConnectionEndpoints.* -import io.iohk.atala.connect.controller.http.{AcceptConnectionInvitationRequest, CreateConnectionRequest} -import io.iohk.atala.iam.authentication.Authenticator -import io.iohk.atala.iam.authentication.Authorizer -import io.iohk.atala.iam.authentication.DefaultAuthenticator -import io.iohk.atala.iam.authentication.SecurityLogic +import org.hyperledger.identus.LogUtils.* +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.api.http.RequestContext +import org.hyperledger.identus.api.http.model.PaginationInput +import org.hyperledger.identus.connect.controller.ConnectionEndpoints.* +import org.hyperledger.identus.connect.controller.http.{AcceptConnectionInvitationRequest, CreateConnectionRequest} +import org.hyperledger.identus.iam.authentication.Authenticator +import org.hyperledger.identus.iam.authentication.Authorizer +import org.hyperledger.identus.iam.authentication.DefaultAuthenticator +import org.hyperledger.identus.iam.authentication.SecurityLogic import sttp.tapir.ztapir.* import zio.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/http/AcceptConnectionInvitationRequest.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/connect/controller/http/AcceptConnectionInvitationRequest.scala similarity index 87% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/http/AcceptConnectionInvitationRequest.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/connect/controller/http/AcceptConnectionInvitationRequest.scala index 9f98d736ed..f6eeb2da44 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/http/AcceptConnectionInvitationRequest.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/connect/controller/http/AcceptConnectionInvitationRequest.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.connect.controller.http +package org.hyperledger.identus.connect.controller.http -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.connect.controller.http.AcceptConnectionInvitationRequest.annotations +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.connect.controller.http.AcceptConnectionInvitationRequest.annotations import sttp.tapir.Schema import sttp.tapir.Schema.annotations.{description, encodedExample} import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonDecoder, JsonEncoder} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/http/Connection.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/connect/controller/http/Connection.scala similarity index 95% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/http/Connection.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/connect/controller/http/Connection.scala index 543ea9009d..f506c526a3 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/http/Connection.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/connect/controller/http/Connection.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.connect.controller.http +package org.hyperledger.identus.connect.controller.http -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.connect.controller.http.Connection.annotations -import io.iohk.atala.connect.core.model -import io.iohk.atala.connect.core.model.ConnectionRecord.Role +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.connect.controller.http.Connection.annotations +import org.hyperledger.identus.connect.core.model +import org.hyperledger.identus.connect.core.model.ConnectionRecord.Role import sttp.model.Uri import sttp.tapir.Schema.annotations.{description, encodedExample, validate} import sttp.tapir.{Schema, Validator} @@ -11,7 +11,7 @@ import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonDecoder, JsonEncoder} import java.time.{OffsetDateTime, ZoneOffset} import java.util.UUID -import io.iohk.atala.connect.controller.http.Connection.annotations.goalcode +import org.hyperledger.identus.connect.controller.http.Connection.annotations.goalcode case class Connection( @description(annotations.connectionId.description) diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/http/ConnectionInvitation.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/connect/controller/http/ConnectionInvitation.scala similarity index 92% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/http/ConnectionInvitation.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/connect/controller/http/ConnectionInvitation.scala index bb26e9ac70..32d9c919b1 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/http/ConnectionInvitation.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/connect/controller/http/ConnectionInvitation.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.connect.controller.http +package org.hyperledger.identus.connect.controller.http -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.connect.controller.http.ConnectionInvitation.annotations -import io.iohk.atala.mercury.protocol.invitation.v2.Invitation +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.connect.controller.http.ConnectionInvitation.annotations +import org.hyperledger.identus.mercury.protocol.invitation.v2.Invitation import sttp.tapir.Schema import sttp.tapir.Schema.annotations.{description, encodedExample} import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonDecoder, JsonEncoder} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/http/ConnectionsPage.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/connect/controller/http/ConnectionsPage.scala similarity index 94% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/http/ConnectionsPage.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/connect/controller/http/ConnectionsPage.scala index 15791b6fd4..cddb14d73c 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/http/ConnectionsPage.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/connect/controller/http/ConnectionsPage.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.connect.controller.http +package org.hyperledger.identus.connect.controller.http -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.connect.controller.http.ConnectionsPage.annotations +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.connect.controller.http.ConnectionsPage.annotations import sttp.tapir.Schema import sttp.tapir.Schema.annotations.{description, encodedExample} import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonDecoder, JsonEncoder} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/http/CreateConnectionRequest.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/connect/controller/http/CreateConnectionRequest.scala similarity index 89% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/http/CreateConnectionRequest.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/connect/controller/http/CreateConnectionRequest.scala index 1528542f0a..d3fc107514 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/http/CreateConnectionRequest.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/connect/controller/http/CreateConnectionRequest.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.connect.controller.http +package org.hyperledger.identus.connect.controller.http -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.connect.controller.http.CreateConnectionRequest.annotations +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.connect.controller.http.CreateConnectionRequest.annotations import sttp.tapir.Schema import sttp.tapir.Schema.annotations.{description, encodedExample, validate, validateEach} import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonDecoder, JsonEncoder} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/DIDController.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/DIDController.scala similarity index 76% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/DIDController.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/DIDController.scala index 863618b344..9b9d5bce6e 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/DIDController.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/DIDController.scala @@ -1,11 +1,15 @@ -package io.iohk.atala.castor.controller +package org.hyperledger.identus.castor.controller -import io.iohk.atala.castor.controller.http.DIDResolutionResult +import org.hyperledger.identus.castor.controller.http.DIDResolutionResult import zio.* -import io.iohk.atala.castor.controller.http.{DIDDocument, DIDDocumentMetadata, DIDResolutionMetadata} -import io.iohk.atala.castor.core.model.did.w3c.{DIDDocumentMetadataRepr, DIDDocumentRepr, DIDResolutionErrorRepr} -import io.iohk.atala.castor.core.service.DIDService -import io.iohk.atala.castor.core.model.did.w3c.makeW3CResolver +import org.hyperledger.identus.castor.controller.http.{DIDDocument, DIDDocumentMetadata, DIDResolutionMetadata} +import org.hyperledger.identus.castor.core.model.did.w3c.{ + DIDDocumentMetadataRepr, + DIDDocumentRepr, + DIDResolutionErrorRepr +} +import org.hyperledger.identus.castor.core.service.DIDService +import org.hyperledger.identus.castor.core.model.did.w3c.makeW3CResolver import scala.language.implicitConversions trait DIDController { diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/DIDEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/DIDEndpoints.scala similarity index 92% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/DIDEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/DIDEndpoints.scala index 8b76be6a7a..1d528676bc 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/DIDEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/DIDEndpoints.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.castor.controller +package org.hyperledger.identus.castor.controller -import io.iohk.atala.api.http.codec.DIDCodec.emptyDidJsonLD -import io.iohk.atala.api.http.codec.DIDCodec.{didJsonLD, didResolutionJsonLD} -import io.iohk.atala.api.http.RequestContext -import io.iohk.atala.castor.controller.http.{DIDResolutionResult, DIDInput} +import org.hyperledger.identus.api.http.codec.DIDCodec.emptyDidJsonLD +import org.hyperledger.identus.api.http.codec.DIDCodec.{didJsonLD, didResolutionJsonLD} +import org.hyperledger.identus.api.http.RequestContext +import org.hyperledger.identus.castor.controller.http.{DIDResolutionResult, DIDInput} import sttp.apispec.Tag import sttp.model.StatusCode import sttp.tapir.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/DIDRegistrarController.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/DIDRegistrarController.scala similarity index 82% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/DIDRegistrarController.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/DIDRegistrarController.scala index 1b53a054e5..c1a8eded2d 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/DIDRegistrarController.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/DIDRegistrarController.scala @@ -1,24 +1,24 @@ -package io.iohk.atala.castor.controller - -import io.iohk.atala.agent.walletapi.model.ManagedDIDDetail -import io.iohk.atala.agent.walletapi.model.error.CreateManagedDIDError -import io.iohk.atala.agent.walletapi.model.error.GetManagedDIDError -import io.iohk.atala.agent.walletapi.model.error.PublishManagedDIDError -import io.iohk.atala.agent.walletapi.model.error.UpdateManagedDIDError -import io.iohk.atala.agent.walletapi.service.ManagedDIDService -import io.iohk.atala.api.http.model.CollectionStats -import io.iohk.atala.api.http.model.PaginationInput -import io.iohk.atala.api.http.{ErrorResponse, RequestContext} -import io.iohk.atala.api.util.PaginationUtils -import io.iohk.atala.castor.controller.http.CreateManagedDIDResponse -import io.iohk.atala.castor.controller.http.CreateManagedDidRequest -import io.iohk.atala.castor.controller.http.DIDOperationResponse -import io.iohk.atala.castor.controller.http.ManagedDID -import io.iohk.atala.castor.controller.http.ManagedDIDPage -import io.iohk.atala.castor.controller.http.UpdateManagedDIDRequest -import io.iohk.atala.castor.core.model.did.PrismDID -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.utils.Traverse.* +package org.hyperledger.identus.castor.controller + +import org.hyperledger.identus.agent.walletapi.model.ManagedDIDDetail +import org.hyperledger.identus.agent.walletapi.model.error.CreateManagedDIDError +import org.hyperledger.identus.agent.walletapi.model.error.GetManagedDIDError +import org.hyperledger.identus.agent.walletapi.model.error.PublishManagedDIDError +import org.hyperledger.identus.agent.walletapi.model.error.UpdateManagedDIDError +import org.hyperledger.identus.agent.walletapi.service.ManagedDIDService +import org.hyperledger.identus.api.http.model.CollectionStats +import org.hyperledger.identus.api.http.model.PaginationInput +import org.hyperledger.identus.api.http.{ErrorResponse, RequestContext} +import org.hyperledger.identus.api.util.PaginationUtils +import org.hyperledger.identus.castor.controller.http.CreateManagedDIDResponse +import org.hyperledger.identus.castor.controller.http.CreateManagedDidRequest +import org.hyperledger.identus.castor.controller.http.DIDOperationResponse +import org.hyperledger.identus.castor.controller.http.ManagedDID +import org.hyperledger.identus.castor.controller.http.ManagedDIDPage +import org.hyperledger.identus.castor.controller.http.UpdateManagedDIDRequest +import org.hyperledger.identus.castor.core.model.did.PrismDID +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.utils.Traverse.* import scala.language.implicitConversions import zio.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/DIDRegistrarEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/DIDRegistrarEndpoints.scala similarity index 89% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/DIDRegistrarEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/DIDRegistrarEndpoints.scala index 0e7e61936a..172d2b1f40 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/DIDRegistrarEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/DIDRegistrarEndpoints.scala @@ -1,21 +1,21 @@ -package io.iohk.atala.castor.controller +package org.hyperledger.identus.castor.controller -import io.iohk.atala.api.http.EndpointOutputs.FailureVariant -import io.iohk.atala.api.http.model.PaginationInput -import io.iohk.atala.api.http.{EndpointOutputs, ErrorResponse, RequestContext} -import io.iohk.atala.castor.controller.http.DIDOperationResponse -import io.iohk.atala.castor.controller.http.UpdateManagedDIDRequest -import io.iohk.atala.castor.controller.http.{ +import org.hyperledger.identus.api.http.EndpointOutputs.FailureVariant +import org.hyperledger.identus.api.http.model.PaginationInput +import org.hyperledger.identus.api.http.{EndpointOutputs, ErrorResponse, RequestContext} +import org.hyperledger.identus.castor.controller.http.DIDOperationResponse +import org.hyperledger.identus.castor.controller.http.UpdateManagedDIDRequest +import org.hyperledger.identus.castor.controller.http.{ CreateManagedDIDResponse, CreateManagedDidRequest, DIDInput, ManagedDID, ManagedDIDPage } -import io.iohk.atala.iam.authentication.apikey.ApiKeyCredentials -import io.iohk.atala.iam.authentication.apikey.ApiKeyEndpointSecurityLogic.apiKeyHeader -import io.iohk.atala.iam.authentication.oidc.JwtCredentials -import io.iohk.atala.iam.authentication.oidc.JwtSecurityLogic.jwtAuthHeader +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyCredentials +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyEndpointSecurityLogic.apiKeyHeader +import org.hyperledger.identus.iam.authentication.oidc.JwtCredentials +import org.hyperledger.identus.iam.authentication.oidc.JwtSecurityLogic.jwtAuthHeader import sttp.apispec.Tag import sttp.model.StatusCode import sttp.tapir.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/DIDRegistrarServerEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/DIDRegistrarServerEndpoints.scala similarity index 88% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/DIDRegistrarServerEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/DIDRegistrarServerEndpoints.scala index 73eb7189f6..06eb313e7b 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/DIDRegistrarServerEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/DIDRegistrarServerEndpoints.scala @@ -1,12 +1,12 @@ -package io.iohk.atala.castor.controller +package org.hyperledger.identus.castor.controller -import io.iohk.atala.LogUtils.* -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.iam.authentication.Authenticator -import io.iohk.atala.iam.authentication.Authorizer -import io.iohk.atala.iam.authentication.DefaultAuthenticator -import io.iohk.atala.iam.authentication.SecurityLogic -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.LogUtils.* +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.iam.authentication.Authenticator +import org.hyperledger.identus.iam.authentication.Authorizer +import org.hyperledger.identus.iam.authentication.DefaultAuthenticator +import org.hyperledger.identus.iam.authentication.SecurityLogic +import org.hyperledger.identus.shared.models.WalletAccessContext import sttp.tapir.ztapir.* import zio.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/DIDServerEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/DIDServerEndpoints.scala similarity index 87% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/DIDServerEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/DIDServerEndpoints.scala index 3fa30527b3..000f362f33 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/DIDServerEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/DIDServerEndpoints.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.castor.controller +package org.hyperledger.identus.castor.controller -import io.iohk.atala.LogUtils.* +import org.hyperledger.identus.LogUtils.* import sttp.tapir.ztapir.* import zio.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/DIDDocument.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/DIDDocument.scala similarity index 92% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/DIDDocument.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/DIDDocument.scala index 30ec6db675..a1e5942649 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/DIDDocument.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/DIDDocument.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.castor.controller.http +package org.hyperledger.identus.castor.controller.http -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.castor.core.model.did.w3c +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.castor.core.model.did.w3c import sttp.tapir.Schema import sttp.tapir.Schema.annotations.{description, encodedExample} import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonEncoder, JsonDecoder} -import io.iohk.atala.castor.controller.http.DIDDocument.annotations +import org.hyperledger.identus.castor.controller.http.DIDDocument.annotations import scala.language.implicitConversions @description("A W3C compliant Prism DID document representation.") diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/DIDDocumentMetadata.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/DIDDocumentMetadata.scala similarity index 93% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/DIDDocumentMetadata.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/DIDDocumentMetadata.scala index 52873d164f..d12cc5d645 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/DIDDocumentMetadata.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/DIDDocumentMetadata.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.castor.controller.http +package org.hyperledger.identus.castor.controller.http -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.castor.core.model.did.w3c +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.castor.core.model.did.w3c import sttp.tapir.Schema import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonEncoder, JsonDecoder} import sttp.tapir.Schema.annotations.{description, encodedExample} -import io.iohk.atala.castor.controller.http.DIDDocumentMetadata.annotations +import org.hyperledger.identus.castor.controller.http.DIDDocumentMetadata.annotations @description("[DID document metadata](https://www.w3.org/TR/did-core/#did-document-metadata)") final case class DIDDocumentMetadata( diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/DIDInput.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/DIDInput.scala similarity index 87% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/DIDInput.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/DIDInput.scala index 4da2fa8561..f11fed8cd5 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/DIDInput.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/DIDInput.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.castor.controller.http +package org.hyperledger.identus.castor.controller.http import sttp.tapir.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/DIDResolutionMetadata.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/DIDResolutionMetadata.scala similarity index 89% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/DIDResolutionMetadata.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/DIDResolutionMetadata.scala index b680ff2ef6..5426b27d58 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/DIDResolutionMetadata.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/DIDResolutionMetadata.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.castor.controller.http +package org.hyperledger.identus.castor.controller.http -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.castor.controller.http.DIDResolutionMetadata.annotations +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.castor.controller.http.DIDResolutionMetadata.annotations import sttp.tapir.Schema import sttp.tapir.Schema.annotations.{description, encodedExample} import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonEncoder, JsonDecoder} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/DIDResolutionResult.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/DIDResolutionResult.scala similarity index 91% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/DIDResolutionResult.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/DIDResolutionResult.scala index 3fb50cc70a..9fb37052b5 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/DIDResolutionResult.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/DIDResolutionResult.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.castor.controller.http +package org.hyperledger.identus.castor.controller.http import sttp.tapir.Schema import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonEncoder, JsonDecoder} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/ManagedDID.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/ManagedDID.scala similarity index 93% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/ManagedDID.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/ManagedDID.scala index 781ef3f607..021275998a 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/ManagedDID.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/ManagedDID.scala @@ -1,15 +1,15 @@ -package io.iohk.atala.castor.controller.http - -import io.iohk.atala.agent.walletapi.model as walletDomain -import io.iohk.atala.agent.walletapi.model.DIDPublicKeyTemplate -import io.iohk.atala.agent.walletapi.model.ManagedDIDDetail -import io.iohk.atala.agent.walletapi.model.PublicationState -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.castor.core.model.did as castorDomain -import io.iohk.atala.castor.core.model.did.EllipticCurve -import io.iohk.atala.castor.core.model.did.PrismDID -import io.iohk.atala.castor.core.model.did.VerificationRelationship -import io.iohk.atala.shared.utils.Traverse.* +package org.hyperledger.identus.castor.controller.http + +import org.hyperledger.identus.agent.walletapi.model as walletDomain +import org.hyperledger.identus.agent.walletapi.model.DIDPublicKeyTemplate +import org.hyperledger.identus.agent.walletapi.model.ManagedDIDDetail +import org.hyperledger.identus.agent.walletapi.model.PublicationState +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.castor.core.model.did as castorDomain +import org.hyperledger.identus.castor.core.model.did.EllipticCurve +import org.hyperledger.identus.castor.core.model.did.PrismDID +import org.hyperledger.identus.castor.core.model.did.VerificationRelationship +import org.hyperledger.identus.shared.utils.Traverse.* import sttp.tapir.Schema import sttp.tapir.Schema.annotations.{description, encodedExample} import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonEncoder, JsonDecoder} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/PublicKeyJwk.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/PublicKeyJwk.scala similarity index 86% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/PublicKeyJwk.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/PublicKeyJwk.scala index 90d5377a89..7142f279d1 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/PublicKeyJwk.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/PublicKeyJwk.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.castor.controller.http +package org.hyperledger.identus.castor.controller.http -import io.iohk.atala.castor.core.model.did.w3c +import org.hyperledger.identus.castor.core.model.did.w3c import sttp.tapir.Schema import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonEncoder, JsonDecoder} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/ScheduledOperation.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/ScheduledOperation.scala similarity index 89% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/ScheduledOperation.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/ScheduledOperation.scala index 4da951371d..e1d1fd76f7 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/ScheduledOperation.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/ScheduledOperation.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.castor.controller.http +package org.hyperledger.identus.castor.controller.http -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.castor.core.model.did.ScheduleDIDOperationOutcome -import io.iohk.atala.shared.models.HexString +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.castor.core.model.did.ScheduleDIDOperationOutcome +import org.hyperledger.identus.shared.models.HexString import sttp.tapir.Schema import sttp.tapir.Schema.annotations.{description, encodedExample} import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonEncoder, JsonDecoder} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/Service.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/Service.scala similarity index 91% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/Service.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/Service.scala index 84615a56f4..08f47150c7 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/Service.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/Service.scala @@ -1,13 +1,13 @@ -package io.iohk.atala.castor.controller.http +package org.hyperledger.identus.castor.controller.http import io.circe.Json -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.api.http.codec.CirceJsonInterop -import io.iohk.atala.castor.controller.http.Service.annotations -import io.iohk.atala.castor.core.model.ProtoModelHelper -import io.iohk.atala.castor.core.model.did as castorDomain -import io.iohk.atala.castor.core.model.did.w3c -import io.iohk.atala.shared.utils.Traverse.* +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.api.http.codec.CirceJsonInterop +import org.hyperledger.identus.castor.controller.http.Service.annotations +import org.hyperledger.identus.castor.core.model.ProtoModelHelper +import org.hyperledger.identus.castor.core.model.did as castorDomain +import org.hyperledger.identus.castor.core.model.did.w3c +import org.hyperledger.identus.shared.utils.Traverse.* import scala.language.implicitConversions import sttp.tapir.Schema import sttp.tapir.Schema.annotations.{description, encodedExample} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/UpdateManagedDID.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/UpdateManagedDID.scala similarity index 95% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/UpdateManagedDID.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/UpdateManagedDID.scala index b4717084f1..14a76c48d4 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/UpdateManagedDID.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/UpdateManagedDID.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.castor.controller.http +package org.hyperledger.identus.castor.controller.http -import io.iohk.atala.agent.walletapi.model as walletDomain -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.castor.core.model.did as castorDomain -import io.iohk.atala.shared.utils.Traverse.* +import org.hyperledger.identus.agent.walletapi.model as walletDomain +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.castor.core.model.did as castorDomain +import org.hyperledger.identus.shared.utils.Traverse.* import sttp.tapir.Schema import sttp.tapir.Schema.annotations.{description, encodedExample} import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonEncoder, JsonDecoder} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/VerificationMethod.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/VerificationMethod.scala similarity index 88% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/VerificationMethod.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/VerificationMethod.scala index 8456c9f6e2..b4464b4fb1 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/castor/controller/http/VerificationMethod.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/controller/http/VerificationMethod.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.castor.controller.http +package org.hyperledger.identus.castor.controller.http -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.castor.core.model.did.w3c +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.castor.core.model.did.w3c import sttp.tapir.Schema import sttp.tapir.Schema.annotations.{description, encodedExample} import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonEncoder, JsonDecoder} -import io.iohk.atala.castor.controller.http.VerificationMethod.annotations +import org.hyperledger.identus.castor.controller.http.VerificationMethod.annotations import scala.language.implicitConversions @description( diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/credentialstatus/controller/CredentialStatusController.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/credentialstatus/controller/CredentialStatusController.scala similarity index 74% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/credentialstatus/controller/CredentialStatusController.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/credentialstatus/controller/CredentialStatusController.scala index 7091920486..221dce9b9c 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/credentialstatus/controller/CredentialStatusController.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/credentialstatus/controller/CredentialStatusController.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.credentialstatus.controller +package org.hyperledger.identus.credential.status.controller -import io.iohk.atala.api.http.{ErrorResponse, RequestContext} -import io.iohk.atala.credentialstatus.controller.http.StatusListCredential -import io.iohk.atala.pollux.core.model.error.CredentialStatusListServiceError -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.api.http.{ErrorResponse, RequestContext} +import org.hyperledger.identus.credential.status.controller.http.StatusListCredential +import org.hyperledger.identus.pollux.core.model.error.CredentialStatusListServiceError +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* -import io.iohk.atala.pollux.core.model.DidCommID +import org.hyperledger.identus.pollux.core.model.DidCommID import java.util.UUID diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/credentialstatus/controller/CredentialStatusControllerImpl.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/credentialstatus/controller/CredentialStatusControllerImpl.scala similarity index 69% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/credentialstatus/controller/CredentialStatusControllerImpl.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/credentialstatus/controller/CredentialStatusControllerImpl.scala index c4640f0efa..636935feb4 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/credentialstatus/controller/CredentialStatusControllerImpl.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/credentialstatus/controller/CredentialStatusControllerImpl.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.credentialstatus.controller +package org.hyperledger.identus.credential.status.controller -import io.iohk.atala.api.http.{ErrorResponse, RequestContext} -import io.iohk.atala.credentialstatus.controller.http.StatusListCredential -import io.iohk.atala.pollux.core.service.CredentialStatusListService +import org.hyperledger.identus.api.http.{ErrorResponse, RequestContext} +import org.hyperledger.identus.credential.status.controller.http.StatusListCredential +import org.hyperledger.identus.pollux.core.service.CredentialStatusListService import zio.* -import io.iohk.atala.pollux.core.model.DidCommID -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.pollux.core.model.DidCommID +import org.hyperledger.identus.shared.models.WalletAccessContext import java.util.UUID diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/credentialstatus/controller/CredentialStatusEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/credentialstatus/controller/CredentialStatusEndpoints.scala similarity index 68% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/credentialstatus/controller/CredentialStatusEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/credentialstatus/controller/CredentialStatusEndpoints.scala index 675e5ca169..298b5755db 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/credentialstatus/controller/CredentialStatusEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/credentialstatus/controller/CredentialStatusEndpoints.scala @@ -1,17 +1,17 @@ -package io.iohk.atala.credentialstatus.controller +package org.hyperledger.identus.credential.status.controller -import io.iohk.atala.api.http.{ErrorResponse, RequestContext} -import io.iohk.atala.api.http.EndpointOutputs.* -import io.iohk.atala.credentialstatus.controller.http.StatusListCredential +import org.hyperledger.identus.api.http.{ErrorResponse, RequestContext} +import org.hyperledger.identus.api.http.EndpointOutputs.* +import org.hyperledger.identus.credential.status.controller.http.StatusListCredential import sttp.tapir.* import sttp.tapir.json.zio.jsonBody -import io.iohk.atala.iam.authentication.apikey.ApiKeyEndpointSecurityLogic.apiKeyHeader -import io.iohk.atala.iam.authentication.oidc.JwtSecurityLogic.jwtAuthHeader +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyEndpointSecurityLogic.apiKeyHeader +import org.hyperledger.identus.iam.authentication.oidc.JwtSecurityLogic.jwtAuthHeader import java.util.UUID -import io.iohk.atala.pollux.core.model.DidCommID -import io.iohk.atala.api.http.codec.DidCommIDCodec.given -import io.iohk.atala.iam.authentication.apikey.ApiKeyCredentials -import io.iohk.atala.iam.authentication.oidc.JwtCredentials +import org.hyperledger.identus.pollux.core.model.DidCommID +import org.hyperledger.identus.api.http.codec.DidCommIDCodec.given +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyCredentials +import org.hyperledger.identus.iam.authentication.oidc.JwtCredentials object CredentialStatusEndpoints { val getCredentialStatusListEndpoint: PublicEndpoint[ diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/credentialstatus/controller/CredentialStatusServiceEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/credentialstatus/controller/CredentialStatusServiceEndpoints.scala similarity index 73% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/credentialstatus/controller/CredentialStatusServiceEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/credentialstatus/controller/CredentialStatusServiceEndpoints.scala index 3e2a720e84..fc34063704 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/credentialstatus/controller/CredentialStatusServiceEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/credentialstatus/controller/CredentialStatusServiceEndpoints.scala @@ -1,17 +1,17 @@ -package io.iohk.atala.credentialstatus.controller +package org.hyperledger.identus.credential.status.controller -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.api.http.{ErrorResponse, RequestContext} -import io.iohk.atala.iam.authentication.Authenticator -import io.iohk.atala.iam.authentication.Authorizer -import io.iohk.atala.iam.authentication.DefaultAuthenticator -import io.iohk.atala.iam.authentication.SecurityLogic -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.api.http.{ErrorResponse, RequestContext} +import org.hyperledger.identus.iam.authentication.Authenticator +import org.hyperledger.identus.iam.authentication.Authorizer +import org.hyperledger.identus.iam.authentication.DefaultAuthenticator +import org.hyperledger.identus.iam.authentication.SecurityLogic +import org.hyperledger.identus.shared.models.WalletAccessContext import sttp.tapir.ztapir.* import zio.* -import io.iohk.atala.credentialstatus.controller.CredentialStatusEndpoints.* +import org.hyperledger.identus.credential.status.controller.CredentialStatusEndpoints.* import sttp.model.StatusCode -import io.iohk.atala.pollux.core.model.DidCommID +import org.hyperledger.identus.pollux.core.model.DidCommID import java.util.UUID diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/credentialstatus/controller/http/StatusListCredential.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/credentialstatus/controller/http/StatusListCredential.scala similarity index 93% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/credentialstatus/controller/http/StatusListCredential.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/credentialstatus/controller/http/StatusListCredential.scala index 18cbdc78a8..c6f8497df5 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/credentialstatus/controller/http/StatusListCredential.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/credentialstatus/controller/http/StatusListCredential.scala @@ -1,13 +1,13 @@ -package io.iohk.atala.credentialstatus.controller.http +package org.hyperledger.identus.credential.status.controller.http -import io.iohk.atala.pollux.vc.jwt.StatusPurpose -import io.iohk.atala.api.http.Annotation +import org.hyperledger.identus.pollux.vc.jwt.StatusPurpose +import org.hyperledger.identus.api.http.Annotation import sttp.tapir.Schema.annotations.{description, encodedExample} -import io.iohk.atala.credentialstatus.controller.http.StatusListCredential.annotations +import org.hyperledger.identus.credential.status.controller.http.StatusListCredential.annotations import sttp.tapir.Schema import zio.json.* -import io.iohk.atala.pollux.core.model.CredentialStatusList -import io.iohk.atala.pollux.core.model.error.CredentialStatusListServiceError +import org.hyperledger.identus.pollux.core.model.CredentialStatusList +import org.hyperledger.identus.pollux.core.model.error.CredentialStatusListServiceError import sttp.tapir.json.zio.schemaForZioJsonValue import zio.json.ast.Json import zio.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/event/controller/EventController.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/event/controller/EventController.scala similarity index 73% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/event/controller/EventController.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/event/controller/EventController.scala index cb643c6696..0aa9f38ed5 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/event/controller/EventController.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/event/controller/EventController.scala @@ -1,18 +1,18 @@ -package io.iohk.atala.event.controller +package org.hyperledger.identus.event.controller -import io.iohk.atala.agent.walletapi.service.WalletManagementService -import io.iohk.atala.agent.walletapi.service.WalletManagementServiceError -import io.iohk.atala.api.http.ErrorResponse -import io.iohk.atala.api.http.RequestContext -import io.iohk.atala.api.http.model.CollectionStats -import io.iohk.atala.api.http.model.PaginationInput -import io.iohk.atala.api.util.PaginationUtils -import io.iohk.atala.event.controller.http.CreateWebhookNotification -import io.iohk.atala.event.controller.http.WebhookNotification -import io.iohk.atala.event.controller.http.WebhookNotificationPage -import io.iohk.atala.event.notification.EventNotificationConfig -import io.iohk.atala.iam.wallet.http.controller.WalletManagementController -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.agent.walletapi.service.WalletManagementService +import org.hyperledger.identus.agent.walletapi.service.WalletManagementServiceError +import org.hyperledger.identus.api.http.ErrorResponse +import org.hyperledger.identus.api.http.RequestContext +import org.hyperledger.identus.api.http.model.CollectionStats +import org.hyperledger.identus.api.http.model.PaginationInput +import org.hyperledger.identus.api.util.PaginationUtils +import org.hyperledger.identus.event.controller.http.CreateWebhookNotification +import org.hyperledger.identus.event.controller.http.WebhookNotification +import org.hyperledger.identus.event.controller.http.WebhookNotificationPage +import org.hyperledger.identus.event.notification.EventNotificationConfig +import org.hyperledger.identus.iam.wallet.http.controller.WalletManagementController +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import java.net.URL diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/event/controller/EventEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/event/controller/EventEndpoints.scala similarity index 68% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/event/controller/EventEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/event/controller/EventEndpoints.scala index 88b886d0f4..0320224faf 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/event/controller/EventEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/event/controller/EventEndpoints.scala @@ -1,16 +1,16 @@ -package io.iohk.atala.event.controller +package org.hyperledger.identus.event.controller -import io.iohk.atala.api.http.EndpointOutputs -import io.iohk.atala.api.http.EndpointOutputs.FailureVariant -import io.iohk.atala.api.http.ErrorResponse -import io.iohk.atala.api.http.RequestContext -import io.iohk.atala.event.controller.http.CreateWebhookNotification -import io.iohk.atala.event.controller.http.WebhookNotification -import io.iohk.atala.event.controller.http.WebhookNotificationPage -import io.iohk.atala.iam.authentication.apikey.ApiKeyCredentials -import io.iohk.atala.iam.authentication.apikey.ApiKeyEndpointSecurityLogic.apiKeyHeader -import io.iohk.atala.iam.authentication.oidc.JwtCredentials -import io.iohk.atala.iam.authentication.oidc.JwtSecurityLogic.jwtAuthHeader +import org.hyperledger.identus.api.http.EndpointOutputs +import org.hyperledger.identus.api.http.EndpointOutputs.FailureVariant +import org.hyperledger.identus.api.http.ErrorResponse +import org.hyperledger.identus.api.http.RequestContext +import org.hyperledger.identus.event.controller.http.CreateWebhookNotification +import org.hyperledger.identus.event.controller.http.WebhookNotification +import org.hyperledger.identus.event.controller.http.WebhookNotificationPage +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyCredentials +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyEndpointSecurityLogic.apiKeyHeader +import org.hyperledger.identus.iam.authentication.oidc.JwtCredentials +import org.hyperledger.identus.iam.authentication.oidc.JwtSecurityLogic.jwtAuthHeader import sttp.model.StatusCode import sttp.tapir.* import sttp.tapir.json.zio.jsonBody diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/event/controller/EventServerEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/event/controller/EventServerEndpoints.scala similarity index 81% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/event/controller/EventServerEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/event/controller/EventServerEndpoints.scala index 806bc2a3f6..c05d23e22c 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/event/controller/EventServerEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/event/controller/EventServerEndpoints.scala @@ -1,14 +1,14 @@ -package io.iohk.atala.event.controller +package org.hyperledger.identus.event.controller -import io.iohk.atala.LogUtils.* -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.iam.authentication.Authenticator -import io.iohk.atala.iam.authentication.Authorizer -import io.iohk.atala.iam.authentication.DefaultAuthenticator -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.LogUtils.* +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.iam.authentication.Authenticator +import org.hyperledger.identus.iam.authentication.Authorizer +import org.hyperledger.identus.iam.authentication.DefaultAuthenticator +import org.hyperledger.identus.shared.models.WalletAccessContext import sttp.tapir.ztapir.* import zio.* -import io.iohk.atala.iam.authentication.SecurityLogic +import org.hyperledger.identus.iam.authentication.SecurityLogic class EventServerEndpoints( eventController: EventController, diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/event/controller/http/CreateWebhookNotification.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/event/controller/http/CreateWebhookNotification.scala similarity index 90% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/event/controller/http/CreateWebhookNotification.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/event/controller/http/CreateWebhookNotification.scala index a3e01269de..e6e413bfc4 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/event/controller/http/CreateWebhookNotification.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/event/controller/http/CreateWebhookNotification.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.event.controller.http +package org.hyperledger.identus.event.controller.http import sttp.tapir.Schema import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonEncoder, JsonDecoder} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/event/controller/http/WebhookNotification.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/event/controller/http/WebhookNotification.scala similarity index 93% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/event/controller/http/WebhookNotification.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/event/controller/http/WebhookNotification.scala index eca0db157f..27fbbbefcc 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/event/controller/http/WebhookNotification.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/event/controller/http/WebhookNotification.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.event.controller.http +package org.hyperledger.identus.event.controller.http -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.event.notification.EventNotificationConfig +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.event.notification.EventNotificationConfig import sttp.tapir.Schema import sttp.tapir.Schema.annotations.{description, encodedExample, validate, validateEach} import zio.json.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/AuthenticationConfig.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/AuthenticationConfig.scala similarity index 52% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/AuthenticationConfig.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/AuthenticationConfig.scala index f229687de1..debadc9492 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/AuthenticationConfig.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/AuthenticationConfig.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.iam.authentication +package org.hyperledger.identus.iam.authentication -import io.iohk.atala.iam.authentication.admin.AdminConfig -import io.iohk.atala.iam.authentication.apikey.ApiKeyConfig -import io.iohk.atala.iam.authentication.oidc.KeycloakConfig +import org.hyperledger.identus.iam.authentication.admin.AdminConfig +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyConfig +import org.hyperledger.identus.iam.authentication.oidc.KeycloakConfig final case class AuthenticationConfig( admin: AdminConfig, diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/Authenticator.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/Authenticator.scala similarity index 86% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/Authenticator.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/Authenticator.scala index 6ed48dcc11..8b34c79f6c 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/Authenticator.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/Authenticator.scala @@ -1,12 +1,12 @@ -package io.iohk.atala.iam.authentication - -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.agent.walletapi.model.Entity -import io.iohk.atala.agent.walletapi.model.EntityRole -import io.iohk.atala.api.http.ErrorResponse -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletAdministrationContext -import io.iohk.atala.shared.models.WalletId +package org.hyperledger.identus.iam.authentication + +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.agent.walletapi.model.Entity +import org.hyperledger.identus.agent.walletapi.model.EntityRole +import org.hyperledger.identus.api.http.ErrorResponse +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletAdministrationContext +import org.hyperledger.identus.shared.models.WalletId import zio.{IO, ZIO, ZLayer} trait Credentials diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/DefaultAuthenticator.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/DefaultAuthenticator.scala similarity index 69% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/DefaultAuthenticator.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/DefaultAuthenticator.scala index a47b510c1c..2bb447171a 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/DefaultAuthenticator.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/DefaultAuthenticator.scala @@ -1,13 +1,13 @@ -package io.iohk.atala.iam.authentication - -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.agent.walletapi.model.Entity -import io.iohk.atala.iam.authentication.admin.{AdminApiKeyAuthenticator, AdminApiKeyCredentials} -import io.iohk.atala.iam.authentication.apikey.{ApiKeyAuthenticator, ApiKeyCredentials} -import io.iohk.atala.iam.authentication.oidc.KeycloakEntity -import io.iohk.atala.iam.authentication.oidc.{KeycloakAuthenticator, JwtCredentials} -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletAdministrationContext +package org.hyperledger.identus.iam.authentication + +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.agent.walletapi.model.Entity +import org.hyperledger.identus.iam.authentication.admin.{AdminApiKeyAuthenticator, AdminApiKeyCredentials} +import org.hyperledger.identus.iam.authentication.apikey.{ApiKeyAuthenticator, ApiKeyCredentials} +import org.hyperledger.identus.iam.authentication.oidc.KeycloakEntity +import org.hyperledger.identus.iam.authentication.oidc.{KeycloakAuthenticator, JwtCredentials} +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletAdministrationContext import zio.* case class DefaultAuthenticator( diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/SecurityLogic.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/SecurityLogic.scala similarity index 83% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/SecurityLogic.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/SecurityLogic.scala index 52e4434d9a..a98daa970a 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/SecurityLogic.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/SecurityLogic.scala @@ -1,15 +1,15 @@ -package io.iohk.atala.iam.authentication +package org.hyperledger.identus.iam.authentication -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.agent.walletapi.model.Entity -import io.iohk.atala.agent.walletapi.model.EntityRole -import io.iohk.atala.api.http.ErrorResponse -import io.iohk.atala.iam.authentication.AuthenticationError.AuthenticationMethodNotEnabled -import io.iohk.atala.iam.authentication.admin.AdminApiKeyCredentials -import io.iohk.atala.iam.authentication.apikey.ApiKeyCredentials -import io.iohk.atala.iam.authentication.oidc.JwtCredentials -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletAdministrationContext +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.agent.walletapi.model.Entity +import org.hyperledger.identus.agent.walletapi.model.EntityRole +import org.hyperledger.identus.api.http.ErrorResponse +import org.hyperledger.identus.iam.authentication.AuthenticationError.AuthenticationMethodNotEnabled +import org.hyperledger.identus.iam.authentication.admin.AdminApiKeyCredentials +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyCredentials +import org.hyperledger.identus.iam.authentication.oidc.JwtCredentials +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletAdministrationContext import zio.* object SecurityLogic { diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/admin/AdminApiKeyAuthenticator.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/admin/AdminApiKeyAuthenticator.scala similarity index 63% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/admin/AdminApiKeyAuthenticator.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/admin/AdminApiKeyAuthenticator.scala index 1444e29d08..500873d90b 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/admin/AdminApiKeyAuthenticator.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/admin/AdminApiKeyAuthenticator.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.iam.authentication.admin +package org.hyperledger.identus.iam.authentication.admin -import io.iohk.atala.agent.walletapi.model.Entity -import io.iohk.atala.iam.authentication.AuthenticatorWithAuthZ -import io.iohk.atala.iam.authentication.EntityAuthorizer -import io.iohk.atala.iam.authentication.{AuthenticationError, Credentials} +import org.hyperledger.identus.agent.walletapi.model.Entity +import org.hyperledger.identus.iam.authentication.AuthenticatorWithAuthZ +import org.hyperledger.identus.iam.authentication.EntityAuthorizer +import org.hyperledger.identus.iam.authentication.{AuthenticationError, Credentials} import zio.* trait AdminApiKeyAuthenticator extends AuthenticatorWithAuthZ[Entity], EntityAuthorizer { diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/admin/AdminApiKeyAuthenticatorImpl.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/admin/AdminApiKeyAuthenticatorImpl.scala similarity index 78% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/admin/AdminApiKeyAuthenticatorImpl.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/admin/AdminApiKeyAuthenticatorImpl.scala index e0f62655e4..c4e32d4b3f 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/admin/AdminApiKeyAuthenticatorImpl.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/admin/AdminApiKeyAuthenticatorImpl.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.iam.authentication.admin +package org.hyperledger.identus.iam.authentication.admin -import io.iohk.atala.agent.walletapi.model.Entity -import io.iohk.atala.iam.authentication.AuthenticationError +import org.hyperledger.identus.agent.walletapi.model.Entity +import org.hyperledger.identus.iam.authentication.AuthenticationError import zio.{IO, URLayer, ZIO, ZLayer} case class AdminApiKeyAuthenticatorImpl(adminConfig: AdminConfig) extends AdminApiKeyAuthenticator { diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/admin/AdminApiKeyCredentials.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/admin/AdminApiKeyCredentials.scala similarity index 74% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/admin/AdminApiKeyCredentials.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/admin/AdminApiKeyCredentials.scala index d255043a36..9903edac58 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/admin/AdminApiKeyCredentials.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/admin/AdminApiKeyCredentials.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.iam.authentication.admin +package org.hyperledger.identus.iam.authentication.admin -import io.iohk.atala.iam.authentication.{AuthenticationError, Credentials} +import org.hyperledger.identus.iam.authentication.{AuthenticationError, Credentials} case class AdminApiKeyAuthenticationError(message: String) extends AuthenticationError diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/admin/AdminApiKeySecurityLogic.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/admin/AdminApiKeySecurityLogic.scala similarity index 88% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/admin/AdminApiKeySecurityLogic.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/admin/AdminApiKeySecurityLogic.scala index 2c6a5db656..1e351d494c 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/admin/AdminApiKeySecurityLogic.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/admin/AdminApiKeySecurityLogic.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.iam.authentication.admin +package org.hyperledger.identus.iam.authentication.admin import sttp.tapir.EndpointIO import sttp.tapir.EndpointInput.Auth diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/admin/AdminConfig.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/admin/AdminConfig.scala similarity index 73% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/admin/AdminConfig.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/admin/AdminConfig.scala index f1de628d5b..ba0920ab67 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/admin/AdminConfig.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/admin/AdminConfig.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.iam.authentication.admin +package org.hyperledger.identus.iam.authentication.admin -import io.iohk.atala.agent.server.config.AppConfig +import org.hyperledger.identus.agent.server.config.AppConfig import zio.{URLayer, ZLayer} final case class AdminConfig(token: String) diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/apikey/ApiKeyAuthenticator.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/apikey/ApiKeyAuthenticator.scala similarity index 79% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/apikey/ApiKeyAuthenticator.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/apikey/ApiKeyAuthenticator.scala index 8a60e147df..fea47359e4 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/apikey/ApiKeyAuthenticator.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/apikey/ApiKeyAuthenticator.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.iam.authentication.apikey +package org.hyperledger.identus.iam.authentication.apikey -import io.iohk.atala.agent.walletapi.model.Entity -import io.iohk.atala.iam.authentication.AuthenticationError.* -import io.iohk.atala.iam.authentication.AuthenticatorWithAuthZ -import io.iohk.atala.iam.authentication.EntityAuthorizer -import io.iohk.atala.iam.authentication.{AuthenticationError, Credentials} +import org.hyperledger.identus.agent.walletapi.model.Entity +import org.hyperledger.identus.iam.authentication.AuthenticationError.* +import org.hyperledger.identus.iam.authentication.AuthenticatorWithAuthZ +import org.hyperledger.identus.iam.authentication.EntityAuthorizer +import org.hyperledger.identus.iam.authentication.{AuthenticationError, Credentials} import zio.{IO, ZIO} import java.util.UUID diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/apikey/ApiKeyAuthenticatorImpl.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/apikey/ApiKeyAuthenticatorImpl.scala similarity index 90% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/apikey/ApiKeyAuthenticatorImpl.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/apikey/ApiKeyAuthenticatorImpl.scala index 2707795a51..364b0b1468 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/apikey/ApiKeyAuthenticatorImpl.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/apikey/ApiKeyAuthenticatorImpl.scala @@ -1,13 +1,13 @@ -package io.iohk.atala.iam.authentication.apikey +package org.hyperledger.identus.iam.authentication.apikey -import io.iohk.atala.agent.walletapi.model.Entity -import io.iohk.atala.agent.walletapi.model.Wallet -import io.iohk.atala.agent.walletapi.service.{EntityService, WalletManagementService} -import io.iohk.atala.iam.authentication.AuthenticationError -import io.iohk.atala.iam.authentication.AuthenticationError.* +import org.hyperledger.identus.agent.walletapi.model.Entity +import org.hyperledger.identus.agent.walletapi.model.Wallet +import org.hyperledger.identus.agent.walletapi.service.{EntityService, WalletManagementService} +import org.hyperledger.identus.iam.authentication.AuthenticationError +import org.hyperledger.identus.iam.authentication.AuthenticationError.* import io.iohk.atala.prism.crypto.Sha256 -import io.iohk.atala.shared.models.WalletAdministrationContext -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.shared.models.WalletAdministrationContext +import org.hyperledger.identus.shared.models.WalletId import zio.{IO, URLayer, ZIO, ZLayer} import java.util.UUID diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/apikey/ApiKeyConfig.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/apikey/ApiKeyConfig.scala similarity index 70% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/apikey/ApiKeyConfig.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/apikey/ApiKeyConfig.scala index ec760b5d6f..5efbad7147 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/apikey/ApiKeyConfig.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/apikey/ApiKeyConfig.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.iam.authentication.apikey +package org.hyperledger.identus.iam.authentication.apikey -import io.iohk.atala.agent.server.config.AppConfig +import org.hyperledger.identus.agent.server.config.AppConfig import zio.* case class ApiKeyConfig(salt: String, enabled: Boolean, authenticateAsDefaultUser: Boolean, autoProvisioning: Boolean) diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/apikey/ApiKeyEndpointSecurityLogic.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/apikey/ApiKeyEndpointSecurityLogic.scala similarity index 87% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/apikey/ApiKeyEndpointSecurityLogic.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/apikey/ApiKeyEndpointSecurityLogic.scala index cc8585ef6d..1821c291a2 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/apikey/ApiKeyEndpointSecurityLogic.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/apikey/ApiKeyEndpointSecurityLogic.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.iam.authentication.apikey +package org.hyperledger.identus.iam.authentication.apikey import sttp.tapir.EndpointIO import sttp.tapir.EndpointInput.Auth diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/apikey/AuthenticationRepository.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/apikey/AuthenticationRepository.scala similarity index 98% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/apikey/AuthenticationRepository.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/apikey/AuthenticationRepository.scala index d52d27ab1b..411847c7f9 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/apikey/AuthenticationRepository.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/apikey/AuthenticationRepository.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.iam.authentication.apikey +package org.hyperledger.identus.iam.authentication.apikey import io.getquill.context.json.PostgresJsonExtensions import io.getquill.doobie.DoobieContext diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/apikey/JdbcAuthenticationRepository.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/apikey/JdbcAuthenticationRepository.scala similarity index 98% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/apikey/JdbcAuthenticationRepository.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/apikey/JdbcAuthenticationRepository.scala index e96cfc8d58..55a440b26f 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/apikey/JdbcAuthenticationRepository.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/apikey/JdbcAuthenticationRepository.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.iam.authentication.apikey +package org.hyperledger.identus.iam.authentication.apikey import doobie.* import doobie.implicits.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/apikey/package.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/apikey/package.scala similarity index 88% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/apikey/package.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/apikey/package.scala index d9aca0200a..e1dd6716e7 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/apikey/package.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/apikey/package.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.iam.authentication +package org.hyperledger.identus.iam.authentication package object apikey { case class ApiKeyCredentials(apiKey: Option[String]) extends Credentials diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/oidc/JwtCredentials.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/oidc/JwtCredentials.scala similarity index 59% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/oidc/JwtCredentials.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/oidc/JwtCredentials.scala index a303dfd522..099550fdd6 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/oidc/JwtCredentials.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/oidc/JwtCredentials.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.iam.authentication.oidc +package org.hyperledger.identus.iam.authentication.oidc -import io.iohk.atala.iam.authentication.AuthenticationError -import io.iohk.atala.iam.authentication.Credentials +import org.hyperledger.identus.iam.authentication.AuthenticationError +import org.hyperledger.identus.iam.authentication.Credentials final case class JwtCredentials(token: Option[String]) extends Credentials diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/oidc/JwtSecurityLogic.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/oidc/JwtSecurityLogic.scala similarity index 83% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/oidc/JwtSecurityLogic.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/oidc/JwtSecurityLogic.scala index 64a141d803..2925d87ba9 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/oidc/JwtSecurityLogic.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/oidc/JwtSecurityLogic.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.iam.authentication.oidc +package org.hyperledger.identus.iam.authentication.oidc import sttp.tapir.EndpointInput.Auth import sttp.tapir.EndpointInput.AuthType.Http diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/oidc/KeycloakAuthenticator.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/oidc/KeycloakAuthenticator.scala similarity index 83% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/oidc/KeycloakAuthenticator.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/oidc/KeycloakAuthenticator.scala index 9bce9e564f..9567a53cf1 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/oidc/KeycloakAuthenticator.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/oidc/KeycloakAuthenticator.scala @@ -1,13 +1,13 @@ -package io.iohk.atala.iam.authentication.oidc +package org.hyperledger.identus.iam.authentication.oidc -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.agent.walletapi.model.EntityRole -import io.iohk.atala.iam.authentication.AuthenticationError -import io.iohk.atala.iam.authentication.AuthenticationError.AuthenticationMethodNotEnabled -import io.iohk.atala.iam.authentication.AuthenticationError.InvalidCredentials -import io.iohk.atala.iam.authentication.AuthenticatorWithAuthZ -import io.iohk.atala.iam.authentication.Credentials -import io.iohk.atala.shared.utils.Traverse.* +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.agent.walletapi.model.EntityRole +import org.hyperledger.identus.iam.authentication.AuthenticationError +import org.hyperledger.identus.iam.authentication.AuthenticationError.AuthenticationMethodNotEnabled +import org.hyperledger.identus.iam.authentication.AuthenticationError.InvalidCredentials +import org.hyperledger.identus.iam.authentication.AuthenticatorWithAuthZ +import org.hyperledger.identus.iam.authentication.Credentials +import org.hyperledger.identus.shared.utils.Traverse.* import pdi.jwt.JwtCirce import pdi.jwt.JwtClaim import pdi.jwt.JwtOptions diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/oidc/KeycloakAuthenticatorImpl.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/oidc/KeycloakAuthenticatorImpl.scala similarity index 87% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/oidc/KeycloakAuthenticatorImpl.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/oidc/KeycloakAuthenticatorImpl.scala index 4d9f5156d8..35f46c440d 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/oidc/KeycloakAuthenticatorImpl.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/oidc/KeycloakAuthenticatorImpl.scala @@ -1,12 +1,12 @@ -package io.iohk.atala.iam.authentication.oidc +package org.hyperledger.identus.iam.authentication.oidc -import io.iohk.atala.agent.walletapi.model.EntityRole -import io.iohk.atala.iam.authentication.AuthenticationError -import io.iohk.atala.iam.authentication.AuthenticationError.AuthenticationMethodNotEnabled -import io.iohk.atala.iam.authorization.core.PermissionManagement -import io.iohk.atala.iam.authorization.core.PermissionManagement.Error.PermissionNotAvailable -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletAdministrationContext +import org.hyperledger.identus.agent.walletapi.model.EntityRole +import org.hyperledger.identus.iam.authentication.AuthenticationError +import org.hyperledger.identus.iam.authentication.AuthenticationError.AuthenticationMethodNotEnabled +import org.hyperledger.identus.iam.authorization.core.PermissionManagement +import org.hyperledger.identus.iam.authorization.core.PermissionManagement.Error.PermissionNotAvailable +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletAdministrationContext import zio.* import java.util.UUID diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/oidc/KeycloakClient.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/oidc/KeycloakClient.scala similarity index 99% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/oidc/KeycloakClient.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/oidc/KeycloakClient.scala index 88260265c7..935531d25f 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/oidc/KeycloakClient.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/oidc/KeycloakClient.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.iam.authentication.oidc +package org.hyperledger.identus.iam.authentication.oidc import org.keycloak.authorization.client.{AuthzClient, Configuration as KeycloakAuthzConfig} import org.keycloak.representations.idm.authorization.AuthorizationRequest diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/oidc/KeycloakConfig.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/oidc/KeycloakConfig.scala similarity index 80% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/oidc/KeycloakConfig.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/oidc/KeycloakConfig.scala index 6612b34e2e..463a8751a5 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authentication/oidc/KeycloakConfig.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authentication/oidc/KeycloakConfig.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.iam.authentication.oidc +package org.hyperledger.identus.iam.authentication.oidc import zio.* -import io.iohk.atala.agent.server.config.AppConfig +import org.hyperledger.identus.agent.server.config.AppConfig import java.net.URL final case class KeycloakConfig( diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authorization/DefaultPermissionManagementService.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authorization/DefaultPermissionManagementService.scala similarity index 74% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authorization/DefaultPermissionManagementService.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authorization/DefaultPermissionManagementService.scala index b685bd438e..a885e83f5c 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authorization/DefaultPermissionManagementService.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authorization/DefaultPermissionManagementService.scala @@ -1,12 +1,12 @@ -package io.iohk.atala.iam.authorization +package org.hyperledger.identus.iam.authorization -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.agent.walletapi.model.Entity -import io.iohk.atala.iam.authentication.oidc.KeycloakEntity -import io.iohk.atala.iam.authorization.core.PermissionManagement -import io.iohk.atala.iam.authorization.core.PermissionManagement.Error -import io.iohk.atala.shared.models.WalletAdministrationContext -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.agent.walletapi.model.Entity +import org.hyperledger.identus.iam.authentication.oidc.KeycloakEntity +import org.hyperledger.identus.iam.authorization.core.PermissionManagement +import org.hyperledger.identus.iam.authorization.core.PermissionManagement.Error +import org.hyperledger.identus.shared.models.WalletAdministrationContext +import org.hyperledger.identus.shared.models.WalletId import zio.* class DefaultPermissionManagementService( diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authorization/core/EntityPermissionManagementService.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authorization/core/EntityPermissionManagementService.scala similarity index 69% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authorization/core/EntityPermissionManagementService.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authorization/core/EntityPermissionManagementService.scala index e2a8d9a68a..b3977b642b 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authorization/core/EntityPermissionManagementService.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authorization/core/EntityPermissionManagementService.scala @@ -1,12 +1,12 @@ -package io.iohk.atala.iam.authorization.core - -import io.iohk.atala.agent.walletapi.model.Entity -import io.iohk.atala.agent.walletapi.service.EntityService -import io.iohk.atala.iam.authorization.core.PermissionManagement.Error -import io.iohk.atala.iam.authorization.core.PermissionManagement.Error.ServiceError -import io.iohk.atala.iam.authorization.core.PermissionManagement.Error.WalletNotFoundById -import io.iohk.atala.shared.models.WalletAdministrationContext -import io.iohk.atala.shared.models.WalletId +package org.hyperledger.identus.iam.authorization.core + +import org.hyperledger.identus.agent.walletapi.model.Entity +import org.hyperledger.identus.agent.walletapi.service.EntityService +import org.hyperledger.identus.iam.authorization.core.PermissionManagement.Error +import org.hyperledger.identus.iam.authorization.core.PermissionManagement.Error.ServiceError +import org.hyperledger.identus.iam.authorization.core.PermissionManagement.Error.WalletNotFoundById +import org.hyperledger.identus.shared.models.WalletAdministrationContext +import org.hyperledger.identus.shared.models.WalletId import zio.* import scala.language.implicitConversions diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authorization/core/PermissionManagement.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authorization/core/PermissionManagement.scala similarity index 72% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authorization/core/PermissionManagement.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authorization/core/PermissionManagement.scala index b3d6c922f1..c4581dcb5e 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authorization/core/PermissionManagement.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authorization/core/PermissionManagement.scala @@ -1,13 +1,13 @@ -package io.iohk.atala.iam.authorization.core - -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.agent.walletapi.model.error.EntityServiceError -import io.iohk.atala.agent.walletapi.model.error.EntityServiceError.EntityAlreadyExists -import io.iohk.atala.agent.walletapi.model.error.EntityServiceError.EntityNotFound -import io.iohk.atala.agent.walletapi.model.error.EntityServiceError.EntityStorageError -import io.iohk.atala.agent.walletapi.model.error.EntityServiceError.EntityWalletNotFound -import io.iohk.atala.shared.models.WalletAdministrationContext -import io.iohk.atala.shared.models.WalletId +package org.hyperledger.identus.iam.authorization.core + +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.agent.walletapi.model.error.EntityServiceError +import org.hyperledger.identus.agent.walletapi.model.error.EntityServiceError.EntityAlreadyExists +import org.hyperledger.identus.agent.walletapi.model.error.EntityServiceError.EntityNotFound +import org.hyperledger.identus.agent.walletapi.model.error.EntityServiceError.EntityStorageError +import org.hyperledger.identus.agent.walletapi.model.error.EntityServiceError.EntityWalletNotFound +import org.hyperledger.identus.shared.models.WalletAdministrationContext +import org.hyperledger.identus.shared.models.WalletId import zio.* import java.util.UUID diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authorization/keycloak/admin/KeycloakPermissionManagementService.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authorization/keycloak/admin/KeycloakPermissionManagementService.scala similarity index 91% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authorization/keycloak/admin/KeycloakPermissionManagementService.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authorization/keycloak/admin/KeycloakPermissionManagementService.scala index 04169b92e7..771f914911 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/authorization/keycloak/admin/KeycloakPermissionManagementService.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/authorization/keycloak/admin/KeycloakPermissionManagementService.scala @@ -1,14 +1,14 @@ -package io.iohk.atala.iam.authorization.keycloak.admin - -import io.iohk.atala.agent.walletapi.model.Wallet -import io.iohk.atala.agent.walletapi.service.WalletManagementService -import io.iohk.atala.iam.authentication.oidc.KeycloakClient -import io.iohk.atala.iam.authentication.oidc.KeycloakEntity -import io.iohk.atala.iam.authorization.core.PermissionManagement -import io.iohk.atala.iam.authorization.core.PermissionManagement.Error -import io.iohk.atala.iam.authorization.core.PermissionManagement.Error.* -import io.iohk.atala.shared.models.WalletAdministrationContext -import io.iohk.atala.shared.models.WalletId +package org.hyperledger.identus.iam.authorization.keycloak.admin + +import org.hyperledger.identus.agent.walletapi.model.Wallet +import org.hyperledger.identus.agent.walletapi.service.WalletManagementService +import org.hyperledger.identus.iam.authentication.oidc.KeycloakClient +import org.hyperledger.identus.iam.authentication.oidc.KeycloakEntity +import org.hyperledger.identus.iam.authorization.core.PermissionManagement +import org.hyperledger.identus.iam.authorization.core.PermissionManagement.Error +import org.hyperledger.identus.iam.authorization.core.PermissionManagement.Error.* +import org.hyperledger.identus.shared.models.WalletAdministrationContext +import org.hyperledger.identus.shared.models.WalletId import org.keycloak.authorization.client.AuthzClient import org.keycloak.representations.idm.authorization.{ResourceRepresentation, UmaPermissionRepresentation} import zio.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/EntityEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/EntityEndpoints.scala similarity index 92% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/EntityEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/EntityEndpoints.scala index 21a20edc2e..d8e5014d3d 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/EntityEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/EntityEndpoints.scala @@ -1,13 +1,13 @@ -package io.iohk.atala.iam.entity.http +package org.hyperledger.identus.iam.entity.http -import io.iohk.atala.api.http.* -import io.iohk.atala.api.http.EndpointOutputs.* -import io.iohk.atala.api.http.model.PaginationInput -import io.iohk.atala.iam.authentication.admin.AdminApiKeyCredentials -import io.iohk.atala.iam.authentication.admin.AdminApiKeySecurityLogic.adminApiKeyHeader -import io.iohk.atala.iam.authentication.oidc.JwtCredentials -import io.iohk.atala.iam.authentication.oidc.JwtSecurityLogic.jwtAuthHeader -import io.iohk.atala.iam.entity.http.model.* +import org.hyperledger.identus.api.http.* +import org.hyperledger.identus.api.http.EndpointOutputs.* +import org.hyperledger.identus.api.http.model.PaginationInput +import org.hyperledger.identus.iam.authentication.admin.AdminApiKeyCredentials +import org.hyperledger.identus.iam.authentication.admin.AdminApiKeySecurityLogic.adminApiKeyHeader +import org.hyperledger.identus.iam.authentication.oidc.JwtCredentials +import org.hyperledger.identus.iam.authentication.oidc.JwtSecurityLogic.jwtAuthHeader +import org.hyperledger.identus.iam.entity.http.model.* import sttp.model.StatusCode import sttp.tapir.json.zio.jsonBody import sttp.tapir.{Endpoint, EndpointInput, endpoint, extractFromRequest, path, query, statusCode, stringToPath} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/EntityServerEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/EntityServerEndpoints.scala similarity index 82% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/EntityServerEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/EntityServerEndpoints.scala index 922517388a..f6901760c6 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/EntityServerEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/EntityServerEndpoints.scala @@ -1,18 +1,18 @@ -package io.iohk.atala.iam.entity.http +package org.hyperledger.identus.iam.entity.http -import io.iohk.atala.LogUtils.* -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.agent.walletapi.model.EntityRole -import io.iohk.atala.api.http.model.PaginationInput -import io.iohk.atala.api.http.{ErrorResponse, RequestContext} -import io.iohk.atala.iam.authentication.Authenticator -import io.iohk.atala.iam.authentication.DefaultAuthenticator -import io.iohk.atala.iam.authentication.SecurityLogic -import io.iohk.atala.iam.authentication.admin.{AdminApiKeyCredentials} -import io.iohk.atala.iam.authentication.oidc.JwtCredentials -import io.iohk.atala.iam.entity.http.EntityEndpoints.* -import io.iohk.atala.iam.entity.http.controller.EntityController -import io.iohk.atala.iam.entity.http.model.{ +import org.hyperledger.identus.LogUtils.* +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.agent.walletapi.model.EntityRole +import org.hyperledger.identus.api.http.model.PaginationInput +import org.hyperledger.identus.api.http.{ErrorResponse, RequestContext} +import org.hyperledger.identus.iam.authentication.Authenticator +import org.hyperledger.identus.iam.authentication.DefaultAuthenticator +import org.hyperledger.identus.iam.authentication.SecurityLogic +import org.hyperledger.identus.iam.authentication.admin.{AdminApiKeyCredentials} +import org.hyperledger.identus.iam.authentication.oidc.JwtCredentials +import org.hyperledger.identus.iam.entity.http.EntityEndpoints.* +import org.hyperledger.identus.iam.entity.http.controller.EntityController +import org.hyperledger.identus.iam.entity.http.model.{ ApiKeyAuthenticationRequest, CreateEntityRequest, UpdateEntityNameRequest, diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/controller/EntityController.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/controller/EntityController.scala similarity index 80% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/controller/EntityController.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/controller/EntityController.scala index 6058585e48..d48dac5486 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/controller/EntityController.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/controller/EntityController.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.iam.entity.http.controller +package org.hyperledger.identus.iam.entity.http.controller -import io.iohk.atala.agent.walletapi.model.error.EntityServiceError -import io.iohk.atala.api.http.model.PaginationInput -import io.iohk.atala.api.http.{ErrorResponse, RequestContext} -import io.iohk.atala.iam.entity.http.model.{CreateEntityRequest, EntityResponse, EntityResponsePage} +import org.hyperledger.identus.agent.walletapi.model.error.EntityServiceError +import org.hyperledger.identus.api.http.model.PaginationInput +import org.hyperledger.identus.api.http.{ErrorResponse, RequestContext} +import org.hyperledger.identus.iam.entity.http.model.{CreateEntityRequest, EntityResponse, EntityResponsePage} import zio.* import java.util.UUID diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/controller/EntityControllerImpl.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/controller/EntityControllerImpl.scala similarity index 84% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/controller/EntityControllerImpl.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/controller/EntityControllerImpl.scala index 44ff91c78b..1bb20be18e 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/controller/EntityControllerImpl.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/controller/EntityControllerImpl.scala @@ -1,15 +1,15 @@ -package io.iohk.atala.iam.entity.http.controller +package org.hyperledger.identus.iam.entity.http.controller -import io.iohk.atala.agent.walletapi.model.Entity -import io.iohk.atala.agent.walletapi.model.error.EntityServiceError -import io.iohk.atala.agent.walletapi.service.EntityService -import io.iohk.atala.api.http.model.PaginationInput -import io.iohk.atala.api.http.{ErrorResponse, RequestContext} -import io.iohk.atala.iam.authentication.AuthenticationError -import io.iohk.atala.iam.entity.http.model.{CreateEntityRequest, EntityResponse, EntityResponsePage} +import org.hyperledger.identus.agent.walletapi.model.Entity +import org.hyperledger.identus.agent.walletapi.model.error.EntityServiceError +import org.hyperledger.identus.agent.walletapi.service.EntityService +import org.hyperledger.identus.api.http.model.PaginationInput +import org.hyperledger.identus.api.http.{ErrorResponse, RequestContext} +import org.hyperledger.identus.iam.authentication.AuthenticationError +import org.hyperledger.identus.iam.entity.http.model.{CreateEntityRequest, EntityResponse, EntityResponsePage} import zio.ZIO.succeed import zio.{IO, URLayer, ZLayer} -import io.iohk.atala.iam.authentication.apikey.ApiKeyAuthenticator +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyAuthenticator import java.util.UUID diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/model/ApiKeyAuthenticationRequest.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/model/ApiKeyAuthenticationRequest.scala similarity index 87% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/model/ApiKeyAuthenticationRequest.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/model/ApiKeyAuthenticationRequest.scala index 7be26f004a..d5b274b31d 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/model/ApiKeyAuthenticationRequest.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/model/ApiKeyAuthenticationRequest.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.iam.entity.http.model +package org.hyperledger.identus.iam.entity.http.model -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.iam.entity.http.model.ApiKeyAuthenticationRequest.annotations +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.iam.entity.http.model.ApiKeyAuthenticationRequest.annotations import sttp.tapir.{Schema, Validator} import sttp.tapir.Schema.annotations.{description, encodedExample, validate, validateEach} import sttp.tapir.Validator.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/model/CreateEntityRequest.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/model/CreateEntityRequest.scala similarity index 91% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/model/CreateEntityRequest.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/model/CreateEntityRequest.scala index 294af25bca..650dfae862 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/model/CreateEntityRequest.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/model/CreateEntityRequest.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.iam.entity.http.model +package org.hyperledger.identus.iam.entity.http.model -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.iam.entity.http.model.CreateEntityRequest.annotations +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.iam.entity.http.model.CreateEntityRequest.annotations import sttp.tapir.Schema import sttp.tapir.Schema.annotations.{description, encodedExample, validate, validateEach} import sttp.tapir.Validator diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/model/EntityResponse.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/model/EntityResponse.scala similarity index 93% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/model/EntityResponse.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/model/EntityResponse.scala index e32650e333..72d03d34bb 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/model/EntityResponse.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/model/EntityResponse.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.iam.entity.http.model +package org.hyperledger.identus.iam.entity.http.model -import io.iohk.atala.agent.walletapi.model.Entity -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.iam.entity.http.model.EntityResponse.annotations +import org.hyperledger.identus.agent.walletapi.model.Entity +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.iam.entity.http.model.EntityResponse.annotations import sttp.tapir.Schema import sttp.tapir.Schema.annotations.{description, encodedExample, validate, validateEach} import sttp.tapir.Validator.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/model/EntityResponsePage.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/model/EntityResponsePage.scala similarity index 93% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/model/EntityResponsePage.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/model/EntityResponsePage.scala index b3a6a34751..63bfae19da 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/model/EntityResponsePage.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/model/EntityResponsePage.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.iam.entity.http.model +package org.hyperledger.identus.iam.entity.http.model -import io.iohk.atala.agent.walletapi.model.Entity -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.iam.entity.http.model.EntityResponsePage.annotations +import org.hyperledger.identus.agent.walletapi.model.Entity +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.iam.entity.http.model.EntityResponsePage.annotations import sttp.tapir.Schema import sttp.tapir.Schema.annotations.{description, encodedExample, validate, validateEach} import sttp.tapir.Validator.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/model/UpdateEntityNameRequest.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/model/UpdateEntityNameRequest.scala similarity index 83% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/model/UpdateEntityNameRequest.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/model/UpdateEntityNameRequest.scala index d25ff39157..a9c78ec7a1 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/model/UpdateEntityNameRequest.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/model/UpdateEntityNameRequest.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.iam.entity.http.model +package org.hyperledger.identus.iam.entity.http.model -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.iam.entity.http.model.UpdateEntityNameRequest.annotations +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.iam.entity.http.model.UpdateEntityNameRequest.annotations import sttp.tapir.Schema import sttp.tapir.Schema.annotations.{description, encodedExample, validate, validateEach} import sttp.tapir.Validator diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/model/UpdateEntityWalletIdRequest.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/model/UpdateEntityWalletIdRequest.scala similarity index 83% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/model/UpdateEntityWalletIdRequest.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/model/UpdateEntityWalletIdRequest.scala index dfc815d363..b8f3e797f2 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/entity/http/model/UpdateEntityWalletIdRequest.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/entity/http/model/UpdateEntityWalletIdRequest.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.iam.entity.http.model +package org.hyperledger.identus.iam.entity.http.model -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.iam.entity.http.model.UpdateEntityWalletIdRequest.annotations +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.iam.entity.http.model.UpdateEntityWalletIdRequest.annotations import sttp.tapir.Schema import sttp.tapir.Schema.annotations.{description, encodedExample, validate, validateEach} import sttp.tapir.Validator.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/wallet/http/WalletManagementEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/wallet/http/WalletManagementEndpoints.scala similarity index 85% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/wallet/http/WalletManagementEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/wallet/http/WalletManagementEndpoints.scala index e846c02c1f..1259f43e8d 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/wallet/http/WalletManagementEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/wallet/http/WalletManagementEndpoints.scala @@ -1,19 +1,19 @@ -package io.iohk.atala.iam.wallet.http +package org.hyperledger.identus.iam.wallet.http -import io.iohk.atala.api.http.EndpointOutputs -import io.iohk.atala.api.http.ErrorResponse -import io.iohk.atala.api.http.RequestContext -import io.iohk.atala.api.http.model.PaginationInput -import io.iohk.atala.iam.authentication.admin.AdminApiKeyCredentials -import io.iohk.atala.iam.authentication.admin.AdminApiKeySecurityLogic.adminApiKeyHeader -import io.iohk.atala.iam.authentication.apikey.ApiKeyCredentials -import io.iohk.atala.iam.authentication.apikey.ApiKeyEndpointSecurityLogic.apiKeyHeader -import io.iohk.atala.iam.authentication.oidc.JwtCredentials -import io.iohk.atala.iam.authentication.oidc.JwtSecurityLogic.jwtAuthHeader -import io.iohk.atala.iam.wallet.http.model.CreateWalletRequest -import io.iohk.atala.iam.wallet.http.model.CreateWalletUmaPermissionRequest -import io.iohk.atala.iam.wallet.http.model.WalletDetail -import io.iohk.atala.iam.wallet.http.model.WalletDetailPage +import org.hyperledger.identus.api.http.EndpointOutputs +import org.hyperledger.identus.api.http.ErrorResponse +import org.hyperledger.identus.api.http.RequestContext +import org.hyperledger.identus.api.http.model.PaginationInput +import org.hyperledger.identus.iam.authentication.admin.AdminApiKeyCredentials +import org.hyperledger.identus.iam.authentication.admin.AdminApiKeySecurityLogic.adminApiKeyHeader +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyCredentials +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyEndpointSecurityLogic.apiKeyHeader +import org.hyperledger.identus.iam.authentication.oidc.JwtCredentials +import org.hyperledger.identus.iam.authentication.oidc.JwtSecurityLogic.jwtAuthHeader +import org.hyperledger.identus.iam.wallet.http.model.CreateWalletRequest +import org.hyperledger.identus.iam.wallet.http.model.CreateWalletUmaPermissionRequest +import org.hyperledger.identus.iam.wallet.http.model.WalletDetail +import org.hyperledger.identus.iam.wallet.http.model.WalletDetailPage import sttp.apispec.Tag import sttp.model.StatusCode import sttp.tapir.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/wallet/http/WalletManagementServerEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/wallet/http/WalletManagementServerEndpoints.scala similarity index 83% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/wallet/http/WalletManagementServerEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/wallet/http/WalletManagementServerEndpoints.scala index 08fed5ca8f..066a402489 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/wallet/http/WalletManagementServerEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/wallet/http/WalletManagementServerEndpoints.scala @@ -1,14 +1,14 @@ -package io.iohk.atala.iam.wallet.http +package org.hyperledger.identus.iam.wallet.http -import io.iohk.atala.LogUtils.* -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.api.http.ErrorResponse -import io.iohk.atala.iam.authentication.Authenticator -import io.iohk.atala.iam.authentication.Authorizer -import io.iohk.atala.iam.authentication.DefaultAuthenticator -import io.iohk.atala.iam.authentication.SecurityLogic -import io.iohk.atala.iam.wallet.http.controller.WalletManagementController -import io.iohk.atala.shared.models.WalletAdministrationContext +import org.hyperledger.identus.LogUtils.* +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.api.http.ErrorResponse +import org.hyperledger.identus.iam.authentication.Authenticator +import org.hyperledger.identus.iam.authentication.Authorizer +import org.hyperledger.identus.iam.authentication.DefaultAuthenticator +import org.hyperledger.identus.iam.authentication.SecurityLogic +import org.hyperledger.identus.iam.wallet.http.controller.WalletManagementController +import org.hyperledger.identus.shared.models.WalletAdministrationContext import sttp.tapir.ztapir.* import zio.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/wallet/http/controller/WalletManagementController.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/wallet/http/controller/WalletManagementController.scala similarity index 82% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/wallet/http/controller/WalletManagementController.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/wallet/http/controller/WalletManagementController.scala index 13d01d95d4..4ab7cc239d 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/wallet/http/controller/WalletManagementController.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/wallet/http/controller/WalletManagementController.scala @@ -1,26 +1,26 @@ -package io.iohk.atala.iam.wallet.http.controller - -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.agent.walletapi.model.Wallet -import io.iohk.atala.agent.walletapi.model.WalletSeed -import io.iohk.atala.agent.walletapi.service.WalletManagementService -import io.iohk.atala.agent.walletapi.service.WalletManagementServiceError -import io.iohk.atala.agent.walletapi.service.WalletManagementServiceError.TooManyPermittedWallet -import io.iohk.atala.api.http.ErrorResponse -import io.iohk.atala.api.http.RequestContext -import io.iohk.atala.api.http.model.CollectionStats -import io.iohk.atala.api.http.model.PaginationInput -import io.iohk.atala.api.util.PaginationUtils -import io.iohk.atala.iam.authentication.oidc.KeycloakEntity -import io.iohk.atala.iam.authorization.core.PermissionManagement -import io.iohk.atala.iam.wallet.http.model.CreateWalletRequest -import io.iohk.atala.iam.wallet.http.model.CreateWalletUmaPermissionRequest -import io.iohk.atala.iam.wallet.http.model.WalletDetail -import io.iohk.atala.iam.wallet.http.model.WalletDetailPage -import io.iohk.atala.shared.models.HexString -import io.iohk.atala.shared.models.WalletAdministrationContext -import io.iohk.atala.shared.models.WalletAdministrationContext.Admin -import io.iohk.atala.shared.models.WalletId +package org.hyperledger.identus.iam.wallet.http.controller + +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.agent.walletapi.model.Wallet +import org.hyperledger.identus.agent.walletapi.model.WalletSeed +import org.hyperledger.identus.agent.walletapi.service.WalletManagementService +import org.hyperledger.identus.agent.walletapi.service.WalletManagementServiceError +import org.hyperledger.identus.agent.walletapi.service.WalletManagementServiceError.TooManyPermittedWallet +import org.hyperledger.identus.api.http.ErrorResponse +import org.hyperledger.identus.api.http.RequestContext +import org.hyperledger.identus.api.http.model.CollectionStats +import org.hyperledger.identus.api.http.model.PaginationInput +import org.hyperledger.identus.api.util.PaginationUtils +import org.hyperledger.identus.iam.authentication.oidc.KeycloakEntity +import org.hyperledger.identus.iam.authorization.core.PermissionManagement +import org.hyperledger.identus.iam.wallet.http.model.CreateWalletRequest +import org.hyperledger.identus.iam.wallet.http.model.CreateWalletUmaPermissionRequest +import org.hyperledger.identus.iam.wallet.http.model.WalletDetail +import org.hyperledger.identus.iam.wallet.http.model.WalletDetailPage +import org.hyperledger.identus.shared.models.HexString +import org.hyperledger.identus.shared.models.WalletAdministrationContext +import org.hyperledger.identus.shared.models.WalletAdministrationContext.Admin +import org.hyperledger.identus.shared.models.WalletId import zio.* import java.util.UUID diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/wallet/http/model/CreateWalletRequest.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/wallet/http/model/CreateWalletRequest.scala similarity index 94% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/wallet/http/model/CreateWalletRequest.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/wallet/http/model/CreateWalletRequest.scala index f7d5a42240..848eb496e9 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/wallet/http/model/CreateWalletRequest.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/wallet/http/model/CreateWalletRequest.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.iam.wallet.http.model +package org.hyperledger.identus.iam.wallet.http.model -import io.iohk.atala.api.http.Annotation +import org.hyperledger.identus.api.http.Annotation import sttp.tapir.* import sttp.tapir.Schema.annotations.{description, encodedExample, validate} import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonDecoder, JsonEncoder} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/wallet/http/model/CreateWalletUmaPermissionRequest.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/wallet/http/model/CreateWalletUmaPermissionRequest.scala similarity index 90% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/wallet/http/model/CreateWalletUmaPermissionRequest.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/wallet/http/model/CreateWalletUmaPermissionRequest.scala index 488e75b0e4..b46073e80a 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/wallet/http/model/CreateWalletUmaPermissionRequest.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/wallet/http/model/CreateWalletUmaPermissionRequest.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.iam.wallet.http.model +package org.hyperledger.identus.iam.wallet.http.model -import io.iohk.atala.api.http.Annotation +import org.hyperledger.identus.api.http.Annotation import sttp.tapir.* import sttp.tapir.Schema.annotations.{description, encodedExample, validate} import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonDecoder, JsonEncoder} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/wallet/http/model/WalletDetail.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/wallet/http/model/WalletDetail.scala similarity index 93% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/iam/wallet/http/model/WalletDetail.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/wallet/http/model/WalletDetail.scala index 75fbfbac8d..5fb82b45cc 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/iam/wallet/http/model/WalletDetail.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/iam/wallet/http/model/WalletDetail.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.iam.wallet.http.model +package org.hyperledger.identus.iam.wallet.http.model -import io.iohk.atala.agent.walletapi.model.Wallet -import io.iohk.atala.api.http.Annotation +import org.hyperledger.identus.agent.walletapi.model.Wallet +import org.hyperledger.identus.api.http.Annotation import sttp.tapir.* import sttp.tapir.Schema.annotations.{description, encodedExample} import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonDecoder, JsonEncoder} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/issue/controller/IssueController.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/issue/controller/IssueController.scala similarity index 91% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/issue/controller/IssueController.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/issue/controller/IssueController.scala index 6fec924fc2..e6b73579b7 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/issue/controller/IssueController.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/issue/controller/IssueController.scala @@ -1,15 +1,15 @@ -package io.iohk.atala.issue.controller +package org.hyperledger.identus.issue.controller -import io.iohk.atala.api.http.model.PaginationInput -import io.iohk.atala.api.http.{ErrorResponse, RequestContext} -import io.iohk.atala.issue.controller.http.{ +import org.hyperledger.identus.api.http.model.PaginationInput +import org.hyperledger.identus.api.http.{ErrorResponse, RequestContext} +import org.hyperledger.identus.issue.controller.http.{ AcceptCredentialOfferRequest, CreateIssueCredentialRecordRequest, IssueCredentialRecord, IssueCredentialRecordPage } -import io.iohk.atala.pollux.core.model.error.CredentialServiceError -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.pollux.core.model.error.CredentialServiceError +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* trait IssueController { diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/issue/controller/IssueControllerImpl.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/issue/controller/IssueControllerImpl.scala similarity index 85% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/issue/controller/IssueControllerImpl.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/issue/controller/IssueControllerImpl.scala index fe86612a7a..ac28323511 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/issue/controller/IssueControllerImpl.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/issue/controller/IssueControllerImpl.scala @@ -1,32 +1,32 @@ -package io.iohk.atala.issue.controller - -import io.iohk.atala.agent.server.ControllerHelper -import io.iohk.atala.agent.server.config.AppConfig -import io.iohk.atala.agent.walletapi.model.PublicationState -import io.iohk.atala.agent.walletapi.model.PublicationState.{Created, PublicationPending, Published} -import io.iohk.atala.agent.walletapi.model.error.GetManagedDIDError -import io.iohk.atala.agent.walletapi.service.ManagedDIDService -import io.iohk.atala.api.http.model.{CollectionStats, PaginationInput} -import io.iohk.atala.api.http.{ErrorResponse, RequestContext} -import io.iohk.atala.api.util.PaginationUtils -import io.iohk.atala.castor.core.model.did.{DIDData, DIDMetadata, PrismDID, VerificationRelationship} -import io.iohk.atala.castor.core.model.error.DIDResolutionError -import io.iohk.atala.castor.core.service.DIDService -import io.iohk.atala.connect.core.model.error.ConnectionServiceError -import io.iohk.atala.connect.core.service.ConnectionService -import io.iohk.atala.issue.controller.IssueController.toHttpError -import io.iohk.atala.issue.controller.http.{ +package org.hyperledger.identus.issue.controller + +import org.hyperledger.identus.agent.server.ControllerHelper +import org.hyperledger.identus.agent.server.config.AppConfig +import org.hyperledger.identus.agent.walletapi.model.PublicationState +import org.hyperledger.identus.agent.walletapi.model.PublicationState.{Created, PublicationPending, Published} +import org.hyperledger.identus.agent.walletapi.model.error.GetManagedDIDError +import org.hyperledger.identus.agent.walletapi.service.ManagedDIDService +import org.hyperledger.identus.api.http.model.{CollectionStats, PaginationInput} +import org.hyperledger.identus.api.http.{ErrorResponse, RequestContext} +import org.hyperledger.identus.api.util.PaginationUtils +import org.hyperledger.identus.castor.core.model.did.{PrismDID, VerificationRelationship} +import org.hyperledger.identus.castor.core.model.error.DIDResolutionError +import org.hyperledger.identus.castor.core.service.DIDService +import org.hyperledger.identus.connect.core.model.error.ConnectionServiceError +import org.hyperledger.identus.connect.core.service.ConnectionService +import org.hyperledger.identus.issue.controller.IssueController.toHttpError +import org.hyperledger.identus.issue.controller.http.{ AcceptCredentialOfferRequest, CreateIssueCredentialRecordRequest, IssueCredentialRecord, IssueCredentialRecordPage } -import io.iohk.atala.pollux.core.model.CredentialFormat.{AnonCreds, JWT} -import io.iohk.atala.pollux.core.model.error.CredentialServiceError -import io.iohk.atala.pollux.core.model.{CredentialFormat, DidCommID} -import io.iohk.atala.pollux.core.service.CredentialService -import io.iohk.atala.pollux.core.model.IssueCredentialRecord.Role -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.pollux.core.model.CredentialFormat.{AnonCreds, JWT} +import org.hyperledger.identus.pollux.core.model.error.CredentialServiceError +import org.hyperledger.identus.pollux.core.model.{CredentialFormat, DidCommID} +import org.hyperledger.identus.pollux.core.service.CredentialService +import org.hyperledger.identus.pollux.core.model.IssueCredentialRecord.Role +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.{URLayer, ZIO, ZLayer} class IssueControllerImpl( diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/issue/controller/IssueEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/issue/controller/IssueEndpoints.scala similarity index 93% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/issue/controller/IssueEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/issue/controller/IssueEndpoints.scala index ff8f6cd680..3c98092582 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/issue/controller/IssueEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/issue/controller/IssueEndpoints.scala @@ -1,14 +1,14 @@ -package io.iohk.atala.issue.controller +package org.hyperledger.identus.issue.controller -import io.iohk.atala.api.http.EndpointOutputs.* -import io.iohk.atala.api.http.ErrorResponse -import io.iohk.atala.api.http.RequestContext -import io.iohk.atala.api.http.model.PaginationInput -import io.iohk.atala.iam.authentication.apikey.ApiKeyCredentials -import io.iohk.atala.iam.authentication.apikey.ApiKeyEndpointSecurityLogic.apiKeyHeader -import io.iohk.atala.iam.authentication.oidc.JwtCredentials -import io.iohk.atala.iam.authentication.oidc.JwtSecurityLogic.jwtAuthHeader -import io.iohk.atala.issue.controller.http.* +import org.hyperledger.identus.api.http.EndpointOutputs.* +import org.hyperledger.identus.api.http.ErrorResponse +import org.hyperledger.identus.api.http.RequestContext +import org.hyperledger.identus.api.http.model.PaginationInput +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyCredentials +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyEndpointSecurityLogic.apiKeyHeader +import org.hyperledger.identus.iam.authentication.oidc.JwtCredentials +import org.hyperledger.identus.iam.authentication.oidc.JwtSecurityLogic.jwtAuthHeader +import org.hyperledger.identus.issue.controller.http.* import sttp.apispec.Tag import sttp.model.StatusCode import sttp.tapir.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/issue/controller/IssueServerEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/issue/controller/IssueServerEndpoints.scala similarity index 80% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/issue/controller/IssueServerEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/issue/controller/IssueServerEndpoints.scala index ed0f1bf4e3..3819417d30 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/issue/controller/IssueServerEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/issue/controller/IssueServerEndpoints.scala @@ -1,16 +1,16 @@ -package io.iohk.atala.issue.controller +package org.hyperledger.identus.issue.controller -import io.iohk.atala.LogUtils.* -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.api.http.RequestContext -import io.iohk.atala.api.http.model.PaginationInput -import io.iohk.atala.iam.authentication.Authenticator -import io.iohk.atala.iam.authentication.Authorizer -import io.iohk.atala.iam.authentication.DefaultAuthenticator -import io.iohk.atala.iam.authentication.SecurityLogic -import io.iohk.atala.issue.controller.IssueEndpoints.* -import io.iohk.atala.issue.controller.http.{AcceptCredentialOfferRequest, CreateIssueCredentialRecordRequest} -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.LogUtils.* +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.api.http.RequestContext +import org.hyperledger.identus.api.http.model.PaginationInput +import org.hyperledger.identus.iam.authentication.Authenticator +import org.hyperledger.identus.iam.authentication.Authorizer +import org.hyperledger.identus.iam.authentication.DefaultAuthenticator +import org.hyperledger.identus.iam.authentication.SecurityLogic +import org.hyperledger.identus.issue.controller.IssueEndpoints.* +import org.hyperledger.identus.issue.controller.http.{AcceptCredentialOfferRequest, CreateIssueCredentialRecordRequest} +import org.hyperledger.identus.shared.models.WalletAccessContext import sttp.tapir.ztapir.* import zio.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/issue/controller/http/AcceptCredentialOfferRequest.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/issue/controller/http/AcceptCredentialOfferRequest.scala similarity index 87% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/issue/controller/http/AcceptCredentialOfferRequest.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/issue/controller/http/AcceptCredentialOfferRequest.scala index d482e92251..3593e8c20e 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/issue/controller/http/AcceptCredentialOfferRequest.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/issue/controller/http/AcceptCredentialOfferRequest.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.issue.controller.http +package org.hyperledger.identus.issue.controller.http -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.issue.controller.http.AcceptCredentialOfferRequest.annotations +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.issue.controller.http.AcceptCredentialOfferRequest.annotations import sttp.tapir.Schema.annotations.{description, encodedExample, validate} import sttp.tapir.{Schema, Validator} import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonDecoder, JsonEncoder} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/issue/controller/http/CreateIssueCredentialRecordRequest.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/issue/controller/http/CreateIssueCredentialRecordRequest.scala similarity index 96% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/issue/controller/http/CreateIssueCredentialRecordRequest.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/issue/controller/http/CreateIssueCredentialRecordRequest.scala index 793d0758f7..89b043b7a2 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/issue/controller/http/CreateIssueCredentialRecordRequest.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/issue/controller/http/CreateIssueCredentialRecordRequest.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.issue.controller.http +package org.hyperledger.identus.issue.controller.http -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.issue.controller.http.CreateIssueCredentialRecordRequest.annotations +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.issue.controller.http.CreateIssueCredentialRecordRequest.annotations import sttp.tapir.Schema.annotations.{description, encodedExample} import sttp.tapir.json.zio.schemaForZioJsonValue import sttp.tapir.{Schema, Validator} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/issue/controller/http/IssueCredentialRecord.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/issue/controller/http/IssueCredentialRecord.scala similarity index 97% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/issue/controller/http/IssueCredentialRecord.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/issue/controller/http/IssueCredentialRecord.scala index 84af0fc85b..2ff17cb402 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/issue/controller/http/IssueCredentialRecord.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/issue/controller/http/IssueCredentialRecord.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.issue.controller.http +package org.hyperledger.identus.issue.controller.http -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.issue.controller.http.IssueCredentialRecord.annotations -import io.iohk.atala.mercury.model.{AttachmentDescriptor, Base64} -import io.iohk.atala.pollux.core.model.IssueCredentialRecord as PolluxIssueCredentialRecord +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.issue.controller.http.IssueCredentialRecord.annotations +import org.hyperledger.identus.mercury.model.{AttachmentDescriptor, Base64} +import org.hyperledger.identus.pollux.core.model.IssueCredentialRecord as PolluxIssueCredentialRecord import sttp.tapir.Schema.annotations.{description, encodedExample, validate} import sttp.tapir.json.zio.schemaForZioJsonValue import sttp.tapir.{Schema, Validator} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/issue/controller/http/IssueCredentialRecordPage.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/issue/controller/http/IssueCredentialRecordPage.scala similarity index 95% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/issue/controller/http/IssueCredentialRecordPage.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/issue/controller/http/IssueCredentialRecordPage.scala index 4a390ac536..dfc3a94ab0 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/issue/controller/http/IssueCredentialRecordPage.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/issue/controller/http/IssueCredentialRecordPage.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.issue.controller.http +package org.hyperledger.identus.issue.controller.http import sttp.tapir.Schema -import io.iohk.atala.issue.controller.http.IssueCredentialRecordPage.annotations +import org.hyperledger.identus.issue.controller.http.IssueCredentialRecordPage.annotations import sttp.tapir.Schema.annotations.{description, encodedExample} import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonDecoder, JsonEncoder} -import io.iohk.atala.api.http.Annotation +import org.hyperledger.identus.api.http.Annotation /** @param self * The reference to the connection collection itself. for example: ''https://atala-prism-products.io/dids'' diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/CredentialDefinitionRegistryEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/CredentialDefinitionRegistryEndpoints.scala similarity index 89% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/CredentialDefinitionRegistryEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/CredentialDefinitionRegistryEndpoints.scala index 937c90301f..6510aae06f 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/CredentialDefinitionRegistryEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/CredentialDefinitionRegistryEndpoints.scala @@ -1,14 +1,14 @@ -package io.iohk.atala.pollux.credentialdefinition +package org.hyperledger.identus.pollux.credentialdefinition -import io.iohk.atala.api.http.* -import io.iohk.atala.api.http.EndpointOutputs.* -import io.iohk.atala.api.http.codec.OrderCodec.* -import io.iohk.atala.api.http.model.{Order, PaginationInput} -import io.iohk.atala.iam.authentication.apikey.ApiKeyCredentials -import io.iohk.atala.iam.authentication.apikey.ApiKeyEndpointSecurityLogic.apiKeyHeader -import io.iohk.atala.iam.authentication.oidc.JwtCredentials -import io.iohk.atala.iam.authentication.oidc.JwtSecurityLogic.jwtAuthHeader -import io.iohk.atala.pollux.credentialdefinition.http.{ +import org.hyperledger.identus.api.http.* +import org.hyperledger.identus.api.http.EndpointOutputs.* +import org.hyperledger.identus.api.http.codec.OrderCodec.* +import org.hyperledger.identus.api.http.model.{Order, PaginationInput} +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyCredentials +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyEndpointSecurityLogic.apiKeyHeader +import org.hyperledger.identus.iam.authentication.oidc.JwtCredentials +import org.hyperledger.identus.iam.authentication.oidc.JwtSecurityLogic.jwtAuthHeader +import org.hyperledger.identus.pollux.credentialdefinition.http.{ CredentialDefinitionInput, CredentialDefinitionResponse, CredentialDefinitionResponsePage, diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/CredentialDefinitionRegistryServerEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/CredentialDefinitionRegistryServerEndpoints.scala similarity index 77% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/CredentialDefinitionRegistryServerEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/CredentialDefinitionRegistryServerEndpoints.scala index e68d7ccacb..cd2ef7be33 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/CredentialDefinitionRegistryServerEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/CredentialDefinitionRegistryServerEndpoints.scala @@ -1,17 +1,17 @@ -package io.iohk.atala.pollux.credentialdefinition +package org.hyperledger.identus.pollux.credentialdefinition -import io.iohk.atala.LogUtils.* -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.api.http.model.{Order, PaginationInput} -import io.iohk.atala.api.http.{ErrorResponse, RequestContext} -import io.iohk.atala.iam.authentication.Authenticator -import io.iohk.atala.iam.authentication.Authorizer -import io.iohk.atala.iam.authentication.DefaultAuthenticator -import io.iohk.atala.iam.authentication.SecurityLogic -import io.iohk.atala.pollux.credentialdefinition -import io.iohk.atala.pollux.credentialdefinition.CredentialDefinitionRegistryEndpoints.* -import io.iohk.atala.pollux.credentialdefinition.controller.CredentialDefinitionController -import io.iohk.atala.pollux.credentialdefinition.http.{CredentialDefinitionInput, FilterInput} +import org.hyperledger.identus.LogUtils.* +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.api.http.model.{Order, PaginationInput} +import org.hyperledger.identus.api.http.{ErrorResponse, RequestContext} +import org.hyperledger.identus.iam.authentication.Authenticator +import org.hyperledger.identus.iam.authentication.Authorizer +import org.hyperledger.identus.iam.authentication.DefaultAuthenticator +import org.hyperledger.identus.iam.authentication.SecurityLogic +import org.hyperledger.identus.pollux.credentialdefinition +import org.hyperledger.identus.pollux.credentialdefinition.CredentialDefinitionRegistryEndpoints.* +import org.hyperledger.identus.pollux.credentialdefinition.controller.CredentialDefinitionController +import org.hyperledger.identus.pollux.credentialdefinition.http.{CredentialDefinitionInput, FilterInput} import sttp.tapir.ztapir.* import zio.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/controller/CredentialDefinitionController.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/controller/CredentialDefinitionController.scala similarity index 82% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/controller/CredentialDefinitionController.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/controller/CredentialDefinitionController.scala index 0300f22415..39f3655866 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/controller/CredentialDefinitionController.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/controller/CredentialDefinitionController.scala @@ -1,16 +1,16 @@ -package io.iohk.atala.pollux.credentialdefinition.controller +package org.hyperledger.identus.pollux.credentialdefinition.controller -import io.iohk.atala.api.http.* -import io.iohk.atala.api.http.model.{Order, Pagination} -import io.iohk.atala.pollux.core.service.CredentialDefinitionService -import io.iohk.atala.pollux.core.service.CredentialDefinitionService.Error.* -import io.iohk.atala.pollux.credentialdefinition.http.{ +import org.hyperledger.identus.api.http.* +import org.hyperledger.identus.api.http.model.{Order, Pagination} +import org.hyperledger.identus.pollux.core.service.CredentialDefinitionService +import org.hyperledger.identus.pollux.core.service.CredentialDefinitionService.Error.* +import org.hyperledger.identus.pollux.credentialdefinition.http.{ CredentialDefinitionInput, CredentialDefinitionResponse, CredentialDefinitionResponsePage, FilterInput } -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import java.util.UUID diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/controller/CredentialDefinitionControllerImpl.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/controller/CredentialDefinitionControllerImpl.scala similarity index 76% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/controller/CredentialDefinitionControllerImpl.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/controller/CredentialDefinitionControllerImpl.scala index c849db4f38..9eceb54fef 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/controller/CredentialDefinitionControllerImpl.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/controller/CredentialDefinitionControllerImpl.scala @@ -1,24 +1,24 @@ -package io.iohk.atala.pollux.credentialdefinition.controller +package org.hyperledger.identus.pollux.credentialdefinition.controller -import io.iohk.atala.agent.walletapi.model.{ManagedDIDState, PublicationState} -import io.iohk.atala.agent.walletapi.service.ManagedDIDService -import io.iohk.atala.api.http.* -import io.iohk.atala.api.http.model.{CollectionStats, Order, Pagination} -import io.iohk.atala.castor.core.model.did.{LongFormPrismDID, PrismDID} -import io.iohk.atala.pollux.core.model.schema.CredentialDefinition.FilteredEntries -import io.iohk.atala.pollux.core.service.CredentialDefinitionService -import io.iohk.atala.pollux.core.service.CredentialDefinitionService.Error.* -import io.iohk.atala.pollux.credentialdefinition -import io.iohk.atala.pollux.credentialdefinition.controller.CredentialDefinitionController.domainToHttpErrorIO -import io.iohk.atala.pollux.credentialdefinition.http.CredentialDefinitionInput.toDomain -import io.iohk.atala.pollux.credentialdefinition.http.CredentialDefinitionResponse.fromDomain -import io.iohk.atala.pollux.credentialdefinition.http.{ +import org.hyperledger.identus.agent.walletapi.model.{ManagedDIDState, PublicationState} +import org.hyperledger.identus.agent.walletapi.service.ManagedDIDService +import org.hyperledger.identus.api.http.* +import org.hyperledger.identus.api.http.model.{CollectionStats, Order, Pagination} +import org.hyperledger.identus.castor.core.model.did.{LongFormPrismDID, PrismDID} +import org.hyperledger.identus.pollux.core.model.schema.CredentialDefinition.FilteredEntries +import org.hyperledger.identus.pollux.core.service.CredentialDefinitionService +import org.hyperledger.identus.pollux.core.service.CredentialDefinitionService.Error.* +import org.hyperledger.identus.pollux.credentialdefinition +import org.hyperledger.identus.pollux.credentialdefinition.controller.CredentialDefinitionController.domainToHttpErrorIO +import org.hyperledger.identus.pollux.credentialdefinition.http.CredentialDefinitionInput.toDomain +import org.hyperledger.identus.pollux.credentialdefinition.http.CredentialDefinitionResponse.fromDomain +import org.hyperledger.identus.pollux.credentialdefinition.http.{ CredentialDefinitionInput, CredentialDefinitionResponse, CredentialDefinitionResponsePage, FilterInput } -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import zio.json.ast.Json diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/controller/CredentialDefinitionControllerLogic.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/controller/CredentialDefinitionControllerLogic.scala similarity index 72% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/controller/CredentialDefinitionControllerLogic.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/controller/CredentialDefinitionControllerLogic.scala index 3ca826f26a..6a46a7338b 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/controller/CredentialDefinitionControllerLogic.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/controller/CredentialDefinitionControllerLogic.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.pollux.credentialdefinition.controller +package org.hyperledger.identus.pollux.credentialdefinition.controller -import io.iohk.atala.api.http.RequestContext -import io.iohk.atala.api.http.model.CollectionStats -import io.iohk.atala.api.http.model.Pagination -import io.iohk.atala.api.util.PaginationUtils -import io.iohk.atala.pollux.credentialdefinition.http.CredentialDefinitionResponsePage +import org.hyperledger.identus.api.http.RequestContext +import org.hyperledger.identus.api.http.model.CollectionStats +import org.hyperledger.identus.api.http.model.Pagination +import org.hyperledger.identus.api.util.PaginationUtils +import org.hyperledger.identus.pollux.credentialdefinition.http.CredentialDefinitionResponsePage import sttp.model.Uri case class CredentialDefinitionControllerLogic( diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/http/CredentialDefinitionInput.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/http/CredentialDefinitionInput.scala similarity index 87% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/http/CredentialDefinitionInput.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/http/CredentialDefinitionInput.scala index a3077891cb..462fa11c45 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/http/CredentialDefinitionInput.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/http/CredentialDefinitionInput.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.pollux.credentialdefinition.http +package org.hyperledger.identus.pollux.credentialdefinition.http -import io.iohk.atala.api.http.* -import io.iohk.atala.pollux.core.model.schema.CredentialDefinition.Input -import io.iohk.atala.pollux.credentialdefinition.http.CredentialDefinitionResponse.annotations +import org.hyperledger.identus.api.http.* +import org.hyperledger.identus.pollux.core.model.schema.CredentialDefinition.Input +import org.hyperledger.identus.pollux.credentialdefinition.http.CredentialDefinitionResponse.annotations import sttp.tapir.Schema import sttp.tapir.Schema.annotations.description import sttp.tapir.Schema.annotations.encodedExample diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/http/CredentialDefinitionResponse.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/http/CredentialDefinitionResponse.scala similarity index 96% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/http/CredentialDefinitionResponse.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/http/CredentialDefinitionResponse.scala index f9365df062..bb2c470672 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/http/CredentialDefinitionResponse.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/http/CredentialDefinitionResponse.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.pollux.credentialdefinition.http +package org.hyperledger.identus.pollux.credentialdefinition.http -import io.iohk.atala.api.http.* -import io.iohk.atala.pollux.core.model -import io.iohk.atala.pollux.core.model.schema.CredentialDefinition -import io.iohk.atala.pollux.credentialdefinition.http.CredentialDefinitionResponse.annotations +import org.hyperledger.identus.api.http.* +import org.hyperledger.identus.pollux.core.model +import org.hyperledger.identus.pollux.core.model.schema.CredentialDefinition +import org.hyperledger.identus.pollux.credentialdefinition.http.CredentialDefinitionResponse.annotations import sttp.model.Uri import sttp.model.Uri.* import sttp.tapir.Schema diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/http/CredentialDefinitionResponsePage.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/http/CredentialDefinitionResponsePage.scala similarity index 94% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/http/CredentialDefinitionResponsePage.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/http/CredentialDefinitionResponsePage.scala index cfa8017dc6..e1502c1213 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/http/CredentialDefinitionResponsePage.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/http/CredentialDefinitionResponsePage.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.pollux.credentialdefinition.http +package org.hyperledger.identus.pollux.credentialdefinition.http -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.pollux.credentialschema.http.CredentialSchemaResponsePage.annotations +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.pollux.credentialschema.http.CredentialSchemaResponsePage.annotations import sttp.tapir.Schema import sttp.tapir.Schema.annotations.description import sttp.tapir.Schema.annotations.encodedExample diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/http/FilterInput.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/http/FilterInput.scala similarity index 85% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/http/FilterInput.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/http/FilterInput.scala index b7a1cf5826..047817c6e4 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/http/FilterInput.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/http/FilterInput.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.pollux.credentialdefinition.http +package org.hyperledger.identus.pollux.credentialdefinition.http -import io.iohk.atala.api.http.* -import io.iohk.atala.pollux.core.model -import io.iohk.atala.pollux.core.model.schema.CredentialDefinition -import io.iohk.atala.pollux.credentialdefinition.http.FilterInput.annotations +import org.hyperledger.identus.api.http.* +import org.hyperledger.identus.pollux.core.model +import org.hyperledger.identus.pollux.core.model.schema.CredentialDefinition +import org.hyperledger.identus.pollux.credentialdefinition.http.FilterInput.annotations import sttp.tapir.EndpointIO.annotations.example import sttp.tapir.EndpointIO.annotations.query import sttp.tapir.Validator.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/http/Proof.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/http/Proof.scala similarity index 95% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/http/Proof.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/http/Proof.scala index 5ee4087eec..638842345f 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialdefinition/http/Proof.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialdefinition/http/Proof.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.pollux.credentialdefinition.http +package org.hyperledger.identus.pollux.credentialdefinition.http -import io.iohk.atala.api.http.* -import io.iohk.atala.pollux.credentialdefinition.http.Proof.annotations +import org.hyperledger.identus.api.http.* +import org.hyperledger.identus.pollux.credentialdefinition.http.Proof.annotations import sttp.tapir.Schema import sttp.tapir.Schema.annotations.description import sttp.tapir.Schema.annotations.encodedExample diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/SchemaRegistryEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/SchemaRegistryEndpoints.scala similarity index 92% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/SchemaRegistryEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/SchemaRegistryEndpoints.scala index b3fd988a93..3f2e42f3ea 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/SchemaRegistryEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/SchemaRegistryEndpoints.scala @@ -1,14 +1,14 @@ -package io.iohk.atala.pollux.credentialschema +package org.hyperledger.identus.pollux.credentialschema -import io.iohk.atala.api.http.* -import io.iohk.atala.api.http.EndpointOutputs.* -import io.iohk.atala.api.http.codec.OrderCodec.* -import io.iohk.atala.api.http.model.{Order, PaginationInput} -import io.iohk.atala.iam.authentication.apikey.ApiKeyCredentials -import io.iohk.atala.iam.authentication.apikey.ApiKeyEndpointSecurityLogic.apiKeyHeader -import io.iohk.atala.iam.authentication.oidc.JwtCredentials -import io.iohk.atala.iam.authentication.oidc.JwtSecurityLogic.jwtAuthHeader -import io.iohk.atala.pollux.credentialschema.http.{ +import org.hyperledger.identus.api.http.* +import org.hyperledger.identus.api.http.EndpointOutputs.* +import org.hyperledger.identus.api.http.codec.OrderCodec.* +import org.hyperledger.identus.api.http.model.{Order, PaginationInput} +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyCredentials +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyEndpointSecurityLogic.apiKeyHeader +import org.hyperledger.identus.iam.authentication.oidc.JwtCredentials +import org.hyperledger.identus.iam.authentication.oidc.JwtSecurityLogic.jwtAuthHeader +import org.hyperledger.identus.pollux.credentialschema.http.{ CredentialSchemaInput, CredentialSchemaResponse, CredentialSchemaResponsePage, diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/SchemaRegistryServerEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/SchemaRegistryServerEndpoints.scala similarity index 81% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/SchemaRegistryServerEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/SchemaRegistryServerEndpoints.scala index daa1493d43..29e5518773 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/SchemaRegistryServerEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/SchemaRegistryServerEndpoints.scala @@ -1,14 +1,14 @@ -package io.iohk.atala.pollux.credentialschema +package org.hyperledger.identus.pollux.credentialschema -import io.iohk.atala.LogUtils.* -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.api.http.RequestContext -import io.iohk.atala.api.http.model.{Order, PaginationInput} -import io.iohk.atala.iam.authentication.{Authenticator, Authorizer, DefaultAuthenticator, SecurityLogic} -import io.iohk.atala.pollux.credentialschema.SchemaRegistryEndpoints.* -import io.iohk.atala.pollux.credentialschema.controller.CredentialSchemaController -import io.iohk.atala.pollux.credentialschema.http.{CredentialSchemaInput, FilterInput} -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.LogUtils.* +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.api.http.RequestContext +import org.hyperledger.identus.api.http.model.{Order, PaginationInput} +import org.hyperledger.identus.iam.authentication.{Authenticator, Authorizer, DefaultAuthenticator, SecurityLogic} +import org.hyperledger.identus.pollux.credentialschema.SchemaRegistryEndpoints.* +import org.hyperledger.identus.pollux.credentialschema.controller.CredentialSchemaController +import org.hyperledger.identus.pollux.credentialschema.http.{CredentialSchemaInput, FilterInput} +import org.hyperledger.identus.shared.models.WalletAccessContext import sttp.tapir.ztapir.* import zio.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/VerificationPolicyEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/VerificationPolicyEndpoints.scala similarity index 89% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/VerificationPolicyEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/VerificationPolicyEndpoints.scala index 82030b0cda..b84dd1b4d9 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/VerificationPolicyEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/VerificationPolicyEndpoints.scala @@ -1,14 +1,14 @@ -package io.iohk.atala.pollux.credentialschema +package org.hyperledger.identus.pollux.credentialschema -import io.iohk.atala.api.http.* -import io.iohk.atala.api.http.EndpointOutputs.* -import io.iohk.atala.api.http.codec.OrderCodec.* -import io.iohk.atala.api.http.model.{Order, PaginationInput} -import io.iohk.atala.iam.authentication.apikey.ApiKeyCredentials -import io.iohk.atala.iam.authentication.apikey.ApiKeyEndpointSecurityLogic.apiKeyHeader -import io.iohk.atala.iam.authentication.oidc.JwtCredentials -import io.iohk.atala.iam.authentication.oidc.JwtSecurityLogic.jwtAuthHeader -import io.iohk.atala.pollux.credentialschema.http.* +import org.hyperledger.identus.api.http.* +import org.hyperledger.identus.api.http.EndpointOutputs.* +import org.hyperledger.identus.api.http.codec.OrderCodec.* +import org.hyperledger.identus.api.http.model.{Order, PaginationInput} +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyCredentials +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyEndpointSecurityLogic.apiKeyHeader +import org.hyperledger.identus.iam.authentication.oidc.JwtCredentials +import org.hyperledger.identus.iam.authentication.oidc.JwtSecurityLogic.jwtAuthHeader +import org.hyperledger.identus.pollux.credentialschema.http.* import sttp.apispec.Tag import sttp.model.StatusCode import sttp.tapir.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/VerificationPolicyServerEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/VerificationPolicyServerEndpoints.scala similarity index 81% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/VerificationPolicyServerEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/VerificationPolicyServerEndpoints.scala index 3f81b6a596..78c79da40d 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/VerificationPolicyServerEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/VerificationPolicyServerEndpoints.scala @@ -1,17 +1,17 @@ -package io.iohk.atala.pollux.credentialschema +package org.hyperledger.identus.pollux.credentialschema -import io.iohk.atala.LogUtils.* -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.api.http.model.{Order, PaginationInput} -import io.iohk.atala.api.http.{ErrorResponse, RequestContext} -import io.iohk.atala.iam.authentication.Authenticator -import io.iohk.atala.iam.authentication.Authorizer -import io.iohk.atala.iam.authentication.DefaultAuthenticator -import io.iohk.atala.iam.authentication.SecurityLogic -import io.iohk.atala.pollux.credentialschema.VerificationPolicyEndpoints.* -import io.iohk.atala.pollux.credentialschema.controller.VerificationPolicyController -import io.iohk.atala.pollux.credentialschema.http.{VerificationPolicyResponse, VerificationPolicyInput} -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.LogUtils.* +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.api.http.model.{Order, PaginationInput} +import org.hyperledger.identus.api.http.{ErrorResponse, RequestContext} +import org.hyperledger.identus.iam.authentication.Authenticator +import org.hyperledger.identus.iam.authentication.Authorizer +import org.hyperledger.identus.iam.authentication.DefaultAuthenticator +import org.hyperledger.identus.iam.authentication.SecurityLogic +import org.hyperledger.identus.pollux.credentialschema.VerificationPolicyEndpoints.* +import org.hyperledger.identus.pollux.credentialschema.controller.VerificationPolicyController +import org.hyperledger.identus.pollux.credentialschema.http.{VerificationPolicyResponse, VerificationPolicyInput} +import org.hyperledger.identus.shared.models.WalletAccessContext import java.util.UUID import sttp.tapir.ztapir.* import zio.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/controller/CredentialSchemaController.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/controller/CredentialSchemaController.scala similarity index 82% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/controller/CredentialSchemaController.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/controller/CredentialSchemaController.scala index 5413779eee..303dbe1b4d 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/controller/CredentialSchemaController.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/controller/CredentialSchemaController.scala @@ -1,16 +1,16 @@ -package io.iohk.atala.pollux.credentialschema.controller +package org.hyperledger.identus.pollux.credentialschema.controller -import io.iohk.atala.api.http.* -import io.iohk.atala.api.http.model.{Order, Pagination} -import io.iohk.atala.pollux.core.service.CredentialSchemaService -import io.iohk.atala.pollux.core.service.CredentialSchemaService.Error.* -import io.iohk.atala.pollux.credentialschema.http.{ +import org.hyperledger.identus.api.http.* +import org.hyperledger.identus.api.http.model.{Order, Pagination} +import org.hyperledger.identus.pollux.core.service.CredentialSchemaService +import org.hyperledger.identus.pollux.core.service.CredentialSchemaService.Error.* +import org.hyperledger.identus.pollux.credentialschema.http.{ CredentialSchemaInput, CredentialSchemaResponse, CredentialSchemaResponsePage, FilterInput } -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import zio.json.ast.Json diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/controller/CredentialSchemaControllerImpl.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/controller/CredentialSchemaControllerImpl.scala similarity index 79% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/controller/CredentialSchemaControllerImpl.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/controller/CredentialSchemaControllerImpl.scala index 6aef51728c..eff4eb100f 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/controller/CredentialSchemaControllerImpl.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/controller/CredentialSchemaControllerImpl.scala @@ -1,23 +1,23 @@ -package io.iohk.atala.pollux.credentialschema.controller +package org.hyperledger.identus.pollux.credentialschema.controller -import io.iohk.atala.agent.walletapi.model.{ManagedDIDState, PublicationState} -import io.iohk.atala.agent.walletapi.service.ManagedDIDService -import io.iohk.atala.api.http.* -import io.iohk.atala.api.http.model.{CollectionStats, Order, Pagination} -import io.iohk.atala.castor.core.model.did.{LongFormPrismDID, PrismDID} -import io.iohk.atala.pollux.core.model.schema.CredentialSchema.FilteredEntries -import io.iohk.atala.pollux.core.service.CredentialSchemaService -import io.iohk.atala.pollux.core.service.CredentialSchemaService.Error.* -import io.iohk.atala.pollux.credentialschema.controller.CredentialSchemaController.domainToHttpErrorIO -import io.iohk.atala.pollux.credentialschema.http.CredentialSchemaInput.toDomain -import io.iohk.atala.pollux.credentialschema.http.CredentialSchemaResponse.fromDomain -import io.iohk.atala.pollux.credentialschema.http.{ +import org.hyperledger.identus.agent.walletapi.model.{ManagedDIDState, PublicationState} +import org.hyperledger.identus.agent.walletapi.service.ManagedDIDService +import org.hyperledger.identus.api.http.* +import org.hyperledger.identus.api.http.model.{CollectionStats, Order, Pagination} +import org.hyperledger.identus.castor.core.model.did.{LongFormPrismDID, PrismDID} +import org.hyperledger.identus.pollux.core.model.schema.CredentialSchema.FilteredEntries +import org.hyperledger.identus.pollux.core.service.CredentialSchemaService +import org.hyperledger.identus.pollux.core.service.CredentialSchemaService.Error.* +import org.hyperledger.identus.pollux.credentialschema.controller.CredentialSchemaController.domainToHttpErrorIO +import org.hyperledger.identus.pollux.credentialschema.http.CredentialSchemaInput.toDomain +import org.hyperledger.identus.pollux.credentialschema.http.CredentialSchemaResponse.fromDomain +import org.hyperledger.identus.pollux.credentialschema.http.{ CredentialSchemaInput, CredentialSchemaResponse, CredentialSchemaResponsePage, FilterInput } -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import zio.json.ast.Json diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/controller/CredentialSchemaControllerLogic.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/controller/CredentialSchemaControllerLogic.scala similarity index 75% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/controller/CredentialSchemaControllerLogic.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/controller/CredentialSchemaControllerLogic.scala index f07bccd338..14ed20b287 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/controller/CredentialSchemaControllerLogic.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/controller/CredentialSchemaControllerLogic.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.pollux.credentialschema.controller +package org.hyperledger.identus.pollux.credentialschema.controller -import io.iohk.atala.api.http.RequestContext -import io.iohk.atala.api.http.model.{CollectionStats, Pagination} -import io.iohk.atala.pollux.credentialschema.http.CredentialSchemaResponsePage +import org.hyperledger.identus.api.http.RequestContext +import org.hyperledger.identus.api.http.model.{CollectionStats, Pagination} +import org.hyperledger.identus.pollux.credentialschema.http.CredentialSchemaResponsePage import sttp.model.Uri -import io.iohk.atala.api.util.PaginationUtils +import org.hyperledger.identus.api.util.PaginationUtils case class CredentialSchemaControllerLogic( ctx: RequestContext, diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/controller/VerificationPolicyController.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/controller/VerificationPolicyController.scala similarity index 76% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/controller/VerificationPolicyController.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/controller/VerificationPolicyController.scala index 1c5eb92b3c..43e2624805 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/controller/VerificationPolicyController.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/controller/VerificationPolicyController.scala @@ -1,13 +1,13 @@ -package io.iohk.atala.pollux.credentialschema.controller +package org.hyperledger.identus.pollux.credentialschema.controller -import io.iohk.atala.api.http.model.{Order, Pagination} -import io.iohk.atala.api.http.{ErrorResponse, RequestContext} -import io.iohk.atala.pollux.credentialschema.http.{ +import org.hyperledger.identus.api.http.model.{Order, Pagination} +import org.hyperledger.identus.api.http.{ErrorResponse, RequestContext} +import org.hyperledger.identus.pollux.credentialschema.http.{ VerificationPolicyResponse, VerificationPolicyInput, VerificationPolicyResponsePage } -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import java.util.UUID diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/controller/VerificationPolicyControllerImpl.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/controller/VerificationPolicyControllerImpl.scala similarity index 84% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/controller/VerificationPolicyControllerImpl.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/controller/VerificationPolicyControllerImpl.scala index 05723af890..ffade947f9 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/controller/VerificationPolicyControllerImpl.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/controller/VerificationPolicyControllerImpl.scala @@ -1,19 +1,19 @@ -package io.iohk.atala.pollux.credentialschema.controller +package org.hyperledger.identus.pollux.credentialschema.controller -import io.iohk.atala.api.http.* -import io.iohk.atala.api.http.model.{CollectionStats, Order, Pagination} -import io.iohk.atala.pollux.core.model -import io.iohk.atala.pollux.core.model.CredentialSchemaAndTrustedIssuersConstraint -import io.iohk.atala.pollux.core.model.error.VerificationPolicyError -import io.iohk.atala.pollux.core.model.error.VerificationPolicyError.* -import io.iohk.atala.pollux.core.service.VerificationPolicyService -import io.iohk.atala.pollux.credentialschema.http.VerificationPolicyResponse.* -import io.iohk.atala.pollux.credentialschema.http.{ +import org.hyperledger.identus.api.http.* +import org.hyperledger.identus.api.http.model.{CollectionStats, Order, Pagination} +import org.hyperledger.identus.pollux.core.model +import org.hyperledger.identus.pollux.core.model.CredentialSchemaAndTrustedIssuersConstraint +import org.hyperledger.identus.pollux.core.model.error.VerificationPolicyError +import org.hyperledger.identus.pollux.core.model.error.VerificationPolicyError.* +import org.hyperledger.identus.pollux.core.service.VerificationPolicyService +import org.hyperledger.identus.pollux.credentialschema.http.VerificationPolicyResponse.* +import org.hyperledger.identus.pollux.credentialschema.http.{ VerificationPolicyResponse, VerificationPolicyInput, VerificationPolicyResponsePage } -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import zio.ZIO.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/controller/VerificationPolicyPageRequestLogic.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/controller/VerificationPolicyPageRequestLogic.scala similarity index 73% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/controller/VerificationPolicyPageRequestLogic.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/controller/VerificationPolicyPageRequestLogic.scala index 7c142990df..2495879ec8 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/controller/VerificationPolicyPageRequestLogic.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/controller/VerificationPolicyPageRequestLogic.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.pollux.credentialschema.controller +package org.hyperledger.identus.pollux.credentialschema.controller -import io.iohk.atala.api.http.RequestContext -import io.iohk.atala.api.http.model.{CollectionStats, Pagination} -import io.iohk.atala.pollux.credentialschema.http.{VerificationPolicyResponse, VerificationPolicyResponsePage} +import org.hyperledger.identus.api.http.RequestContext +import org.hyperledger.identus.api.http.model.{CollectionStats, Pagination} +import org.hyperledger.identus.pollux.credentialschema.http.{VerificationPolicyResponse, VerificationPolicyResponsePage} import sttp.model.Uri -import io.iohk.atala.api.util.PaginationUtils +import org.hyperledger.identus.api.util.PaginationUtils case class VerificationPolicyPageRequestLogic( ctx: RequestContext, diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/http/CredentialSchemaInput.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/http/CredentialSchemaInput.scala similarity index 86% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/http/CredentialSchemaInput.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/http/CredentialSchemaInput.scala index 70f94fc7ad..e54257f9db 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/http/CredentialSchemaInput.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/http/CredentialSchemaInput.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.pollux.credentialschema.http +package org.hyperledger.identus.pollux.credentialschema.http -import io.iohk.atala.api.http.* -import io.iohk.atala.pollux.core.model.schema.CredentialSchema.Input -import io.iohk.atala.pollux.credentialschema.http.CredentialSchemaResponse.annotations +import org.hyperledger.identus.api.http.* +import org.hyperledger.identus.pollux.core.model.schema.CredentialSchema.Input +import org.hyperledger.identus.pollux.credentialschema.http.CredentialSchemaResponse.annotations import sttp.tapir.Schema import sttp.tapir.Schema.annotations.{description, encodedExample, validate, validateEach} import sttp.tapir.Validator.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/http/CredentialSchemaResponse.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/http/CredentialSchemaResponse.scala similarity index 96% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/http/CredentialSchemaResponse.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/http/CredentialSchemaResponse.scala index dfcad7c714..ee53873913 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/http/CredentialSchemaResponse.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/http/CredentialSchemaResponse.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.pollux.credentialschema.http +package org.hyperledger.identus.pollux.credentialschema.http -import io.iohk.atala.api.http.* -import io.iohk.atala.pollux.core.model -import io.iohk.atala.pollux.core.model.schema.CredentialSchema -import io.iohk.atala.pollux.credentialschema.http.CredentialSchemaResponse.annotations +import org.hyperledger.identus.api.http.* +import org.hyperledger.identus.pollux.core.model +import org.hyperledger.identus.pollux.core.model.schema.CredentialSchema +import org.hyperledger.identus.pollux.credentialschema.http.CredentialSchemaResponse.annotations import sttp.model.Uri import sttp.model.Uri.* import sttp.tapir.Schema diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/http/CredentialSchemaResponsePage.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/http/CredentialSchemaResponsePage.scala similarity index 94% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/http/CredentialSchemaResponsePage.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/http/CredentialSchemaResponsePage.scala index 310dac52d5..f54d7e8106 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/http/CredentialSchemaResponsePage.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/http/CredentialSchemaResponsePage.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.pollux.credentialschema.http +package org.hyperledger.identus.pollux.credentialschema.http import sttp.tapir.Schema import sttp.tapir.Schema.annotations.{description, encodedExample} import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonDecoder, JsonEncoder} -import io.iohk.atala.pollux.credentialschema.http.CredentialSchemaResponsePage.annotations -import io.iohk.atala.api.http.Annotation +import org.hyperledger.identus.pollux.credentialschema.http.CredentialSchemaResponsePage.annotations +import org.hyperledger.identus.api.http.Annotation case class CredentialSchemaResponsePage( @description(annotations.contents.description) diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/http/FilterInput.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/http/FilterInput.scala similarity index 85% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/http/FilterInput.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/http/FilterInput.scala index c85b366863..46f539b53c 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/http/FilterInput.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/http/FilterInput.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.pollux.credentialschema.http +package org.hyperledger.identus.pollux.credentialschema.http -import io.iohk.atala.api.http.* -import io.iohk.atala.pollux.core.model -import io.iohk.atala.pollux.core.model.schema.CredentialSchema -import io.iohk.atala.pollux.credentialschema.http.FilterInput.annotations +import org.hyperledger.identus.api.http.* +import org.hyperledger.identus.pollux.core.model +import org.hyperledger.identus.pollux.core.model.schema.CredentialSchema +import org.hyperledger.identus.pollux.credentialschema.http.FilterInput.annotations import sttp.tapir.EndpointIO.annotations.example import sttp.tapir.EndpointIO.annotations.query import sttp.tapir.Validator.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/http/Proof.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/http/Proof.scala similarity index 95% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/http/Proof.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/http/Proof.scala index 435281112c..602fbb70df 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/http/Proof.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/http/Proof.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.pollux.credentialschema.http +package org.hyperledger.identus.pollux.credentialschema.http import sttp.tapir.Schema import sttp.tapir.Schema.annotations.{description, encodedExample} import sttp.tapir.generic.auto.* import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonDecoder, JsonEncoder} -import io.iohk.atala.pollux.credentialschema.http.Proof.annotations -import io.iohk.atala.api.http.* +import org.hyperledger.identus.pollux.credentialschema.http.Proof.annotations +import org.hyperledger.identus.api.http.* import java.time.OffsetDateTime diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/http/VerificationPolicyResponse.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/http/VerificationPolicyResponse.scala similarity index 97% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/http/VerificationPolicyResponse.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/http/VerificationPolicyResponse.scala index 543ed83e59..df234f3098 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/pollux/credentialschema/http/VerificationPolicyResponse.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/pollux/credentialschema/http/VerificationPolicyResponse.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.pollux.credentialschema.http +package org.hyperledger.identus.pollux.credentialschema.http -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.pollux.core.model -import io.iohk.atala.pollux.core.model.CredentialSchemaAndTrustedIssuersConstraint -import io.iohk.atala.pollux.credentialschema.http +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.pollux.core.model +import org.hyperledger.identus.pollux.core.model.CredentialSchemaAndTrustedIssuersConstraint +import org.hyperledger.identus.pollux.credentialschema.http import sttp.model.Uri import sttp.tapir.Schema import sttp.tapir.Schema.annotations.{description, encodedExample, encodedName, validate} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/PresentProofController.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/PresentProofController.scala similarity index 87% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/PresentProofController.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/PresentProofController.scala index 12b4c74c09..f1c6dfcf23 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/PresentProofController.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/PresentProofController.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.presentproof.controller +package org.hyperledger.identus.presentproof.controller -import io.iohk.atala.api.http.model.PaginationInput -import io.iohk.atala.api.http.{ErrorResponse, RequestContext} -import io.iohk.atala.pollux.core.model.error.PresentationError -import io.iohk.atala.presentproof.controller.http.* -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.api.http.model.PaginationInput +import org.hyperledger.identus.api.http.{ErrorResponse, RequestContext} +import org.hyperledger.identus.pollux.core.model.error.PresentationError +import org.hyperledger.identus.presentproof.controller.http.* +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.ZIO import java.util.UUID @@ -86,8 +86,8 @@ object PresentProofController { detail = Some(s"The Credential format '$format' is not Unsupported") ) - def toDidCommID(str: String): ZIO[Any, ErrorResponse, io.iohk.atala.pollux.core.model.DidCommID] = + def toDidCommID(str: String): ZIO[Any, ErrorResponse, org.hyperledger.identus.pollux.core.model.DidCommID] = ZIO - .fromTry(Try(io.iohk.atala.pollux.core.model.DidCommID(str))) + .fromTry(Try(org.hyperledger.identus.pollux.core.model.DidCommID(str))) .mapError(e => ErrorResponse.badRequest(s"Error parsing string as DidCommID: ${e.getMessage}")) } diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/PresentProofControllerImpl.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/PresentProofControllerImpl.scala similarity index 84% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/PresentProofControllerImpl.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/PresentProofControllerImpl.scala index dde895e22a..2992d35ca1 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/PresentProofControllerImpl.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/PresentProofControllerImpl.scala @@ -1,19 +1,19 @@ -package io.iohk.atala.presentproof.controller +package org.hyperledger.identus.presentproof.controller -import io.iohk.atala.agent.server.ControllerHelper -import io.iohk.atala.api.http.model.PaginationInput -import io.iohk.atala.api.http.{ErrorResponse, RequestContext} -import io.iohk.atala.connect.core.model.error.ConnectionServiceError -import io.iohk.atala.connect.core.service.ConnectionService -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.mercury.protocol.presentproof.ProofType -import io.iohk.atala.pollux.core.model.error.PresentationError -import io.iohk.atala.pollux.core.model.presentation.Options -import io.iohk.atala.pollux.core.model.{CredentialFormat, DidCommID, PresentationRecord} -import io.iohk.atala.pollux.core.service.PresentationService -import io.iohk.atala.presentproof.controller.PresentProofController.toDidCommID -import io.iohk.atala.presentproof.controller.http.* -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.agent.server.ControllerHelper +import org.hyperledger.identus.api.http.model.PaginationInput +import org.hyperledger.identus.api.http.{ErrorResponse, RequestContext} +import org.hyperledger.identus.connect.core.model.error.ConnectionServiceError +import org.hyperledger.identus.connect.core.service.ConnectionService +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.mercury.protocol.presentproof.ProofType +import org.hyperledger.identus.pollux.core.model.error.PresentationError +import org.hyperledger.identus.pollux.core.model.presentation.Options +import org.hyperledger.identus.pollux.core.model.{CredentialFormat, DidCommID, PresentationRecord} +import org.hyperledger.identus.pollux.core.service.PresentationService +import org.hyperledger.identus.presentproof.controller.PresentProofController.toDidCommID +import org.hyperledger.identus.presentproof.controller.http.* +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.{URLayer, ZIO, ZLayer} import java.util.UUID diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/PresentProofEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/PresentProofEndpoints.scala similarity index 86% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/PresentProofEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/PresentProofEndpoints.scala index 03a98d29ef..aa61c68ff4 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/PresentProofEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/PresentProofEndpoints.scala @@ -1,13 +1,13 @@ -package io.iohk.atala.presentproof.controller +package org.hyperledger.identus.presentproof.controller -import io.iohk.atala.api.http.EndpointOutputs.* -import io.iohk.atala.api.http.model.PaginationInput -import io.iohk.atala.api.http.{ErrorResponse, RequestContext} -import io.iohk.atala.iam.authentication.apikey.ApiKeyCredentials -import io.iohk.atala.iam.authentication.apikey.ApiKeyEndpointSecurityLogic.apiKeyHeader -import io.iohk.atala.iam.authentication.oidc.JwtCredentials -import io.iohk.atala.iam.authentication.oidc.JwtSecurityLogic.jwtAuthHeader -import io.iohk.atala.presentproof.controller.http.* +import org.hyperledger.identus.api.http.EndpointOutputs.* +import org.hyperledger.identus.api.http.model.PaginationInput +import org.hyperledger.identus.api.http.{ErrorResponse, RequestContext} +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyCredentials +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyEndpointSecurityLogic.apiKeyHeader +import org.hyperledger.identus.iam.authentication.oidc.JwtCredentials +import org.hyperledger.identus.iam.authentication.oidc.JwtSecurityLogic.jwtAuthHeader +import org.hyperledger.identus.presentproof.controller.http.* import sttp.model.StatusCode import sttp.tapir.* import sttp.tapir.json.zio.jsonBody diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/PresentProofServerEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/PresentProofServerEndpoints.scala similarity index 78% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/PresentProofServerEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/PresentProofServerEndpoints.scala index e566fbd742..903ed8e22d 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/PresentProofServerEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/PresentProofServerEndpoints.scala @@ -1,21 +1,21 @@ -package io.iohk.atala.presentproof.controller +package org.hyperledger.identus.presentproof.controller -import io.iohk.atala.LogUtils.* -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.api.http.RequestContext -import io.iohk.atala.api.http.model.PaginationInput -import io.iohk.atala.iam.authentication.Authenticator -import io.iohk.atala.iam.authentication.Authorizer -import io.iohk.atala.iam.authentication.DefaultAuthenticator -import io.iohk.atala.iam.authentication.SecurityLogic -import io.iohk.atala.presentproof.controller.PresentProofEndpoints.{ +import org.hyperledger.identus.LogUtils.* +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.api.http.RequestContext +import org.hyperledger.identus.api.http.model.PaginationInput +import org.hyperledger.identus.iam.authentication.Authenticator +import org.hyperledger.identus.iam.authentication.Authorizer +import org.hyperledger.identus.iam.authentication.DefaultAuthenticator +import org.hyperledger.identus.iam.authentication.SecurityLogic +import org.hyperledger.identus.presentproof.controller.PresentProofEndpoints.{ getAllPresentations, getPresentation, requestPresentation, updatePresentation } -import io.iohk.atala.presentproof.controller.http.{RequestPresentationAction, RequestPresentationInput} -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.presentproof.controller.http.{RequestPresentationAction, RequestPresentationInput} +import org.hyperledger.identus.shared.models.WalletAccessContext import sttp.tapir.ztapir.* import zio.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/http/Options.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/http/Options.scala similarity index 86% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/http/Options.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/http/Options.scala index 7f55dc8580..3f49c8349d 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/http/Options.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/http/Options.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.presentproof.controller.http +package org.hyperledger.identus.presentproof.controller.http -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.presentproof.controller.http.Options.annotations +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.presentproof.controller.http.Options.annotations import sttp.tapir.Schema import sttp.tapir.Schema.annotations.{description, encodedExample} import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonDecoder, JsonEncoder} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/http/PresentationStatus.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/http/PresentationStatus.scala similarity index 93% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/http/PresentationStatus.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/http/PresentationStatus.scala index 58b006c4d3..597348aef7 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/http/PresentationStatus.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/http/PresentationStatus.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.presentproof.controller.http +package org.hyperledger.identus.presentproof.controller.http -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.mercury.model.Base64 -import io.iohk.atala.pollux.core.model.PresentationRecord -import io.iohk.atala.presentproof.controller.http.PresentationStatus.annotations +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.mercury.model.Base64 +import org.hyperledger.identus.pollux.core.model.PresentationRecord +import org.hyperledger.identus.presentproof.controller.http.PresentationStatus.annotations import sttp.tapir.Schema.annotations.{description, encodedExample, validate} import sttp.tapir.{Schema, Validator} import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonDecoder, JsonEncoder} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/http/PresentationStatusPage.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/http/PresentationStatusPage.scala similarity index 91% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/http/PresentationStatusPage.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/http/PresentationStatusPage.scala index 1dc5be057a..7fa6593c6a 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/http/PresentationStatusPage.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/http/PresentationStatusPage.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.presentproof.controller.http +package org.hyperledger.identus.presentproof.controller.http -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.presentproof.controller.http.PresentationStatusPage.annotations +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.presentproof.controller.http.PresentationStatusPage.annotations import sttp.tapir.Schema import sttp.tapir.Schema.annotations.{description, encodedExample} import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonDecoder, JsonEncoder} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/http/ProofRequestAux.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/http/ProofRequestAux.scala similarity index 86% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/http/ProofRequestAux.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/http/ProofRequestAux.scala index f134b37268..3d48eca4f9 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/http/ProofRequestAux.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/http/ProofRequestAux.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.presentproof.controller.http +package org.hyperledger.identus.presentproof.controller.http -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.presentproof.controller.http.ProofRequestAux.annotations +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.presentproof.controller.http.ProofRequestAux.annotations import sttp.tapir.Schema import sttp.tapir.Schema.annotations.{description, encodedExample} import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonDecoder, JsonEncoder} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/http/RequestPresentationAction.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/http/RequestPresentationAction.scala similarity index 90% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/http/RequestPresentationAction.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/http/RequestPresentationAction.scala index 114b08893a..d104cce7a0 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/http/RequestPresentationAction.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/http/RequestPresentationAction.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.presentproof.controller.http +package org.hyperledger.identus.presentproof.controller.http -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.pollux.core.service.serdes.* -import io.iohk.atala.presentproof.controller.http.RequestPresentationAction.annotations +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.pollux.core.service.serdes.* +import org.hyperledger.identus.presentproof.controller.http.RequestPresentationAction.annotations import sttp.tapir.Schema.annotations.{description, encodedExample, validate} import sttp.tapir.{Schema, Validator} import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonDecoder, JsonEncoder} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/http/RequestPresentationInput.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/http/RequestPresentationInput.scala similarity index 94% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/http/RequestPresentationInput.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/http/RequestPresentationInput.scala index 9f3c677fa8..239925f999 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/presentproof/controller/http/RequestPresentationInput.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/presentproof/controller/http/RequestPresentationInput.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.presentproof.controller.http +package org.hyperledger.identus.presentproof.controller.http -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.pollux.core.service.serdes.* -import io.iohk.atala.presentproof.controller.http.RequestPresentationInput.annotations +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.pollux.core.service.serdes.* +import org.hyperledger.identus.presentproof.controller.http.RequestPresentationInput.annotations import sttp.tapir.Schema.annotations.{description, encodedExample} import sttp.tapir.{Schema, Validator} import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonDecoder, JsonEncoder} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/system/controller/SystemController.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/system/controller/SystemController.scala similarity index 50% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/system/controller/SystemController.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/system/controller/SystemController.scala index 1821eabf4e..21bf841708 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/system/controller/SystemController.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/system/controller/SystemController.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.system.controller +package org.hyperledger.identus.system.controller import zio.* -import io.iohk.atala.api.http.{ErrorResponse, RequestContext} -import io.iohk.atala.system.controller.http.HealthInfo +import org.hyperledger.identus.api.http.{ErrorResponse, RequestContext} +import org.hyperledger.identus.system.controller.http.HealthInfo trait SystemController { diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/system/controller/SystemControllerImpl.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/system/controller/SystemControllerImpl.scala similarity index 70% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/system/controller/SystemControllerImpl.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/system/controller/SystemControllerImpl.scala index 15c2bcb0d5..7ad16c53a3 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/system/controller/SystemControllerImpl.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/system/controller/SystemControllerImpl.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.system.controller +package org.hyperledger.identus.system.controller -import io.iohk.atala.agent.server.buildinfo.BuildInfo -import io.iohk.atala.api.http.{ErrorResponse, RequestContext} -import io.iohk.atala.system.controller.http.HealthInfo +import org.hyperledger.identus.agent.server.buildinfo.BuildInfo +import org.hyperledger.identus.api.http.{ErrorResponse, RequestContext} +import org.hyperledger.identus.system.controller.http.HealthInfo import io.micrometer.prometheus.PrometheusMeterRegistry import zio.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/system/controller/SystemEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/system/controller/SystemEndpoints.scala similarity index 88% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/system/controller/SystemEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/system/controller/SystemEndpoints.scala index d0da17fbf8..73cf6a6c85 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/system/controller/SystemEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/system/controller/SystemEndpoints.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.system.controller +package org.hyperledger.identus.system.controller -import io.iohk.atala.api.http.EndpointOutputs.* -import io.iohk.atala.api.http.{ErrorResponse, RequestContext} -import io.iohk.atala.system.controller.http.HealthInfo +import org.hyperledger.identus.api.http.EndpointOutputs.* +import org.hyperledger.identus.api.http.{ErrorResponse, RequestContext} +import org.hyperledger.identus.system.controller.http.HealthInfo import sttp.apispec.Tag import sttp.tapir.ztapir.stringBody import sttp.tapir.json.zio.jsonBody diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/system/controller/SystemServerEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/system/controller/SystemServerEndpoints.scala similarity index 80% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/system/controller/SystemServerEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/system/controller/SystemServerEndpoints.scala index 738e31946e..6b693a9553 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/system/controller/SystemServerEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/system/controller/SystemServerEndpoints.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.system.controller +package org.hyperledger.identus.system.controller -import io.iohk.atala.LogUtils.* -import io.iohk.atala.api.http.RequestContext -import io.iohk.atala.system.controller.SystemEndpoints.* +import org.hyperledger.identus.LogUtils.* +import org.hyperledger.identus.api.http.RequestContext +import org.hyperledger.identus.system.controller.SystemEndpoints.* import sttp.tapir.ztapir.* import zio.{URIO, ZIO} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/system/controller/http/HealthInfo.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/system/controller/http/HealthInfo.scala similarity index 83% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/system/controller/http/HealthInfo.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/system/controller/http/HealthInfo.scala index ffb9fa9e35..f5eec8783a 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/system/controller/http/HealthInfo.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/system/controller/http/HealthInfo.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.system.controller.http +package org.hyperledger.identus.system.controller.http -import io.iohk.atala.api.http.Annotation -import io.iohk.atala.system.controller.http.HealthInfo.annotations +import org.hyperledger.identus.api.http.Annotation +import org.hyperledger.identus.system.controller.http.HealthInfo.annotations import sttp.tapir.Schema.annotations.{description, encodedExample} import sttp.tapir.Schema import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonDecoder, JsonEncoder} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/VcVerificationController.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/VcVerificationController.scala similarity index 64% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/VcVerificationController.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/VcVerificationController.scala index b08e735a77..c9bad74bd3 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/VcVerificationController.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/VcVerificationController.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.verification.controller +package org.hyperledger.identus.verification.controller -import io.iohk.atala.api.http.{ErrorResponse, RequestContext} -import io.iohk.atala.pollux.core.service.verification.VcVerificationServiceError -import io.iohk.atala.verification.controller +import org.hyperledger.identus.api.http.{ErrorResponse, RequestContext} +import org.hyperledger.identus.pollux.core.service.verification.VcVerificationServiceError +import org.hyperledger.identus.verification.controller import zio.* trait VcVerificationController { diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/VcVerificationControllerImpl.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/VcVerificationControllerImpl.scala similarity index 79% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/VcVerificationControllerImpl.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/VcVerificationControllerImpl.scala index 200cb4e421..d1df630242 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/VcVerificationControllerImpl.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/VcVerificationControllerImpl.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.verification.controller +package org.hyperledger.identus.verification.controller -import io.iohk.atala.api.http.{ErrorResponse, RequestContext} -import io.iohk.atala.pollux.core.service.verification.VcVerificationService -import io.iohk.atala.verification.controller +import org.hyperledger.identus.api.http.{ErrorResponse, RequestContext} +import org.hyperledger.identus.pollux.core.service.verification.VcVerificationService +import org.hyperledger.identus.verification.controller import zio.* class VcVerificationControllerImpl(vcVerificationService: VcVerificationService) extends VcVerificationController { diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/VcVerificationEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/VcVerificationEndpoints.scala similarity index 65% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/VcVerificationEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/VcVerificationEndpoints.scala index f81c951fec..e32d445485 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/VcVerificationEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/VcVerificationEndpoints.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.verification.controller +package org.hyperledger.identus.verification.controller -import io.iohk.atala.api.http.EndpointOutputs.* -import io.iohk.atala.api.http.{ErrorResponse, RequestContext} -import io.iohk.atala.iam.authentication.apikey.ApiKeyCredentials -import io.iohk.atala.iam.authentication.apikey.ApiKeyEndpointSecurityLogic.apiKeyHeader -import io.iohk.atala.iam.authentication.oidc.JwtCredentials -import io.iohk.atala.iam.authentication.oidc.JwtSecurityLogic.jwtAuthHeader +import org.hyperledger.identus.api.http.EndpointOutputs.* +import org.hyperledger.identus.api.http.{ErrorResponse, RequestContext} +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyCredentials +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyEndpointSecurityLogic.apiKeyHeader +import org.hyperledger.identus.iam.authentication.oidc.JwtCredentials +import org.hyperledger.identus.iam.authentication.oidc.JwtSecurityLogic.jwtAuthHeader import sttp.model.StatusCode import sttp.tapir.* import sttp.tapir.json.zio.jsonBody diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/VcVerificationServerEndpoints.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/VcVerificationServerEndpoints.scala similarity index 70% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/VcVerificationServerEndpoints.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/VcVerificationServerEndpoints.scala index 2cc01ce215..7f3a114f9e 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/VcVerificationServerEndpoints.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/VcVerificationServerEndpoints.scala @@ -1,12 +1,12 @@ -package io.iohk.atala.verification.controller +package org.hyperledger.identus.verification.controller -import io.iohk.atala.LogUtils.* -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.api.http.RequestContext -import io.iohk.atala.iam.authentication.{Authenticator, Authorizer, DefaultAuthenticator, SecurityLogic} -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.verification.controller -import io.iohk.atala.verification.controller.VcVerificationEndpoints.verify +import org.hyperledger.identus.LogUtils.* +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.api.http.RequestContext +import org.hyperledger.identus.iam.authentication.{Authenticator, Authorizer, DefaultAuthenticator, SecurityLogic} +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.verification.controller +import org.hyperledger.identus.verification.controller.VcVerificationEndpoints.verify import sttp.tapir.ztapir.* import zio.* diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/http/ParameterizableVcVerification.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/http/ParameterizableVcVerification.scala similarity index 90% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/http/ParameterizableVcVerification.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/http/ParameterizableVcVerification.scala index 8994cedf77..7200824ec0 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/http/ParameterizableVcVerification.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/http/ParameterizableVcVerification.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.verification.controller.http +package org.hyperledger.identus.verification.controller.http import sttp.tapir.Schema import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonDecoder, JsonEncoder} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/http/VcVerification.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/http/VcVerification.scala similarity index 92% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/http/VcVerification.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/http/VcVerification.scala index 345e582714..159d86cf62 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/http/VcVerification.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/http/VcVerification.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.verification.controller.http +package org.hyperledger.identus.verification.controller.http -import io.iohk.atala.api.http.ErrorResponse -import io.iohk.atala.pollux.core.service -import io.iohk.atala.pollux.core.service.verification.VcVerification as ServiceVcVerification +import org.hyperledger.identus.api.http.ErrorResponse +import org.hyperledger.identus.pollux.core.service +import org.hyperledger.identus.pollux.core.service.verification.VcVerification as ServiceVcVerification import sttp.tapir.Schema import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonDecoder, JsonEncoder} import zio.{IO, *} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/http/VcVerificationParameter.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/http/VcVerificationParameter.scala similarity index 95% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/http/VcVerificationParameter.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/http/VcVerificationParameter.scala index 66ca951fcb..4821fa3ba8 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/http/VcVerificationParameter.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/http/VcVerificationParameter.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.verification.controller.http +package org.hyperledger.identus.verification.controller.http import sttp.tapir.Schema import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonDecoder, JsonEncoder} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/http/VcVerificationRequest.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/http/VcVerificationRequest.scala similarity index 91% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/http/VcVerificationRequest.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/http/VcVerificationRequest.scala index dd7602b3d0..2fbbfa57ec 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/http/VcVerificationRequest.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/http/VcVerificationRequest.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.verification.controller.http +package org.hyperledger.identus.verification.controller.http -import io.iohk.atala.api.http.{Annotation, ErrorResponse} -import io.iohk.atala.pollux.core.service.verification.VcVerificationRequest as ServiceVcVerificationRequest +import org.hyperledger.identus.api.http.{Annotation, ErrorResponse} +import org.hyperledger.identus.pollux.core.service.verification.VcVerificationRequest as ServiceVcVerificationRequest import sttp.tapir.Schema import sttp.tapir.Schema.annotations.{description, encodedExample} import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonDecoder, JsonEncoder} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/http/VcVerificationResponse.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/http/VcVerificationResponse.scala similarity index 97% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/http/VcVerificationResponse.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/http/VcVerificationResponse.scala index 70e4ee35bc..99b25d7170 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/http/VcVerificationResponse.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/http/VcVerificationResponse.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.verification.controller.http +package org.hyperledger.identus.verification.controller.http -import io.iohk.atala.api.http.Annotation +import org.hyperledger.identus.api.http.Annotation import sttp.tapir.Schema import sttp.tapir.Schema.annotations.{description, encodedExample} import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonDecoder, JsonEncoder} diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/http/VcVerificationResult.scala b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/http/VcVerificationResult.scala similarity index 80% rename from prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/http/VcVerificationResult.scala rename to cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/http/VcVerificationResult.scala index 99158682da..3eab310e22 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/verification/controller/http/VcVerificationResult.scala +++ b/cloud-agent/service/server/src/main/scala/org/hyperledger/identus/verification/controller/http/VcVerificationResult.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.verification.controller.http +package org.hyperledger.identus.verification.controller.http -import io.iohk.atala.pollux.core.service.verification.VcVerificationResult as ServiceVcVerificationResult +import org.hyperledger.identus.pollux.core.service.verification.VcVerificationResult as ServiceVcVerificationResult import sttp.tapir.Schema import zio.json.{DeriveJsonDecoder, DeriveJsonEncoder, JsonDecoder, JsonEncoder} diff --git a/prism-agent/service/server/src/test/resources/anoncred-schema-example.json b/cloud-agent/service/server/src/test/resources/anoncred-schema-example.json similarity index 100% rename from prism-agent/service/server/src/test/resources/anoncred-schema-example.json rename to cloud-agent/service/server/src/test/resources/anoncred-schema-example.json diff --git a/prism-agent/service/server/src/test/resources/logback.xml b/cloud-agent/service/server/src/test/resources/logback.xml similarity index 100% rename from prism-agent/service/server/src/test/resources/logback.xml rename to cloud-agent/service/server/src/test/resources/logback.xml diff --git a/pollux/lib/core/src/test/resources/vc-schema-example.json b/cloud-agent/service/server/src/test/resources/vc-schema-example.json similarity index 100% rename from pollux/lib/core/src/test/resources/vc-schema-example.json rename to cloud-agent/service/server/src/test/resources/vc-schema-example.json diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/ZioHttpTest.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/ZioHttpTest.scala similarity index 98% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/ZioHttpTest.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/ZioHttpTest.scala index c218bb0243..eb28c2cba9 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/ZioHttpTest.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/ZioHttpTest.scala @@ -1,4 +1,4 @@ -package io.iohk.atala +package org.hyperledger.identus import zio.* import zio.http.* diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/agent/server/AgentInitializationSpec.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/agent/server/AgentInitializationSpec.scala similarity index 81% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/agent/server/AgentInitializationSpec.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/agent/server/AgentInitializationSpec.scala index c43fc1f3e1..028bca98cf 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/agent/server/AgentInitializationSpec.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/agent/server/AgentInitializationSpec.scala @@ -1,23 +1,23 @@ -package io.iohk.atala.agent.server +package org.hyperledger.identus.agent.server -import io.iohk.atala.agent.server.config.AppConfig -import io.iohk.atala.agent.server.config.SecretStorageBackend -import io.iohk.atala.agent.walletapi.service.EntityServiceImpl -import io.iohk.atala.agent.walletapi.service.WalletManagementService -import io.iohk.atala.agent.walletapi.service.WalletManagementServiceImpl -import io.iohk.atala.agent.walletapi.sql.JdbcEntityRepository -import io.iohk.atala.agent.walletapi.sql.JdbcWalletNonSecretStorage -import io.iohk.atala.agent.walletapi.sql.JdbcWalletSecretStorage -import io.iohk.atala.agent.walletapi.storage.WalletNonSecretStorage -import io.iohk.atala.agent.walletapi.storage.WalletSecretStorage -import io.iohk.atala.iam.authentication.apikey.ApiKeyAuthenticatorImpl -import io.iohk.atala.iam.authentication.apikey.JdbcAuthenticationRepository -import io.iohk.atala.shared.crypto.ApolloSpecHelper -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletAdministrationContext -import io.iohk.atala.shared.models.WalletId -import io.iohk.atala.sharedtest.containers.PostgresTestContainerSupport -import io.iohk.atala.test.container.DBTestUtils +import org.hyperledger.identus.agent.server.config.AppConfig +import org.hyperledger.identus.agent.server.config.SecretStorageBackend +import org.hyperledger.identus.agent.walletapi.service.EntityServiceImpl +import org.hyperledger.identus.agent.walletapi.service.WalletManagementService +import org.hyperledger.identus.agent.walletapi.service.WalletManagementServiceImpl +import org.hyperledger.identus.agent.walletapi.sql.JdbcEntityRepository +import org.hyperledger.identus.agent.walletapi.sql.JdbcWalletNonSecretStorage +import org.hyperledger.identus.agent.walletapi.sql.JdbcWalletSecretStorage +import org.hyperledger.identus.agent.walletapi.storage.WalletNonSecretStorage +import org.hyperledger.identus.agent.walletapi.storage.WalletSecretStorage +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyAuthenticatorImpl +import org.hyperledger.identus.iam.authentication.apikey.JdbcAuthenticationRepository +import org.hyperledger.identus.shared.crypto.ApolloSpecHelper +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletAdministrationContext +import org.hyperledger.identus.shared.models.WalletId +import org.hyperledger.identus.sharedtest.containers.PostgresTestContainerSupport +import org.hyperledger.identus.test.container.DBTestUtils import zio.* import zio.test.* import zio.test.Assertion.* diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/agent/server/config/AppConfigSpec.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/agent/server/config/AppConfigSpec.scala similarity index 98% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/agent/server/config/AppConfigSpec.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/agent/server/config/AppConfigSpec.scala index f5c4dde185..e967551ed5 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/agent/server/config/AppConfigSpec.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/agent/server/config/AppConfigSpec.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.agent.server.config +package org.hyperledger.identus.agent.server.config -import io.iohk.atala.agent.server.SystemModule +import org.hyperledger.identus.agent.server.SystemModule import monocle.syntax.all.* import zio.* import zio.test.* diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/api/util/PaginationUtilsSpec.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/api/util/PaginationUtilsSpec.scala similarity index 94% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/api/util/PaginationUtilsSpec.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/api/util/PaginationUtilsSpec.scala index 54f4ef22f9..b81b64696f 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/api/util/PaginationUtilsSpec.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/api/util/PaginationUtilsSpec.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.api.util +package org.hyperledger.identus.api.util import zio.* import zio.test.* import zio.test.Assertion.* import sttp.model.Uri -import io.iohk.atala.api.http.model.CollectionStats -import io.iohk.atala.api.http.model.Pagination +import org.hyperledger.identus.api.http.model.CollectionStats +import org.hyperledger.identus.api.http.model.Pagination object PaginationUtilsSpec extends ZIOSpecDefault { diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/api/util/Tapir2StaticOAS.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/api/util/Tapir2StaticOAS.scala similarity index 60% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/api/util/Tapir2StaticOAS.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/api/util/Tapir2StaticOAS.scala index 68b510f62e..3506f95cae 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/api/util/Tapir2StaticOAS.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/api/util/Tapir2StaticOAS.scala @@ -1,20 +1,23 @@ -package io.iohk.atala.api.util +package org.hyperledger.identus.api.util -import io.iohk.atala.agent.server.AgentHttpServer -import io.iohk.atala.agent.server.http.DocModels -import io.iohk.atala.castor.controller.{DIDController, DIDRegistrarController} -import io.iohk.atala.connect.controller.ConnectionController -import io.iohk.atala.credentialstatus.controller.CredentialStatusController -import io.iohk.atala.event.controller.EventController -import io.iohk.atala.iam.authentication.DefaultAuthenticator -import io.iohk.atala.iam.entity.http.controller.EntityController -import io.iohk.atala.iam.wallet.http.controller.WalletManagementController -import io.iohk.atala.issue.controller.IssueController -import io.iohk.atala.pollux.credentialdefinition.controller.CredentialDefinitionController -import io.iohk.atala.pollux.credentialschema.controller.{CredentialSchemaController, VerificationPolicyController} -import io.iohk.atala.presentproof.controller.PresentProofController -import io.iohk.atala.system.controller.SystemController -import io.iohk.atala.verification.controller.VcVerificationController +import org.hyperledger.identus.agent.server.AgentHttpServer +import org.hyperledger.identus.agent.server.http.DocModels +import org.hyperledger.identus.castor.controller.{DIDController, DIDRegistrarController} +import org.hyperledger.identus.connect.controller.ConnectionController +import org.hyperledger.identus.credential.status.controller.CredentialStatusController +import org.hyperledger.identus.event.controller.EventController +import org.hyperledger.identus.iam.authentication.DefaultAuthenticator +import org.hyperledger.identus.iam.entity.http.controller.EntityController +import org.hyperledger.identus.iam.wallet.http.controller.WalletManagementController +import org.hyperledger.identus.issue.controller.IssueController +import org.hyperledger.identus.pollux.credentialdefinition.controller.CredentialDefinitionController +import org.hyperledger.identus.pollux.credentialschema.controller.{ + CredentialSchemaController, + VerificationPolicyController +} +import org.hyperledger.identus.presentproof.controller.PresentProofController +import org.hyperledger.identus.system.controller.SystemController +import org.hyperledger.identus.verification.controller.VcVerificationController import org.scalatestplus.mockito.MockitoSugar.* import sttp.tapir.docs.openapi.OpenAPIDocsInterpreter import zio.{Scope, ZIO, ZIOAppArgs, ZIOAppDefault, ZLayer} diff --git a/pollux/lib/sql-doobie/src/test/scala/io/iohk/atala/test/container/MigrationAspect.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/container/util/MigrationAspect.scala similarity index 96% rename from pollux/lib/sql-doobie/src/test/scala/io/iohk/atala/test/container/MigrationAspect.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/container/util/MigrationAspect.scala index b12338d17f..fe5bf1cbc7 100644 --- a/pollux/lib/sql-doobie/src/test/scala/io/iohk/atala/test/container/MigrationAspect.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/container/util/MigrationAspect.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.test.container +package org.hyperledger.identus.container.util import com.dimafeng.testcontainers.PostgreSQLContainer import org.flywaydb.core.Flyway import zio.ZIO -import zio.test.{TestAspect, TestAspectAtLeastR} import zio.test.TestAspect.{beforeAll, before} +import zio.test.{TestAspect, TestAspectAtLeastR} object MigrationAspects { def migrate(schema: String, paths: String*): TestAspectAtLeastR[PostgreSQLContainer] = { diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/iam/authentication/SecurityLogicSpec.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/iam/authentication/SecurityLogicSpec.scala similarity index 94% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/iam/authentication/SecurityLogicSpec.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/iam/authentication/SecurityLogicSpec.scala index e5bfbcfabb..3437e896a9 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/iam/authentication/SecurityLogicSpec.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/iam/authentication/SecurityLogicSpec.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.iam.authentication +package org.hyperledger.identus.iam.authentication -import io.iohk.atala.agent.walletapi.model.Entity -import io.iohk.atala.agent.walletapi.model.EntityRole -import io.iohk.atala.iam.authentication.AuthenticationError.InvalidCredentials -import io.iohk.atala.iam.authentication.apikey.ApiKeyCredentials +import org.hyperledger.identus.agent.walletapi.model.Entity +import org.hyperledger.identus.agent.walletapi.model.EntityRole +import org.hyperledger.identus.iam.authentication.AuthenticationError.InvalidCredentials +import org.hyperledger.identus.iam.authentication.apikey.ApiKeyCredentials import zio.* import zio.test.* import zio.test.Assertion.* diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/iam/authentication/apikey/ApiKeyAuthenticatorSpec.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/iam/authentication/apikey/ApiKeyAuthenticatorSpec.scala similarity index 90% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/iam/authentication/apikey/ApiKeyAuthenticatorSpec.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/iam/authentication/apikey/ApiKeyAuthenticatorSpec.scala index 23aa3096e7..2ee8d718c7 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/iam/authentication/apikey/ApiKeyAuthenticatorSpec.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/iam/authentication/apikey/ApiKeyAuthenticatorSpec.scala @@ -1,21 +1,25 @@ -package io.iohk.atala.iam.authentication.apikey +package org.hyperledger.identus.iam.authentication.apikey import com.dimafeng.testcontainers.PostgreSQLContainer -import io.iohk.atala.agent.walletapi.model.{Entity, Wallet} -import io.iohk.atala.agent.walletapi.service.{ +import org.hyperledger.identus.agent.walletapi.model.{Entity, Wallet} +import org.hyperledger.identus.agent.walletapi.service.{ EntityService, EntityServiceImpl, WalletManagementService, WalletManagementServiceImpl } -import io.iohk.atala.agent.walletapi.sql.{JdbcEntityRepository, JdbcWalletNonSecretStorage, JdbcWalletSecretStorage} -import io.iohk.atala.container.util.MigrationAspects.* -import io.iohk.atala.iam.authentication.AuthenticationError -import io.iohk.atala.iam.authentication.AuthenticationError.InvalidCredentials -import io.iohk.atala.shared.crypto.Apollo -import io.iohk.atala.shared.models.WalletAdministrationContext -import io.iohk.atala.shared.models.WalletId -import io.iohk.atala.sharedtest.containers.PostgresTestContainerSupport +import org.hyperledger.identus.agent.walletapi.sql.{ + JdbcEntityRepository, + JdbcWalletNonSecretStorage, + JdbcWalletSecretStorage +} +import org.hyperledger.identus.container.util.MigrationAspects.* +import org.hyperledger.identus.iam.authentication.AuthenticationError +import org.hyperledger.identus.iam.authentication.AuthenticationError.InvalidCredentials +import org.hyperledger.identus.shared.crypto.Apollo +import org.hyperledger.identus.shared.models.WalletAdministrationContext +import org.hyperledger.identus.shared.models.WalletId +import org.hyperledger.identus.sharedtest.containers.PostgresTestContainerSupport import zio.Runtime.removeDefaultLoggers import zio.test.Assertion.* import zio.test.TestAspect.sequential diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/iam/authentication/apikey/JdbcAuthenticationRepositorySpec.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/iam/authentication/apikey/JdbcAuthenticationRepositorySpec.scala similarity index 93% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/iam/authentication/apikey/JdbcAuthenticationRepositorySpec.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/iam/authentication/apikey/JdbcAuthenticationRepositorySpec.scala index b5e2f0626b..18d14280f8 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/iam/authentication/apikey/JdbcAuthenticationRepositorySpec.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/iam/authentication/apikey/JdbcAuthenticationRepositorySpec.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.iam.authentication.apikey +package org.hyperledger.identus.iam.authentication.apikey -import io.iohk.atala.container.util.MigrationAspects.migrate -import io.iohk.atala.iam.authentication.apikey.AuthenticationMethodType.ApiKey -import io.iohk.atala.sharedtest.containers.PostgresTestContainerSupport +import org.hyperledger.identus.container.util.MigrationAspects.migrate +import org.hyperledger.identus.iam.authentication.apikey.AuthenticationMethodType.ApiKey +import org.hyperledger.identus.sharedtest.containers.PostgresTestContainerSupport import zio.Runtime.removeDefaultLoggers import zio.ZIO import zio.test.* diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/iam/authentication/oidc/KeycloakAuthenticatorSpec.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/iam/authentication/oidc/KeycloakAuthenticatorSpec.scala similarity index 91% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/iam/authentication/oidc/KeycloakAuthenticatorSpec.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/iam/authentication/oidc/KeycloakAuthenticatorSpec.scala index 24a7f1b6c7..5ccde5e29d 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/iam/authentication/oidc/KeycloakAuthenticatorSpec.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/iam/authentication/oidc/KeycloakAuthenticatorSpec.scala @@ -1,21 +1,21 @@ -package io.iohk.atala.iam.authentication.oidc +package org.hyperledger.identus.iam.authentication.oidc -import io.iohk.atala.agent.walletapi.model.EntityRole -import io.iohk.atala.agent.walletapi.model.Wallet -import io.iohk.atala.agent.walletapi.service.WalletManagementService -import io.iohk.atala.agent.walletapi.service.WalletManagementServiceImpl -import io.iohk.atala.agent.walletapi.sql.JdbcWalletNonSecretStorage -import io.iohk.atala.agent.walletapi.sql.JdbcWalletSecretStorage -import io.iohk.atala.iam.authentication.AuthenticationError -import io.iohk.atala.iam.authorization.keycloak.admin.KeycloakPermissionManagementService -import io.iohk.atala.shared.crypto.ApolloSpecHelper -import io.iohk.atala.shared.models.WalletAdministrationContext -import io.iohk.atala.shared.models.WalletId -import io.iohk.atala.sharedtest.containers.KeycloakAdminClient -import io.iohk.atala.sharedtest.containers.KeycloakContainerCustom -import io.iohk.atala.sharedtest.containers.KeycloakTestContainerSupport -import io.iohk.atala.sharedtest.containers.PostgresTestContainerSupport -import io.iohk.atala.test.container.DBTestUtils +import org.hyperledger.identus.agent.walletapi.model.EntityRole +import org.hyperledger.identus.agent.walletapi.model.Wallet +import org.hyperledger.identus.agent.walletapi.service.WalletManagementService +import org.hyperledger.identus.agent.walletapi.service.WalletManagementServiceImpl +import org.hyperledger.identus.agent.walletapi.sql.JdbcWalletNonSecretStorage +import org.hyperledger.identus.agent.walletapi.sql.JdbcWalletSecretStorage +import org.hyperledger.identus.iam.authentication.AuthenticationError +import org.hyperledger.identus.iam.authorization.keycloak.admin.KeycloakPermissionManagementService +import org.hyperledger.identus.shared.crypto.ApolloSpecHelper +import org.hyperledger.identus.shared.models.WalletAdministrationContext +import org.hyperledger.identus.shared.models.WalletId +import org.hyperledger.identus.sharedtest.containers.KeycloakAdminClient +import org.hyperledger.identus.sharedtest.containers.KeycloakContainerCustom +import org.hyperledger.identus.sharedtest.containers.KeycloakTestContainerSupport +import org.hyperledger.identus.sharedtest.containers.PostgresTestContainerSupport +import org.hyperledger.identus.test.container.DBTestUtils import org.keycloak.authorization.client.AuthzClient import org.keycloak.representations.idm.authorization.ResourceRepresentation import org.keycloak.representations.idm.authorization.UmaPermissionRepresentation diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/iam/authorization/core/EntityPermissionManagementSpec.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/iam/authorization/core/EntityPermissionManagementSpec.scala similarity index 79% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/iam/authorization/core/EntityPermissionManagementSpec.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/iam/authorization/core/EntityPermissionManagementSpec.scala index 0fa7d18ab7..46fc963ca3 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/iam/authorization/core/EntityPermissionManagementSpec.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/iam/authorization/core/EntityPermissionManagementSpec.scala @@ -1,21 +1,21 @@ -package io.iohk.atala.iam.authorization.core +package org.hyperledger.identus.iam.authorization.core -import io.iohk.atala.agent.walletapi.model.Entity -import io.iohk.atala.agent.walletapi.model.Wallet -import io.iohk.atala.agent.walletapi.service.EntityService -import io.iohk.atala.agent.walletapi.service.EntityServiceImpl -import io.iohk.atala.agent.walletapi.service.WalletManagementService -import io.iohk.atala.agent.walletapi.service.WalletManagementServiceImpl -import io.iohk.atala.agent.walletapi.sql.JdbcEntityRepository -import io.iohk.atala.agent.walletapi.sql.JdbcWalletNonSecretStorage -import io.iohk.atala.agent.walletapi.sql.JdbcWalletSecretStorage -import io.iohk.atala.iam.authorization.core.PermissionManagement.Error.ServiceError -import io.iohk.atala.iam.authorization.core.PermissionManagement.Error.WalletNotFoundById -import io.iohk.atala.shared.crypto.ApolloSpecHelper -import io.iohk.atala.shared.models.WalletAdministrationContext -import io.iohk.atala.shared.models.WalletId -import io.iohk.atala.sharedtest.containers.PostgresTestContainerSupport -import io.iohk.atala.test.container.DBTestUtils +import org.hyperledger.identus.agent.walletapi.model.Entity +import org.hyperledger.identus.agent.walletapi.model.Wallet +import org.hyperledger.identus.agent.walletapi.service.EntityService +import org.hyperledger.identus.agent.walletapi.service.EntityServiceImpl +import org.hyperledger.identus.agent.walletapi.service.WalletManagementService +import org.hyperledger.identus.agent.walletapi.service.WalletManagementServiceImpl +import org.hyperledger.identus.agent.walletapi.sql.JdbcEntityRepository +import org.hyperledger.identus.agent.walletapi.sql.JdbcWalletNonSecretStorage +import org.hyperledger.identus.agent.walletapi.sql.JdbcWalletSecretStorage +import org.hyperledger.identus.iam.authorization.core.PermissionManagement.Error.ServiceError +import org.hyperledger.identus.iam.authorization.core.PermissionManagement.Error.WalletNotFoundById +import org.hyperledger.identus.shared.crypto.ApolloSpecHelper +import org.hyperledger.identus.shared.models.WalletAdministrationContext +import org.hyperledger.identus.shared.models.WalletId +import org.hyperledger.identus.sharedtest.containers.PostgresTestContainerSupport +import org.hyperledger.identus.test.container.DBTestUtils import zio.* import zio.test.* import zio.test.Assertion.* diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/iam/authorization/keycloak/admin/KeycloakAdmin.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/iam/authorization/keycloak/admin/KeycloakAdmin.scala similarity index 95% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/iam/authorization/keycloak/admin/KeycloakAdmin.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/iam/authorization/keycloak/admin/KeycloakAdmin.scala index 60abc23456..bbab0c3545 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/iam/authorization/keycloak/admin/KeycloakAdmin.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/iam/authorization/keycloak/admin/KeycloakAdmin.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.iam.authorization.keycloak.admin +package org.hyperledger.identus.iam.authorization.keycloak.admin import org.keycloak.admin.client.Keycloak import zio.{RLayer, Task, ZIO, ZLayer} diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/iam/authorization/keycloak/admin/KeycloakAdminSpec.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/iam/authorization/keycloak/admin/KeycloakAdminSpec.scala similarity index 83% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/iam/authorization/keycloak/admin/KeycloakAdminSpec.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/iam/authorization/keycloak/admin/KeycloakAdminSpec.scala index 2f98cb9ef4..ed92b74522 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/iam/authorization/keycloak/admin/KeycloakAdminSpec.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/iam/authorization/keycloak/admin/KeycloakAdminSpec.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.iam.authorization.keycloak.admin +package org.hyperledger.identus.iam.authorization.keycloak.admin -import io.iohk.atala.sharedtest.containers.{KeycloakContainerCustom, KeycloakTestContainerSupport} +import org.hyperledger.identus.sharedtest.containers.{KeycloakContainerCustom, KeycloakTestContainerSupport} import zio.* import zio.ZIO.* import zio.test.* diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/iam/authorization/keycloak/admin/KeycloakConfigUtils.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/iam/authorization/keycloak/admin/KeycloakConfigUtils.scala similarity index 85% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/iam/authorization/keycloak/admin/KeycloakConfigUtils.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/iam/authorization/keycloak/admin/KeycloakConfigUtils.scala index 5ee11525cb..a64f067240 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/iam/authorization/keycloak/admin/KeycloakConfigUtils.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/iam/authorization/keycloak/admin/KeycloakConfigUtils.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.iam.authorization.keycloak.admin +package org.hyperledger.identus.iam.authorization.keycloak.admin -import io.iohk.atala.iam.authentication.oidc.KeycloakConfig -import io.iohk.atala.sharedtest.containers.{KeycloakContainerCustom, KeycloakTestContainerSupport} +import org.hyperledger.identus.iam.authentication.oidc.KeycloakConfig +import org.hyperledger.identus.sharedtest.containers.{KeycloakContainerCustom, KeycloakTestContainerSupport} import zio.* import zio.ZIO.* diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/iam/authorization/keycloak/admin/KeycloakPermissionManagementServiceSpec.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/iam/authorization/keycloak/admin/KeycloakPermissionManagementServiceSpec.scala similarity index 88% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/iam/authorization/keycloak/admin/KeycloakPermissionManagementServiceSpec.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/iam/authorization/keycloak/admin/KeycloakPermissionManagementServiceSpec.scala index 65fd8084d3..cd8e01ba95 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/iam/authorization/keycloak/admin/KeycloakPermissionManagementServiceSpec.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/iam/authorization/keycloak/admin/KeycloakPermissionManagementServiceSpec.scala @@ -1,27 +1,27 @@ -package io.iohk.atala.iam.authorization.keycloak.admin - -import io.iohk.atala.agent.walletapi.model.Wallet -import io.iohk.atala.agent.walletapi.service.WalletManagementServiceImpl -import io.iohk.atala.agent.walletapi.service.{WalletManagementService, WalletManagementServiceError} -import io.iohk.atala.agent.walletapi.sql.JdbcWalletNonSecretStorage -import io.iohk.atala.agent.walletapi.sql.JdbcWalletSecretStorage -import io.iohk.atala.iam.authentication.AuthenticationError.ResourceNotPermitted -import io.iohk.atala.iam.authentication.oidc.{ +package org.hyperledger.identus.iam.authorization.keycloak.admin + +import org.hyperledger.identus.agent.walletapi.model.Wallet +import org.hyperledger.identus.agent.walletapi.service.WalletManagementServiceImpl +import org.hyperledger.identus.agent.walletapi.service.{WalletManagementService, WalletManagementServiceError} +import org.hyperledger.identus.agent.walletapi.sql.JdbcWalletNonSecretStorage +import org.hyperledger.identus.agent.walletapi.sql.JdbcWalletSecretStorage +import org.hyperledger.identus.iam.authentication.AuthenticationError.ResourceNotPermitted +import org.hyperledger.identus.iam.authentication.oidc.{ KeycloakAuthenticator, KeycloakAuthenticatorImpl, KeycloakClient, KeycloakClientImpl, KeycloakEntity } -import io.iohk.atala.iam.authorization.core.PermissionManagement -import io.iohk.atala.iam.authorization.core.PermissionManagement.Error.UnexpectedError -import io.iohk.atala.iam.authorization.core.PermissionManagement.Error.WalletNotFoundById -import io.iohk.atala.shared.crypto.ApolloSpecHelper -import io.iohk.atala.shared.models.WalletAdministrationContext -import io.iohk.atala.shared.models.{WalletAccessContext, WalletId} -import io.iohk.atala.sharedtest.containers.PostgresTestContainerSupport -import io.iohk.atala.sharedtest.containers.{KeycloakContainerCustom, KeycloakTestContainerSupport} -import io.iohk.atala.test.container.DBTestUtils +import org.hyperledger.identus.iam.authorization.core.PermissionManagement +import org.hyperledger.identus.iam.authorization.core.PermissionManagement.Error.UnexpectedError +import org.hyperledger.identus.iam.authorization.core.PermissionManagement.Error.WalletNotFoundById +import org.hyperledger.identus.shared.crypto.ApolloSpecHelper +import org.hyperledger.identus.shared.models.WalletAdministrationContext +import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} +import org.hyperledger.identus.sharedtest.containers.PostgresTestContainerSupport +import org.hyperledger.identus.sharedtest.containers.{KeycloakContainerCustom, KeycloakTestContainerSupport} +import org.hyperledger.identus.test.container.DBTestUtils import zio.* import zio.ZIO.* import zio.http.Client diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/issue/controller/IssueControllerImplSpec.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/issue/controller/IssueControllerImplSpec.scala similarity index 88% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/issue/controller/IssueControllerImplSpec.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/issue/controller/IssueControllerImplSpec.scala index e4bc47825a..341ba9f99d 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/issue/controller/IssueControllerImplSpec.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/issue/controller/IssueControllerImplSpec.scala @@ -1,23 +1,23 @@ -package io.iohk.atala.issue.controller +package org.hyperledger.identus.issue.controller -import io.iohk.atala.agent.walletapi.model.{BaseEntity, ManagedDIDState, PublicationState} -import io.iohk.atala.agent.walletapi.service.{ManagedDIDService, MockManagedDIDService} -import io.iohk.atala.api.http.ErrorResponse -import io.iohk.atala.castor.core.model.did.{DIDData, DIDMetadata, PrismDIDOperation, VerificationRelationship} -import io.iohk.atala.castor.core.service.MockDIDService -import io.iohk.atala.connect.core.model.ConnectionRecord -import io.iohk.atala.connect.core.model.ConnectionRecord.ProtocolState -import io.iohk.atala.connect.core.service -import io.iohk.atala.connect.core.service.MockConnectionService -import io.iohk.atala.container.util.MigrationAspects.migrate -import io.iohk.atala.iam.authentication.AuthenticatorWithAuthZ -import io.iohk.atala.issue.controller.http.{AcceptCredentialOfferRequest, CreateIssueCredentialRecordRequest} -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.mercury.protocol.connection.ConnectionResponse -import io.iohk.atala.mercury.protocol.invitation.v2.Invitation -import io.iohk.atala.pollux.core.model.IssueCredentialRecord.{ProtocolState, Role} -import io.iohk.atala.pollux.core.model.{CredentialFormat, DidCommID, IssueCredentialRecord} -import io.iohk.atala.pollux.core.service.MockCredentialService +import org.hyperledger.identus.agent.walletapi.model.{BaseEntity, ManagedDIDState, PublicationState} +import org.hyperledger.identus.agent.walletapi.service.{ManagedDIDService, MockManagedDIDService} +import org.hyperledger.identus.api.http.ErrorResponse +import org.hyperledger.identus.castor.core.model.did.{DIDData, DIDMetadata, PrismDIDOperation, VerificationRelationship} +import org.hyperledger.identus.castor.core.service.MockDIDService +import org.hyperledger.identus.connect.core.model.ConnectionRecord +import org.hyperledger.identus.connect.core.model.ConnectionRecord.ProtocolState +import org.hyperledger.identus.connect.core.service +import org.hyperledger.identus.connect.core.service.MockConnectionService +import org.hyperledger.identus.container.util.MigrationAspects.migrate +import org.hyperledger.identus.iam.authentication.AuthenticatorWithAuthZ +import org.hyperledger.identus.issue.controller.http.{AcceptCredentialOfferRequest, CreateIssueCredentialRecordRequest} +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.mercury.protocol.connection.ConnectionResponse +import org.hyperledger.identus.mercury.protocol.invitation.v2.Invitation +import org.hyperledger.identus.pollux.core.model.IssueCredentialRecord.{ProtocolState, Role} +import org.hyperledger.identus.pollux.core.model.{CredentialFormat, DidCommID, IssueCredentialRecord} +import org.hyperledger.identus.pollux.core.service.MockCredentialService import sttp.client3.ziojson.* import sttp.client3.{DeserializationException, UriContext, basicRequest} import sttp.model.StatusCode diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/issue/controller/IssueControllerSpec.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/issue/controller/IssueControllerSpec.scala similarity index 94% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/issue/controller/IssueControllerSpec.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/issue/controller/IssueControllerSpec.scala index 2f9da9fc74..9dc27f430e 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/issue/controller/IssueControllerSpec.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/issue/controller/IssueControllerSpec.scala @@ -1,13 +1,13 @@ -package io.iohk.atala.issue.controller +package org.hyperledger.identus.issue.controller -import io.iohk.atala.api.http.ErrorResponse -import io.iohk.atala.pollux.core.model.DidCommID -import io.iohk.atala.pollux.core.model.error.CredentialServiceError -import io.iohk.atala.pollux.vc.jwt.W3cCredentialPayload +import org.hyperledger.identus.api.http.ErrorResponse +import org.hyperledger.identus.pollux.core.model.DidCommID +import org.hyperledger.identus.pollux.core.model.error.CredentialServiceError +import org.hyperledger.identus.pollux.vc.jwt.W3cCredentialPayload import zio.* import zio.test.* import zio.test.Assertion.* -import io.iohk.atala.pollux.vc.jwt.* +import org.hyperledger.identus.pollux.vc.jwt.* import io.circe.* import java.time.Instant diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/issue/controller/IssueControllerTestTools.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/issue/controller/IssueControllerTestTools.scala similarity index 77% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/issue/controller/IssueControllerTestTools.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/issue/controller/IssueControllerTestTools.scala index bbe016b0a1..0d454fcba8 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/issue/controller/IssueControllerTestTools.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/issue/controller/IssueControllerTestTools.scala @@ -1,20 +1,20 @@ -package io.iohk.atala.issue.controller +package org.hyperledger.identus.issue.controller import com.dimafeng.testcontainers.PostgreSQLContainer import com.typesafe.config.ConfigFactory -import io.iohk.atala.agent.server.config.AppConfig -import io.iohk.atala.agent.server.http.CustomServerInterceptors -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.agent.walletapi.service.ManagedDIDService -import io.iohk.atala.api.http.ErrorResponse -import io.iohk.atala.castor.core.service.DIDService -import io.iohk.atala.connect.core.service.ConnectionService -import io.iohk.atala.iam.authentication.{AuthenticatorWithAuthZ, DefaultEntityAuthenticator} -import io.iohk.atala.issue.controller.http.IssueCredentialRecordPage -import io.iohk.atala.pollux.core.model.IssueCredentialRecord -import io.iohk.atala.pollux.core.service.* -import io.iohk.atala.pollux.vc.jwt.* -import io.iohk.atala.sharedtest.containers.PostgresTestContainerSupport +import org.hyperledger.identus.agent.server.config.AppConfig +import org.hyperledger.identus.agent.server.http.CustomServerInterceptors +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.agent.walletapi.service.ManagedDIDService +import org.hyperledger.identus.api.http.ErrorResponse +import org.hyperledger.identus.castor.core.service.DIDService +import org.hyperledger.identus.connect.core.service.ConnectionService +import org.hyperledger.identus.iam.authentication.{AuthenticatorWithAuthZ, DefaultEntityAuthenticator} +import org.hyperledger.identus.issue.controller.http.IssueCredentialRecordPage +import org.hyperledger.identus.pollux.core.model.IssueCredentialRecord +import org.hyperledger.identus.pollux.core.service.* +import org.hyperledger.identus.pollux.vc.jwt.* +import org.hyperledger.identus.sharedtest.containers.PostgresTestContainerSupport import sttp.client3.testing.SttpBackendStub import sttp.client3.{DeserializationException, Response, UriContext} import sttp.monad.MonadError diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/credentialdefinition/CredentialDefinitionBasicSpec.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/credentialdefinition/CredentialDefinitionBasicSpec.scala similarity index 87% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/credentialdefinition/CredentialDefinitionBasicSpec.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/credentialdefinition/CredentialDefinitionBasicSpec.scala index ffabec1c77..f991a36b63 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/credentialdefinition/CredentialDefinitionBasicSpec.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/credentialdefinition/CredentialDefinitionBasicSpec.scala @@ -1,18 +1,21 @@ -package io.iohk.atala.pollux.credentialdefinition +package org.hyperledger.identus.pollux.credentialdefinition -import io.iohk.atala.agent.walletapi.model.{BaseEntity, Entity} -import io.iohk.atala.agent.walletapi.storage.GenericSecretStorage -import io.iohk.atala.api.http.ErrorResponse -import io.iohk.atala.container.util.MigrationAspects.* -import io.iohk.atala.iam.authentication.AuthenticatorWithAuthZ -import io.iohk.atala.pollux.core.model.secret.CredentialDefinitionSecret -import io.iohk.atala.pollux.core.service.serdes.{ +import org.hyperledger.identus.agent.walletapi.model.{BaseEntity, Entity} +import org.hyperledger.identus.agent.walletapi.storage.GenericSecretStorage +import org.hyperledger.identus.api.http.ErrorResponse +import org.hyperledger.identus.container.util.MigrationAspects.* +import org.hyperledger.identus.iam.authentication.AuthenticatorWithAuthZ +import org.hyperledger.identus.pollux.core.model.secret.CredentialDefinitionSecret +import org.hyperledger.identus.pollux.core.service.serdes.{ PrivateCredentialDefinitionSchemaSerDesV1, ProofKeyCredentialDefinitionSchemaSerDesV1, PublicCredentialDefinitionSerDesV1 } -import io.iohk.atala.pollux.credentialdefinition.controller.CredentialDefinitionController -import io.iohk.atala.pollux.credentialdefinition.http.{CredentialDefinitionInput, CredentialDefinitionResponse} +import org.hyperledger.identus.pollux.credentialdefinition.controller.CredentialDefinitionController +import org.hyperledger.identus.pollux.credentialdefinition.http.{ + CredentialDefinitionInput, + CredentialDefinitionResponse +} import sttp.client3.basicRequest import sttp.client3.ziojson.* import sttp.model.StatusCode diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/credentialdefinition/CredentialDefinitionFailureSpec.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/credentialdefinition/CredentialDefinitionFailureSpec.scala similarity index 76% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/credentialdefinition/CredentialDefinitionFailureSpec.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/credentialdefinition/CredentialDefinitionFailureSpec.scala index ba8202862f..ae94a94941 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/credentialdefinition/CredentialDefinitionFailureSpec.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/credentialdefinition/CredentialDefinitionFailureSpec.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.pollux.credentialdefinition +package org.hyperledger.identus.pollux.credentialdefinition -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.agent.walletapi.service.MockManagedDIDService -import io.iohk.atala.api.http.ErrorResponse -import io.iohk.atala.container.util.MigrationAspects.migrate -import io.iohk.atala.iam.authentication.AuthenticatorWithAuthZ -import io.iohk.atala.pollux.credentialdefinition.controller.CredentialDefinitionController +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.agent.walletapi.service.MockManagedDIDService +import org.hyperledger.identus.api.http.ErrorResponse +import org.hyperledger.identus.container.util.MigrationAspects.migrate +import org.hyperledger.identus.iam.authentication.AuthenticatorWithAuthZ +import org.hyperledger.identus.pollux.credentialdefinition.controller.CredentialDefinitionController import sttp.client3.ziojson.* import sttp.client3.{DeserializationException, basicRequest} import sttp.model.StatusCode diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/credentialdefinition/CredentialDefinitionLookupAndPaginationSpec.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/credentialdefinition/CredentialDefinitionLookupAndPaginationSpec.scala similarity index 89% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/credentialdefinition/CredentialDefinitionLookupAndPaginationSpec.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/credentialdefinition/CredentialDefinitionLookupAndPaginationSpec.scala index 525b7bfa70..84b142a0c8 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/credentialdefinition/CredentialDefinitionLookupAndPaginationSpec.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/credentialdefinition/CredentialDefinitionLookupAndPaginationSpec.scala @@ -1,11 +1,14 @@ -package io.iohk.atala.pollux.credentialdefinition +package org.hyperledger.identus.pollux.credentialdefinition -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.container.util.MigrationAspects.migrate -import io.iohk.atala.iam.authentication.AuthenticatorWithAuthZ -import io.iohk.atala.pollux.credentialdefinition.controller.CredentialDefinitionController -import io.iohk.atala.pollux.credentialdefinition.http.{CredentialDefinitionResponse, CredentialDefinitionResponsePage} -import io.iohk.atala.shared.models.{WalletAccessContext, WalletId} +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.container.util.MigrationAspects.migrate +import org.hyperledger.identus.iam.authentication.AuthenticatorWithAuthZ +import org.hyperledger.identus.pollux.credentialdefinition.controller.CredentialDefinitionController +import org.hyperledger.identus.pollux.credentialdefinition.http.{ + CredentialDefinitionResponse, + CredentialDefinitionResponsePage +} +import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} import sttp.client3.ziojson.* import sttp.client3.{DeserializationException, Response, UriContext, basicRequest} import sttp.model.{StatusCode, Uri} diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/credentialdefinition/CredentialDefinitionTestTools.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/credentialdefinition/CredentialDefinitionTestTools.scala similarity index 84% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/credentialdefinition/CredentialDefinitionTestTools.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/credentialdefinition/CredentialDefinitionTestTools.scala index d38a9d28d0..c39e35749c 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/credentialdefinition/CredentialDefinitionTestTools.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/credentialdefinition/CredentialDefinitionTestTools.scala @@ -1,34 +1,34 @@ -package io.iohk.atala.pollux.credentialdefinition +package org.hyperledger.identus.pollux.credentialdefinition import com.dimafeng.testcontainers.PostgreSQLContainer -import io.iohk.atala.agent.server.http.CustomServerInterceptors -import io.iohk.atala.agent.walletapi.memory.GenericSecretStorageInMemory -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.agent.walletapi.model.{ManagedDIDState, PublicationState} -import io.iohk.atala.agent.walletapi.service.{ManagedDIDService, MockManagedDIDService} -import io.iohk.atala.agent.walletapi.storage.GenericSecretStorage -import io.iohk.atala.api.http.ErrorResponse -import io.iohk.atala.castor.core.model.did.PrismDIDOperation -import io.iohk.atala.iam.authentication.AuthenticatorWithAuthZ -import io.iohk.atala.iam.authentication.DefaultEntityAuthenticator -import io.iohk.atala.pollux.core.repository.CredentialDefinitionRepository -import io.iohk.atala.pollux.core.service.{ +import org.hyperledger.identus.agent.server.http.CustomServerInterceptors +import org.hyperledger.identus.agent.walletapi.memory.GenericSecretStorageInMemory +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.agent.walletapi.model.{ManagedDIDState, PublicationState} +import org.hyperledger.identus.agent.walletapi.service.{ManagedDIDService, MockManagedDIDService} +import org.hyperledger.identus.agent.walletapi.storage.GenericSecretStorage +import org.hyperledger.identus.api.http.ErrorResponse +import org.hyperledger.identus.castor.core.model.did.PrismDIDOperation +import org.hyperledger.identus.iam.authentication.AuthenticatorWithAuthZ +import org.hyperledger.identus.iam.authentication.DefaultEntityAuthenticator +import org.hyperledger.identus.pollux.core.repository.CredentialDefinitionRepository +import org.hyperledger.identus.pollux.core.service.{ CredentialDefinitionService, CredentialDefinitionServiceImpl, ResourceURIDereferencerImpl } -import io.iohk.atala.pollux.credentialdefinition.controller.{ +import org.hyperledger.identus.pollux.credentialdefinition.controller.{ CredentialDefinitionController, CredentialDefinitionControllerImpl } -import io.iohk.atala.pollux.credentialdefinition.http.{ +import org.hyperledger.identus.pollux.credentialdefinition.http.{ CredentialDefinitionInput, CredentialDefinitionResponse, CredentialDefinitionResponsePage } -import io.iohk.atala.pollux.sql.repository.JdbcCredentialDefinitionRepository -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.sharedtest.containers.PostgresTestContainerSupport +import org.hyperledger.identus.pollux.sql.repository.JdbcCredentialDefinitionRepository +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.sharedtest.containers.PostgresTestContainerSupport import sttp.client3.testing.SttpBackendStub import sttp.client3.ziojson.* import sttp.client3.{DeserializationException, Response, UriContext, basicRequest} diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/schema/CredentialSchemaAnoncredSpec.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/schema/CredentialSchemaAnoncredSpec.scala similarity index 85% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/schema/CredentialSchemaAnoncredSpec.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/schema/CredentialSchemaAnoncredSpec.scala index 87fd6726cb..58aaaacfd9 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/schema/CredentialSchemaAnoncredSpec.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/schema/CredentialSchemaAnoncredSpec.scala @@ -1,14 +1,14 @@ -package io.iohk.atala.pollux.schema - -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.api.http.ErrorResponse -import io.iohk.atala.container.util.MigrationAspects.* -import io.iohk.atala.iam.authentication.AuthenticatorWithAuthZ -import io.iohk.atala.pollux.core.model.schema.`type`.anoncred.AnoncredSchemaSerDesV1 -import io.iohk.atala.pollux.core.model.schema.`type`.{AnoncredSchemaType, CredentialJsonSchemaType} -import io.iohk.atala.pollux.credentialschema.* -import io.iohk.atala.pollux.credentialschema.controller.CredentialSchemaController -import io.iohk.atala.pollux.credentialschema.http.{CredentialSchemaInput, CredentialSchemaResponse} +package org.hyperledger.identus.pollux.schema + +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.api.http.ErrorResponse +import org.hyperledger.identus.container.util.MigrationAspects.* +import org.hyperledger.identus.iam.authentication.AuthenticatorWithAuthZ +import org.hyperledger.identus.pollux.core.model.schema.`type`.anoncred.AnoncredSchemaSerDesV1 +import org.hyperledger.identus.pollux.core.model.schema.`type`.{AnoncredSchemaType, CredentialJsonSchemaType} +import org.hyperledger.identus.pollux.credentialschema.* +import org.hyperledger.identus.pollux.credentialschema.controller.CredentialSchemaController +import org.hyperledger.identus.pollux.credentialschema.http.{CredentialSchemaInput, CredentialSchemaResponse} import sttp.client3.basicRequest import sttp.client3.ziojson.{asJsonAlways, *} import sttp.model.StatusCode diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/schema/CredentialSchemaBasicSpec.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/schema/CredentialSchemaBasicSpec.scala similarity index 85% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/schema/CredentialSchemaBasicSpec.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/schema/CredentialSchemaBasicSpec.scala index b2e7822f11..d5dd2bc21f 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/schema/CredentialSchemaBasicSpec.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/schema/CredentialSchemaBasicSpec.scala @@ -1,15 +1,15 @@ -package io.iohk.atala.pollux.schema +package org.hyperledger.identus.pollux.schema import com.dimafeng.testcontainers.PostgreSQLContainer -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.agent.walletapi.service.ManagedDIDService -import io.iohk.atala.api.http.ErrorResponse -import io.iohk.atala.container.util.MigrationAspects.* -import io.iohk.atala.iam.authentication.AuthenticatorWithAuthZ -import io.iohk.atala.pollux.core.model.schema.`type`.CredentialJsonSchemaType -import io.iohk.atala.pollux.credentialschema.* -import io.iohk.atala.pollux.credentialschema.controller.CredentialSchemaController -import io.iohk.atala.pollux.credentialschema.http.{CredentialSchemaInput, CredentialSchemaResponse} +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.agent.walletapi.service.ManagedDIDService +import org.hyperledger.identus.api.http.ErrorResponse +import org.hyperledger.identus.container.util.MigrationAspects.* +import org.hyperledger.identus.iam.authentication.AuthenticatorWithAuthZ +import org.hyperledger.identus.pollux.core.model.schema.`type`.CredentialJsonSchemaType +import org.hyperledger.identus.pollux.credentialschema.* +import org.hyperledger.identus.pollux.credentialschema.controller.CredentialSchemaController +import org.hyperledger.identus.pollux.credentialschema.http.{CredentialSchemaInput, CredentialSchemaResponse} import sttp.client3.basicRequest import sttp.client3.ziojson.* import sttp.model.StatusCode diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/schema/CredentialSchemaFailureSpec.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/schema/CredentialSchemaFailureSpec.scala similarity index 72% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/schema/CredentialSchemaFailureSpec.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/schema/CredentialSchemaFailureSpec.scala index 49312e9591..c2cfd861bc 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/schema/CredentialSchemaFailureSpec.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/schema/CredentialSchemaFailureSpec.scala @@ -1,13 +1,13 @@ -package io.iohk.atala.pollux.schema +package org.hyperledger.identus.pollux.schema import com.dimafeng.testcontainers.PostgreSQLContainer -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.agent.walletapi.service.MockManagedDIDService -import io.iohk.atala.api.http.ErrorResponse -import io.iohk.atala.container.util.MigrationAspects.migrate -import io.iohk.atala.iam.authentication.AuthenticatorWithAuthZ -import io.iohk.atala.pollux.credentialschema.* -import io.iohk.atala.pollux.credentialschema.controller.CredentialSchemaController +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.agent.walletapi.service.MockManagedDIDService +import org.hyperledger.identus.api.http.ErrorResponse +import org.hyperledger.identus.container.util.MigrationAspects.migrate +import org.hyperledger.identus.iam.authentication.AuthenticatorWithAuthZ +import org.hyperledger.identus.pollux.credentialschema.* +import org.hyperledger.identus.pollux.credentialschema.controller.CredentialSchemaController import sttp.client3.DeserializationException import sttp.client3.basicRequest import sttp.client3.ziojson.* diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/schema/CredentialSchemaLookupAndPaginationSpec.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/schema/CredentialSchemaLookupAndPaginationSpec.scala similarity index 89% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/schema/CredentialSchemaLookupAndPaginationSpec.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/schema/CredentialSchemaLookupAndPaginationSpec.scala index 160bc75633..f8e3a192a4 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/schema/CredentialSchemaLookupAndPaginationSpec.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/schema/CredentialSchemaLookupAndPaginationSpec.scala @@ -1,17 +1,17 @@ -package io.iohk.atala.pollux.schema +package org.hyperledger.identus.pollux.schema import com.dimafeng.testcontainers.PostgreSQLContainer -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.container.util.MigrationAspects.migrate -import io.iohk.atala.iam.authentication.AuthenticatorWithAuthZ -import io.iohk.atala.pollux.credentialschema.* -import io.iohk.atala.pollux.credentialschema.controller.CredentialSchemaController -import io.iohk.atala.pollux.credentialschema.http.{ +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.container.util.MigrationAspects.migrate +import org.hyperledger.identus.iam.authentication.AuthenticatorWithAuthZ +import org.hyperledger.identus.pollux.credentialschema.* +import org.hyperledger.identus.pollux.credentialschema.controller.CredentialSchemaController +import org.hyperledger.identus.pollux.credentialschema.http.{ CredentialSchemaInput, CredentialSchemaResponse, CredentialSchemaResponsePage } -import io.iohk.atala.shared.models.{WalletAccessContext, WalletId} +import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} import sttp.client3.ziojson.* import sttp.client3.{DeserializationException, Response, UriContext, basicRequest} import sttp.model.{StatusCode, Uri} diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/schema/CredentialSchemaMultiTenancySpec.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/schema/CredentialSchemaMultiTenancySpec.scala similarity index 89% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/schema/CredentialSchemaMultiTenancySpec.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/schema/CredentialSchemaMultiTenancySpec.scala index 706784b68c..bead3f57b0 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/schema/CredentialSchemaMultiTenancySpec.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/schema/CredentialSchemaMultiTenancySpec.scala @@ -1,12 +1,12 @@ -package io.iohk.atala.pollux.schema +package org.hyperledger.identus.pollux.schema import com.dimafeng.testcontainers.PostgreSQLContainer -import io.iohk.atala.agent.walletapi.model.Entity -import io.iohk.atala.container.util.MigrationAspects.* -import io.iohk.atala.pollux.core.model.schema.CredentialSchema -import io.iohk.atala.pollux.core.model.schema.`type`.CredentialJsonSchemaType -import io.iohk.atala.pollux.core.service.{CredentialSchemaService, CredentialSchemaServiceImpl} -import io.iohk.atala.pollux.sql.repository.JdbcCredentialSchemaRepository +import org.hyperledger.identus.agent.walletapi.model.Entity +import org.hyperledger.identus.container.util.MigrationAspects.* +import org.hyperledger.identus.pollux.core.model.schema.CredentialSchema +import org.hyperledger.identus.pollux.core.model.schema.`type`.CredentialJsonSchemaType +import org.hyperledger.identus.pollux.core.service.{CredentialSchemaService, CredentialSchemaServiceImpl} +import org.hyperledger.identus.pollux.sql.repository.JdbcCredentialSchemaRepository import zio.* import zio.ZIO.* import zio.json.* diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/schema/CredentialSchemaTestTools.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/schema/CredentialSchemaTestTools.scala similarity index 81% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/schema/CredentialSchemaTestTools.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/schema/CredentialSchemaTestTools.scala index 498e198d39..9236536421 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/pollux/schema/CredentialSchemaTestTools.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/schema/CredentialSchemaTestTools.scala @@ -1,27 +1,30 @@ -package io.iohk.atala.pollux.schema +package org.hyperledger.identus.pollux.schema import com.dimafeng.testcontainers.PostgreSQLContainer -import io.iohk.atala.agent.server.http.CustomServerInterceptors -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.agent.walletapi.model.{ManagedDIDState, PublicationState} -import io.iohk.atala.agent.walletapi.service.{ManagedDIDService, MockManagedDIDService} -import io.iohk.atala.api.http.ErrorResponse -import io.iohk.atala.castor.core.model.did.PrismDIDOperation -import io.iohk.atala.iam.authentication.AuthenticatorWithAuthZ -import io.iohk.atala.iam.authentication.DefaultEntityAuthenticator -import io.iohk.atala.pollux.core.model.schema.`type`.CredentialJsonSchemaType -import io.iohk.atala.pollux.core.repository.CredentialSchemaRepository -import io.iohk.atala.pollux.core.service.{CredentialSchemaService, CredentialSchemaServiceImpl} -import io.iohk.atala.pollux.credentialschema.SchemaRegistryServerEndpoints -import io.iohk.atala.pollux.credentialschema.controller.{CredentialSchemaController, CredentialSchemaControllerImpl} -import io.iohk.atala.pollux.credentialschema.http.{ +import org.hyperledger.identus.agent.server.http.CustomServerInterceptors +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.agent.walletapi.model.{ManagedDIDState, PublicationState} +import org.hyperledger.identus.agent.walletapi.service.{ManagedDIDService, MockManagedDIDService} +import org.hyperledger.identus.api.http.ErrorResponse +import org.hyperledger.identus.castor.core.model.did.PrismDIDOperation +import org.hyperledger.identus.iam.authentication.AuthenticatorWithAuthZ +import org.hyperledger.identus.iam.authentication.DefaultEntityAuthenticator +import org.hyperledger.identus.pollux.core.model.schema.`type`.CredentialJsonSchemaType +import org.hyperledger.identus.pollux.core.repository.CredentialSchemaRepository +import org.hyperledger.identus.pollux.core.service.{CredentialSchemaService, CredentialSchemaServiceImpl} +import org.hyperledger.identus.pollux.credentialschema.SchemaRegistryServerEndpoints +import org.hyperledger.identus.pollux.credentialschema.controller.{ + CredentialSchemaController, + CredentialSchemaControllerImpl +} +import org.hyperledger.identus.pollux.credentialschema.http.{ CredentialSchemaInput, CredentialSchemaResponse, CredentialSchemaResponsePage } -import io.iohk.atala.pollux.sql.repository.JdbcCredentialSchemaRepository -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.sharedtest.containers.PostgresTestContainerSupport +import org.hyperledger.identus.pollux.sql.repository.JdbcCredentialSchemaRepository +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.sharedtest.containers.PostgresTestContainerSupport import sttp.client3.testing.SttpBackendStub import sttp.client3.ziojson.* import sttp.client3.{DeserializationException, Response, UriContext, basicRequest} diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/system/controller/SystemControllerImplSpec.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/system/controller/SystemControllerImplSpec.scala similarity index 94% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/system/controller/SystemControllerImplSpec.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/system/controller/SystemControllerImplSpec.scala index 363386c81a..d1b45f9968 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/system/controller/SystemControllerImplSpec.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/system/controller/SystemControllerImplSpec.scala @@ -1,12 +1,12 @@ -package io.iohk.atala.system.controller +package org.hyperledger.identus.system.controller -import io.iohk.atala.system.controller.http.HealthInfo +import org.hyperledger.identus.system.controller.http.HealthInfo import sttp.client3.ziojson.* import sttp.client3.{DeserializationException, UriContext, asString, basicRequest} import sttp.model.StatusCode import zio.test.* import zio.test.Assertion.* -import io.iohk.atala.agent.server.buildinfo.BuildInfo +import org.hyperledger.identus.agent.server.buildinfo.BuildInfo import zio.* object SystemControllerImplSpec extends ZIOSpecDefault with SystemControllerTestTools { diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/system/controller/SystemControllerTestTools.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/system/controller/SystemControllerTestTools.scala similarity index 86% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/system/controller/SystemControllerTestTools.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/system/controller/SystemControllerTestTools.scala index 930007b7bf..325accbf56 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/system/controller/SystemControllerTestTools.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/system/controller/SystemControllerTestTools.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.system.controller +package org.hyperledger.identus.system.controller import sttp.client3.testing.SttpBackendStub import sttp.client3.{DeserializationException, Response, UriContext} @@ -8,10 +8,10 @@ import sttp.tapir.ztapir.RIOMonadError import zio.metrics.connectors.micrometer import zio.* import zio.metrics.jvm.DefaultJvmMetrics -import io.iohk.atala.system.controller.http.HealthInfo -import io.iohk.atala.agent.server.SystemModule.configLayer -import io.iohk.atala.agent.server.config.AppConfig -import io.iohk.atala.agent.server.http.CustomServerInterceptors +import org.hyperledger.identus.system.controller.http.HealthInfo +import org.hyperledger.identus.agent.server.SystemModule.configLayer +import org.hyperledger.identus.agent.server.config.AppConfig +import org.hyperledger.identus.agent.server.http.CustomServerInterceptors import sttp.monad.MonadError import zio.metrics.connectors.micrometer.MicrometerConfig import zio.test.ZIOSpecDefault diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/verification/controller/VcVerificationControllerImplSpec.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/verification/controller/VcVerificationControllerImplSpec.scala similarity index 90% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/verification/controller/VcVerificationControllerImplSpec.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/verification/controller/VcVerificationControllerImplSpec.scala index 4e67ad59bf..1efbe9e153 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/verification/controller/VcVerificationControllerImplSpec.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/verification/controller/VcVerificationControllerImplSpec.scala @@ -1,14 +1,14 @@ -package io.iohk.atala.verification.controller +package org.hyperledger.identus.verification.controller import io.circe.* import io.circe.syntax.* -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.agent.walletapi.service.{ManagedDIDService, MockManagedDIDService} -import io.iohk.atala.castor.core.service.MockDIDService -import io.iohk.atala.iam.authentication.AuthenticatorWithAuthZ -import io.iohk.atala.pollux.vc.jwt.* -import io.iohk.atala.pollux.vc.jwt.CredentialPayload.Implicits.* -import io.iohk.atala.verification.controller.http.* +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.agent.walletapi.service.{ManagedDIDService, MockManagedDIDService} +import org.hyperledger.identus.castor.core.service.MockDIDService +import org.hyperledger.identus.iam.authentication.AuthenticatorWithAuthZ +import org.hyperledger.identus.pollux.vc.jwt.* +import org.hyperledger.identus.pollux.vc.jwt.CredentialPayload.Implicits.* +import org.hyperledger.identus.verification.controller.http.* import sttp.client3.ziojson.* import sttp.client3.{DeserializationException, Response, UriContext, basicRequest} import sttp.model.StatusCode diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/verification/controller/VcVerificationControllerTestTools.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/verification/controller/VcVerificationControllerTestTools.scala similarity index 71% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/verification/controller/VcVerificationControllerTestTools.scala rename to cloud-agent/service/server/src/test/scala/org/hyperledger/identus/verification/controller/VcVerificationControllerTestTools.scala index 30bce18ce2..666e3de51a 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/verification/controller/VcVerificationControllerTestTools.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/verification/controller/VcVerificationControllerTestTools.scala @@ -1,17 +1,17 @@ -package io.iohk.atala.verification.controller +package org.hyperledger.identus.verification.controller -import io.iohk.atala.agent.server.http.CustomServerInterceptors -import io.iohk.atala.agent.walletapi.model.BaseEntity -import io.iohk.atala.agent.walletapi.service.ManagedDIDService -import io.iohk.atala.castor.core.model.did.VerificationRelationship -import io.iohk.atala.castor.core.service.MockDIDService -import io.iohk.atala.iam.authentication.{AuthenticatorWithAuthZ, DefaultEntityAuthenticator} -import io.iohk.atala.pollux.core.service.* -import io.iohk.atala.pollux.core.service.verification.{VcVerificationService, VcVerificationServiceImpl} -import io.iohk.atala.pollux.vc.jwt.* -import io.iohk.atala.shared.models.WalletId.* -import io.iohk.atala.shared.models.{WalletAccessContext, WalletId} -import io.iohk.atala.sharedtest.containers.PostgresTestContainerSupport +import org.hyperledger.identus.agent.server.http.CustomServerInterceptors +import org.hyperledger.identus.agent.walletapi.model.BaseEntity +import org.hyperledger.identus.agent.walletapi.service.ManagedDIDService +import org.hyperledger.identus.castor.core.model.did.VerificationRelationship +import org.hyperledger.identus.castor.core.service.MockDIDService +import org.hyperledger.identus.iam.authentication.{AuthenticatorWithAuthZ, DefaultEntityAuthenticator} +import org.hyperledger.identus.pollux.core.service.* +import org.hyperledger.identus.pollux.core.service.verification.{VcVerificationService, VcVerificationServiceImpl} +import org.hyperledger.identus.pollux.vc.jwt.* +import org.hyperledger.identus.shared.models.WalletId.* +import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} +import org.hyperledger.identus.sharedtest.containers.PostgresTestContainerSupport import sttp.client3.UriContext import sttp.client3.testing.SttpBackendStub import sttp.monad.MonadError @@ -29,7 +29,7 @@ trait VcVerificationControllerTestTools extends PostgresTestContainerSupport { protected val issuer = Issuer( - did = io.iohk.atala.pollux.vc.jwt.DID(issuerDidData.id.did.toString), + did = org.hyperledger.identus.pollux.vc.jwt.DID(issuerDidData.id.did.toString), signer = ES256KSigner(issuerKp.privateKey.toJavaPrivateKey), publicKey = issuerKp.publicKey.toJavaPublicKey ) diff --git a/prism-agent/service/wallet-api/src/main/resources/sql/agent/V10__create_peer_did_table.sql b/cloud-agent/service/wallet-api/src/main/resources/sql/agent/V10__create_peer_did_table.sql similarity index 100% rename from prism-agent/service/wallet-api/src/main/resources/sql/agent/V10__create_peer_did_table.sql rename to cloud-agent/service/wallet-api/src/main/resources/sql/agent/V10__create_peer_did_table.sql diff --git a/prism-agent/service/wallet-api/src/main/resources/sql/agent/V11__wallet_seed_digest.sql b/cloud-agent/service/wallet-api/src/main/resources/sql/agent/V11__wallet_seed_digest.sql similarity index 100% rename from prism-agent/service/wallet-api/src/main/resources/sql/agent/V11__wallet_seed_digest.sql rename to cloud-agent/service/wallet-api/src/main/resources/sql/agent/V11__wallet_seed_digest.sql diff --git a/prism-agent/service/wallet-api/src/main/resources/sql/agent/V12__generic_secret.sql b/cloud-agent/service/wallet-api/src/main/resources/sql/agent/V12__generic_secret.sql similarity index 100% rename from prism-agent/service/wallet-api/src/main/resources/sql/agent/V12__generic_secret.sql rename to cloud-agent/service/wallet-api/src/main/resources/sql/agent/V12__generic_secret.sql diff --git a/prism-agent/service/wallet-api/src/main/resources/sql/agent/V13__apikey_authentication_improvements.sql b/cloud-agent/service/wallet-api/src/main/resources/sql/agent/V13__apikey_authentication_improvements.sql similarity index 100% rename from prism-agent/service/wallet-api/src/main/resources/sql/agent/V13__apikey_authentication_improvements.sql rename to cloud-agent/service/wallet-api/src/main/resources/sql/agent/V13__apikey_authentication_improvements.sql diff --git a/prism-agent/service/wallet-api/src/main/resources/sql/agent/V14__multiple_did_key_types.sql b/cloud-agent/service/wallet-api/src/main/resources/sql/agent/V14__multiple_did_key_types.sql similarity index 100% rename from prism-agent/service/wallet-api/src/main/resources/sql/agent/V14__multiple_did_key_types.sql rename to cloud-agent/service/wallet-api/src/main/resources/sql/agent/V14__multiple_did_key_types.sql diff --git a/prism-agent/service/wallet-api/src/main/resources/sql/agent/V1__init_tables.sql b/cloud-agent/service/wallet-api/src/main/resources/sql/agent/V1__init_tables.sql similarity index 100% rename from prism-agent/service/wallet-api/src/main/resources/sql/agent/V1__init_tables.sql rename to cloud-agent/service/wallet-api/src/main/resources/sql/agent/V1__init_tables.sql diff --git a/prism-agent/service/wallet-api/src/main/resources/sql/agent/V2__did_nonsecret_storage.sql b/cloud-agent/service/wallet-api/src/main/resources/sql/agent/V2__did_nonsecret_storage.sql similarity index 100% rename from prism-agent/service/wallet-api/src/main/resources/sql/agent/V2__did_nonsecret_storage.sql rename to cloud-agent/service/wallet-api/src/main/resources/sql/agent/V2__did_nonsecret_storage.sql diff --git a/prism-agent/service/wallet-api/src/main/resources/sql/agent/V3__did_update_state.sql b/cloud-agent/service/wallet-api/src/main/resources/sql/agent/V3__did_update_state.sql similarity index 100% rename from prism-agent/service/wallet-api/src/main/resources/sql/agent/V3__did_update_state.sql rename to cloud-agent/service/wallet-api/src/main/resources/sql/agent/V3__did_update_state.sql diff --git a/prism-agent/service/wallet-api/src/main/resources/sql/agent/V4__did_hd_key.sql b/cloud-agent/service/wallet-api/src/main/resources/sql/agent/V4__did_hd_key.sql similarity index 100% rename from prism-agent/service/wallet-api/src/main/resources/sql/agent/V4__did_hd_key.sql rename to cloud-agent/service/wallet-api/src/main/resources/sql/agent/V4__did_hd_key.sql diff --git a/prism-agent/service/wallet-api/src/main/resources/sql/agent/V5__remove_did_rand_key.sql b/cloud-agent/service/wallet-api/src/main/resources/sql/agent/V5__remove_did_rand_key.sql similarity index 100% rename from prism-agent/service/wallet-api/src/main/resources/sql/agent/V5__remove_did_rand_key.sql rename to cloud-agent/service/wallet-api/src/main/resources/sql/agent/V5__remove_did_rand_key.sql diff --git a/prism-agent/service/wallet-api/src/main/resources/sql/agent/V6__add_schema_id_to_secret_table.sql b/cloud-agent/service/wallet-api/src/main/resources/sql/agent/V6__add_schema_id_to_secret_table.sql similarity index 100% rename from prism-agent/service/wallet-api/src/main/resources/sql/agent/V6__add_schema_id_to_secret_table.sql rename to cloud-agent/service/wallet-api/src/main/resources/sql/agent/V6__add_schema_id_to_secret_table.sql diff --git a/prism-agent/service/wallet-api/src/main/resources/sql/agent/V7__mutitenant_wallet.sql b/cloud-agent/service/wallet-api/src/main/resources/sql/agent/V7__mutitenant_wallet.sql similarity index 100% rename from prism-agent/service/wallet-api/src/main/resources/sql/agent/V7__mutitenant_wallet.sql rename to cloud-agent/service/wallet-api/src/main/resources/sql/agent/V7__mutitenant_wallet.sql diff --git a/prism-agent/service/wallet-api/src/main/resources/sql/agent/V8__init_entity_repository_tables.sql b/cloud-agent/service/wallet-api/src/main/resources/sql/agent/V8__init_entity_repository_tables.sql similarity index 100% rename from prism-agent/service/wallet-api/src/main/resources/sql/agent/V8__init_entity_repository_tables.sql rename to cloud-agent/service/wallet-api/src/main/resources/sql/agent/V8__init_entity_repository_tables.sql diff --git a/prism-agent/service/wallet-api/src/main/resources/sql/agent/V9__init_authentication_repository_tables.sql b/cloud-agent/service/wallet-api/src/main/resources/sql/agent/V9__init_authentication_repository_tables.sql similarity index 100% rename from prism-agent/service/wallet-api/src/main/resources/sql/agent/V9__init_authentication_repository_tables.sql rename to cloud-agent/service/wallet-api/src/main/resources/sql/agent/V9__init_authentication_repository_tables.sql diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/memory/GenericSecretStorageInMemory.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/memory/GenericSecretStorageInMemory.scala similarity index 84% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/memory/GenericSecretStorageInMemory.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/memory/GenericSecretStorageInMemory.scala index 954c02af25..75d6d93660 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/memory/GenericSecretStorageInMemory.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/memory/GenericSecretStorageInMemory.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.agent.walletapi.memory +package org.hyperledger.identus.agent.walletapi.memory -import io.iohk.atala.agent.walletapi.storage.GenericSecret -import io.iohk.atala.agent.walletapi.storage.GenericSecretStorage -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.agent.walletapi.storage.GenericSecret +import org.hyperledger.identus.agent.walletapi.storage.GenericSecretStorage +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletId import zio.* import zio.json.ast.Json diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/memory/WalletSecretStorageInMemory.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/memory/WalletSecretStorageInMemory.scala similarity index 71% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/memory/WalletSecretStorageInMemory.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/memory/WalletSecretStorageInMemory.scala index aae6a1aa44..a2eef53a13 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/memory/WalletSecretStorageInMemory.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/memory/WalletSecretStorageInMemory.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.agent.walletapi.memory +package org.hyperledger.identus.agent.walletapi.memory -import io.iohk.atala.agent.walletapi.model.WalletSeed -import io.iohk.atala.agent.walletapi.storage.WalletSecretStorage -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.agent.walletapi.model.WalletSeed +import org.hyperledger.identus.agent.walletapi.storage.WalletSecretStorage +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletId import zio.* class WalletSecretStorageInMemory(storeRef: Ref[Map[WalletId, WalletSeed]]) extends WalletSecretStorage { diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/Entity.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/Entity.scala similarity index 93% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/Entity.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/Entity.scala index 8dd665f084..182ef7afc1 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/Entity.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/Entity.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.agent.walletapi.model +package org.hyperledger.identus.agent.walletapi.model -import io.iohk.atala.shared.models.{WalletAccessContext, WalletId} +import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} import zio.* import java.time.Instant diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/KeyManagement.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/KeyManagement.scala similarity index 93% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/KeyManagement.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/KeyManagement.scala index 95c7b6105c..baa03202cb 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/KeyManagement.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/KeyManagement.scala @@ -1,12 +1,12 @@ -package io.iohk.atala.agent.walletapi.model +package org.hyperledger.identus.agent.walletapi.model -import io.iohk.atala.castor.core.model.did.EllipticCurve -import io.iohk.atala.castor.core.model.did.InternalKeyPurpose -import io.iohk.atala.castor.core.model.did.VerificationRelationship +import org.hyperledger.identus.castor.core.model.did.EllipticCurve +import org.hyperledger.identus.castor.core.model.did.InternalKeyPurpose +import org.hyperledger.identus.castor.core.model.did.VerificationRelationship import io.iohk.atala.prism.crypto.Sha256 -import io.iohk.atala.shared.crypto.DerivationPath -import io.iohk.atala.shared.crypto.Ed25519KeyPair -import io.iohk.atala.shared.crypto.X25519KeyPair +import org.hyperledger.identus.shared.crypto.DerivationPath +import org.hyperledger.identus.shared.crypto.Ed25519KeyPair +import org.hyperledger.identus.shared.crypto.X25519KeyPair import scala.collection.immutable.ArraySeq import scala.language.implicitConversions diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/ManagedDID.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/ManagedDID.scala similarity index 84% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/ManagedDID.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/ManagedDID.scala index 582a6d599e..b95f43cb9b 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/ManagedDID.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/ManagedDID.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.agent.walletapi.model +package org.hyperledger.identus.agent.walletapi.model -import io.iohk.atala.castor.core.model.did.{CanonicalPrismDID, PrismDIDOperation, ScheduledDIDOperationStatus} +import org.hyperledger.identus.castor.core.model.did.{CanonicalPrismDID, PrismDIDOperation, ScheduledDIDOperationStatus} import java.time.Instant import scala.collection.immutable.ArraySeq diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/ManagedDIDTemplate.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/ManagedDIDTemplate.scala similarity index 90% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/ManagedDIDTemplate.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/ManagedDIDTemplate.scala index a17d47da65..08903f209e 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/ManagedDIDTemplate.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/ManagedDIDTemplate.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.agent.walletapi.model +package org.hyperledger.identus.agent.walletapi.model -import io.iohk.atala.castor.core.model.did.{ +import org.hyperledger.identus.castor.core.model.did.{ EllipticCurve, Service, ServiceEndpoint, diff --git a/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/PeerDIDRecord.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/PeerDIDRecord.scala new file mode 100644 index 0000000000..f9bd9e36d9 --- /dev/null +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/PeerDIDRecord.scala @@ -0,0 +1,8 @@ +package org.hyperledger.identus.agent.walletapi.model + +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.shared.models.WalletId + +import java.time.Instant + +case class PeerDIDRecord(did: DidId, createdAt: Instant, walletId: WalletId) diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/Wallet.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/Wallet.scala similarity index 87% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/Wallet.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/Wallet.scala index 6e22772f13..8cbb164065 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/Wallet.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/Wallet.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.agent.walletapi.model +package org.hyperledger.identus.agent.walletapi.model -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.shared.models.WalletId import java.time.Instant import java.time.temporal.ChronoUnit diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/error/CreateManagedDIDError.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/error/CreateManagedDIDError.scala similarity index 63% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/error/CreateManagedDIDError.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/error/CreateManagedDIDError.scala index c2390f97ea..9dcb20cd4b 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/error/CreateManagedDIDError.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/error/CreateManagedDIDError.scala @@ -1,6 +1,7 @@ -package io.iohk.atala.agent.walletapi.model.error +package org.hyperledger.identus.agent.walletapi.model.error -import io.iohk.atala.castor.core.model.error as castor +import org.hyperledger.identus.castor.core.model.error as castor +import org.hyperledger.identus.castor.core.model.error.OperationValidationError sealed trait CreateManagedDIDError extends Throwable diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/error/DIDSecretStorageError.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/error/DIDSecretStorageError.scala similarity index 69% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/error/DIDSecretStorageError.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/error/DIDSecretStorageError.scala index 5f062bbb10..779d8fbde0 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/error/DIDSecretStorageError.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/error/DIDSecretStorageError.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.agent.walletapi.model.error +package org.hyperledger.identus.agent.walletapi.model.error -import io.iohk.atala.mercury.model.DidId +import org.hyperledger.identus.mercury.model.DidId sealed trait DIDSecretStorageError extends Throwable diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/error/EntityServiceError.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/error/EntityServiceError.scala similarity index 90% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/error/EntityServiceError.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/error/EntityServiceError.scala index eb047bc49d..e2fef2dd9f 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/error/EntityServiceError.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/error/EntityServiceError.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.agent.walletapi.model.error +package org.hyperledger.identus.agent.walletapi.model.error import java.util.UUID diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/error/GetKeyError.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/error/GetKeyError.scala similarity index 77% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/error/GetKeyError.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/error/GetKeyError.scala index 486f845923..b7c4439f04 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/error/GetKeyError.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/error/GetKeyError.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.agent.walletapi.model.error +package org.hyperledger.identus.agent.walletapi.model.error sealed trait GetKeyError diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/error/GetManagedDIDError.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/error/GetManagedDIDError.scala similarity index 63% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/error/GetManagedDIDError.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/error/GetManagedDIDError.scala index a714d7bd16..effa4ef0c6 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/error/GetManagedDIDError.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/error/GetManagedDIDError.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.agent.walletapi.model.error +package org.hyperledger.identus.agent.walletapi.model.error -import io.iohk.atala.castor.core.model.error.DIDOperationError +import org.hyperledger.identus.castor.core.model.error.DIDOperationError sealed trait GetManagedDIDError diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/error/PublishManagedDIDError.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/error/PublishManagedDIDError.scala similarity index 67% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/error/PublishManagedDIDError.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/error/PublishManagedDIDError.scala index c171ac5787..dde6740066 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/error/PublishManagedDIDError.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/error/PublishManagedDIDError.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.agent.walletapi.model.error +package org.hyperledger.identus.agent.walletapi.model.error -import io.iohk.atala.castor.core.model.did.PrismDID -import io.iohk.atala.castor.core.model.error.DIDOperationError +import org.hyperledger.identus.castor.core.model.did.PrismDID +import org.hyperledger.identus.castor.core.model.error.DIDOperationError sealed trait PublishManagedDIDError diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/error/UpdateManagedDIDError.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/error/UpdateManagedDIDError.scala similarity index 77% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/error/UpdateManagedDIDError.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/error/UpdateManagedDIDError.scala index ba317f40db..59975df2d1 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/error/UpdateManagedDIDError.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/error/UpdateManagedDIDError.scala @@ -1,7 +1,8 @@ -package io.iohk.atala.agent.walletapi.model.error +package org.hyperledger.identus.agent.walletapi.model.error -import io.iohk.atala.castor.core.model.did.CanonicalPrismDID -import io.iohk.atala.castor.core.model.error as castor +import org.hyperledger.identus.castor.core.model.did.CanonicalPrismDID +import org.hyperledger.identus.castor.core.model.error as castor +import org.hyperledger.identus.castor.core.model.error.{OperationValidationError, DIDOperationError, DIDResolutionError} sealed trait UpdateManagedDIDError diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/error/package.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/error/package.scala similarity index 89% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/error/package.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/error/package.scala index d6cb574b43..dc6869139e 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/error/package.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/model/error/package.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.agent.walletapi.model +package org.hyperledger.identus.agent.walletapi.model -import io.iohk.atala.castor.core.model.error.DIDOperationError +import org.hyperledger.identus.castor.core.model.error.DIDOperationError package object error { final case class CommonWalletStorageError(cause: Throwable) diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/EntityService.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/EntityService.scala similarity index 72% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/EntityService.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/EntityService.scala index 8b3df2fdc1..1899072ff1 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/EntityService.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/EntityService.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.agent.walletapi.service +package org.hyperledger.identus.agent.walletapi.service -import io.iohk.atala.agent.walletapi.model.Entity -import io.iohk.atala.agent.walletapi.model.error.EntityServiceError +import org.hyperledger.identus.agent.walletapi.model.Entity +import org.hyperledger.identus.agent.walletapi.model.error.EntityServiceError import zio.IO import java.util.UUID diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/EntityServiceImpl.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/EntityServiceImpl.scala similarity index 86% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/EntityServiceImpl.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/EntityServiceImpl.scala index 5cd5839171..7dad1c1f97 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/EntityServiceImpl.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/EntityServiceImpl.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.agent.walletapi.service +package org.hyperledger.identus.agent.walletapi.service -import io.iohk.atala.agent.walletapi.model.Entity -import io.iohk.atala.agent.walletapi.model.error.EntityServiceError -import io.iohk.atala.agent.walletapi.sql.EntityRepository +import org.hyperledger.identus.agent.walletapi.model.Entity +import org.hyperledger.identus.agent.walletapi.model.error.EntityServiceError +import org.hyperledger.identus.agent.walletapi.sql.EntityRepository import zio.{IO, URLayer, ZIO, ZLayer} import java.util.UUID diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/ManagedDIDService.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/ManagedDIDService.scala similarity index 77% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/ManagedDIDService.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/ManagedDIDService.scala index 229ea7aafb..8d58fa4aec 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/ManagedDIDService.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/ManagedDIDService.scala @@ -1,15 +1,15 @@ -package io.iohk.atala.agent.walletapi.service - -import io.iohk.atala.agent.walletapi.model.* -import io.iohk.atala.agent.walletapi.model.error.* -import io.iohk.atala.agent.walletapi.storage.DIDNonSecretStorage -import io.iohk.atala.castor.core.model.did.* -import io.iohk.atala.mercury.PeerDID -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.shared.crypto.Ed25519KeyPair -import io.iohk.atala.shared.crypto.Secp256k1KeyPair -import io.iohk.atala.shared.crypto.X25519KeyPair -import io.iohk.atala.shared.models.WalletAccessContext +package org.hyperledger.identus.agent.walletapi.service + +import org.hyperledger.identus.agent.walletapi.model.* +import org.hyperledger.identus.agent.walletapi.model.error.* +import org.hyperledger.identus.agent.walletapi.storage.DIDNonSecretStorage +import org.hyperledger.identus.castor.core.model.did.* +import org.hyperledger.identus.mercury.PeerDID +import org.hyperledger.identus.mercury.model.* +import org.hyperledger.identus.shared.crypto.Ed25519KeyPair +import org.hyperledger.identus.shared.crypto.Secp256k1KeyPair +import org.hyperledger.identus.shared.crypto.X25519KeyPair +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import java.security.{PrivateKey as JavaPrivateKey, PublicKey as JavaPublicKey} diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/ManagedDIDServiceImpl.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/ManagedDIDServiceImpl.scala similarity index 93% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/ManagedDIDServiceImpl.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/ManagedDIDServiceImpl.scala index 521f6f7a30..0fc7657186 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/ManagedDIDServiceImpl.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/ManagedDIDServiceImpl.scala @@ -1,22 +1,22 @@ -package io.iohk.atala.agent.walletapi.service +package org.hyperledger.identus.agent.walletapi.service -import io.iohk.atala.agent.walletapi.model.* -import io.iohk.atala.agent.walletapi.model.error.{*, given} -import io.iohk.atala.agent.walletapi.service.ManagedDIDService.DEFAULT_MASTER_KEY_ID -import io.iohk.atala.agent.walletapi.service.handler.{DIDCreateHandler, DIDUpdateHandler, PublicationHandler} -import io.iohk.atala.agent.walletapi.storage.{DIDSecretStorage, DIDNonSecretStorage, WalletSecretStorage} -import io.iohk.atala.agent.walletapi.util.* -import io.iohk.atala.castor.core.model.did.* -import io.iohk.atala.castor.core.model.error.DIDOperationError -import io.iohk.atala.castor.core.service.DIDService -import io.iohk.atala.castor.core.util.DIDOperationValidator -import io.iohk.atala.mercury.PeerDID -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.shared.crypto.Apollo -import io.iohk.atala.shared.crypto.Ed25519KeyPair -import io.iohk.atala.shared.crypto.Secp256k1KeyPair -import io.iohk.atala.shared.crypto.X25519KeyPair -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.agent.walletapi.model.* +import org.hyperledger.identus.agent.walletapi.model.error.{*, given} +import org.hyperledger.identus.agent.walletapi.service.ManagedDIDService.DEFAULT_MASTER_KEY_ID +import org.hyperledger.identus.agent.walletapi.service.handler.{DIDCreateHandler, DIDUpdateHandler, PublicationHandler} +import org.hyperledger.identus.agent.walletapi.storage.{DIDSecretStorage, DIDNonSecretStorage, WalletSecretStorage} +import org.hyperledger.identus.agent.walletapi.util.* +import org.hyperledger.identus.castor.core.model.did.* +import org.hyperledger.identus.castor.core.model.error.DIDOperationError +import org.hyperledger.identus.castor.core.service.DIDService +import org.hyperledger.identus.castor.core.util.DIDOperationValidator +import org.hyperledger.identus.mercury.PeerDID +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.shared.crypto.Apollo +import org.hyperledger.identus.shared.crypto.Ed25519KeyPair +import org.hyperledger.identus.shared.crypto.Secp256k1KeyPair +import org.hyperledger.identus.shared.crypto.X25519KeyPair +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import java.security.{PrivateKey as JavaPrivateKey, PublicKey as JavaPublicKey} diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/ManagedDIDServiceWithEventNotificationImpl.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/ManagedDIDServiceWithEventNotificationImpl.scala similarity index 73% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/ManagedDIDServiceWithEventNotificationImpl.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/ManagedDIDServiceWithEventNotificationImpl.scala index b22b5da747..5e5bc4f76a 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/ManagedDIDServiceWithEventNotificationImpl.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/ManagedDIDServiceWithEventNotificationImpl.scala @@ -1,17 +1,17 @@ -package io.iohk.atala.agent.walletapi.service +package org.hyperledger.identus.agent.walletapi.service -import io.iohk.atala.agent.walletapi.model.ManagedDIDDetail -import io.iohk.atala.agent.walletapi.model.error.CommonWalletStorageError -import io.iohk.atala.agent.walletapi.storage.WalletSecretStorage -import io.iohk.atala.agent.walletapi.storage.{DIDNonSecretStorage, DIDSecretStorage} -import io.iohk.atala.castor.core.model.did.CanonicalPrismDID -import io.iohk.atala.castor.core.model.error -import io.iohk.atala.castor.core.model.error.DIDOperationError -import io.iohk.atala.castor.core.service.DIDService -import io.iohk.atala.castor.core.util.DIDOperationValidator -import io.iohk.atala.event.notification.{Event, EventNotificationService} -import io.iohk.atala.shared.crypto.Apollo -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.agent.walletapi.model.ManagedDIDDetail +import org.hyperledger.identus.agent.walletapi.model.error.CommonWalletStorageError +import org.hyperledger.identus.agent.walletapi.storage.WalletSecretStorage +import org.hyperledger.identus.agent.walletapi.storage.{DIDNonSecretStorage, DIDSecretStorage} +import org.hyperledger.identus.castor.core.model.did.CanonicalPrismDID +import org.hyperledger.identus.castor.core.model.error +import org.hyperledger.identus.castor.core.model.error.DIDOperationError +import org.hyperledger.identus.castor.core.service.DIDService +import org.hyperledger.identus.castor.core.util.DIDOperationValidator +import org.hyperledger.identus.event.notification.{Event, EventNotificationService} +import org.hyperledger.identus.shared.crypto.Apollo +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* class ManagedDIDServiceWithEventNotificationImpl( diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/MockManagedDIDService.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/MockManagedDIDService.scala similarity index 85% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/MockManagedDIDService.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/MockManagedDIDService.scala index ea3128b884..e19677c513 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/MockManagedDIDService.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/MockManagedDIDService.scala @@ -1,19 +1,19 @@ -package io.iohk.atala.agent.walletapi.service +package org.hyperledger.identus.agent.walletapi.service -import io.iohk.atala.agent.walletapi.model.* -import io.iohk.atala.agent.walletapi.model.error.* -import io.iohk.atala.agent.walletapi.storage.DIDNonSecretStorage -import io.iohk.atala.castor.core.model.did.{ +import org.hyperledger.identus.agent.walletapi.model.* +import org.hyperledger.identus.agent.walletapi.model.error.* +import org.hyperledger.identus.agent.walletapi.storage.DIDNonSecretStorage +import org.hyperledger.identus.castor.core.model.did.{ CanonicalPrismDID, LongFormPrismDID, PrismDIDOperation, ScheduleDIDOperationOutcome } -import io.iohk.atala.mercury.PeerDID -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.shared.crypto.Ed25519KeyPair -import io.iohk.atala.shared.crypto.Secp256k1KeyPair -import io.iohk.atala.shared.crypto.X25519KeyPair +import org.hyperledger.identus.mercury.PeerDID +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.shared.crypto.Ed25519KeyPair +import org.hyperledger.identus.shared.crypto.Secp256k1KeyPair +import org.hyperledger.identus.shared.crypto.X25519KeyPair import zio.mock.* import zio.test.Assertion import zio.{mock, *} diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/WalletManagementService.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/WalletManagementService.scala similarity index 84% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/WalletManagementService.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/WalletManagementService.scala index 3b7b9e47b0..635fd826f3 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/WalletManagementService.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/WalletManagementService.scala @@ -1,16 +1,16 @@ -package io.iohk.atala.agent.walletapi.service +package org.hyperledger.identus.agent.walletapi.service -import io.iohk.atala.agent.walletapi.model.Wallet -import io.iohk.atala.agent.walletapi.model.WalletSeed -import io.iohk.atala.agent.walletapi.storage.WalletNonSecretStorageError -import io.iohk.atala.event.notification.EventNotificationConfig -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.agent.walletapi.model.Wallet +import org.hyperledger.identus.agent.walletapi.model.WalletSeed +import org.hyperledger.identus.agent.walletapi.storage.WalletNonSecretStorageError +import org.hyperledger.identus.event.notification.EventNotificationConfig +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletId import zio.* import java.util.UUID import scala.language.implicitConversions -import io.iohk.atala.shared.models.WalletAdministrationContext +import org.hyperledger.identus.shared.models.WalletAdministrationContext sealed trait WalletManagementServiceError { final def toThrowable: Throwable = this diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/WalletManagementServiceImpl.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/WalletManagementServiceImpl.scala similarity index 84% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/WalletManagementServiceImpl.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/WalletManagementServiceImpl.scala index 082178ac82..355eb543b3 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/WalletManagementServiceImpl.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/WalletManagementServiceImpl.scala @@ -1,14 +1,14 @@ -package io.iohk.atala.agent.walletapi.service +package org.hyperledger.identus.agent.walletapi.service -import io.iohk.atala.agent.walletapi.model.Wallet -import io.iohk.atala.agent.walletapi.model.WalletSeed -import io.iohk.atala.agent.walletapi.storage.WalletNonSecretStorage -import io.iohk.atala.agent.walletapi.storage.WalletSecretStorage -import io.iohk.atala.event.notification.EventNotificationConfig -import io.iohk.atala.shared.crypto.Apollo -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletAdministrationContext -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.agent.walletapi.model.Wallet +import org.hyperledger.identus.agent.walletapi.model.WalletSeed +import org.hyperledger.identus.agent.walletapi.storage.WalletNonSecretStorage +import org.hyperledger.identus.agent.walletapi.storage.WalletSecretStorage +import org.hyperledger.identus.event.notification.EventNotificationConfig +import org.hyperledger.identus.shared.crypto.Apollo +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletAdministrationContext +import org.hyperledger.identus.shared.models.WalletId import zio.* import java.util.UUID diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/handler/DIDCreateHandler.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/handler/DIDCreateHandler.scala similarity index 68% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/handler/DIDCreateHandler.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/handler/DIDCreateHandler.scala index 59e3dcc5f7..360377f8e8 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/handler/DIDCreateHandler.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/handler/DIDCreateHandler.scala @@ -1,20 +1,20 @@ -package io.iohk.atala.agent.walletapi.service.handler +package org.hyperledger.identus.agent.walletapi.service.handler -import io.iohk.atala.agent.walletapi.model.CreateDIDKey -import io.iohk.atala.agent.walletapi.model.ManagedDIDState -import io.iohk.atala.agent.walletapi.model.ManagedDIDTemplate -import io.iohk.atala.agent.walletapi.model.PublicationState -import io.iohk.atala.agent.walletapi.model.WalletSeed -import io.iohk.atala.agent.walletapi.model.error.CreateManagedDIDError -import io.iohk.atala.agent.walletapi.storage.DIDNonSecretStorage -import io.iohk.atala.agent.walletapi.storage.DIDSecretStorage -import io.iohk.atala.agent.walletapi.storage.WalletSecretStorage -import io.iohk.atala.agent.walletapi.util.OperationFactory -import io.iohk.atala.castor.core.model.did.PrismDIDOperation -import io.iohk.atala.shared.crypto.Apollo -import io.iohk.atala.shared.crypto.Ed25519KeyPair -import io.iohk.atala.shared.crypto.X25519KeyPair -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.agent.walletapi.model.CreateDIDKey +import org.hyperledger.identus.agent.walletapi.model.ManagedDIDState +import org.hyperledger.identus.agent.walletapi.model.ManagedDIDTemplate +import org.hyperledger.identus.agent.walletapi.model.PublicationState +import org.hyperledger.identus.agent.walletapi.model.WalletSeed +import org.hyperledger.identus.agent.walletapi.model.error.CreateManagedDIDError +import org.hyperledger.identus.agent.walletapi.storage.DIDNonSecretStorage +import org.hyperledger.identus.agent.walletapi.storage.DIDSecretStorage +import org.hyperledger.identus.agent.walletapi.storage.WalletSecretStorage +import org.hyperledger.identus.agent.walletapi.util.OperationFactory +import org.hyperledger.identus.castor.core.model.did.PrismDIDOperation +import org.hyperledger.identus.shared.crypto.Apollo +import org.hyperledger.identus.shared.crypto.Ed25519KeyPair +import org.hyperledger.identus.shared.crypto.X25519KeyPair +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* private[walletapi] class DIDCreateHandler( diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/handler/DIDUpdateHandler.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/handler/DIDUpdateHandler.scala similarity index 72% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/handler/DIDUpdateHandler.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/handler/DIDUpdateHandler.scala index f6ae6dfbf3..c55bae5116 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/handler/DIDUpdateHandler.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/handler/DIDUpdateHandler.scala @@ -1,25 +1,25 @@ -package io.iohk.atala.agent.walletapi.service.handler +package org.hyperledger.identus.agent.walletapi.service.handler -import io.iohk.atala.agent.walletapi.model.DIDUpdateLineage -import io.iohk.atala.agent.walletapi.model.ManagedDIDKeyMeta -import io.iohk.atala.agent.walletapi.model.ManagedDIDState -import io.iohk.atala.agent.walletapi.model.UpdateDIDKey -import io.iohk.atala.agent.walletapi.model.UpdateManagedDIDAction -import io.iohk.atala.agent.walletapi.model.WalletSeed -import io.iohk.atala.agent.walletapi.model.error.UpdateManagedDIDError -import io.iohk.atala.agent.walletapi.model.error.{*, given} -import io.iohk.atala.agent.walletapi.storage.DIDNonSecretStorage -import io.iohk.atala.agent.walletapi.storage.DIDSecretStorage -import io.iohk.atala.agent.walletapi.storage.WalletSecretStorage -import io.iohk.atala.agent.walletapi.util.OperationFactory -import io.iohk.atala.castor.core.model.did.PrismDIDOperation -import io.iohk.atala.castor.core.model.did.PrismDIDOperation.Update -import io.iohk.atala.castor.core.model.did.ScheduledDIDOperationStatus -import io.iohk.atala.castor.core.model.did.SignedPrismDIDOperation -import io.iohk.atala.shared.crypto.Apollo -import io.iohk.atala.shared.crypto.Ed25519KeyPair -import io.iohk.atala.shared.crypto.X25519KeyPair -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.agent.walletapi.model.DIDUpdateLineage +import org.hyperledger.identus.agent.walletapi.model.ManagedDIDKeyMeta +import org.hyperledger.identus.agent.walletapi.model.ManagedDIDState +import org.hyperledger.identus.agent.walletapi.model.UpdateDIDKey +import org.hyperledger.identus.agent.walletapi.model.UpdateManagedDIDAction +import org.hyperledger.identus.agent.walletapi.model.WalletSeed +import org.hyperledger.identus.agent.walletapi.model.error.UpdateManagedDIDError +import org.hyperledger.identus.agent.walletapi.model.error.{*, given} +import org.hyperledger.identus.agent.walletapi.storage.DIDNonSecretStorage +import org.hyperledger.identus.agent.walletapi.storage.DIDSecretStorage +import org.hyperledger.identus.agent.walletapi.storage.WalletSecretStorage +import org.hyperledger.identus.agent.walletapi.util.OperationFactory +import org.hyperledger.identus.castor.core.model.did.PrismDIDOperation +import org.hyperledger.identus.castor.core.model.did.PrismDIDOperation.Update +import org.hyperledger.identus.castor.core.model.did.ScheduledDIDOperationStatus +import org.hyperledger.identus.castor.core.model.did.SignedPrismDIDOperation +import org.hyperledger.identus.shared.crypto.Apollo +import org.hyperledger.identus.shared.crypto.Ed25519KeyPair +import org.hyperledger.identus.shared.crypto.X25519KeyPair +import org.hyperledger.identus.shared.models.WalletAccessContext import scala.collection.immutable.ArraySeq import zio.* diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/handler/PublicationHandler.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/handler/PublicationHandler.scala similarity index 61% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/handler/PublicationHandler.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/handler/PublicationHandler.scala index 1cdf639732..8eb17c65c0 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/service/handler/PublicationHandler.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/service/handler/PublicationHandler.scala @@ -1,16 +1,16 @@ -package io.iohk.atala.agent.walletapi.service.handler +package org.hyperledger.identus.agent.walletapi.service.handler -import io.iohk.atala.agent.walletapi.model.ManagedDIDState -import io.iohk.atala.agent.walletapi.model.error.CommonCryptographyError -import io.iohk.atala.agent.walletapi.model.error.CommonWalletStorageError -import io.iohk.atala.agent.walletapi.util.KeyResolver -import io.iohk.atala.castor.core.model.did.PrismDIDOperation -import io.iohk.atala.castor.core.model.did.ScheduleDIDOperationOutcome -import io.iohk.atala.castor.core.model.did.SignedPrismDIDOperation -import io.iohk.atala.castor.core.model.error.DIDOperationError -import io.iohk.atala.castor.core.service.DIDService -import io.iohk.atala.shared.crypto.Secp256k1KeyPair -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.agent.walletapi.model.ManagedDIDState +import org.hyperledger.identus.agent.walletapi.model.error.CommonCryptographyError +import org.hyperledger.identus.agent.walletapi.model.error.CommonWalletStorageError +import org.hyperledger.identus.agent.walletapi.util.KeyResolver +import org.hyperledger.identus.castor.core.model.did.PrismDIDOperation +import org.hyperledger.identus.castor.core.model.did.ScheduleDIDOperationOutcome +import org.hyperledger.identus.castor.core.model.did.SignedPrismDIDOperation +import org.hyperledger.identus.castor.core.model.error.DIDOperationError +import org.hyperledger.identus.castor.core.service.DIDService +import org.hyperledger.identus.shared.crypto.Secp256k1KeyPair +import org.hyperledger.identus.shared.models.WalletAccessContext import scala.collection.immutable.ArraySeq import scala.language.implicitConversions import zio.* diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/sql/EntityRepository.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/sql/EntityRepository.scala similarity index 94% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/sql/EntityRepository.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/sql/EntityRepository.scala index 8c9082f639..073526e55e 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/sql/EntityRepository.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/sql/EntityRepository.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.agent.walletapi.sql +package org.hyperledger.identus.agent.walletapi.sql import io.getquill.* import io.getquill.doobie.DoobieContext import io.getquill.idiom.* -import io.iohk.atala.agent.walletapi.model.Entity -import io.iohk.atala.agent.walletapi.model.error.EntityServiceError +import org.hyperledger.identus.agent.walletapi.model.Entity +import org.hyperledger.identus.agent.walletapi.model.error.EntityServiceError import zio.{IO, ZIO} import java.time.Instant diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/sql/JdbcDIDNonSecretStorage.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/sql/JdbcDIDNonSecretStorage.scala similarity index 96% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/sql/JdbcDIDNonSecretStorage.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/sql/JdbcDIDNonSecretStorage.scala index 8ec4b39311..efaaea1d36 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/sql/JdbcDIDNonSecretStorage.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/sql/JdbcDIDNonSecretStorage.scala @@ -1,21 +1,21 @@ -package io.iohk.atala.agent.walletapi.sql +package org.hyperledger.identus.agent.walletapi.sql import doobie.* import doobie.implicits.* import doobie.postgres.implicits.* -import io.iohk.atala.agent.walletapi.model.* -import io.iohk.atala.agent.walletapi.storage.DIDNonSecretStorage -import io.iohk.atala.castor.core.model.did.{ +import org.hyperledger.identus.agent.walletapi.model.* +import org.hyperledger.identus.agent.walletapi.storage.DIDNonSecretStorage +import org.hyperledger.identus.castor.core.model.did.{ EllipticCurve, InternalKeyPurpose, PrismDID, ScheduledDIDOperationStatus, VerificationRelationship } -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.shared.db.ContextAwareTask -import io.iohk.atala.shared.db.Implicits.{*, given} -import io.iohk.atala.shared.models.{WalletAccessContext, WalletId} +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.shared.db.ContextAwareTask +import org.hyperledger.identus.shared.db.Implicits.{*, given} +import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} import zio.* import zio.interop.catz.* diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/sql/JdbcDIDSecretStorage.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/sql/JdbcDIDSecretStorage.scala similarity index 85% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/sql/JdbcDIDSecretStorage.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/sql/JdbcDIDSecretStorage.scala index dfba408e2e..75a3ff77d3 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/sql/JdbcDIDSecretStorage.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/sql/JdbcDIDSecretStorage.scala @@ -1,17 +1,17 @@ -package io.iohk.atala.agent.walletapi.sql +package org.hyperledger.identus.agent.walletapi.sql import com.nimbusds.jose.jwk.OctetKeyPair import doobie.* import doobie.implicits.* import doobie.postgres.implicits.* -import io.iohk.atala.agent.walletapi.storage.DIDSecretStorage -import io.iohk.atala.castor.core.model.did.PrismDID -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.shared.crypto.jwk.FromJWK -import io.iohk.atala.shared.crypto.jwk.JWK -import io.iohk.atala.shared.db.ContextAwareTask -import io.iohk.atala.shared.db.Implicits.* -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.agent.walletapi.storage.DIDSecretStorage +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.castor.core.model.did.PrismDID +import org.hyperledger.identus.shared.crypto.jwk.FromJWK +import org.hyperledger.identus.shared.crypto.jwk.JWK +import org.hyperledger.identus.shared.db.ContextAwareTask +import org.hyperledger.identus.shared.db.Implicits.* +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import java.time.Instant diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/sql/JdbcEntityRepository.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/sql/JdbcEntityRepository.scala similarity index 93% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/sql/JdbcEntityRepository.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/sql/JdbcEntityRepository.scala index 6420f7f0e0..d67f250096 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/sql/JdbcEntityRepository.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/sql/JdbcEntityRepository.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.agent.walletapi.sql +package org.hyperledger.identus.agent.walletapi.sql import doobie.* import doobie.implicits.* -import io.iohk.atala.agent.walletapi.model.Entity -import io.iohk.atala.agent.walletapi.model.error.EntityServiceError -import io.iohk.atala.agent.walletapi.model.error.EntityServiceError.{ +import org.hyperledger.identus.agent.walletapi.model.Entity +import org.hyperledger.identus.agent.walletapi.model.error.EntityServiceError +import org.hyperledger.identus.agent.walletapi.model.error.EntityServiceError.{ EntityAlreadyExists, EntityNotFound, EntityStorageError, diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/sql/JdbcGenericSecretStorage.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/sql/JdbcGenericSecretStorage.scala similarity index 80% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/sql/JdbcGenericSecretStorage.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/sql/JdbcGenericSecretStorage.scala index e67756911a..bb828565b1 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/sql/JdbcGenericSecretStorage.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/sql/JdbcGenericSecretStorage.scala @@ -1,13 +1,13 @@ -package io.iohk.atala.agent.walletapi.sql +package org.hyperledger.identus.agent.walletapi.sql import doobie.* import doobie.implicits.* import doobie.postgres.implicits.* -import io.iohk.atala.agent.walletapi.storage.GenericSecret -import io.iohk.atala.agent.walletapi.storage.GenericSecretStorage -import io.iohk.atala.shared.db.ContextAwareTask -import io.iohk.atala.shared.db.Implicits.* -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.agent.walletapi.storage.GenericSecret +import org.hyperledger.identus.agent.walletapi.storage.GenericSecretStorage +import org.hyperledger.identus.shared.db.ContextAwareTask +import org.hyperledger.identus.shared.db.Implicits.* +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import zio.json.ast.Json diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/sql/JdbcWalletNonSecretStorage.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/sql/JdbcWalletNonSecretStorage.scala similarity index 88% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/sql/JdbcWalletNonSecretStorage.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/sql/JdbcWalletNonSecretStorage.scala index d760776156..645d716408 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/sql/JdbcWalletNonSecretStorage.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/sql/JdbcWalletNonSecretStorage.scala @@ -1,20 +1,20 @@ -package io.iohk.atala.agent.walletapi.sql +package org.hyperledger.identus.agent.walletapi.sql import cats.implicits.* import doobie.* import doobie.implicits.* import doobie.postgres.implicits.* import doobie.util.transactor.Transactor -import io.iohk.atala.agent.walletapi.model.Wallet -import io.iohk.atala.agent.walletapi.sql.JdbcWalletNonSecretStorage.MAX_WEBHOOK_PER_WALLET -import io.iohk.atala.agent.walletapi.storage.WalletNonSecretStorage -import io.iohk.atala.agent.walletapi.storage.WalletNonSecretStorageError -import io.iohk.atala.agent.walletapi.storage.WalletNonSecretStorageError.TooManyWebhook -import io.iohk.atala.event.notification.EventNotificationConfig -import io.iohk.atala.shared.db.ContextAwareTask -import io.iohk.atala.shared.db.Implicits.{*, given} -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.agent.walletapi.model.Wallet +import org.hyperledger.identus.agent.walletapi.sql.JdbcWalletNonSecretStorage.MAX_WEBHOOK_PER_WALLET +import org.hyperledger.identus.agent.walletapi.storage.WalletNonSecretStorage +import org.hyperledger.identus.agent.walletapi.storage.WalletNonSecretStorageError +import org.hyperledger.identus.agent.walletapi.storage.WalletNonSecretStorageError.TooManyWebhook +import org.hyperledger.identus.event.notification.EventNotificationConfig +import org.hyperledger.identus.shared.db.ContextAwareTask +import org.hyperledger.identus.shared.db.Implicits.{*, given} +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletId import zio.* import java.net.URL diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/sql/JdbcWalletSecretStorage.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/sql/JdbcWalletSecretStorage.scala similarity index 77% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/sql/JdbcWalletSecretStorage.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/sql/JdbcWalletSecretStorage.scala index 8fdcac36aa..eee2225312 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/sql/JdbcWalletSecretStorage.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/sql/JdbcWalletSecretStorage.scala @@ -1,15 +1,15 @@ -package io.iohk.atala.agent.walletapi.sql +package org.hyperledger.identus.agent.walletapi.sql import doobie.* import doobie.implicits.* import doobie.postgres.implicits.* import doobie.util.transactor.Transactor -import io.iohk.atala.agent.walletapi.model.WalletSeed -import io.iohk.atala.agent.walletapi.storage.WalletSecretStorage -import io.iohk.atala.shared.db.ContextAwareTask -import io.iohk.atala.shared.db.Implicits.{*, given} -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.agent.walletapi.model.WalletSeed +import org.hyperledger.identus.agent.walletapi.storage.WalletSecretStorage +import org.hyperledger.identus.shared.db.ContextAwareTask +import org.hyperledger.identus.shared.db.Implicits.{*, given} +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletId import java.time.Instant import zio.* diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/sql/package.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/sql/package.scala similarity index 92% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/sql/package.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/sql/package.scala index b1330ecd6c..aa0cd77a42 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/sql/package.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/sql/package.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.agent.walletapi +package org.hyperledger.identus.agent.walletapi import com.nimbusds.jose.jwk.OctetKeyPair import doobie.* @@ -7,17 +7,17 @@ import doobie.util.invariant.InvalidEnum import io.circe.* import io.circe.parser.* import io.circe.syntax.* -import io.iohk.atala.agent.walletapi.model.Wallet -import io.iohk.atala.agent.walletapi.model.{ManagedDIDState, PublicationState, KeyManagementMode} -import io.iohk.atala.castor.core.model.ProtoModelHelper.* -import io.iohk.atala.castor.core.model.did.EllipticCurve -import io.iohk.atala.castor.core.model.did.InternalKeyPurpose -import io.iohk.atala.castor.core.model.did.VerificationRelationship -import io.iohk.atala.castor.core.model.did.{PrismDID, PrismDIDOperation, ScheduledDIDOperationStatus} -import io.iohk.atala.event.notification.EventNotificationConfig +import org.hyperledger.identus.agent.walletapi.model.Wallet +import org.hyperledger.identus.agent.walletapi.model.{ManagedDIDState, PublicationState, KeyManagementMode} +import org.hyperledger.identus.castor.core.model.ProtoModelHelper.* +import org.hyperledger.identus.castor.core.model.did.EllipticCurve +import org.hyperledger.identus.castor.core.model.did.InternalKeyPurpose +import org.hyperledger.identus.castor.core.model.did.VerificationRelationship +import org.hyperledger.identus.castor.core.model.did.{PrismDID, PrismDIDOperation, ScheduledDIDOperationStatus} +import org.hyperledger.identus.event.notification.EventNotificationConfig import io.iohk.atala.prism.protos.node_models -import io.iohk.atala.shared.crypto.jwk.JWK -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.shared.crypto.jwk.JWK +import org.hyperledger.identus.shared.models.WalletId import zio.json.* import zio.json.ast.Json import zio.json.ast.Json.* diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/storage/DIDNonSecretStorage.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/storage/DIDNonSecretStorage.scala similarity index 84% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/storage/DIDNonSecretStorage.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/storage/DIDNonSecretStorage.scala index 91a0106567..a4abb78c33 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/storage/DIDNonSecretStorage.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/storage/DIDNonSecretStorage.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.agent.walletapi.storage +package org.hyperledger.identus.agent.walletapi.storage -import io.iohk.atala.agent.walletapi.model.* -import io.iohk.atala.castor.core.model.did.{PrismDID, ScheduledDIDOperationStatus} -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.agent.walletapi.model.* +import org.hyperledger.identus.castor.core.model.did.{PrismDID, ScheduledDIDOperationStatus} +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import scala.collection.immutable.ArraySeq diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/storage/DIDSecretStorage.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/storage/DIDSecretStorage.scala similarity index 65% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/storage/DIDSecretStorage.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/storage/DIDSecretStorage.scala index 52f84e3ed1..f9835c0d04 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/storage/DIDSecretStorage.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/storage/DIDSecretStorage.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.agent.walletapi.storage +package org.hyperledger.identus.agent.walletapi.storage import com.nimbusds.jose.jwk.OctetKeyPair -import io.iohk.atala.castor.core.model.did.PrismDID -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.shared.crypto.jwk.FromJWK -import io.iohk.atala.shared.crypto.jwk.JWK -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.castor.core.model.did.PrismDID +import org.hyperledger.identus.shared.crypto.jwk.FromJWK +import org.hyperledger.identus.shared.crypto.jwk.JWK +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* /** A simple single-user DID key storage */ diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/storage/GenericSecretStorage.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/storage/GenericSecretStorage.scala similarity index 77% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/storage/GenericSecretStorage.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/storage/GenericSecretStorage.scala index 28b29d2612..8a2ec07201 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/storage/GenericSecretStorage.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/storage/GenericSecretStorage.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.agent.walletapi.storage +package org.hyperledger.identus.agent.walletapi.storage -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import zio.json.ast.Json diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/storage/WalletNonSecretStorage.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/storage/WalletNonSecretStorage.scala similarity index 86% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/storage/WalletNonSecretStorage.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/storage/WalletNonSecretStorage.scala index 7c48f4f506..c0cbda6d72 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/storage/WalletNonSecretStorage.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/storage/WalletNonSecretStorage.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.agent.walletapi.storage +package org.hyperledger.identus.agent.walletapi.storage -import io.iohk.atala.agent.walletapi.model.Wallet -import io.iohk.atala.event.notification.EventNotificationConfig -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.agent.walletapi.model.Wallet +import org.hyperledger.identus.event.notification.EventNotificationConfig +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletId import org.postgresql.util.PSQLException import zio.* diff --git a/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/storage/WalletSecretStorage.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/storage/WalletSecretStorage.scala new file mode 100644 index 0000000000..4121868293 --- /dev/null +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/storage/WalletSecretStorage.scala @@ -0,0 +1,10 @@ +package org.hyperledger.identus.agent.walletapi.storage + +import org.hyperledger.identus.agent.walletapi.model.WalletSeed +import org.hyperledger.identus.shared.models.WalletAccessContext +import zio.* + +trait WalletSecretStorage { + def setWalletSeed(seed: WalletSeed): RIO[WalletAccessContext, Unit] + def getWalletSeed: RIO[WalletAccessContext, Option[WalletSeed]] +} diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/util/KeyResolver.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/util/KeyResolver.scala similarity index 60% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/util/KeyResolver.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/util/KeyResolver.scala index 487060a96b..a8a033db8c 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/util/KeyResolver.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/util/KeyResolver.scala @@ -1,19 +1,19 @@ -package io.iohk.atala.agent.walletapi.util +package org.hyperledger.identus.agent.walletapi.util -import io.iohk.atala.agent.walletapi.model.ManagedDIDHdKeyPath -import io.iohk.atala.agent.walletapi.model.ManagedDIDKeyMeta -import io.iohk.atala.agent.walletapi.model.ManagedDIDRandKeyMeta -import io.iohk.atala.agent.walletapi.model.WalletSeed -import io.iohk.atala.agent.walletapi.storage.DIDNonSecretStorage -import io.iohk.atala.agent.walletapi.storage.DIDSecretStorage -import io.iohk.atala.agent.walletapi.storage.WalletSecretStorage -import io.iohk.atala.castor.core.model.did.EllipticCurve -import io.iohk.atala.castor.core.model.did.PrismDID -import io.iohk.atala.shared.crypto.Apollo -import io.iohk.atala.shared.crypto.Ed25519KeyPair -import io.iohk.atala.shared.crypto.Secp256k1KeyPair -import io.iohk.atala.shared.crypto.X25519KeyPair -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.agent.walletapi.model.ManagedDIDHdKeyPath +import org.hyperledger.identus.agent.walletapi.model.ManagedDIDKeyMeta +import org.hyperledger.identus.agent.walletapi.model.ManagedDIDRandKeyMeta +import org.hyperledger.identus.agent.walletapi.model.WalletSeed +import org.hyperledger.identus.agent.walletapi.storage.DIDNonSecretStorage +import org.hyperledger.identus.agent.walletapi.storage.DIDSecretStorage +import org.hyperledger.identus.agent.walletapi.storage.WalletSecretStorage +import org.hyperledger.identus.castor.core.model.did.EllipticCurve +import org.hyperledger.identus.castor.core.model.did.PrismDID +import org.hyperledger.identus.shared.crypto.Apollo +import org.hyperledger.identus.shared.crypto.Ed25519KeyPair +import org.hyperledger.identus.shared.crypto.Secp256k1KeyPair +import org.hyperledger.identus.shared.crypto.X25519KeyPair +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* class KeyResolver( diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/util/ManagedDIDTemplateValidator.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/util/ManagedDIDTemplateValidator.scala similarity index 81% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/util/ManagedDIDTemplateValidator.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/util/ManagedDIDTemplateValidator.scala index 93c7ffe99a..daa24fd415 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/util/ManagedDIDTemplateValidator.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/util/ManagedDIDTemplateValidator.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.agent.walletapi.util +package org.hyperledger.identus.agent.walletapi.util -import io.iohk.atala.agent.walletapi.model.ManagedDIDTemplate -import io.iohk.atala.agent.walletapi.service.ManagedDIDService -import io.iohk.atala.castor.core.model.did.EllipticCurve -import io.iohk.atala.castor.core.model.did.VerificationRelationship +import org.hyperledger.identus.agent.walletapi.model.ManagedDIDTemplate +import org.hyperledger.identus.agent.walletapi.service.ManagedDIDService +import org.hyperledger.identus.castor.core.model.did.EllipticCurve +import org.hyperledger.identus.castor.core.model.did.VerificationRelationship object ManagedDIDTemplateValidator { diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/util/OperationFactory.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/util/OperationFactory.scala similarity index 95% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/util/OperationFactory.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/util/OperationFactory.scala index e94cb31582..2973014bf3 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/util/OperationFactory.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/util/OperationFactory.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.agent.walletapi.util +package org.hyperledger.identus.agent.walletapi.util -import io.iohk.atala.agent.walletapi.model.* -import io.iohk.atala.agent.walletapi.model.error.{CreateManagedDIDError, UpdateManagedDIDError} -import io.iohk.atala.castor.core.model.did.* -import io.iohk.atala.shared.crypto.{ +import org.hyperledger.identus.agent.walletapi.model.* +import org.hyperledger.identus.agent.walletapi.model.error.{CreateManagedDIDError, UpdateManagedDIDError} +import org.hyperledger.identus.castor.core.model.did.* +import org.hyperledger.identus.shared.crypto.{ Apollo, Ed25519KeyPair, Ed25519PublicKey, @@ -12,7 +12,7 @@ import io.iohk.atala.shared.crypto.{ X25519KeyPair, X25519PublicKey } -import io.iohk.atala.shared.models.Base64UrlString +import org.hyperledger.identus.shared.models.Base64UrlString import zio.* import scala.collection.immutable.ArraySeq diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/util/UpdateManagedDIDActionValidator.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/util/UpdateManagedDIDActionValidator.scala similarity index 82% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/util/UpdateManagedDIDActionValidator.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/util/UpdateManagedDIDActionValidator.scala index 4428238293..28027f0cdf 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/util/UpdateManagedDIDActionValidator.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/util/UpdateManagedDIDActionValidator.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.agent.walletapi.util +package org.hyperledger.identus.agent.walletapi.util -import io.iohk.atala.agent.walletapi.model.UpdateManagedDIDAction -import io.iohk.atala.agent.walletapi.service.ManagedDIDService +import org.hyperledger.identus.agent.walletapi.model.UpdateManagedDIDAction +import org.hyperledger.identus.agent.walletapi.service.ManagedDIDService object UpdateManagedDIDActionValidator { diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/vault/VaultClient.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/vault/VaultClient.scala similarity index 99% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/vault/VaultClient.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/vault/VaultClient.scala index 74d1011534..5f2d8a9948 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/vault/VaultClient.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/vault/VaultClient.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.agent.walletapi.vault +package org.hyperledger.identus.agent.walletapi.vault import io.github.jopenlibs.vault.Vault import io.github.jopenlibs.vault.VaultConfig diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/vault/VaultDIDSecretStorage.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/vault/VaultDIDSecretStorage.scala similarity index 87% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/vault/VaultDIDSecretStorage.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/vault/VaultDIDSecretStorage.scala index 27ce96f99d..a334f0ac34 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/vault/VaultDIDSecretStorage.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/vault/VaultDIDSecretStorage.scala @@ -1,15 +1,15 @@ -package io.iohk.atala.agent.walletapi.vault +package org.hyperledger.identus.agent.walletapi.vault import com.nimbusds.jose.jwk.OctetKeyPair -import io.iohk.atala.agent.walletapi.storage.DIDSecretStorage -import io.iohk.atala.castor.core.model.did.PrismDID -import io.iohk.atala.mercury.model.DidId +import org.hyperledger.identus.agent.walletapi.storage.DIDSecretStorage +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.castor.core.model.did.PrismDID import io.iohk.atala.prism.crypto.Sha256 -import io.iohk.atala.shared.crypto.jwk.FromJWK -import io.iohk.atala.shared.crypto.jwk.JWK -import io.iohk.atala.shared.models.HexString -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.shared.crypto.jwk.FromJWK +import org.hyperledger.identus.shared.crypto.jwk.JWK +import org.hyperledger.identus.shared.models.HexString +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletId import zio.* import java.nio.charset.StandardCharsets diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/vault/VaultGenericSecretStorage.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/vault/VaultGenericSecretStorage.scala similarity index 86% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/vault/VaultGenericSecretStorage.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/vault/VaultGenericSecretStorage.scala index fec9d1870c..268c0eb4e9 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/vault/VaultGenericSecretStorage.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/vault/VaultGenericSecretStorage.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.agent.walletapi.vault +package org.hyperledger.identus.agent.walletapi.vault -import io.iohk.atala.agent.walletapi.storage.GenericSecret -import io.iohk.atala.agent.walletapi.storage.GenericSecretStorage +import org.hyperledger.identus.agent.walletapi.storage.GenericSecret +import org.hyperledger.identus.agent.walletapi.storage.GenericSecretStorage import io.iohk.atala.prism.crypto.Sha256 -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletId import zio.* import zio.json.ast.Json diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/vault/VaultWalletSecretStorage.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/vault/VaultWalletSecretStorage.scala similarity index 77% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/vault/VaultWalletSecretStorage.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/vault/VaultWalletSecretStorage.scala index b7b53b58ec..561080afaa 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/vault/VaultWalletSecretStorage.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/vault/VaultWalletSecretStorage.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.agent.walletapi.vault +package org.hyperledger.identus.agent.walletapi.vault -import io.iohk.atala.agent.walletapi.model.WalletSeed -import io.iohk.atala.agent.walletapi.storage.WalletSecretStorage -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.agent.walletapi.model.WalletSeed +import org.hyperledger.identus.agent.walletapi.storage.WalletSecretStorage +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletId import zio.* class VaultWalletSecretStorage(vaultKV: VaultKVClient) extends WalletSecretStorage { diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/vault/package.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/vault/package.scala similarity index 89% rename from prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/vault/package.scala rename to cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/vault/package.scala index 3b5822a0dd..4f0c861ce4 100644 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/vault/package.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/vault/package.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.agent.walletapi +package org.hyperledger.identus.agent.walletapi import com.nimbusds.jose.jwk.OctetKeyPair -import io.iohk.atala.agent.walletapi.model.WalletSeed -import io.iohk.atala.shared.crypto.jwk.JWK -import io.iohk.atala.shared.models.HexString -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.agent.walletapi.model.WalletSeed +import org.hyperledger.identus.shared.crypto.jwk.JWK +import org.hyperledger.identus.shared.models.HexString +import org.hyperledger.identus.shared.models.WalletId import zio.json.* import zio.json.ast.Json import zio.json.ast.Json.* diff --git a/prism-agent/service/wallet-api/src/test/resources/logback.xml b/cloud-agent/service/wallet-api/src/test/resources/logback.xml similarity index 100% rename from prism-agent/service/wallet-api/src/test/resources/logback.xml rename to cloud-agent/service/wallet-api/src/test/resources/logback.xml diff --git a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/benchmark/KeyDerivation.scala b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/benchmark/KeyDerivation.scala similarity index 89% rename from prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/benchmark/KeyDerivation.scala rename to cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/benchmark/KeyDerivation.scala index 981b934fad..7ab8e40e02 100644 --- a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/benchmark/KeyDerivation.scala +++ b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/benchmark/KeyDerivation.scala @@ -1,13 +1,13 @@ -package io.iohk.atala.agent.walletapi.benchmark +package org.hyperledger.identus.agent.walletapi.benchmark -import io.iohk.atala.agent.walletapi.vault.KVCodec -import io.iohk.atala.agent.walletapi.vault.VaultKVClient -import io.iohk.atala.shared.crypto.Apollo -import io.iohk.atala.shared.crypto.DerivationPath -import io.iohk.atala.shared.crypto.Secp256k1PrivateKey -import io.iohk.atala.shared.models.Base64UrlString -import io.iohk.atala.shared.models.HexString -import io.iohk.atala.test.container.VaultTestContainerSupport +import org.hyperledger.identus.agent.walletapi.vault.KVCodec +import org.hyperledger.identus.agent.walletapi.vault.VaultKVClient +import org.hyperledger.identus.shared.crypto.Apollo +import org.hyperledger.identus.shared.crypto.DerivationPath +import org.hyperledger.identus.shared.crypto.Secp256k1PrivateKey +import org.hyperledger.identus.shared.models.Base64UrlString +import org.hyperledger.identus.shared.models.HexString +import org.hyperledger.identus.test.container.VaultTestContainerSupport import scala.util.Try import zio.* import zio.test.* diff --git a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/service/ManagedDIDServiceSpec.scala b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/service/ManagedDIDServiceSpec.scala similarity index 96% rename from prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/service/ManagedDIDServiceSpec.scala rename to cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/service/ManagedDIDServiceSpec.scala index 5ffc724abf..c819cc0f2e 100644 --- a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/service/ManagedDIDServiceSpec.scala +++ b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/service/ManagedDIDServiceSpec.scala @@ -1,24 +1,24 @@ -package io.iohk.atala.agent.walletapi.service +package org.hyperledger.identus.agent.walletapi.service -import io.iohk.atala.agent.walletapi.model.* -import io.iohk.atala.agent.walletapi.model.error.{ +import org.hyperledger.identus.agent.walletapi.model.* +import org.hyperledger.identus.agent.walletapi.model.error.{ CreateManagedDIDError, DIDSecretStorageError, PublishManagedDIDError, UpdateManagedDIDError } -import io.iohk.atala.agent.walletapi.sql.* -import io.iohk.atala.agent.walletapi.storage.* -import io.iohk.atala.agent.walletapi.vault.{VaultDIDSecretStorage, VaultWalletSecretStorage} -import io.iohk.atala.castor.core.model.did.* -import io.iohk.atala.castor.core.model.error -import io.iohk.atala.castor.core.service.DIDService -import io.iohk.atala.castor.core.util.DIDOperationValidator -import io.iohk.atala.shared.crypto.ApolloSpecHelper -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletAdministrationContext -import io.iohk.atala.sharedtest.containers.PostgresTestContainerSupport -import io.iohk.atala.test.container.{DBTestUtils, VaultTestContainerSupport} +import org.hyperledger.identus.agent.walletapi.sql.* +import org.hyperledger.identus.agent.walletapi.storage.* +import org.hyperledger.identus.agent.walletapi.vault.{VaultDIDSecretStorage, VaultWalletSecretStorage} +import org.hyperledger.identus.castor.core.model.did.* +import org.hyperledger.identus.castor.core.model.error +import org.hyperledger.identus.castor.core.service.DIDService +import org.hyperledger.identus.castor.core.util.DIDOperationValidator +import org.hyperledger.identus.shared.crypto.ApolloSpecHelper +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletAdministrationContext +import org.hyperledger.identus.sharedtest.containers.PostgresTestContainerSupport +import org.hyperledger.identus.test.container.{DBTestUtils, VaultTestContainerSupport} import zio.* import zio.test.* import zio.test.Assertion.* diff --git a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/service/WalletManagementServiceSpec.scala b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/service/WalletManagementServiceSpec.scala similarity index 87% rename from prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/service/WalletManagementServiceSpec.scala rename to cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/service/WalletManagementServiceSpec.scala index 60d18eed1c..86e03e86ff 100644 --- a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/service/WalletManagementServiceSpec.scala +++ b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/service/WalletManagementServiceSpec.scala @@ -1,20 +1,20 @@ -package io.iohk.atala.agent.walletapi.service +package org.hyperledger.identus.agent.walletapi.service -import io.iohk.atala.agent.walletapi.model.Wallet -import io.iohk.atala.agent.walletapi.model.WalletSeed -import io.iohk.atala.agent.walletapi.service.WalletManagementServiceError.DuplicatedWalletSeed -import io.iohk.atala.agent.walletapi.service.WalletManagementServiceError.TooManyPermittedWallet -import io.iohk.atala.agent.walletapi.sql.JdbcWalletNonSecretStorage -import io.iohk.atala.agent.walletapi.sql.JdbcWalletSecretStorage -import io.iohk.atala.agent.walletapi.storage.WalletSecretStorage -import io.iohk.atala.agent.walletapi.vault.VaultWalletSecretStorage -import io.iohk.atala.shared.crypto.ApolloSpecHelper -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletAdministrationContext -import io.iohk.atala.shared.models.WalletId -import io.iohk.atala.sharedtest.containers.PostgresTestContainerSupport -import io.iohk.atala.test.container.DBTestUtils -import io.iohk.atala.test.container.VaultTestContainerSupport +import org.hyperledger.identus.agent.walletapi.model.Wallet +import org.hyperledger.identus.agent.walletapi.model.WalletSeed +import org.hyperledger.identus.agent.walletapi.service.WalletManagementServiceError.DuplicatedWalletSeed +import org.hyperledger.identus.agent.walletapi.service.WalletManagementServiceError.TooManyPermittedWallet +import org.hyperledger.identus.agent.walletapi.sql.JdbcWalletNonSecretStorage +import org.hyperledger.identus.agent.walletapi.sql.JdbcWalletSecretStorage +import org.hyperledger.identus.agent.walletapi.storage.WalletSecretStorage +import org.hyperledger.identus.agent.walletapi.vault.VaultWalletSecretStorage +import org.hyperledger.identus.shared.crypto.ApolloSpecHelper +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletAdministrationContext +import org.hyperledger.identus.shared.models.WalletId +import org.hyperledger.identus.sharedtest.containers.PostgresTestContainerSupport +import org.hyperledger.identus.test.container.DBTestUtils +import org.hyperledger.identus.test.container.VaultTestContainerSupport import zio.* import zio.test.* import zio.test.Assertion.* diff --git a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/storage/DIDSecretStorageSpec.scala b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/storage/DIDSecretStorageSpec.scala similarity index 89% rename from prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/storage/DIDSecretStorageSpec.scala rename to cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/storage/DIDSecretStorageSpec.scala index 974c885f12..b72d982e99 100644 --- a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/storage/DIDSecretStorageSpec.scala +++ b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/storage/DIDSecretStorageSpec.scala @@ -1,20 +1,20 @@ -package io.iohk.atala.agent.walletapi.storage +package org.hyperledger.identus.agent.walletapi.storage -import io.iohk.atala.agent.walletapi.model.Wallet -import io.iohk.atala.agent.walletapi.service.{WalletManagementService, WalletManagementServiceImpl} -import io.iohk.atala.agent.walletapi.sql.{ +import org.hyperledger.identus.agent.walletapi.model.Wallet +import org.hyperledger.identus.agent.walletapi.service.{WalletManagementService, WalletManagementServiceImpl} +import org.hyperledger.identus.agent.walletapi.sql.{ JdbcDIDNonSecretStorage, JdbcDIDSecretStorage, JdbcWalletNonSecretStorage, JdbcWalletSecretStorage } -import io.iohk.atala.agent.walletapi.vault.{VaultDIDSecretStorage, VaultWalletSecretStorage} -import io.iohk.atala.mercury.PeerDID -import io.iohk.atala.shared.crypto.ApolloSpecHelper -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletAdministrationContext -import io.iohk.atala.sharedtest.containers.PostgresTestContainerSupport -import io.iohk.atala.test.container.{DBTestUtils, VaultTestContainerSupport} +import org.hyperledger.identus.agent.walletapi.vault.{VaultDIDSecretStorage, VaultWalletSecretStorage} +import org.hyperledger.identus.mercury.PeerDID +import org.hyperledger.identus.shared.crypto.ApolloSpecHelper +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletAdministrationContext +import org.hyperledger.identus.sharedtest.containers.PostgresTestContainerSupport +import org.hyperledger.identus.test.container.{DBTestUtils, VaultTestContainerSupport} import zio.* import zio.test.* import zio.test.Assertion.* diff --git a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/storage/GenericSecretStorageSpec.scala b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/storage/GenericSecretStorageSpec.scala similarity index 87% rename from prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/storage/GenericSecretStorageSpec.scala rename to cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/storage/GenericSecretStorageSpec.scala index 51a564d3e2..2b7e95a142 100644 --- a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/storage/GenericSecretStorageSpec.scala +++ b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/storage/GenericSecretStorageSpec.scala @@ -1,15 +1,19 @@ -package io.iohk.atala.agent.walletapi.storage - -import io.iohk.atala.agent.walletapi.memory.GenericSecretStorageInMemory -import io.iohk.atala.agent.walletapi.model.Wallet -import io.iohk.atala.agent.walletapi.service.{WalletManagementService, WalletManagementServiceImpl} -import io.iohk.atala.agent.walletapi.sql.{JdbcGenericSecretStorage, JdbcWalletNonSecretStorage, JdbcWalletSecretStorage} -import io.iohk.atala.agent.walletapi.vault.{VaultGenericSecretStorage, VaultWalletSecretStorage} -import io.iohk.atala.shared.crypto.ApolloSpecHelper -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletAdministrationContext -import io.iohk.atala.sharedtest.containers.PostgresTestContainerSupport -import io.iohk.atala.test.container.{DBTestUtils, VaultTestContainerSupport} +package org.hyperledger.identus.agent.walletapi.storage + +import org.hyperledger.identus.agent.walletapi.memory.GenericSecretStorageInMemory +import org.hyperledger.identus.agent.walletapi.model.Wallet +import org.hyperledger.identus.agent.walletapi.service.{WalletManagementService, WalletManagementServiceImpl} +import org.hyperledger.identus.agent.walletapi.sql.{ + JdbcGenericSecretStorage, + JdbcWalletNonSecretStorage, + JdbcWalletSecretStorage +} +import org.hyperledger.identus.agent.walletapi.vault.{VaultGenericSecretStorage, VaultWalletSecretStorage} +import org.hyperledger.identus.shared.crypto.ApolloSpecHelper +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletAdministrationContext +import org.hyperledger.identus.sharedtest.containers.PostgresTestContainerSupport +import org.hyperledger.identus.test.container.{DBTestUtils, VaultTestContainerSupport} import zio.* import zio.json.ast.Json import zio.test.* diff --git a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/storage/JdbcEntityRepositorySpec.scala b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/storage/JdbcEntityRepositorySpec.scala similarity index 93% rename from prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/storage/JdbcEntityRepositorySpec.scala rename to cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/storage/JdbcEntityRepositorySpec.scala index a1da66a1fa..8ab2904559 100644 --- a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/storage/JdbcEntityRepositorySpec.scala +++ b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/storage/JdbcEntityRepositorySpec.scala @@ -1,15 +1,15 @@ -package io.iohk.atala.agent.walletapi.storage +package org.hyperledger.identus.agent.walletapi.storage -import io.iohk.atala.agent.walletapi.model.error.EntityServiceError.{ +import org.hyperledger.identus.agent.walletapi.model.error.EntityServiceError.{ EntityAlreadyExists, EntityNotFound, EntityWalletNotFound } -import io.iohk.atala.agent.walletapi.model.{Entity, Wallet} -import io.iohk.atala.agent.walletapi.sql.{EntityRepository, JdbcEntityRepository, JdbcWalletNonSecretStorage} -import io.iohk.atala.shared.models.WalletId -import io.iohk.atala.sharedtest.containers.PostgresTestContainerSupport -import io.iohk.atala.test.container.DBTestUtils +import org.hyperledger.identus.agent.walletapi.model.{Entity, Wallet} +import org.hyperledger.identus.agent.walletapi.sql.{EntityRepository, JdbcEntityRepository, JdbcWalletNonSecretStorage} +import org.hyperledger.identus.shared.models.WalletId +import org.hyperledger.identus.sharedtest.containers.PostgresTestContainerSupport +import org.hyperledger.identus.test.container.DBTestUtils import zio.* import zio.test.* import zio.test.Assertion.* diff --git a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/storage/JdbcWalletNonSecretStorageSpec.scala b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/storage/JdbcWalletNonSecretStorageSpec.scala similarity index 90% rename from prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/storage/JdbcWalletNonSecretStorageSpec.scala rename to cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/storage/JdbcWalletNonSecretStorageSpec.scala index b23ad0a2c6..e112843b3d 100644 --- a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/storage/JdbcWalletNonSecretStorageSpec.scala +++ b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/storage/JdbcWalletNonSecretStorageSpec.scala @@ -1,15 +1,15 @@ -package io.iohk.atala.agent.walletapi.storage +package org.hyperledger.identus.agent.walletapi.storage -import io.iohk.atala.agent.walletapi.model.Wallet -import io.iohk.atala.agent.walletapi.sql.JdbcWalletNonSecretStorage -import io.iohk.atala.agent.walletapi.storage.WalletNonSecretStorageError.TooManyWebhook -import io.iohk.atala.agent.walletapi.storage.WalletNonSecretStorageError.DuplicatedWalletId -import io.iohk.atala.agent.walletapi.storage.WalletNonSecretStorageError.DuplicatedWalletSeed -import io.iohk.atala.event.notification.EventNotificationConfig -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletId -import io.iohk.atala.sharedtest.containers.PostgresTestContainerSupport -import io.iohk.atala.test.container.DBTestUtils +import org.hyperledger.identus.agent.walletapi.model.Wallet +import org.hyperledger.identus.agent.walletapi.sql.JdbcWalletNonSecretStorage +import org.hyperledger.identus.agent.walletapi.storage.WalletNonSecretStorageError.TooManyWebhook +import org.hyperledger.identus.agent.walletapi.storage.WalletNonSecretStorageError.DuplicatedWalletId +import org.hyperledger.identus.agent.walletapi.storage.WalletNonSecretStorageError.DuplicatedWalletSeed +import org.hyperledger.identus.event.notification.EventNotificationConfig +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletId +import org.hyperledger.identus.sharedtest.containers.PostgresTestContainerSupport +import org.hyperledger.identus.test.container.DBTestUtils import zio.* import zio.test.* import zio.test.Assertion.* diff --git a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/storage/StorageSpecHelper.scala b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/storage/StorageSpecHelper.scala similarity index 65% rename from prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/storage/StorageSpecHelper.scala rename to cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/storage/StorageSpecHelper.scala index 1670b6b1e1..8e4b5fde56 100644 --- a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/storage/StorageSpecHelper.scala +++ b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/storage/StorageSpecHelper.scala @@ -1,21 +1,21 @@ -package io.iohk.atala.agent.walletapi.storage +package org.hyperledger.identus.agent.walletapi.storage -import io.iohk.atala.agent.walletapi.model.DIDPublicKeyTemplate -import io.iohk.atala.agent.walletapi.model.DIDUpdateLineage -import io.iohk.atala.agent.walletapi.model.ManagedDIDState -import io.iohk.atala.agent.walletapi.model.ManagedDIDTemplate -import io.iohk.atala.agent.walletapi.model.PublicationState -import io.iohk.atala.agent.walletapi.model.Wallet -import io.iohk.atala.agent.walletapi.service.WalletManagementService -import io.iohk.atala.agent.walletapi.util.OperationFactory -import io.iohk.atala.castor.core.model.did.EllipticCurve -import io.iohk.atala.castor.core.model.did.PrismDID -import io.iohk.atala.castor.core.model.did.PrismDIDOperation -import io.iohk.atala.castor.core.model.did.ScheduledDIDOperationStatus -import io.iohk.atala.castor.core.model.did.VerificationRelationship -import io.iohk.atala.shared.crypto.ApolloSpecHelper -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletAdministrationContext +import org.hyperledger.identus.agent.walletapi.model.DIDPublicKeyTemplate +import org.hyperledger.identus.agent.walletapi.model.DIDUpdateLineage +import org.hyperledger.identus.agent.walletapi.model.ManagedDIDState +import org.hyperledger.identus.agent.walletapi.model.ManagedDIDTemplate +import org.hyperledger.identus.agent.walletapi.model.PublicationState +import org.hyperledger.identus.agent.walletapi.model.Wallet +import org.hyperledger.identus.agent.walletapi.service.WalletManagementService +import org.hyperledger.identus.agent.walletapi.util.OperationFactory +import org.hyperledger.identus.castor.core.model.did.EllipticCurve +import org.hyperledger.identus.castor.core.model.did.PrismDID +import org.hyperledger.identus.castor.core.model.did.PrismDIDOperation +import org.hyperledger.identus.castor.core.model.did.ScheduledDIDOperationStatus +import org.hyperledger.identus.castor.core.model.did.VerificationRelationship +import org.hyperledger.identus.shared.crypto.ApolloSpecHelper +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletAdministrationContext import zio.* import zio.test.* diff --git a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/storage/WalletSecretStorageSpec.scala b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/storage/WalletSecretStorageSpec.scala similarity index 79% rename from prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/storage/WalletSecretStorageSpec.scala rename to cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/storage/WalletSecretStorageSpec.scala index d913d1dea9..de3c005a71 100644 --- a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/storage/WalletSecretStorageSpec.scala +++ b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/storage/WalletSecretStorageSpec.scala @@ -1,14 +1,14 @@ -package io.iohk.atala.agent.walletapi.storage +package org.hyperledger.identus.agent.walletapi.storage -import io.iohk.atala.agent.walletapi.model.Wallet -import io.iohk.atala.agent.walletapi.model.WalletSeed -import io.iohk.atala.agent.walletapi.sql.JdbcWalletNonSecretStorage -import io.iohk.atala.agent.walletapi.sql.JdbcWalletSecretStorage -import io.iohk.atala.agent.walletapi.vault.VaultWalletSecretStorage -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.sharedtest.containers.PostgresTestContainerSupport -import io.iohk.atala.test.container.DBTestUtils -import io.iohk.atala.test.container.VaultTestContainerSupport +import org.hyperledger.identus.agent.walletapi.model.Wallet +import org.hyperledger.identus.agent.walletapi.model.WalletSeed +import org.hyperledger.identus.agent.walletapi.sql.JdbcWalletNonSecretStorage +import org.hyperledger.identus.agent.walletapi.sql.JdbcWalletSecretStorage +import org.hyperledger.identus.agent.walletapi.vault.VaultWalletSecretStorage +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.sharedtest.containers.PostgresTestContainerSupport +import org.hyperledger.identus.test.container.DBTestUtils +import org.hyperledger.identus.test.container.VaultTestContainerSupport import zio.* import zio.test.* import zio.test.Assertion.* diff --git a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/util/ManagedDIDTemplateValidatorSpec.scala b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/util/ManagedDIDTemplateValidatorSpec.scala similarity index 72% rename from prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/util/ManagedDIDTemplateValidatorSpec.scala rename to cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/util/ManagedDIDTemplateValidatorSpec.scala index f8bfb61541..37e0d343be 100644 --- a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/util/ManagedDIDTemplateValidatorSpec.scala +++ b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/util/ManagedDIDTemplateValidatorSpec.scala @@ -1,12 +1,12 @@ -package io.iohk.atala.agent.walletapi.util +package org.hyperledger.identus.agent.walletapi.util -import io.iohk.atala.agent.walletapi.model.{DIDPublicKeyTemplate, ManagedDIDTemplate} -import io.iohk.atala.agent.walletapi.service.ManagedDIDService -import io.iohk.atala.castor.core.model.did.EllipticCurve -import io.iohk.atala.castor.core.model.did.ServiceEndpoint -import io.iohk.atala.castor.core.model.did.ServiceEndpoint.UriOrJsonEndpoint -import io.iohk.atala.castor.core.model.did.ServiceEndpoint.UriValue -import io.iohk.atala.castor.core.model.did.{Service, ServiceType, VerificationRelationship} +import org.hyperledger.identus.agent.walletapi.model.{DIDPublicKeyTemplate, ManagedDIDTemplate} +import org.hyperledger.identus.agent.walletapi.service.ManagedDIDService +import org.hyperledger.identus.castor.core.model.did.EllipticCurve +import org.hyperledger.identus.castor.core.model.did.ServiceEndpoint +import org.hyperledger.identus.castor.core.model.did.ServiceEndpoint.UriOrJsonEndpoint +import org.hyperledger.identus.castor.core.model.did.ServiceEndpoint.UriValue +import org.hyperledger.identus.castor.core.model.did.{Service, ServiceType, VerificationRelationship} import zio.* import zio.test.* import zio.test.Assertion.* diff --git a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/util/OperationFactorySpec.scala b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/util/OperationFactorySpec.scala similarity index 95% rename from prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/util/OperationFactorySpec.scala rename to cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/util/OperationFactorySpec.scala index 4e9f684160..6e28f86376 100644 --- a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/util/OperationFactorySpec.scala +++ b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/agent/walletapi/util/OperationFactorySpec.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.agent.walletapi.util +package org.hyperledger.identus.agent.walletapi.util -import io.iohk.atala.agent.walletapi.model.* -import io.iohk.atala.castor.core.model.did.* -import io.iohk.atala.shared.crypto.ApolloSpecHelper -import io.iohk.atala.shared.models.HexString +import org.hyperledger.identus.agent.walletapi.model.* +import org.hyperledger.identus.castor.core.model.did.* +import org.hyperledger.identus.shared.crypto.ApolloSpecHelper +import org.hyperledger.identus.shared.models.HexString import zio.* import zio.test.* import zio.test.Assertion.* diff --git a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/test/container/DBTestUtils.scala b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/test/container/DBTestUtils.scala similarity index 95% rename from prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/test/container/DBTestUtils.scala rename to cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/test/container/DBTestUtils.scala index c50b700eba..6a6d4da18b 100644 --- a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/test/container/DBTestUtils.scala +++ b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/test/container/DBTestUtils.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.test.container +package org.hyperledger.identus.test.container import com.dimafeng.testcontainers.PostgreSQLContainer import org.flywaydb.core.Flyway diff --git a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/test/container/VaultLayer.scala b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/test/container/VaultLayer.scala similarity index 76% rename from prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/test/container/VaultLayer.scala rename to cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/test/container/VaultLayer.scala index bbbbc4d508..7c539c463b 100644 --- a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/test/container/VaultLayer.scala +++ b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/test/container/VaultLayer.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.test.container +package org.hyperledger.identus.test.container import zio.* -import io.iohk.atala.sharedtest.containers.VaultTestContainer -import io.iohk.atala.sharedtest.containers.VaultContainerCustom +import org.hyperledger.identus.sharedtest.containers.VaultTestContainer +import org.hyperledger.identus.sharedtest.containers.VaultContainerCustom object VaultLayer { diff --git a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/test/container/VaultTestContainerSupport.scala b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/test/container/VaultTestContainerSupport.scala similarity index 71% rename from prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/test/container/VaultTestContainerSupport.scala rename to cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/test/container/VaultTestContainerSupport.scala index 03447a1dbd..b4e9111c5f 100644 --- a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/test/container/VaultTestContainerSupport.scala +++ b/cloud-agent/service/wallet-api/src/test/scala/org/hyperledger/identus/test/container/VaultTestContainerSupport.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.test.container +package org.hyperledger.identus.test.container -import io.iohk.atala.agent.walletapi.vault.VaultKVClient -import io.iohk.atala.agent.walletapi.vault.VaultKVClientImpl -import io.iohk.atala.sharedtest.containers.VaultContainerCustom +import org.hyperledger.identus.agent.walletapi.vault.VaultKVClient +import org.hyperledger.identus.agent.walletapi.vault.VaultKVClientImpl +import org.hyperledger.identus.sharedtest.containers.VaultContainerCustom import zio.* import zio.http.Client diff --git a/connect/lib/CHANGELOG.md b/connect/CHANGELOG.md similarity index 100% rename from connect/lib/CHANGELOG.md rename to connect/CHANGELOG.md diff --git a/connect/lib/README.md b/connect/README.md similarity index 100% rename from connect/lib/README.md rename to connect/README.md diff --git a/connect/lib/connect-protocol-state.md b/connect/connect-protocol-state.md similarity index 100% rename from connect/lib/connect-protocol-state.md rename to connect/connect-protocol-state.md diff --git a/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/model/ConnectionRecord.scala b/connect/core/src/main/scala/org/hyperledger/identus/connect/core/model/ConnectionRecord.scala similarity index 91% rename from connect/lib/core/src/main/scala/io/iohk/atala/connect/core/model/ConnectionRecord.scala rename to connect/core/src/main/scala/org/hyperledger/identus/connect/core/model/ConnectionRecord.scala index 3a91d8ef26..d1e33be574 100644 --- a/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/model/ConnectionRecord.scala +++ b/connect/core/src/main/scala/org/hyperledger/identus/connect/core/model/ConnectionRecord.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.connect.core.model +package org.hyperledger.identus.connect.core.model -import io.iohk.atala.connect.core.model.ConnectionRecord.{ProtocolState, Role} -import io.iohk.atala.mercury.protocol.connection.{ConnectionRequest, ConnectionResponse} -import io.iohk.atala.mercury.protocol.invitation.v2.Invitation +import org.hyperledger.identus.connect.core.model.ConnectionRecord.{ProtocolState, Role} +import org.hyperledger.identus.mercury.protocol.connection.{ConnectionRequest, ConnectionResponse} +import org.hyperledger.identus.mercury.protocol.invitation.v2.Invitation import java.time.Instant import java.time.temporal.ChronoUnit diff --git a/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/model/error/ConnectionServiceError.scala b/connect/core/src/main/scala/org/hyperledger/identus/connect/core/model/error/ConnectionServiceError.scala similarity index 90% rename from connect/lib/core/src/main/scala/io/iohk/atala/connect/core/model/error/ConnectionServiceError.scala rename to connect/core/src/main/scala/org/hyperledger/identus/connect/core/model/error/ConnectionServiceError.scala index fb9bc514e7..f4a23b745b 100644 --- a/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/model/error/ConnectionServiceError.scala +++ b/connect/core/src/main/scala/org/hyperledger/identus/connect/core/model/error/ConnectionServiceError.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.connect.core.model.error +package org.hyperledger.identus.connect.core.model.error -import io.iohk.atala.connect.core.model.ConnectionRecord.ProtocolState -import io.iohk.atala.shared.models.{Failure, StatusCode} +import org.hyperledger.identus.connect.core.model.ConnectionRecord.ProtocolState +import org.hyperledger.identus.shared.models.{Failure, StatusCode} import zio.NonEmptyChunk import java.util.UUID diff --git a/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/repository/ConnectionRepository.scala b/connect/core/src/main/scala/org/hyperledger/identus/connect/core/repository/ConnectionRepository.scala similarity index 82% rename from connect/lib/core/src/main/scala/io/iohk/atala/connect/core/repository/ConnectionRepository.scala rename to connect/core/src/main/scala/org/hyperledger/identus/connect/core/repository/ConnectionRepository.scala index 3ba6843bc8..121371700c 100644 --- a/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/repository/ConnectionRepository.scala +++ b/connect/core/src/main/scala/org/hyperledger/identus/connect/core/repository/ConnectionRepository.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.connect.core.repository +package org.hyperledger.identus.connect.core.repository -import io.iohk.atala.connect.core.model.ConnectionRecord -import io.iohk.atala.connect.core.model.ConnectionRecord.ProtocolState -import io.iohk.atala.mercury.protocol.connection.* -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.connect.core.model.ConnectionRecord +import org.hyperledger.identus.connect.core.model.ConnectionRecord.ProtocolState +import org.hyperledger.identus.mercury.protocol.connection.* +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.UIO import zio.URIO diff --git a/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/repository/ConnectionRepositoryInMemory.scala b/connect/core/src/main/scala/org/hyperledger/identus/connect/core/repository/ConnectionRepositoryInMemory.scala similarity index 93% rename from connect/lib/core/src/main/scala/io/iohk/atala/connect/core/repository/ConnectionRepositoryInMemory.scala rename to connect/core/src/main/scala/org/hyperledger/identus/connect/core/repository/ConnectionRepositoryInMemory.scala index f4f2f57142..b9415bc354 100644 --- a/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/repository/ConnectionRepositoryInMemory.scala +++ b/connect/core/src/main/scala/org/hyperledger/identus/connect/core/repository/ConnectionRepositoryInMemory.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.connect.core.repository - -import io.iohk.atala.connect.core.model.ConnectionRecord -import io.iohk.atala.connect.core.model.ConnectionRecord.ProtocolState -import io.iohk.atala.mercury.protocol.connection.ConnectionRequest -import io.iohk.atala.mercury.protocol.connection.ConnectionResponse -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletId +package org.hyperledger.identus.connect.core.repository + +import org.hyperledger.identus.connect.core.model.ConnectionRecord +import org.hyperledger.identus.connect.core.model.ConnectionRecord.ProtocolState +import org.hyperledger.identus.mercury.protocol.connection.ConnectionRequest +import org.hyperledger.identus.mercury.protocol.connection.ConnectionResponse +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletId import zio.* import java.time.Instant diff --git a/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/service/ConnectionService.scala b/connect/core/src/main/scala/org/hyperledger/identus/connect/core/service/ConnectionService.scala similarity index 83% rename from connect/lib/core/src/main/scala/io/iohk/atala/connect/core/service/ConnectionService.scala rename to connect/core/src/main/scala/org/hyperledger/identus/connect/core/service/ConnectionService.scala index c68f751f8d..27d5c0eb1b 100644 --- a/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/service/ConnectionService.scala +++ b/connect/core/src/main/scala/org/hyperledger/identus/connect/core/service/ConnectionService.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.connect.core.service - -import io.iohk.atala.connect.core.model.ConnectionRecord -import io.iohk.atala.connect.core.model.error.ConnectionServiceError -import io.iohk.atala.connect.core.model.error.ConnectionServiceError.* -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.mercury.protocol.connection.{ConnectionRequest, ConnectionResponse} -import io.iohk.atala.shared.models.WalletAccessContext +package org.hyperledger.identus.connect.core.service + +import org.hyperledger.identus.connect.core.model.ConnectionRecord +import org.hyperledger.identus.connect.core.model.error.ConnectionServiceError +import org.hyperledger.identus.connect.core.model.error.ConnectionServiceError.* +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.mercury.protocol.connection.{ConnectionRequest, ConnectionResponse} +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import java.time.Duration diff --git a/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/service/ConnectionServiceImpl.scala b/connect/core/src/main/scala/org/hyperledger/identus/connect/core/service/ConnectionServiceImpl.scala similarity index 92% rename from connect/lib/core/src/main/scala/io/iohk/atala/connect/core/service/ConnectionServiceImpl.scala rename to connect/core/src/main/scala/org/hyperledger/identus/connect/core/service/ConnectionServiceImpl.scala index d4132d7d65..175f16ec6a 100644 --- a/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/service/ConnectionServiceImpl.scala +++ b/connect/core/src/main/scala/org/hyperledger/identus/connect/core/service/ConnectionServiceImpl.scala @@ -1,23 +1,24 @@ -package io.iohk.atala.connect.core.service +package org.hyperledger.identus.connect.core.service -import io.iohk.atala.connect.core.model.ConnectionRecord -import io.iohk.atala.connect.core.model.ConnectionRecord.* -import io.iohk.atala.connect.core.model.error.ConnectionServiceError -import io.iohk.atala.connect.core.model.error.ConnectionServiceError.* -import io.iohk.atala.connect.core.repository.ConnectionRepository -import io.iohk.atala.mercury.* -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.mercury.protocol.connection.* -import io.iohk.atala.mercury.protocol.invitation.v2.Invitation -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.utils.Base64Utils -import io.iohk.atala.shared.utils.aspects.CustomMetricsAspect -import io.iohk.atala.shared.validation.ValidationUtils +import org.hyperledger.identus.connect.core.model.ConnectionRecord +import org.hyperledger.identus.connect.core.model.ConnectionRecord.* +import org.hyperledger.identus.connect.core.model.error.ConnectionServiceError +import org.hyperledger.identus.connect.core.model.error.ConnectionServiceError.* +import org.hyperledger.identus.connect.core.repository.ConnectionRepository +import org.hyperledger.identus.* +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.mercury.protocol.connection.* +import org.hyperledger.identus.mercury.protocol.invitation.v2.Invitation +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.utils.Base64Utils +import org.hyperledger.identus.shared.utils.aspects.CustomMetricsAspect +import org.hyperledger.identus.shared.validation.ValidationUtils import zio.* import zio.prelude.* import java.time.{Duration, Instant} import java.util.UUID + private class ConnectionServiceImpl( connectionRepository: ConnectionRepository, maxRetries: Int = 5, // TODO move to config diff --git a/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/service/ConnectionServiceNotifier.scala b/connect/core/src/main/scala/org/hyperledger/identus/connect/core/service/ConnectionServiceNotifier.scala similarity index 88% rename from connect/lib/core/src/main/scala/io/iohk/atala/connect/core/service/ConnectionServiceNotifier.scala rename to connect/core/src/main/scala/org/hyperledger/identus/connect/core/service/ConnectionServiceNotifier.scala index e6294cf85f..05ebead7b0 100644 --- a/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/service/ConnectionServiceNotifier.scala +++ b/connect/core/src/main/scala/org/hyperledger/identus/connect/core/service/ConnectionServiceNotifier.scala @@ -1,12 +1,12 @@ -package io.iohk.atala.connect.core.service - -import io.iohk.atala.connect.core.model.ConnectionRecord -import io.iohk.atala.connect.core.model.error.ConnectionServiceError -import io.iohk.atala.connect.core.model.error.ConnectionServiceError.* -import io.iohk.atala.event.notification.{Event, EventNotificationService} -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.mercury.protocol.connection.{ConnectionRequest, ConnectionResponse} -import io.iohk.atala.shared.models.WalletAccessContext +package org.hyperledger.identus.connect.core.service + +import org.hyperledger.identus.connect.core.model.ConnectionRecord +import org.hyperledger.identus.connect.core.model.error.ConnectionServiceError +import org.hyperledger.identus.connect.core.model.error.ConnectionServiceError.* +import org.hyperledger.identus.event.notification.{Event, EventNotificationService} +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.mercury.protocol.connection.{ConnectionRequest, ConnectionResponse} +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.{UIO, URIO, URLayer, ZIO, ZLayer} import java.time.Duration diff --git a/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/service/MockConnectionService.scala b/connect/core/src/main/scala/org/hyperledger/identus/connect/core/service/MockConnectionService.scala similarity index 91% rename from connect/lib/core/src/main/scala/io/iohk/atala/connect/core/service/MockConnectionService.scala rename to connect/core/src/main/scala/org/hyperledger/identus/connect/core/service/MockConnectionService.scala index b1eb81e1df..597460e992 100644 --- a/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/service/MockConnectionService.scala +++ b/connect/core/src/main/scala/org/hyperledger/identus/connect/core/service/MockConnectionService.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.connect.core.service - -import io.iohk.atala.connect.core.model.ConnectionRecord -import io.iohk.atala.connect.core.model.error.ConnectionServiceError -import io.iohk.atala.connect.core.model.error.ConnectionServiceError.* -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.mercury.protocol.connection.{ConnectionRequest, ConnectionResponse} -import io.iohk.atala.shared.models.WalletAccessContext +package org.hyperledger.identus.connect.core.service + +import org.hyperledger.identus.connect.core.model.ConnectionRecord +import org.hyperledger.identus.connect.core.model.error.ConnectionServiceError +import org.hyperledger.identus.connect.core.model.error.ConnectionServiceError.* +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.mercury.protocol.connection.{ConnectionRequest, ConnectionResponse} +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.mock.{Mock, Proxy} import zio.{UIO, URIO, URLayer, ZIO, ZLayer, mock} diff --git a/connect/lib/core/src/test/scala/io/iohk/atala/connect/core/repository/ConnectionRepositoryInMemorySpec.scala b/connect/core/src/test/scala/org/hyperledger/identus/connect/core/repository/ConnectionRepositoryInMemorySpec.scala similarity index 88% rename from connect/lib/core/src/test/scala/io/iohk/atala/connect/core/repository/ConnectionRepositoryInMemorySpec.scala rename to connect/core/src/test/scala/org/hyperledger/identus/connect/core/repository/ConnectionRepositoryInMemorySpec.scala index aeddbf6190..38751293bc 100644 --- a/connect/lib/core/src/test/scala/io/iohk/atala/connect/core/repository/ConnectionRepositoryInMemorySpec.scala +++ b/connect/core/src/test/scala/org/hyperledger/identus/connect/core/repository/ConnectionRepositoryInMemorySpec.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.connect.core.repository +package org.hyperledger.identus.connect.core.repository import zio.* import zio.test.* diff --git a/connect/lib/core/src/test/scala/io/iohk/atala/connect/core/repository/ConnectionRepositorySpecSuite.scala b/connect/core/src/test/scala/org/hyperledger/identus/connect/core/repository/ConnectionRepositorySpecSuite.scala similarity index 96% rename from connect/lib/core/src/test/scala/io/iohk/atala/connect/core/repository/ConnectionRepositorySpecSuite.scala rename to connect/core/src/test/scala/org/hyperledger/identus/connect/core/repository/ConnectionRepositorySpecSuite.scala index 12e4d9876f..4aa03b95ab 100644 --- a/connect/lib/core/src/test/scala/io/iohk/atala/connect/core/repository/ConnectionRepositorySpecSuite.scala +++ b/connect/core/src/test/scala/org/hyperledger/identus/connect/core/repository/ConnectionRepositorySpecSuite.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.connect.core.repository +package org.hyperledger.identus.connect.core.repository -import io.iohk.atala.connect.core.model.ConnectionRecord -import io.iohk.atala.connect.core.model.ConnectionRecord.* -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.mercury.protocol.connection.{ConnectionRequest, ConnectionResponse} -import io.iohk.atala.mercury.protocol.invitation.v2.Invitation -import io.iohk.atala.shared.models.{WalletAccessContext, WalletId} +import org.hyperledger.identus.connect.core.model.ConnectionRecord +import org.hyperledger.identus.connect.core.model.ConnectionRecord.* +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.mercury.protocol.connection.{ConnectionRequest, ConnectionResponse} +import org.hyperledger.identus.mercury.protocol.invitation.v2.Invitation +import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} import zio.Exit.Failure import zio.test.* import zio.{Cause, Exit, ZIO, ZLayer} @@ -33,7 +33,7 @@ object ConnectionRepositorySpecSuite { from = DidId("did:prism:aaa"), body = Invitation .Body( - goal_code = Some("io.atalaprism.connect"), + goal_code = Some("org.hyperledger.identus.connect"), goal = Some("Establish a trust connection between two peers"), Nil ) @@ -50,7 +50,7 @@ object ConnectionRepositorySpecSuite { to = DidId("did:prism:bbb"), thid = None, pthid = Some(UUID.randomUUID().toString), - body = ConnectionRequest.Body(goal_code = Some("io.atalaprism.connect")) + body = ConnectionRequest.Body(goal_code = Some("org.hyperledger.identus.connect")) ) val testSuite = suite("CRUD operations")( diff --git a/connect/lib/core/src/test/scala/io/iohk/atala/connect/core/service/ConnectionServiceImplSpec.scala b/connect/core/src/test/scala/org/hyperledger/identus/connect/core/service/ConnectionServiceImplSpec.scala similarity index 95% rename from connect/lib/core/src/test/scala/io/iohk/atala/connect/core/service/ConnectionServiceImplSpec.scala rename to connect/core/src/test/scala/org/hyperledger/identus/connect/core/service/ConnectionServiceImplSpec.scala index af75f4f570..fca81c7a9a 100644 --- a/connect/lib/core/src/test/scala/io/iohk/atala/connect/core/service/ConnectionServiceImplSpec.scala +++ b/connect/core/src/test/scala/org/hyperledger/identus/connect/core/service/ConnectionServiceImplSpec.scala @@ -1,14 +1,14 @@ -package io.iohk.atala.connect.core.service +package org.hyperledger.identus.connect.core.service import io.circe.syntax.* -import io.iohk.atala.connect.core.model.ConnectionRecord -import io.iohk.atala.connect.core.model.ConnectionRecord.* -import io.iohk.atala.connect.core.model.error.ConnectionServiceError -import io.iohk.atala.connect.core.model.error.ConnectionServiceError.InvalidStateForOperation -import io.iohk.atala.connect.core.repository.ConnectionRepositoryInMemory -import io.iohk.atala.mercury.model.{DidId, Message} -import io.iohk.atala.mercury.protocol.connection.ConnectionResponse -import io.iohk.atala.shared.models.{WalletAccessContext, WalletId} +import org.hyperledger.identus.connect.core.model.ConnectionRecord +import org.hyperledger.identus.connect.core.model.ConnectionRecord.* +import org.hyperledger.identus.connect.core.model.error.ConnectionServiceError +import org.hyperledger.identus.connect.core.model.error.ConnectionServiceError.InvalidStateForOperation +import org.hyperledger.identus.connect.core.repository.ConnectionRepositoryInMemory +import org.hyperledger.identus.mercury.model.{DidId, Message} +import org.hyperledger.identus.mercury.protocol.connection.ConnectionResponse +import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} import zio.* import zio.test.* import zio.test.Assertion.* diff --git a/connect/lib/core/src/test/scala/io/iohk/atala/connect/core/service/ConnectionServiceNotifierSpec.scala b/connect/core/src/test/scala/org/hyperledger/identus/connect/core/service/ConnectionServiceNotifierSpec.scala similarity index 90% rename from connect/lib/core/src/test/scala/io/iohk/atala/connect/core/service/ConnectionServiceNotifierSpec.scala rename to connect/core/src/test/scala/org/hyperledger/identus/connect/core/service/ConnectionServiceNotifierSpec.scala index 957a8beb69..2f156b0114 100644 --- a/connect/lib/core/src/test/scala/io/iohk/atala/connect/core/service/ConnectionServiceNotifierSpec.scala +++ b/connect/core/src/test/scala/org/hyperledger/identus/connect/core/service/ConnectionServiceNotifierSpec.scala @@ -1,13 +1,13 @@ -package io.iohk.atala.connect.core.service +package org.hyperledger.identus.connect.core.service -import io.iohk.atala.connect.core.model.ConnectionRecord -import io.iohk.atala.connect.core.model.ConnectionRecord.ProtocolState -import io.iohk.atala.connect.core.repository.ConnectionRepositoryInMemory -import io.iohk.atala.event.notification.* -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.mercury.protocol.connection.{ConnectionRequest, ConnectionResponse} -import io.iohk.atala.mercury.protocol.invitation.v2.Invitation -import io.iohk.atala.shared.models.{WalletAccessContext, WalletId} +import org.hyperledger.identus.connect.core.model.ConnectionRecord +import org.hyperledger.identus.connect.core.model.ConnectionRecord.ProtocolState +import org.hyperledger.identus.connect.core.repository.ConnectionRepositoryInMemory +import org.hyperledger.identus.event.notification.* +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.mercury.protocol.connection.{ConnectionRequest, ConnectionResponse} +import org.hyperledger.identus.mercury.protocol.invitation.v2.Invitation +import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} import zio.* import zio.ZIO.* import zio.mock.Expectation diff --git a/connect/lib/sql-doobie/src/main/resources/sql/connect/V1__init_tables.sql b/connect/sql-doobie/src/main/resources/sql/connect/V1__init_tables.sql similarity index 100% rename from connect/lib/sql-doobie/src/main/resources/sql/connect/V1__init_tables.sql rename to connect/sql-doobie/src/main/resources/sql/connect/V1__init_tables.sql diff --git a/connect/lib/sql-doobie/src/main/resources/sql/connect/V2__add_thid_unique_constraint.sql b/connect/sql-doobie/src/main/resources/sql/connect/V2__add_thid_unique_constraint.sql similarity index 100% rename from connect/lib/sql-doobie/src/main/resources/sql/connect/V2__add_thid_unique_constraint.sql rename to connect/sql-doobie/src/main/resources/sql/connect/V2__add_thid_unique_constraint.sql diff --git a/connect/lib/sql-doobie/src/main/resources/sql/connect/V3__add_meta_retries_and_meta_last_failure.sql b/connect/sql-doobie/src/main/resources/sql/connect/V3__add_meta_retries_and_meta_last_failure.sql similarity index 100% rename from connect/lib/sql-doobie/src/main/resources/sql/connect/V3__add_meta_retries_and_meta_last_failure.sql rename to connect/sql-doobie/src/main/resources/sql/connect/V3__add_meta_retries_and_meta_last_failure.sql diff --git a/connect/lib/sql-doobie/src/main/resources/sql/connect/V4__create_protocol_state_index.sql b/connect/sql-doobie/src/main/resources/sql/connect/V4__create_protocol_state_index.sql similarity index 100% rename from connect/lib/sql-doobie/src/main/resources/sql/connect/V4__create_protocol_state_index.sql rename to connect/sql-doobie/src/main/resources/sql/connect/V4__create_protocol_state_index.sql diff --git a/connect/lib/sql-doobie/src/main/resources/sql/connect/V5__add_meta_next_retry.sql b/connect/sql-doobie/src/main/resources/sql/connect/V5__add_meta_next_retry.sql similarity index 100% rename from connect/lib/sql-doobie/src/main/resources/sql/connect/V5__add_meta_next_retry.sql rename to connect/sql-doobie/src/main/resources/sql/connect/V5__add_meta_next_retry.sql diff --git a/connect/lib/sql-doobie/src/main/resources/sql/connect/V6__add_rls_policy.sql b/connect/sql-doobie/src/main/resources/sql/connect/V6__add_rls_policy.sql similarity index 100% rename from connect/lib/sql-doobie/src/main/resources/sql/connect/V6__add_rls_policy.sql rename to connect/sql-doobie/src/main/resources/sql/connect/V6__add_rls_policy.sql diff --git a/connect/lib/sql-doobie/src/main/resources/sql/connect/V7__add_goal_and_goal_code.sql b/connect/sql-doobie/src/main/resources/sql/connect/V7__add_goal_and_goal_code.sql similarity index 100% rename from connect/lib/sql-doobie/src/main/resources/sql/connect/V7__add_goal_and_goal_code.sql rename to connect/sql-doobie/src/main/resources/sql/connect/V7__add_goal_and_goal_code.sql diff --git a/connect/lib/sql-doobie/src/main/scala/io/iohk/atala/connect/sql/repository/JdbcConnectionRepository.scala b/connect/sql-doobie/src/main/scala/org/hyperledger/identus/connect/sql/repository/JdbcConnectionRepository.scala similarity index 94% rename from connect/lib/sql-doobie/src/main/scala/io/iohk/atala/connect/sql/repository/JdbcConnectionRepository.scala rename to connect/sql-doobie/src/main/scala/org/hyperledger/identus/connect/sql/repository/JdbcConnectionRepository.scala index 0f76908f37..439df93062 100644 --- a/connect/lib/sql-doobie/src/main/scala/io/iohk/atala/connect/sql/repository/JdbcConnectionRepository.scala +++ b/connect/sql-doobie/src/main/scala/org/hyperledger/identus/connect/sql/repository/JdbcConnectionRepository.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.connect.sql.repository +package org.hyperledger.identus.connect.sql.repository import cats.data.NonEmptyList import doobie.* @@ -8,14 +8,14 @@ import doobie.postgres.implicits.* import io.circe.* import io.circe.parser.* import io.circe.syntax.* -import io.iohk.atala.connect.core.model.* -import io.iohk.atala.connect.core.model.ConnectionRecord.{ProtocolState, Role} -import io.iohk.atala.connect.core.repository.ConnectionRepository -import io.iohk.atala.mercury.protocol.connection.* -import io.iohk.atala.mercury.protocol.invitation.v2.Invitation -import io.iohk.atala.shared.db.ContextAwareTask -import io.iohk.atala.shared.db.Implicits.* -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.connect.core.model.* +import org.hyperledger.identus.connect.core.model.ConnectionRecord.{ProtocolState, Role} +import org.hyperledger.identus.connect.core.repository.ConnectionRepository +import org.hyperledger.identus.mercury.protocol.connection.* +import org.hyperledger.identus.mercury.protocol.invitation.v2.Invitation +import org.hyperledger.identus.shared.db.ContextAwareTask +import org.hyperledger.identus.shared.db.Implicits.* +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import zio.interop.catz.* diff --git a/connect/lib/sql-doobie/src/main/scala/io/iohk/atala/connect/sql/repository/Migrations.scala b/connect/sql-doobie/src/main/scala/org/hyperledger/identus/connect/sql/repository/Migrations.scala similarity index 89% rename from connect/lib/sql-doobie/src/main/scala/io/iohk/atala/connect/sql/repository/Migrations.scala rename to connect/sql-doobie/src/main/scala/org/hyperledger/identus/connect/sql/repository/Migrations.scala index eeaf4dd70f..68f3051e15 100644 --- a/connect/lib/sql-doobie/src/main/scala/io/iohk/atala/connect/sql/repository/Migrations.scala +++ b/connect/sql-doobie/src/main/scala/org/hyperledger/identus/connect/sql/repository/Migrations.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.connect.sql.repository +package org.hyperledger.identus.connect.sql.repository import doobie.* import doobie.implicits.* import doobie.util.transactor.Transactor -import io.iohk.atala.shared.db.ContextAwareTask -import io.iohk.atala.shared.db.DbConfig -import io.iohk.atala.shared.db.Implicits.* +import org.hyperledger.identus.shared.db.ContextAwareTask +import org.hyperledger.identus.shared.db.DbConfig +import org.hyperledger.identus.shared.db.Implicits.* import org.flywaydb.core.Flyway import zio.* import zio.interop.catz.* diff --git a/connect/lib/sql-doobie/src/test/resources/logback.xml b/connect/sql-doobie/src/test/resources/logback.xml similarity index 100% rename from connect/lib/sql-doobie/src/test/resources/logback.xml rename to connect/sql-doobie/src/test/resources/logback.xml diff --git a/connect/lib/sql-doobie/src/test/scala/io/iohk/atala/connect/sql/repository/JdbcConnectionRepositorySpec.scala b/connect/sql-doobie/src/test/scala/org/hyperledger/identus/connect/sql/repository/JdbcConnectionRepositorySpec.scala similarity index 77% rename from connect/lib/sql-doobie/src/test/scala/io/iohk/atala/connect/sql/repository/JdbcConnectionRepositorySpec.scala rename to connect/sql-doobie/src/test/scala/org/hyperledger/identus/connect/sql/repository/JdbcConnectionRepositorySpec.scala index 32e4d8d6f0..13d10d6663 100644 --- a/connect/lib/sql-doobie/src/test/scala/io/iohk/atala/connect/sql/repository/JdbcConnectionRepositorySpec.scala +++ b/connect/sql-doobie/src/test/scala/org/hyperledger/identus/connect/sql/repository/JdbcConnectionRepositorySpec.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.connect.sql.repository +package org.hyperledger.identus.connect.sql.repository import com.dimafeng.testcontainers.PostgreSQLContainer -import io.iohk.atala.connect.core.repository.{ConnectionRepository, ConnectionRepositorySpecSuite} -import io.iohk.atala.shared.db.DbConfig -import io.iohk.atala.sharedtest.containers.PostgresTestContainerSupport +import org.hyperledger.identus.connect.core.repository.{ConnectionRepository, ConnectionRepositorySpecSuite} +import org.hyperledger.identus.shared.db.DbConfig +import org.hyperledger.identus.sharedtest.containers.PostgresTestContainerSupport import zio.* import zio.test.* diff --git a/connect/lib/sql-doobie/src/test/scala/io/iohk/atala/test/container/PostgresTestContainer.scala b/connect/sql-doobie/src/test/scala/org/hyperledger/identus/test/container/PostgresTestContainer.scala similarity index 78% rename from connect/lib/sql-doobie/src/test/scala/io/iohk/atala/test/container/PostgresTestContainer.scala rename to connect/sql-doobie/src/test/scala/org/hyperledger/identus/test/container/PostgresTestContainer.scala index a3f74c949a..35f4fabac8 100644 --- a/connect/lib/sql-doobie/src/test/scala/io/iohk/atala/test/container/PostgresTestContainer.scala +++ b/connect/sql-doobie/src/test/scala/org/hyperledger/identus/test/container/PostgresTestContainer.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.test.container +package org.hyperledger.identus.test.container import com.dimafeng.testcontainers.PostgreSQLContainer -import io.iohk.atala.sharedtest.containers.PostgresTestContainer.postgresContainer +import org.hyperledger.identus.sharedtest.containers.PostgresTestContainer.postgresContainer import zio.* import zio.ZIO.* diff --git a/docs/decisions/20240116-use-zio-failures-and-defects-effectively.md b/docs/decisions/20240116-use-zio-failures-and-defects-effectively.md index 15480799e9..20ef42cccf 100644 --- a/docs/decisions/20240116-use-zio-failures-and-defects-effectively.md +++ b/docs/decisions/20240116-use-zio-failures-and-defects-effectively.md @@ -392,7 +392,7 @@ prohibited ([example](https://github.com/hyperledger/identus-cloud-agent/blob/b5 #### Extend the common `Failure` trait Make sure all service errors extend the shared -trait [`io.iohk.atala.shared.models.Failure`](https://github.com/hyperledger/identus-cloud-agent/blob/main/shared/src/main/scala/io/iohk/atala/shared/models/Failure.scala). +trait [`org.hyperledger.identus.shared.models.Failure`](https://github.com/hyperledger/identus-cloud-agent/blob/main/shared/src/main/scala/io/iohk/atala/shared/models/Failure.scala). This allows handling "at the end of the world“ to be done in a consistent and in generic way. Create an exhaustive and meaningful list of service errors and make sure the value of the `userFacingMessage` attribute @@ -490,7 +490,7 @@ The upper layer will automatically do so appropriately and consistently using Ta #### Reporting RFC-9457 Error Response All declared Tapir endpoints must -use [`io.iohk.atala.api.http.ErrorResponse`](https://github.com/hyperledger/identus-cloud-agent/blob/main/prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/ErrorResponse.scala) +use [`org.hyperledger.identus.api.http.ErrorResponse`](https://github.com/hyperledger/identus-cloud-agent/blob/main/prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/ErrorResponse.scala) as their output error type ([example](https://github.com/hyperledger/identus-cloud-agent/blob/eb898e068f768507d6979a5d9bab35ef7ad4a045/prism-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/ConnectionEndpoints.scala#L45)) This type ensures that the response returned to the user complies with @@ -514,7 +514,7 @@ object ConnectionEndpoints { If all the underlying services used by a controller comply with the above rules, then the only error type that could propagate through the effect’s error channel is the -parent [`io.iohk.atala.shared.models.Failure`](https://github.com/hyperledger/identus-cloud-agent/blob/main/shared/src/main/scala/io/iohk/atala/shared/models/Failure.scala) +parent [`org.hyperledger.identus.shared.models.Failure`](https://github.com/hyperledger/identus-cloud-agent/blob/main/shared/src/main/scala/io/iohk/atala/shared/models/Failure.scala) type and its conversion to the ErrorResponse type is done automatically via [Scala implicit conversion](https://github.com/hyperledger/identus-cloud-agent/blob/eb898e068f768507d6979a5d9bab35ef7ad4a045/prism-agent/service/server/src/main/scala/io/iohk/atala/api/http/ErrorResponse.scala#L44). diff --git a/docs/general/key-derivation-benchmark.md b/docs/general/key-derivation-benchmark.md index 64d331a970..b7cdc677b7 100644 --- a/docs/general/key-derivation-benchmark.md +++ b/docs/general/key-derivation-benchmark.md @@ -18,7 +18,7 @@ __System information__ __JVM options__ - Xmx:4G -The tests can be run by running the `io.iohk.atala.agent.walletapi.benchmark.KeyDerivation`. +The tests can be run by running the `org.hyperledger.identus.agent.walletapi.benchmark.KeyDerivation`. The tests are being ignored to avoid running them on CI. When running locally, the ignore aspect should be removed and the test can be run by diff --git a/docs/guides/linting.md b/docs/guides/linting.md index 4c347d530d..dc26ac5f23 100644 --- a/docs/guides/linting.md +++ b/docs/guides/linting.md @@ -128,19 +128,9 @@ Linter - Suggested Change: Customise In /github/workspace/infrastructure/dev/get-versions.sh line 8: - export PRISM_AGENT_VERSION=$(cd ../../prism-agent/service && sbt "project server" -Dsbt.supershell=false -error "print version") + export AGENT_VERSION=$(cd ../../prism-agent/service && sbt "project server" -Dsbt.supershell=false -error "print version") ^-----------------^ SC2155 (warning): Declare and assign separately to avoid masking return values. - - In /github/workspace/infrastructure/dev/get-versions.sh line 11: - export MERCURY_MEDIATOR_VERSION=$(cd ../../mercury/mercury-mediator && sbt "project mediator" -Dsbt.supershell=false -error "print version") - ^----------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values. - - - In /github/workspace/infrastructure/dev/get-versions.sh line 14: - export IRIS_SERVICE_VERSION=$(cd ../../iris/service && sbt "project server" -Dsbt.supershell=false -error "print version") - ^------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values. - For more information: https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ... https://www.shellcheck.net/wiki/SC2164 -- Use 'cd ... || exit' or 'cd ... |... diff --git a/event-notification/src/main/scala/io/iohk/atala/event/notification/Event.scala b/event-notification/src/main/scala/org/hyperledger/identus/event/notification/Event.scala similarity index 73% rename from event-notification/src/main/scala/io/iohk/atala/event/notification/Event.scala rename to event-notification/src/main/scala/org/hyperledger/identus/event/notification/Event.scala index 1b2a255ad7..edeef57c6f 100644 --- a/event-notification/src/main/scala/io/iohk/atala/event/notification/Event.scala +++ b/event-notification/src/main/scala/org/hyperledger/identus/event/notification/Event.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.event.notification +package org.hyperledger.identus.event.notification -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.shared.models.WalletId import java.time.Instant import java.util.UUID diff --git a/event-notification/src/main/scala/io/iohk/atala/event/notification/EventConsumer.scala b/event-notification/src/main/scala/org/hyperledger/identus/event/notification/EventConsumer.scala similarity index 68% rename from event-notification/src/main/scala/io/iohk/atala/event/notification/EventConsumer.scala rename to event-notification/src/main/scala/org/hyperledger/identus/event/notification/EventConsumer.scala index 3b65858bd5..77c3512b68 100644 --- a/event-notification/src/main/scala/io/iohk/atala/event/notification/EventConsumer.scala +++ b/event-notification/src/main/scala/org/hyperledger/identus/event/notification/EventConsumer.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.event.notification +package org.hyperledger.identus.event.notification import zio.IO diff --git a/event-notification/src/main/scala/io/iohk/atala/event/notification/EventNotificationConfig.scala b/event-notification/src/main/scala/org/hyperledger/identus/event/notification/EventNotificationConfig.scala similarity index 87% rename from event-notification/src/main/scala/io/iohk/atala/event/notification/EventNotificationConfig.scala rename to event-notification/src/main/scala/org/hyperledger/identus/event/notification/EventNotificationConfig.scala index 39ce4108c9..5837ec87d9 100644 --- a/event-notification/src/main/scala/io/iohk/atala/event/notification/EventNotificationConfig.scala +++ b/event-notification/src/main/scala/org/hyperledger/identus/event/notification/EventNotificationConfig.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.event.notification +package org.hyperledger.identus.event.notification -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletId import zio.* import java.net.URL diff --git a/event-notification/src/main/scala/io/iohk/atala/event/notification/EventNotificationService.scala b/event-notification/src/main/scala/org/hyperledger/identus/event/notification/EventNotificationService.scala similarity index 81% rename from event-notification/src/main/scala/io/iohk/atala/event/notification/EventNotificationService.scala rename to event-notification/src/main/scala/org/hyperledger/identus/event/notification/EventNotificationService.scala index e3f590faf5..72792f94c9 100644 --- a/event-notification/src/main/scala/io/iohk/atala/event/notification/EventNotificationService.scala +++ b/event-notification/src/main/scala/org/hyperledger/identus/event/notification/EventNotificationService.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.event.notification +package org.hyperledger.identus.event.notification import zio.IO diff --git a/event-notification/src/main/scala/io/iohk/atala/event/notification/EventNotificationServiceError.scala b/event-notification/src/main/scala/org/hyperledger/identus/event/notification/EventNotificationServiceError.scala similarity index 76% rename from event-notification/src/main/scala/io/iohk/atala/event/notification/EventNotificationServiceError.scala rename to event-notification/src/main/scala/org/hyperledger/identus/event/notification/EventNotificationServiceError.scala index abee167f41..23c8506ad4 100644 --- a/event-notification/src/main/scala/io/iohk/atala/event/notification/EventNotificationServiceError.scala +++ b/event-notification/src/main/scala/org/hyperledger/identus/event/notification/EventNotificationServiceError.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.event.notification +package org.hyperledger.identus.event.notification sealed trait EventNotificationServiceError diff --git a/event-notification/src/main/scala/io/iohk/atala/event/notification/EventNotificationServiceImpl.scala b/event-notification/src/main/scala/org/hyperledger/identus/event/notification/EventNotificationServiceImpl.scala similarity index 92% rename from event-notification/src/main/scala/io/iohk/atala/event/notification/EventNotificationServiceImpl.scala rename to event-notification/src/main/scala/org/hyperledger/identus/event/notification/EventNotificationServiceImpl.scala index 55a138c8df..39450a2931 100644 --- a/event-notification/src/main/scala/io/iohk/atala/event/notification/EventNotificationServiceImpl.scala +++ b/event-notification/src/main/scala/org/hyperledger/identus/event/notification/EventNotificationServiceImpl.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.event.notification +package org.hyperledger.identus.event.notification -import io.iohk.atala.event.notification.EventNotificationServiceError.EventSendingFailed +import org.hyperledger.identus.event.notification.EventNotificationServiceError.EventSendingFailed import zio.concurrent.ConcurrentMap import zio.{IO, Queue, URLayer, ZIO, ZLayer} diff --git a/event-notification/src/main/scala/io/iohk/atala/event/notification/EventProducer.scala b/event-notification/src/main/scala/org/hyperledger/identus/event/notification/EventProducer.scala similarity index 68% rename from event-notification/src/main/scala/io/iohk/atala/event/notification/EventProducer.scala rename to event-notification/src/main/scala/org/hyperledger/identus/event/notification/EventProducer.scala index 9fec9c2f8d..4bb52e4154 100644 --- a/event-notification/src/main/scala/io/iohk/atala/event/notification/EventProducer.scala +++ b/event-notification/src/main/scala/org/hyperledger/identus/event/notification/EventProducer.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.event.notification +package org.hyperledger.identus.event.notification import zio.IO diff --git a/event-notification/src/test/scala/io/iohk/atala/event/notification/EventNotificationServiceImplSpec.scala b/event-notification/src/test/scala/org/hyperledger/identus/event/notification/EventNotificationServiceImplSpec.scala similarity index 97% rename from event-notification/src/test/scala/io/iohk/atala/event/notification/EventNotificationServiceImplSpec.scala rename to event-notification/src/test/scala/org/hyperledger/identus/event/notification/EventNotificationServiceImplSpec.scala index 8b7a215911..80bf5bf7db 100644 --- a/event-notification/src/test/scala/io/iohk/atala/event/notification/EventNotificationServiceImplSpec.scala +++ b/event-notification/src/test/scala/org/hyperledger/identus/event/notification/EventNotificationServiceImplSpec.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.event.notification +package org.hyperledger.identus.event.notification import zio.* import zio.test.* -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.shared.models.WalletId object EventNotificationServiceImplSpec extends ZIOSpecDefault { diff --git a/examples/readme.md b/examples/readme.md index 302f6756ef..2344b5197c 100644 --- a/examples/readme.md +++ b/examples/readme.md @@ -1,5 +1,5 @@ # Examples of OpenAPI specifications -This directory contains OpenAPI/Swagger specifications of Atala competitors. +This directory contains OpenAPI/Swagger specifications of Identus competitors. Not all the companies are real competitors, but number of them are experts in particular area, so we have a good opportunity to get inspiration and build a better solution. ### godiddy-api.yaml diff --git a/infrastructure/ci/docker-compose-multiple-actors.yml b/infrastructure/ci/docker-compose-multiple-actors.yml new file mode 100644 index 0000000000..a13c64e2d1 --- /dev/null +++ b/infrastructure/ci/docker-compose-multiple-actors.yml @@ -0,0 +1,154 @@ +version: "3.8" + +services: + ########################## + # Pollux Databases + ########################## + + db_pollux_issuer: + image: postgres:13 + restart: always + environment: + POSTGRES_DB: pollux_issuer + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + ports: + - 5435:5432 + volumes: + - pg_data_pollux_db_issuer:/var/lib/postgresql/data + healthcheck: + test: ["CMD", "pg_isready", "-U", "postgres", "-d", "pollux_issuer"] + interval: 10s + timeout: 5s + retries: 5 + + db_pollux_holder: + image: postgres:13 + restart: always + environment: + POSTGRES_DB: pollux_holder + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + ports: + - 5436:5432 + volumes: + - pg_data_pollux_db_holder:/var/lib/postgresql/data + healthcheck: + test: ["CMD", "pg_isready", "-U", "postgres", "-d", "pollux_holder"] + interval: 10s + timeout: 5s + retries: 5 + + ########################## + # Connect Databases + ########################## + + db_connect_issuer: + image: postgres:13 + restart: always + environment: + POSTGRES_DB: connect_issuer + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + ports: + - 5437:5432 + volumes: + - pg_data_connect_db_issuer:/var/lib/postgresql/data + healthcheck: + test: ["CMD", "pg_isready", "-U", "postgres", "-d", "connect_issuer"] + interval: 10s + timeout: 5s + retries: 5 + + db_connect_holder: + image: postgres:13 + restart: always + environment: + POSTGRES_DB: connect_holder + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + ports: + - 5438:5432 + volumes: + - pg_data_connect_db_holder:/var/lib/postgresql/data + healthcheck: + test: ["CMD", "pg_isready", "-U", "postgres", "-d", "connect_holder"] + interval: 10s + timeout: 5s + retries: 5 + + ########################## + # Services + ##########################c + + prism-agent-issuer: + image: ghcr.io/hyperledger/prism-agent:0.5.0 + environment: + REST_SERVICE_PORT: 8080 + DIDCOMM_SERVICE_PORT: 8081 + CASTOR_DB_HOST: db_castor_issuer + CASTOR_DB_PORT: 5432 + CASTOR_DB_NAME: castor_issuer + CASTOR_DB_USER: postgres + CASTOR_DB_PASSWORD: postgres + POLLUX_DB_HOST: db_pollux_issuer + POLLUX_DB_PORT: 5432 + POLLUX_DB_NAME: pollux_issuer + POLLUX_DB_USER: postgres + POLLUX_DB_PASSWORD: postgres + CONNECT_DB_HOST: db_connect_issuer + CONNECT_DB_PORT: 5432 + CONNECT_DB_NAME: connect_issuer + CONNECT_DB_USER: postgres + CONNECT_DB_PASSWORD: postgres + DIDCOMM_SERVICE_URL: "http://prism-agent-issuer" + ports: + - "8080:8080" + - "8081:8081" + depends_on: + - db_castor_issuer + - db_pollux_issuer + healthcheck: + test: ["CMD", "curl", "-f", "http://prism-agent-issuer:8080/dids/xyz"] + interval: 30s + timeout: 10s + retries: 5 + + prism-agent-holder: + image: ghcr.io/hyperledger/prism-agent:0.5.0 + environment: + REST_SERVICE_PORT: 8090 + DIDCOMM_SERVICE_PORT: 8091 + CASTOR_DB_HOST: db_castor_holder + CASTOR_DB_PORT: 5432 + CASTOR_DB_NAME: castor_holder + CASTOR_DB_USER: postgres + CASTOR_DB_PASSWORD: postgres + POLLUX_DB_HOST: db_pollux_holder + POLLUX_DB_PORT: 5432 + POLLUX_DB_NAME: pollux_holder + POLLUX_DB_USER: postgres + POLLUX_DB_PASSWORD: postgres + CONNECT_DB_HOST: db_connect_holder + CONNECT_DB_PORT: 5432 + CONNECT_DB_NAME: connect_holder + CONNECT_DB_USER: postgres + CONNECT_DB_PASSWORD: postgres + DIDCOMM_SERVICE_URL: "http://prism-agent-holder" + ports: + - "8090:8090" + - "8091:8091" + depends_on: + - db_castor_holder + - db_pollux_holder + healthcheck: + test: ["CMD", "curl", "-f", "http://prism-agent-holder:8090/dids/xyz"] + interval: 30s + timeout: 10s + retries: 5 + +volumes: + pg_data_pollux_db_issuer: + pg_data_pollux_db_holder: + pg_data_connect_db_issuer: + pg_data_connect_db_holder: diff --git a/infrastructure/dev/get-versions.sh b/infrastructure/dev/get-versions.sh index ccc91631eb..b301a00281 100755 --- a/infrastructure/dev/get-versions.sh +++ b/infrastructure/dev/get-versions.sh @@ -5,8 +5,8 @@ SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) # Set working directory cd ${SCRIPT_DIR} -export PRISM_AGENT_VERSION=$(cd ../../ && sbt "project agent" -Dsbt.supershell=false -error "print version") -echo "prism-agent server version: ${PRISM_AGENT_VERSION}" +export AGENT_VERSION=$(cd ../../ && sbt "project agent" -Dsbt.supershell=false -error "print version") +echo "prism-agent server version: ${AGENT_VERSION}" export PRISM_NODE_VERSION=v2.1.1 echo "prism node version: ${PRISM_NODE_VERSION}" diff --git a/infrastructure/local/.env b/infrastructure/local/.env index f85485b1c5..1b3d510520 100644 --- a/infrastructure/local/.env +++ b/infrastructure/local/.env @@ -1,3 +1,3 @@ -PRISM_AGENT_VERSION=1.31.0 +AGENT_VERSION=1.31.0 PRISM_NODE_VERSION=2.2.1 VAULT_DEV_ROOT_TOKEN_ID=root diff --git a/infrastructure/local/update_env.sh b/infrastructure/local/update_env.sh index a8831c9e51..5ab8eedffb 100755 --- a/infrastructure/local/update_env.sh +++ b/infrastructure/local/update_env.sh @@ -5,6 +5,6 @@ ENV_FILE="${SCRIPT_DIR}/.env" pip install ${SCRIPT_DIR}/../utils/python/github-helpers > /dev/null 2>&1 -PRISM_AGENT_VERSION=$(github get-latest-package-version --package prism-agent --package-type container) +AGENT_VERSION=$(github get-latest-package-version --package prism-agent --package-type container) -sed -i.bak "s/PRISM_AGENT_VERSION=.*/PRISM_AGENT_VERSION=${PRISM_AGENT_VERSION}/" ${ENV_FILE} && rm -f ${ENV_FILE}.bak +sed -i.bak "s/AGENT_VERSION=.*/AGENT_VERSION=${AGENT_VERSION}/" ${ENV_FILE} && rm -f ${ENV_FILE}.bak diff --git a/infrastructure/multi/.env b/infrastructure/multi/.env index a6c57a3d91..ec1313acb7 100644 --- a/infrastructure/multi/.env +++ b/infrastructure/multi/.env @@ -1,2 +1,2 @@ MERCURY_MEDIATOR_VERSION=0.2.0 -PRISM_AGENT_VERSION=0.6.0 +AGENT_VERSION=0.6.0 diff --git a/infrastructure/shared/docker-compose-demo.yml b/infrastructure/shared/docker-compose-demo.yml index a448aa3e05..eecb80ac05 100644 --- a/infrastructure/shared/docker-compose-demo.yml +++ b/infrastructure/shared/docker-compose-demo.yml @@ -29,7 +29,7 @@ services: condition: service_healthy prism-agent: - image: ghcr.io/hyperledger/identus-cloud-agent:${PRISM_AGENT_VERSION} + image: ghcr.io/hyperledger/identus-cloud-agent:${AGENT_VERSION} environment: DIDCOMM_SERVICE_URL: http://${DOCKERHOST}:${PORT}/didcomm REST_SERVICE_URL: http://${DOCKERHOST}:${PORT}/prism-agent diff --git a/infrastructure/shared/docker-compose-mt-keycloak.yml b/infrastructure/shared/docker-compose-mt-keycloak.yml index 5b0e6c5d7f..ea7f76d8b5 100644 --- a/infrastructure/shared/docker-compose-mt-keycloak.yml +++ b/infrastructure/shared/docker-compose-mt-keycloak.yml @@ -70,7 +70,7 @@ services: retries: 5 prism-agent: - image: ghcr.io/hyperledger/identus-cloud-agent:${PRISM_AGENT_VERSION} + image: ghcr.io/hyperledger/identus-cloud-agent:${AGENT_VERSION} environment: POLLUX_DB_HOST: db POLLUX_DB_PORT: 5432 diff --git a/infrastructure/shared/docker-compose.yml b/infrastructure/shared/docker-compose.yml index 70384c1b62..7b9ecb0a82 100644 --- a/infrastructure/shared/docker-compose.yml +++ b/infrastructure/shared/docker-compose.yml @@ -71,7 +71,7 @@ services: retries: 5 prism-agent: - image: ghcr.io/hyperledger/identus-cloud-agent:${PRISM_AGENT_VERSION} + image: ghcr.io/hyperledger/identus-cloud-agent:${AGENT_VERSION} environment: POLLUX_DB_HOST: db POLLUX_DB_PORT: 5432 diff --git a/infrastructure/single-tenant-testing-stack/.env b/infrastructure/single-tenant-testing-stack/.env index 3d851d1c25..4dafa03681 100644 --- a/infrastructure/single-tenant-testing-stack/.env +++ b/infrastructure/single-tenant-testing-stack/.env @@ -1,3 +1,3 @@ -PRISM_AGENT_VERSION=1.25.0 +AGENT_VERSION=1.25.0 PRISM_NODE_VERSION=2.2.1 VAULT_DEV_ROOT_TOKEN_ID=root diff --git a/infrastructure/single-tenant-testing-stack/docker-compose.yml b/infrastructure/single-tenant-testing-stack/docker-compose.yml index ea959fcfd5..bc4c641c53 100644 --- a/infrastructure/single-tenant-testing-stack/docker-compose.yml +++ b/infrastructure/single-tenant-testing-stack/docker-compose.yml @@ -85,7 +85,7 @@ services: condition: service_healthy issuer-oea: - image: ghcr.io/hyperledger/identus-cloud-agent:${PRISM_AGENT_VERSION} + image: ghcr.io/hyperledger/identus-cloud-agent:${AGENT_VERSION} environment: POLLUX_DB_HOST: issuer-db POLLUX_DB_PORT: 5432 @@ -155,7 +155,7 @@ services: - 9095:9095 verifier-oea: - image: ghcr.io/hyperledger/identus-cloud-agent:${PRISM_AGENT_VERSION} + image: ghcr.io/hyperledger/identus-cloud-agent:${AGENT_VERSION} environment: POLLUX_DB_HOST: verifier-db POLLUX_DB_PORT: 5432 @@ -227,7 +227,7 @@ services: - DATA_SOURCE_NAME=postgresql://postgres:postgres@issuer-db:5432/postgres?sslmode=disable holder-oea: - image: ghcr.io/hyperledger/identus-cloud-agent:${PRISM_AGENT_VERSION} + image: ghcr.io/hyperledger/identus-cloud-agent:${AGENT_VERSION} environment: POLLUX_DB_HOST: holder-db POLLUX_DB_PORT: 5432 diff --git a/infrastructure/single-tenant-testing-stack/run-performance-tests-local.sh b/infrastructure/single-tenant-testing-stack/run-performance-tests-local.sh index 38e5a6d051..f45e698acf 100755 --- a/infrastructure/single-tenant-testing-stack/run-performance-tests-local.sh +++ b/infrastructure/single-tenant-testing-stack/run-performance-tests-local.sh @@ -30,7 +30,7 @@ echo "--------------------------------------" ( export K6_PROMETHEUS_RW_SERVER_URL=http://localhost:9090/api/v1/write export K6_PROMETHEUS_RW_TREND_AS_NATIVE_HISTOGRAM=true - cd ${SCRIPT_DIR}/../../tests/performance-tests/atala-performance-tests-k6 + cd ${SCRIPT_DIR}/../../tests/performance-tests/agent-performance-tests-k6 yarn install yarn webpack k6 run -e SCENARIO_LABEL=st-create-prism-did-smoke dist/create-prism-did-test.js -o experimental-prometheus-rw diff --git a/mercury/mercury-library/CHANGELOG.md b/mercury/CHANGELOG.md similarity index 100% rename from mercury/mercury-library/CHANGELOG.md rename to mercury/CHANGELOG.md diff --git a/mercury/mercury-library/QuickStart.md b/mercury/QuickStart.md similarity index 100% rename from mercury/mercury-library/QuickStart.md rename to mercury/QuickStart.md diff --git a/mercury/README.md b/mercury/README.md index db1fb3f277..f3c891098d 100644 --- a/mercury/README.md +++ b/mercury/README.md @@ -1,15 +1,97 @@ -# Mercury folder +# Mercury -We are following the directory structure defined in [RFC 0013 - Service-Oriented BB API Dependency Management](https://input-output.atlassian.net/wiki/spaces/ATB/pages/3534848001/RFC+0013+-+Service-Oriented+BB+API+Dependency+Management). +## Index -**NOTE** - The `Mediator` development is part of the Mercury BB and is being implemented in a separate repository [atala-prism-mediator](https://github.com/input-output-hk/atala-prism-mediator). +- [Mediator (Mailbox)](./Mercury-Mailbox-Mediator.md) +- Protocols: + - [Invitation-Protocol](./protocol-invitation/Invitation-Protocol.md) + - [Mercury-Mailbox-Protocol](./protocol-mercury-mailbox/Mercury-Mailbox-Protocol.md) + - [Report-Problem-Protocol](protocol-report-problem/Report-Problem-Protocol.md) + - [Routing-Protocol](./protocol-routing/Routing-Protocol.md) +- [Quick start](./QuickStart.md) +- [UseCases](./UseCases.md) -**Folders:** +## Project structure -- `mercury-library`: - Is our project implementation of the DID Comm and DID Comm protocols. +Dependencies: -- `roots-id-mediator`: - Contains a configuration setup and utilities script to test interoperability against ROOTS-ID's mediator. +```mermaid +flowchart BT + models + %%[mercury-data-models] + resolver + %%[mercury-resolver] + invitation[protocol-invitation] + mailbox[protocol-mercury-mailbox] + routing[mercury-protocol-routing-2_0] + agent + agent-didcommx + agent-didscala - See [ROOTS-ID-mediator](./roots-id-mediator/REAMDE-ROOTS-ID-mediator.md) + alice((Alice)) + bob((Bob)) + + subgraph Libs + didcommx + did-scala + http[shttp or zhttp] + end + + + + subgraph Mercury + subgraph Protocols + invitation + mailbox + routing + end + + subgraph DID agents + alice + bob + agent-cli-didcommx + end + + resolver --> models + agent --> resolver + + invitation --> models + mailbox --> models + routing --> models + mailbox --> invitation + mailbox --> routing + + alice -.->|client| mailbox + alice --> agent-didcommx + bob --> agent-didcommx + + + agent ---> models + agent -..-> routing + %% invitation + + + agent-didcommx --> agent + agent-didcommx -.-> didcommx + + agent-cli-didcommx -.-> http + agent-cli-didcommx --> agent-didcommx + + agent-didscala --> agent + agent-didscala -.-> did-scala + end + + + + +``` + +## Quick Reference Guide + +```shell +# Alice Agent (send messagem to Bob's Mediator) +sbt "agentDidcommx/runMain org.hyperledger.identus.AgentClientAlice" + +# Bob Agent (fetch his message from Mediator) +sbt "agentDidcommx/runMain org.hyperledger.identus.AgentClientBob" +``` diff --git a/mercury/mercury-library/UseCases.md b/mercury/UseCases.md similarity index 100% rename from mercury/mercury-library/UseCases.md rename to mercury/UseCases.md diff --git a/mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/mercury/AgentPeerService.scala b/mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/AgentPeerService.scala similarity index 96% rename from mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/mercury/AgentPeerService.scala rename to mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/AgentPeerService.scala index fd4870d2dd..1b71af6e86 100644 --- a/mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/mercury/AgentPeerService.scala +++ b/mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/AgentPeerService.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.mercury +package org.hyperledger.identus.mercury import zio._ -import io.iohk.atala.mercury.model.* +import org.hyperledger.identus.mercury.model.* import com.nimbusds.jose.jwk.OctetKeyPair import org.didcommx.peerdid.core.PeerDIDUtils import org.didcommx.didcomm.common._ diff --git a/mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/mercury/DidCommX.scala b/mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/DidCommX.scala similarity index 93% rename from mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/mercury/DidCommX.scala rename to mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/DidCommX.scala index 84d3028d48..dc23a01a86 100644 --- a/mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/mercury/DidCommX.scala +++ b/mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/DidCommX.scala @@ -1,12 +1,12 @@ -package io.iohk.atala.mercury +package org.hyperledger.identus.mercury import org.didcommx.didcomm.DIDComm import zio._ import org.didcommx.didcomm.model._ -import io.iohk.atala.resolvers._ -import io.iohk.atala.mercury.model.{given, _} +import org.hyperledger.identus.resolvers.UniversalDidResolver +import org.hyperledger.identus.mercury.model.{given, _} import scala.language.implicitConversions object DidCommX { diff --git a/mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/mercury/MessagingService.scala b/mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/MessagingService.scala similarity index 94% rename from mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/mercury/MessagingService.scala rename to mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/MessagingService.scala index e0dba38d3e..0db166cb47 100644 --- a/mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/mercury/MessagingService.scala +++ b/mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/MessagingService.scala @@ -1,14 +1,14 @@ -package io.iohk.atala.mercury +package org.hyperledger.identus.mercury import scala.jdk.CollectionConverters.* import zio._ import io.circe._ import io.circe.JsonObject -import io.iohk.atala.mercury.model._ -import io.iohk.atala.mercury.model.error._ -import io.iohk.atala.mercury.protocol.routing._ -import io.iohk.atala.resolvers.DIDResolver +import org.hyperledger.identus.mercury.model._ +import org.hyperledger.identus.mercury.error._ +import org.hyperledger.identus.mercury.protocol.routing._ +import org.hyperledger.identus.resolvers.DIDResolver type HttpOrDID = String //TODO case class ServiceEndpoint(uri: HttpOrDID, accept: Option[Seq[String]], routingKeys: Option[Seq[String]]) @@ -124,7 +124,7 @@ object MessagingService { didCommService.packEncrypted(msg = finalMessage, to = finalMessage.to.head) // TODO Head _ <- ZIO.log(s"Sending a Message to '$serviceEndpoint'") - resp <- HttpClient + resp <- org.hyperledger.identus.mercury.HttpClient .postDIDComm(url = serviceEndpoint, data = encryptedMessage.string) .catchAll { case ex => ZIO.fail(SendMessageError(ex, Some(encryptedMessage.string))) } _ <- ZIO.when(resp.status >= 300)( diff --git a/mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/mercury/PeerDID.scala b/mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/PeerDID.scala similarity index 97% rename from mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/mercury/PeerDID.scala rename to mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/PeerDID.scala index a4a9f052ed..3e29ff6b5c 100644 --- a/mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/mercury/PeerDID.scala +++ b/mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/PeerDID.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.mercury +package org.hyperledger.identus.mercury import org.didcommx.peerdid.* @@ -9,7 +9,7 @@ import io.circe.syntax._ import io.circe.generic.semiauto._ import scala.jdk.CollectionConverters.* -import io.iohk.atala.mercury.model.DidId +import org.hyperledger.identus.mercury.model.DidId final case class PeerDID( did: DidId, diff --git a/mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/mercury/model/Conversions.scala b/mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/model/Conversions.scala similarity index 98% rename from mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/mercury/model/Conversions.scala rename to mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/model/Conversions.scala index 7caa3b62b1..b91ced49e3 100644 --- a/mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/mercury/model/Conversions.scala +++ b/mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/model/Conversions.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.mercury.model +package org.hyperledger.identus.mercury.model import io.circe.* -import io.iohk.atala.mercury.model.* +import org.hyperledger.identus.mercury.model.* import org.didcommx.didcomm.message.Attachment.Data import org.didcommx.didcomm.message.{MessageBuilder, Attachment as XAttachment} import org.didcommx.didcomm.model.* diff --git a/mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/mercury/model/JsonUtilsForDidCommx.scala b/mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/model/JsonUtilsForDidCommx.scala similarity index 98% rename from mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/mercury/model/JsonUtilsForDidCommx.scala rename to mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/model/JsonUtilsForDidCommx.scala index 16d603ae62..b25e43f88c 100644 --- a/mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/mercury/model/JsonUtilsForDidCommx.scala +++ b/mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/model/JsonUtilsForDidCommx.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.mercury.model +package org.hyperledger.identus.mercury.model import scala.jdk.CollectionConverters._ diff --git a/mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/mercury/model/package.scala b/mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/model/package.scala similarity index 97% rename from mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/mercury/model/package.scala rename to mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/model/package.scala index 19a0637cad..b4a0a5888d 100644 --- a/mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/mercury/model/package.scala +++ b/mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/model/package.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.mercury.model +package org.hyperledger.identus.mercury.model import scala.jdk.CollectionConverters.* diff --git a/mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/resolvers/AliceSecretResolver.scala b/mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/resolvers/AliceSecretResolver.scala similarity index 96% rename from mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/resolvers/AliceSecretResolver.scala rename to mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/resolvers/AliceSecretResolver.scala index 246955ba95..fff62a7b22 100644 --- a/mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/resolvers/AliceSecretResolver.scala +++ b/mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/resolvers/AliceSecretResolver.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.resolvers +package org.hyperledger.identus.mercury.resolvers import org.didcommx.didcomm.common.{VerificationMaterial, VerificationMaterialFormat, VerificationMethodType} import org.didcommx.didcomm.secret.{Secret, SecretResolverInMemory} diff --git a/mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/resolvers/BobSecretResolver.scala b/mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/resolvers/BobSecretResolver.scala similarity index 96% rename from mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/resolvers/BobSecretResolver.scala rename to mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/resolvers/BobSecretResolver.scala index cf14e8375d..4a57e4cce7 100644 --- a/mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/resolvers/BobSecretResolver.scala +++ b/mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/resolvers/BobSecretResolver.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.resolvers +package org.hyperledger.identus.mercury.resolvers import org.didcommx.didcomm.common.{VerificationMaterial, VerificationMaterialFormat, VerificationMethodType} import org.didcommx.didcomm.secret.{Secret, SecretResolverInMemory} diff --git a/mercury/mercury-library/agent-didcommx/src/test/scala/io/iohk/atala/mercury/PeerDIDSpec.scala b/mercury/agent-didcommx/src/test/scala/org/hyperledger/identus/mercury/PeerDIDSpec.scala similarity index 78% rename from mercury/mercury-library/agent-didcommx/src/test/scala/io/iohk/atala/mercury/PeerDIDSpec.scala rename to mercury/agent-didcommx/src/test/scala/org/hyperledger/identus/mercury/PeerDIDSpec.scala index 0628ecb986..e1b3c21326 100644 --- a/mercury/mercury-library/agent-didcommx/src/test/scala/io/iohk/atala/mercury/PeerDIDSpec.scala +++ b/mercury/agent-didcommx/src/test/scala/org/hyperledger/identus/mercury/PeerDIDSpec.scala @@ -1,13 +1,14 @@ -package io.iohk.atala.mercury +package org.hyperledger.identus.mercury import munit.* -import io.iohk.atala.mercury.model.DidId +import org.hyperledger.identus.mercury.model.DidId import com.nimbusds.jose.jwk.OctetKeyPair class PeerDIDSpec extends ZSuite { test("Make and parse PeerDID") { - val peer = PeerDID.makePeerDid(serviceEndpoint = Some("http://localhost:8654/myendpoint")) + val peer = + org.hyperledger.identus.mercury.PeerDID.makePeerDid(serviceEndpoint = Some("http://localhost:8654/myendpoint")) val did = peer.did.value // Exemple {"kty":"OKP","d":"XwaryH2em2iRwqPjxInIHrhvKJqLZ_iejheA5cVM2ZY","crv":"X25519","x":"w1tZHpAuQ6TD6q5cMGWu6q2K1eL3gvEbE1gwkMzLnQI"} diff --git a/mercury/mercury-library/agent-didcommx/src/test/scala/io/iohk/atala/mercury/model/UnpackMessageImpSpec.scala b/mercury/agent-didcommx/src/test/scala/org/hyperledger/identus/mercury/model/UnpackMessageImpSpec.scala similarity index 94% rename from mercury/mercury-library/agent-didcommx/src/test/scala/io/iohk/atala/mercury/model/UnpackMessageImpSpec.scala rename to mercury/agent-didcommx/src/test/scala/org/hyperledger/identus/mercury/model/UnpackMessageImpSpec.scala index cb4031d350..1426255b6f 100644 --- a/mercury/mercury-library/agent-didcommx/src/test/scala/io/iohk/atala/mercury/model/UnpackMessageImpSpec.scala +++ b/mercury/agent-didcommx/src/test/scala/org/hyperledger/identus/mercury/model/UnpackMessageImpSpec.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.mercury.model +package org.hyperledger.identus.mercury.model import munit.* import io.circe.JsonObject import scala.language.implicitConversions -/** agentDidcommx/testOnly io.iohk.atala.mercury.model.UnpackMessageImpSpec */ +/** agentDidcommx/testOnly org.hyperledger.identus.mercury.UnpackMessageImpSpec */ class UnpackMessageImpSpec extends ZSuite { test("Message conversions - check pleaseAck None") { val m1 = Message( diff --git a/mercury/mercury-library/agent/src/main/scala/io/iohk/atala/mercury/Agent.scala b/mercury/agent/src/main/scala/org/hyperledger/identus/mercury/Agent.scala similarity index 96% rename from mercury/mercury-library/agent/src/main/scala/io/iohk/atala/mercury/Agent.scala rename to mercury/agent/src/main/scala/org/hyperledger/identus/mercury/Agent.scala index a20c198ac2..6e9c19b085 100644 --- a/mercury/mercury-library/agent/src/main/scala/io/iohk/atala/mercury/Agent.scala +++ b/mercury/agent/src/main/scala/org/hyperledger/identus/mercury/Agent.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.mercury +package org.hyperledger.identus.mercury -import io.iohk.atala.mercury.model.DidId +import org.hyperledger.identus.mercury.model.DidId enum Agent(val id: DidId): case Alice extends Agent(DidId("did:example:alice")) diff --git a/mercury/mercury-library/agent/src/main/scala/io/iohk/atala/mercury/CoordinateMediationPrograms.scala b/mercury/agent/src/main/scala/org/hyperledger/identus/mercury/CoordinateMediationPrograms.scala similarity index 89% rename from mercury/mercury-library/agent/src/main/scala/io/iohk/atala/mercury/CoordinateMediationPrograms.scala rename to mercury/agent/src/main/scala/org/hyperledger/identus/mercury/CoordinateMediationPrograms.scala index 446d9b76cc..7e5501a1cf 100644 --- a/mercury/mercury-library/agent/src/main/scala/io/iohk/atala/mercury/CoordinateMediationPrograms.scala +++ b/mercury/agent/src/main/scala/org/hyperledger/identus/mercury/CoordinateMediationPrograms.scala @@ -1,14 +1,14 @@ -package io.iohk.atala.mercury +package org.hyperledger.identus.mercury import scala.util.chaining._ import zio._ import io.circe.parser._ import io.circe.JsonObject -import io.iohk.atala.mercury._ -import io.iohk.atala.mercury.model._ -import io.iohk.atala.mercury.protocol.coordinatemediation._ -import io.iohk.atala.mercury.protocol.invitation.v2.Invitation +import org.hyperledger.identus._ +import org.hyperledger.identus.mercury.model._ +import org.hyperledger.identus.mercury.protocol.coordinatemediation._ +import org.hyperledger.identus.mercury.protocol.invitation.v2.Invitation object CoordinateMediationPrograms { diff --git a/mercury/mercury-library/agent/src/main/scala/io/iohk/atala/mercury/HttpClient.scala b/mercury/agent/src/main/scala/org/hyperledger/identus/mercury/HttpClient.scala similarity index 94% rename from mercury/mercury-library/agent/src/main/scala/io/iohk/atala/mercury/HttpClient.scala rename to mercury/agent/src/main/scala/org/hyperledger/identus/mercury/HttpClient.scala index 6f5ee118b8..b17a1d86bf 100644 --- a/mercury/mercury-library/agent/src/main/scala/io/iohk/atala/mercury/HttpClient.scala +++ b/mercury/agent/src/main/scala/org/hyperledger/identus/mercury/HttpClient.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.mercury +package org.hyperledger.identus.mercury import zio._ diff --git a/mercury/mercury-library/agent/src/main/scala/io/iohk/atala/mercury/InvitationPrograms.scala b/mercury/agent/src/main/scala/org/hyperledger/identus/mercury/InvitationPrograms.scala similarity index 80% rename from mercury/mercury-library/agent/src/main/scala/io/iohk/atala/mercury/InvitationPrograms.scala rename to mercury/agent/src/main/scala/org/hyperledger/identus/mercury/InvitationPrograms.scala index c8950a8a31..7e74ea9098 100644 --- a/mercury/mercury-library/agent/src/main/scala/io/iohk/atala/mercury/InvitationPrograms.scala +++ b/mercury/agent/src/main/scala/org/hyperledger/identus/mercury/InvitationPrograms.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.mercury +package org.hyperledger.identus.mercury import zio.* -import io.iohk.atala.mercury.protocol.invitation.* -import io.iohk.atala.mercury.protocol.invitation.v2.* -import io.iohk.atala.mercury.protocol.invitation.v2.Invitation.Body +import org.hyperledger.identus.mercury.protocol.invitation.* +import org.hyperledger.identus.mercury.protocol.invitation.v2.* +import org.hyperledger.identus.mercury.protocol.invitation.v2.Invitation.Body import io.circe.syntax.* object InvitationPrograms { diff --git a/mercury/mercury-library/agent/src/main/scala/io/iohk/atala/mercury/OutOfBandLoginPrograms.scala b/mercury/agent/src/main/scala/org/hyperledger/identus/mercury/OutOfBandLoginPrograms.scala similarity index 79% rename from mercury/mercury-library/agent/src/main/scala/io/iohk/atala/mercury/OutOfBandLoginPrograms.scala rename to mercury/agent/src/main/scala/org/hyperledger/identus/mercury/OutOfBandLoginPrograms.scala index 03a137f6ef..e124a58e32 100644 --- a/mercury/mercury-library/agent/src/main/scala/io/iohk/atala/mercury/OutOfBandLoginPrograms.scala +++ b/mercury/agent/src/main/scala/org/hyperledger/identus/mercury/OutOfBandLoginPrograms.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.mercury +package org.hyperledger.identus.mercury -import io.iohk.atala.mercury.model._ -import io.iohk.atala.mercury.protocol.outofbandlogin._ +import org.hyperledger.identus.mercury.model._ +import org.hyperledger.identus.mercury.protocol.outofbandlogin._ object OutOfBandLoginPrograms { diff --git a/mercury/mercury-library/README.md b/mercury/mercury-library/README.md deleted file mode 100644 index dcf6bf508e..0000000000 --- a/mercury/mercury-library/README.md +++ /dev/null @@ -1,97 +0,0 @@ -# Mercury - -## Index - -- [Mediator (Mailbox)](./Mercury-Mailbox-Mediator.md) -- Protocols: - - [Invitation-Protocol](./protocol-invitation/Invitation-Protocol.md) - - [Mercury-Mailbox-Protocol](./protocol-mercury-mailbox/Mercury-Mailbox-Protocol.md) - - [Report-Problem-Protocol](protocol-report-problem/Report-Problem-Protocol.md) - - [Routing-Protocol](./protocol-routing/Routing-Protocol.md) -- [Quick start](./QuickStart.md) -- [UseCases](./UseCases.md) - -## Project structure - -Dependencies: - -```mermaid -flowchart BT - models - %%[mercury-data-models] - resolver - %%[mercury-resolver] - invitation[protocol-invitation] - mailbox[protocol-mercury-mailbox] - routing[mercury-protocol-routing-2_0] - agent - agent-didcommx - agent-didscala - - alice((Alice)) - bob((Bob)) - - subgraph Libs - didcommx - did-scala - http[shttp or zhttp] - end - - - - subgraph Mercury - subgraph Protocols - invitation - mailbox - routing - end - - subgraph DID agents - alice - bob - agent-cli-didcommx - end - - resolver --> models - agent --> resolver - - invitation --> models - mailbox --> models - routing --> models - mailbox --> invitation - mailbox --> routing - - alice -.->|client| mailbox - alice --> agent-didcommx - bob --> agent-didcommx - - - agent ---> models - agent -..-> routing - %% invitation - - - agent-didcommx --> agent - agent-didcommx -.-> didcommx - - agent-cli-didcommx -.-> http - agent-cli-didcommx --> agent-didcommx - - agent-didscala --> agent - agent-didscala -.-> did-scala - end - - - - -``` - -## Quick Reference Guide - -```shell -# Alice Agent (send messagem to Bob's Mediator) -sbt "agentDidcommx/runMain io.iohk.atala.AgentClientAlice" - -# Bob Agent (fetch his message from Mediator) -sbt "agentDidcommx/runMain io.iohk.atala.AgentClientBob" -``` diff --git a/mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/Main.scala b/mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/Main.scala deleted file mode 100644 index c13b8d973d..0000000000 --- a/mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/Main.scala +++ /dev/null @@ -1,129 +0,0 @@ -/* -package io.iohk.atala - -import java.time.{LocalDateTime, ZoneOffset} -import scala.jdk.CollectionConverters._ - -import java.util -import java.util.Base64 - -import zio._ - -import io.iohk.atala.resolvers.{AliceSecretResolver, BobSecretResolver, MediatorSecretResolver, UniversalDidResolver} -import io.iohk.atala.mercury.model.Message -import io.iohk.atala.mercury.Agent -import io.iohk.atala.mercury.AgentService -import io.iohk.atala.mercury.protocol.routing._ -import io.iohk.atala.mercury.model.Attachment -import io.iohk.atala.mercury.model.EncryptedMessage - -val program1 = for { - messageCreated <- ZIO.succeed(makeMsg(Agent.Alice, Agent.Bob)) - alice <- ZIO.service[AgentService[Agent.Alice.type]] - bob <- ZIO.service[AgentService[Agent.Bob.type]] - // ########################################## - signedMsg <- alice.packSigned(messageCreated) - _ <- Console.printLine("SignedMesagem: " + signedMsg.string) - aux <- bob.unpackBase64(signedMsg.base64) - _ <- Console.printLine("Bob Check SignedMesagem: " + aux.getMessage) -} yield () - -val program2 = for { - messageCreated <- ZIO.succeed(makeMsg(Agent.Alice, Agent.Bob)) - alice <- ZIO.service[AgentService[Agent.Alice.type]] - bob <- ZIO.service[AgentService[Agent.Bob.type]] - // ########################################## - _ <- Console.printLine("*" * 120) - encryptedMsg <- alice.packEncrypted(messageCreated, to = Agent.Bob.id) - _ <- Console.printLine("EncryptedMsg: " + encryptedMsg.string) - base64EncodedString = encryptedMsg.base64 - _ <- Console.printLine("Sending bytes ...") - // base64DecodedString = new String(Base64.getUrlDecoder.decode(base64EncodedString)) - mediator <- ZIO.service[AgentService[Agent.Mediator.type]] - msgInMediator <- mediator.unpackBase64(base64EncodedString) - _ <- Console.printLine("msgInMediator: " + msgInMediator.getMessage) - _ <- Console.printLine("Sending bytes to BOB ...") - msgToBob = msgInMediator.getMessage.getAttachments().get(0).getData().toJSONObject().get("json").toString() - _ <- Console.printLine("msgToBob: " + msgToBob) - _ <- Console.printLine("Bob read Message ...") - msgInBob <- bob.unpack(msgToBob) - _ <- Console.printLine("msgInBob: " + msgInBob.getMessage) -} yield () - -val program3 = for { - _ <- Console.printLine("\n#### Program 3 ####") - messageCreated <- ZIO.succeed(makeMsg(Agent.Alice, Agent.Bob)) - alice <- ZIO.service[AgentService[Agent.Alice.type]] - bob <- ZIO.service[AgentService[Agent.Bob.type]] - // ########################################## - encryptedMsg <- alice.packEncrypted(messageCreated, to = Agent.Bob.id) - _ <- Console.printLine("EncryptedMsg: " + encryptedMsg.string) - msgInBob <- bob.unpack(encryptedMsg.string) - _ <- Console.printLine("msgInBob: " + msgInBob.getMessage) -} yield () - -val program4 = for { - _ <- Console.printLine("\n#### Program 4 ####") - messageCreated <- ZIO.succeed(makeMsg(Agent.Alice, Agent.Bob)) - alice <- ZIO.service[AgentService[Agent.Alice.type]] - - // ########################################## - encryptedMsg <- alice.packEncrypted(messageCreated, to = Agent.Bob.id) - _ <- Console.printLine("EncryptedMsg: " + encryptedMsg.string) - - forwardMessage = makeForwardMessage(Agent.Alice, Agent.Mediator, Agent.Bob, encryptedMsg).asMessage - - encryptedForwardMessage <- alice.packEncrypted(forwardMessage, to = Agent.Mediator.id) - _ <- Console.printLine("Sending bytes ...") - base64EncodedString = encryptedForwardMessage.base64 - _ <- Console.printLine(base64EncodedString) - - // _ <- Console.printLine("Sending bytes ...") - base64DecodedString = new String(Base64.getUrlDecoder.decode(base64EncodedString)) - mediator <- ZIO.service[AgentService[Agent.Mediator.type]] - msgInMediator <- mediator.unpackBase64(base64EncodedString) - _ <- Console.printLine("msgInMediator: ") - _ <- Console.printLine(msgInMediator.getMessage) - _ <- Console.printLine("Sending bytes to BOB ...") - msgToBob = msgInMediator.getMessage.getAttachments().get(0).getData().toJSONObject().get("json").toString() - _ <- Console.printLine("msgToBob:") - _ <- Console.printLine(msgToBob) - _ <- Console.printLine("Bob read Message ...") - - bob <- ZIO.service[AgentService[Agent.Bob.type]] - msgInBob <- bob.unpack(msgToBob) - _ <- Console.printLine("msgInBob: " + msgInBob.getMessage) -} yield () - -// TODO Make tests and remove this main -@main def didCommPlay() = { - - val app1 = program1.provide( - AgentService.alice, - AgentService.bob - ) - - val app2 = program2.provide( - AgentService.alice, - AgentService.bob, - AgentService.mediator - ) - - val app3 = program3.provide( - AgentService.alice, - AgentService.bob - ) - - val app4 = program4.provide( - AgentService.alice, - AgentService.bob, - AgentService.mediator - ) - - // Unsafe.unsafe { Runtime.default.unsafe.run(app1).getOrThrowFiberFailure() } - // Unsafe.unsafe { Runtime.default.unsafe.run(app2).getOrThrowFiberFailure() } - // Unsafe.unsafe { Runtime.default.unsafe.run(app3).getOrThrowFiberFailure() } - Unsafe.unsafe { Runtime.default.unsafe.run(app4).getOrThrowFiberFailure() } - -} - */ diff --git a/mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/resolvers/CharlieSecretResolver.scala b/mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/resolvers/CharlieSecretResolver.scala deleted file mode 100644 index a93c0b4939..0000000000 --- a/mercury/mercury-library/agent-didcommx/src/main/scala/io/iohk/atala/resolvers/CharlieSecretResolver.scala +++ /dev/null @@ -1,62 +0,0 @@ -/* -package io.iohk.atala.resolvers - -import org.didcommx.didcomm.common.{VerificationMaterial, VerificationMaterialFormat, VerificationMethodType} -import org.didcommx.didcomm.secret.{Secret, SecretResolverInMemory} -import scala.jdk.CollectionConverters._ -import org.didcommx.peerdid._ - -object CharlieSecretResolver { - - private val jwkKey1 = - // "kid":"${io.iohk.atala.mercury.charlie}#6LSiseNCbbtmG6ascxpPvoyT8ewrWdtJZxwmPNxYAPWxzM8", - s"""{"kty":"OKP","d":"r-jK2cO3taR8LQnJB1_ikLBTAnOtShJOsHXRUWT-aZA","crv":"X25519","x":"avH0O2Y4tqLAq8y9zpianr8ajii5m4F_mICrzNlatXs"}""" - - private val jwkKey2 = // example from did:example:alice#key-1 - // "kid":"${io.iohk.atala.mercury.charlie}#6MkgLBGee6xL5KH8SZmqmKmQKS2o1qd4RG4dSmjtRGTfsxX", - s"""{"kty":"OKP","d":"pFRUKkyzx4kHdJtFSnlPA9WzqkDT1HWV0xZ5OYZd2SY","crv":"Ed25519","x":"G-boxFB6vOZBu-wXkm-9Lh79I8nf9Z50cILaOgKKGww"}""" - - private val secretKey1 = new Secret( - io.iohk.atala.mercury.charlie + "#6LSiseNCbbtmG6ascxpPvoyT8ewrWdtJZxwmPNxYAPWxzM8", - VerificationMethodType.JSON_WEB_KEY_2020, - new VerificationMaterial(VerificationMaterialFormat.JWK, jwkKey1) - ) - private val secretKeyAgreement1 = new Secret( - io.iohk.atala.mercury.charlie + "#6MkgLBGee6xL5KH8SZmqmKmQKS2o1qd4RG4dSmjtRGTfsxX", - VerificationMethodType.JSON_WEB_KEY_2020, - new VerificationMaterial(VerificationMaterialFormat.JWK, jwkKey2) - ) - - val secretResolver = new SecretResolverInMemory( - Map( - (io.iohk.atala.mercury.charlie + "#6LSiseNCbbtmG6ascxpPvoyT8ewrWdtJZxwmPNxYAPWxzM8") -> secretKey1, - (io.iohk.atala.mercury.charlie + "#6MkgLBGee6xL5KH8SZmqmKmQKS2o1qd4RG4dSmjtRGTfsxX") -> secretKeyAgreement1, - (io.iohk.atala.mercury.charlie) -> secretKeyAgreement1 - ).asJava - ) - - // val service = - // """[{ - // | "type": "DIDCommMessaging", - // | "serviceEndpoint": "http://localhost:8000/", - // | "routingKeys": ["did:example:somemediator#somekey"] - // |}, - // |{ - // | "type": "example", - // | "serviceEndpoint": "http://localhost:8000/", - // | "routingKeys": ["did:example:somemediator#somekey2"], - // | "accept": ["didcomm/v2", "didcomm/aip2;env=rfc587"] - // |}]""".stripMargin - - @main def testPeerDidDoc() = { - println( - org.didcommx.peerdid.PeerDIDResolver - .resolvePeerDID( - io.iohk.atala.mercury.charlie, - VerificationMaterialFormatPeerDID.JWK - ) - ) - } - -} - */ diff --git a/mercury/mercury-library/agent/src/main/scala/io/iohk/atala/AgentPrograms.scala b/mercury/mercury-library/agent/src/main/scala/io/iohk/atala/AgentPrograms.scala deleted file mode 100644 index 015ab28118..0000000000 --- a/mercury/mercury-library/agent/src/main/scala/io/iohk/atala/AgentPrograms.scala +++ /dev/null @@ -1,106 +0,0 @@ -package io.iohk.atala - -import zio._ - -import io.circe._ -import io.circe.Json._ -import io.circe.parser._ -import io.circe.JsonObject -import io.iohk.atala.mercury.* -import io.iohk.atala.mercury.model._ -import io.iohk.atala.mercury.protocol.mailbox.Mailbox.ReadMessage -import io.iohk.atala.mercury.protocol.routing._ - -def makeMsg(from: Agent, to: Agent) = Message( - `type` = "http://atalaprism.io/lets_connect/proposal", - from = Some(from.id), - to = Seq(to.id), - body = JsonObject.fromIterable( - Seq( - "connectionId" -> Json.fromString("8fb9ea21-d094-4506-86b6-c7c1627d753a"), - "msg" -> Json.fromString("Hello Bob") - ) - ) -) - -def makeForwardMessage(mediator: Agent, to: Agent, msg: EncryptedMessage) = - ForwardMessage( - to = mediator.id, - expires_time = None, - body = ForwardBody(next = to.id), // TODO check msg header - attachments = Seq(AttachmentDescriptor.buildJsonAttachment(payload = msg.asJson)), - ) - -object AgentPrograms { - - def toPrettyJson(parseToJson: String) = { - parse(parseToJson).getOrElse(???).spaces2 - } - - def makeReadMessage(from: Agent, mediator: Agent) = - ReadMessage(from = from.id, to = mediator.id, expires_time = None) - - val senderProgram = for { - _ <- Console.printLine("\n#### Bob Sending type Readmessages ####") - messageCreated <- ZIO.succeed(makeReadMessage(Agent.Bob, Agent.Mediator)) - bob <- ZIO.service[DidOps] // AgentService[Agent.Bob.type]] - - // ########################################## - encryptedMsg <- bob.packEncrypted(messageCreated.asMessage, to = Agent.Mediator.id) - _ <- Console.printLine("EncryptedMsg: \n" + fromJsonObject(encryptedMsg.asJson).spaces2 + "\n") - _ <- Console.printLine("Sending bytes ...") - jsonString = encryptedMsg.string - // HTTP - httpClient <- ZIO.service[HttpClient] - res <- httpClient.postDIDComm( - url = "http://localhost:8080", - data = jsonString - ) - _ <- Console.printLine("Receiving the message ..." + res.bodyAsString) - messageReceived <- bob.unpack(res.bodyAsString) - _ <- Console.printLine("Unpacking and decrypting the received message ...") - _ <- Console.printLine( - "\n*********************************************************************************************************************************\n" - + toPrettyJson(messageReceived.message.toString) - + "\n********************************************************************************************************************************\n" - ) - - } yield () - - val pickupMessageProgram = for { - _ <- Console.printLine("\n#### Program 4 ####") - messageCreated <- ZIO.succeed(makeMsg(Agent.Alice, Agent.Bob)) - alice <- ZIO.service[DidOps] // AgentService[Agent.Alice.type]] - _ <- Console.printLine("Send Message") - _ <- Console.printLine( - "\n*********************************************************************************************************************************\n" - + messageCreated // toPrettyJson(msg.toString) - + "\n********************************************************************************************************************************\n" - ) - // ########################################## - encryptedMsg <- alice.packEncrypted(messageCreated, to = Agent.Bob.id) - _ <- Console.printLine("EncryptedMsg: " + encryptedMsg.asJson) - _ <- Console.printLine( - "\n*********************************************************************************************************************************\n" - + fromJsonObject(encryptedMsg.asJson).spaces2 - + "\n********************************************************************************************************************************\n" - ) - forwardMessage = makeForwardMessage(Agent.Mediator, Agent.Bob, encryptedMsg).asMessage - - encryptedForwardMessage <- alice.packEncrypted(forwardMessage, to = Agent.Mediator.id) - _ <- Console.printLine("Sending bytes ...") - jsonString = encryptedForwardMessage.string - _ <- Console.printLine(jsonString) - - // HTTP - - alice <- ZIO.service[DidOps] - httpClient <- ZIO.service[HttpClient] - res <- httpClient.postDIDComm( - url = "http://localhost:8080", - data = jsonString - ) - _ <- Console.printLine(res.bodyAsString) - } yield () - -} diff --git a/mercury/mercury-library/protocol-did-exchange/src/main/scala/io/iohk/atala/mercury/protocol/didexchange/v1/DIDExchange.scala b/mercury/mercury-library/protocol-did-exchange/src/main/scala/io/iohk/atala/mercury/protocol/didexchange/v1/DIDExchange.scala deleted file mode 100644 index 620632adba..0000000000 --- a/mercury/mercury-library/protocol-did-exchange/src/main/scala/io/iohk/atala/mercury/protocol/didexchange/v1/DIDExchange.scala +++ /dev/null @@ -1,3 +0,0 @@ -package io.iohk.atala.mercury.protocol.didexchange.v1 - -object DIDExchange {} diff --git a/mercury/mercury-library/protocol-mercury-mailbox/Mercury-Mailbox-Protocol.md b/mercury/mercury-library/protocol-mercury-mailbox/Mercury-Mailbox-Protocol.md deleted file mode 100644 index c18109d352..0000000000 --- a/mercury/mercury-library/protocol-mercury-mailbox/Mercury-Mailbox-Protocol.md +++ /dev/null @@ -1,87 +0,0 @@ -# [WIP] Mercury Mailbox Protocol - -## PIURI - -TODO maybe ??? `https://atalaprism.io/mercury/mailbox/1.0` - -## Diagrams (Mailbox Operations) - -### Flow Diagram - -```mermaid -sequenceDiagram - participant Alice - participant Mediator - participant DID Resolver - - note over Alice: Mediation client or Mediated Agent - - rect rgb(0, 120, 255) - note right of Alice: Alice accepts the invitation and register for a mailbox. - Alice->>+Mediator: Register (HTTP) - Mediator->>+DID Resolver: Ask for Alice DID document - DID Resolver-->>-Mediator: DID document - note over Mediator: Confirm the identity - Mediator-->>-Alice: Registration done - note over Alice: Alice updates his DID document (adding serviceEndpoint) - end -``` - -### Service State Machine - Mediator POV - -```mermaid -stateDiagram-v2 - state "Idle" as idle - [*] --> idle - idle --> [*] - idle --> recieved_forward_message :New msg type forward - recieved_forward_message --> idle :Invalid Request - recieved_forward_message --> *process_forward_message :Valid Request - *process_forward_message --> idle - idle --> recieved_mailbox_operation :New msg type mailbox operation - recieved_mailbox_operation --> idle :Invalid Request - recieved_mailbox_operation --> *process_mailbox_operation :Valid Request - *process_mailbox_operation --> idle -``` - -```mermaid -stateDiagram-v2 - [*] --> process_forward_message - process_forward_message --> storeMessage - storeMessage --> notify_recipient :Message stored - notify_recipient --> notify_recipient :retry - notify_recipient --> [*] :acknowledge (or get \n a pickup operation) - notify_recipient --> [*] :timeout \n (like after 1 year) -``` - -```mermaid -stateDiagram-v2 - [*] --> process_mailbox_operation - process_mailbox_operation --> send_challenge - send_challenge --> [*] :timeout (like \n 10min session) - send_challenge --> *operation :challenge response - *operation --> [*] -``` - -NOTE: message_sent is just a operation type!! - -FIXME replace "pickup" with "operation" - -TODO: the last diagram is maybe its on protocol. -(Does a challenge protocol already exists) ??? - ---- - -### Service State Machine - Alice Agent POV - -**Pickup Operation:** - -```mermaid -stateDiagram-v2 -[*] --> messages_requested :Requested pending messages pickup -messages_requested --> message_replyed :Recived message solve the Challenge -message_replyed --> recieve_messages :recived the messages -message_replyed --> messages_requested :Retry with new challenge -recieve_messages --> messages_requested :Request more messages -recieve_messages --> [*] -``` diff --git a/mercury/mercury-library/protocol-mercury-mailbox/src/main/scala/io/iohk/atala/mercury/protocol/mailbox/Mailbox.scala b/mercury/mercury-library/protocol-mercury-mailbox/src/main/scala/io/iohk/atala/mercury/protocol/mailbox/Mailbox.scala deleted file mode 100644 index bbbfb13dc6..0000000000 --- a/mercury/mercury-library/protocol-mercury-mailbox/src/main/scala/io/iohk/atala/mercury/protocol/mailbox/Mailbox.scala +++ /dev/null @@ -1,26 +0,0 @@ -package io.iohk.atala.mercury.protocol.mailbox - -import io.iohk.atala.mercury.model.{DidId, Message, PIURI} -import io.circe.JsonObject - -object Mailbox { - def `type`: PIURI = "https://atalaprism.io/mercury/mailbox/1.0/ReadMessages" - - final case class ReadMessage( - id: String = java.util.UUID.randomUUID.toString(), - from: DidId, - to: DidId, - expires_time: Option[Long], - ) { - - def asMessage = { - Message( - from = Some(from), - to = Seq(to), - body = JsonObject.empty, - id = id, - `type` = `type` - ) - } - } -} diff --git a/mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/DidAgent.scala b/mercury/models/src/main/scala/org/hyperledger/identus/mercury/DidAgent.scala similarity index 71% rename from mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/DidAgent.scala rename to mercury/models/src/main/scala/org/hyperledger/identus/mercury/DidAgent.scala index 5edd5c8cd6..c8dbfdd621 100644 --- a/mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/DidAgent.scala +++ b/mercury/models/src/main/scala/org/hyperledger/identus/mercury/DidAgent.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.mercury +package org.hyperledger.identus.mercury import com.nimbusds.jose.jwk.* -import io.iohk.atala.mercury.model.DidId +import org.hyperledger.identus.mercury.model.DidId /** Represente a Decentralized Identifier with secrets keys */ trait DidAgent { diff --git a/mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/DidOps.scala b/mercury/models/src/main/scala/org/hyperledger/identus/mercury/DidOps.scala similarity index 95% rename from mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/DidOps.scala rename to mercury/models/src/main/scala/org/hyperledger/identus/mercury/DidOps.scala index 184a880f8e..fb9309ff45 100644 --- a/mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/DidOps.scala +++ b/mercury/models/src/main/scala/org/hyperledger/identus/mercury/DidOps.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.mercury +package org.hyperledger.identus.mercury import zio._ -import io.iohk.atala.mercury.model._ +import org.hyperledger.identus.mercury.model._ import java.util.Base64 import scala.util.Try import scala.util.Failure diff --git a/mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/MediaTypes.scala b/mercury/models/src/main/scala/org/hyperledger/identus/mercury/MediaTypes.scala similarity index 83% rename from mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/MediaTypes.scala rename to mercury/models/src/main/scala/org/hyperledger/identus/mercury/MediaTypes.scala index 583796fe72..db9f6bfacd 100644 --- a/mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/MediaTypes.scala +++ b/mercury/models/src/main/scala/org/hyperledger/identus/mercury/MediaTypes.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.mercury +package org.hyperledger.identus.mercury object MediaTypes { val contentTypePlain = "application/didcomm-plain+json" diff --git a/mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/model/AttachmentDescriptor.scala b/mercury/models/src/main/scala/org/hyperledger/identus/mercury/model/AttachmentDescriptor.scala similarity index 99% rename from mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/model/AttachmentDescriptor.scala rename to mercury/models/src/main/scala/org/hyperledger/identus/mercury/model/AttachmentDescriptor.scala index 8da40854fc..da4357d3df 100644 --- a/mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/model/AttachmentDescriptor.scala +++ b/mercury/models/src/main/scala/org/hyperledger/identus/mercury/model/AttachmentDescriptor.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.mercury.model +package org.hyperledger.identus.mercury.model import java.util.Base64 as JBase64 import io.circe.{Decoder, Encoder, HCursor, Json, JsonObject} diff --git a/mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/model/DidId.scala b/mercury/models/src/main/scala/org/hyperledger/identus/mercury/model/DidId.scala similarity index 86% rename from mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/model/DidId.scala rename to mercury/models/src/main/scala/org/hyperledger/identus/mercury/model/DidId.scala index e608396e4f..696c40637d 100644 --- a/mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/model/DidId.scala +++ b/mercury/models/src/main/scala/org/hyperledger/identus/mercury/model/DidId.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.mercury.model +package org.hyperledger.identus.mercury.model import io.circe._ import io.circe.generic.semiauto._ diff --git a/mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/model/EncryptedMessage.scala b/mercury/models/src/main/scala/org/hyperledger/identus/mercury/model/EncryptedMessage.scala similarity index 91% rename from mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/model/EncryptedMessage.scala rename to mercury/models/src/main/scala/org/hyperledger/identus/mercury/model/EncryptedMessage.scala index 1fa43807c5..83464d5e17 100644 --- a/mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/model/EncryptedMessage.scala +++ b/mercury/models/src/main/scala/org/hyperledger/identus/mercury/model/EncryptedMessage.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.mercury.model +package org.hyperledger.identus.mercury.model // import org.didcommx.didcomm.model.PackEncryptedResult //FIXME REMOVE import java.util.Base64 diff --git a/mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/model/Message.scala b/mercury/models/src/main/scala/org/hyperledger/identus/mercury/model/Message.scala similarity index 95% rename from mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/model/Message.scala rename to mercury/models/src/main/scala/org/hyperledger/identus/mercury/model/Message.scala index af6571aba4..190cb802a0 100644 --- a/mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/model/Message.scala +++ b/mercury/models/src/main/scala/org/hyperledger/identus/mercury/model/Message.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.mercury.model +package org.hyperledger.identus.mercury.model import java.time.LocalDateTime import java.time.ZoneOffset diff --git a/mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/model/SignedMesage.scala b/mercury/models/src/main/scala/org/hyperledger/identus/mercury/model/SignedMesage.scala similarity index 76% rename from mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/model/SignedMesage.scala rename to mercury/models/src/main/scala/org/hyperledger/identus/mercury/model/SignedMesage.scala index e161a62140..743c8b3490 100644 --- a/mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/model/SignedMesage.scala +++ b/mercury/models/src/main/scala/org/hyperledger/identus/mercury/model/SignedMesage.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.mercury.model +package org.hyperledger.identus.mercury.model import java.util.Base64 diff --git a/mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/model/UnpackResult.scala b/mercury/models/src/main/scala/org/hyperledger/identus/mercury/model/UnpackResult.scala similarity index 51% rename from mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/model/UnpackResult.scala rename to mercury/models/src/main/scala/org/hyperledger/identus/mercury/model/UnpackResult.scala index 51ebee26b8..04b7208d18 100644 --- a/mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/model/UnpackResult.scala +++ b/mercury/models/src/main/scala/org/hyperledger/identus/mercury/model/UnpackResult.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.mercury.model +package org.hyperledger.identus.mercury.model trait UnpackMessage { def message: Message diff --git a/mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/model/error/package.scala b/mercury/models/src/main/scala/org/hyperledger/identus/mercury/model/error/package.scala similarity index 96% rename from mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/model/error/package.scala rename to mercury/models/src/main/scala/org/hyperledger/identus/mercury/model/error/package.scala index 62feec8cb3..e354be20a7 100644 --- a/mercury/mercury-library/models/src/main/scala/io/iohk/atala/mercury/model/error/package.scala +++ b/mercury/models/src/main/scala/org/hyperledger/identus/mercury/model/error/package.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.mercury.model +package org.hyperledger.identus.mercury import java.io.IOException diff --git a/mercury/mercury-library/protocol-connection/Connection-Protocol.md b/mercury/protocol-connection/Connection-Protocol.md similarity index 100% rename from mercury/mercury-library/protocol-connection/Connection-Protocol.md rename to mercury/protocol-connection/Connection-Protocol.md diff --git a/mercury/mercury-library/protocol-connection/src/main/scala/io/iohk/atala/mercury/protocol/connection/ConnectionInvitation.scala b/mercury/protocol-connection/src/main/scala/org/hyperledger/identus/mercury/protocol/connection/ConnectionInvitation.scala similarity index 65% rename from mercury/mercury-library/protocol-connection/src/main/scala/io/iohk/atala/mercury/protocol/connection/ConnectionInvitation.scala rename to mercury/protocol-connection/src/main/scala/org/hyperledger/identus/mercury/protocol/connection/ConnectionInvitation.scala index 691f5805bd..928759d16b 100644 --- a/mercury/mercury-library/protocol-connection/src/main/scala/io/iohk/atala/mercury/protocol/connection/ConnectionInvitation.scala +++ b/mercury/protocol-connection/src/main/scala/org/hyperledger/identus/mercury/protocol/connection/ConnectionInvitation.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.mercury.protocol.connection +package org.hyperledger.identus.mercury.protocol.connection -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.mercury.protocol.invitation.v2.Invitation -import io.iohk.atala.mercury.protocol.invitation.v2.Invitation.Body +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.mercury.protocol.invitation.v2.Invitation +import org.hyperledger.identus.mercury.protocol.invitation.v2.Invitation.Body object ConnectionInvitation { @@ -10,7 +10,7 @@ object ConnectionInvitation { def makeConnectionInvitation(from: DidId): Invitation = { makeConnectionInvitation( from = from, - goalCode = Some("io.atalaprism.connect"), + goalCode = Some("org.hyperledger.identus.connect"), goal = Some(s"Establish a trust connection between two peers using the protocol '${ConnectionRequest.`type`}'") ) } diff --git a/mercury/mercury-library/protocol-connection/src/main/scala/io/iohk/atala/mercury/protocol/connection/ConnectionRequest.scala b/mercury/protocol-connection/src/main/scala/org/hyperledger/identus/mercury/protocol/connection/ConnectionRequest.scala similarity index 91% rename from mercury/mercury-library/protocol-connection/src/main/scala/io/iohk/atala/mercury/protocol/connection/ConnectionRequest.scala rename to mercury/protocol-connection/src/main/scala/org/hyperledger/identus/mercury/protocol/connection/ConnectionRequest.scala index 4915354659..cbb7c942f9 100644 --- a/mercury/mercury-library/protocol-connection/src/main/scala/io/iohk/atala/mercury/protocol/connection/ConnectionRequest.scala +++ b/mercury/protocol-connection/src/main/scala/org/hyperledger/identus/mercury/protocol/connection/ConnectionRequest.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.mercury.protocol.connection +package org.hyperledger.identus.mercury.protocol.connection + import io.circe.generic.semiauto.{deriveDecoder, deriveEncoder} import io.circe.{Decoder, Encoder} -import io.iohk.atala.mercury.model.{AttachmentDescriptor, DidId, Message, PIURI} +import org.hyperledger.identus.mercury.model.{AttachmentDescriptor, DidId, Message, PIURI} import io.circe.syntax.* -import io.iohk.atala.mercury.protocol.connection.ConnectionRequest.Body -import io.iohk.atala.mercury.protocol.invitation.v2.Invitation +import org.hyperledger.identus.mercury.protocol.invitation.v2.Invitation object ConnectionRequest { def `type`: PIURI = "https://atalaprism.io/mercury/connections/1.0/request" @@ -80,7 +80,7 @@ final case class ConnectionRequest( to: DidId, thid: Option[String], pthid: Option[String], - body: Body, + body: ConnectionRequest.Body, ) { assert(`type` == "https://atalaprism.io/mercury/connections/1.0/request") diff --git a/mercury/mercury-library/protocol-connection/src/main/scala/io/iohk/atala/mercury/protocol/connection/ConnectionResponse.scala b/mercury/protocol-connection/src/main/scala/org/hyperledger/identus/mercury/protocol/connection/ConnectionResponse.scala similarity index 95% rename from mercury/mercury-library/protocol-connection/src/main/scala/io/iohk/atala/mercury/protocol/connection/ConnectionResponse.scala rename to mercury/protocol-connection/src/main/scala/org/hyperledger/identus/mercury/protocol/connection/ConnectionResponse.scala index 4a2aa8cd3b..86815d124e 100644 --- a/mercury/mercury-library/protocol-connection/src/main/scala/io/iohk/atala/mercury/protocol/connection/ConnectionResponse.scala +++ b/mercury/protocol-connection/src/main/scala/org/hyperledger/identus/mercury/protocol/connection/ConnectionResponse.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.mercury.protocol.connection +package org.hyperledger.identus.mercury.protocol.connection import io.circe.{Decoder, Encoder} import io.circe.generic.semiauto.{deriveDecoder, deriveEncoder} -import io.iohk.atala.mercury.model.{DidId, Message, PIURI} +import org.hyperledger.identus.mercury.model.{DidId, Message, PIURI} import io.circe.syntax.* object ConnectionResponse { diff --git a/mercury/mercury-library/protocol-connection/src/test/scala/io/iohk/atala/mercury/protocol/connection/ConnectionSpec.scala b/mercury/protocol-connection/src/test/scala/org/hyperledger/identus/mercury/protocol/connection/ConnectionSpec.scala similarity index 94% rename from mercury/mercury-library/protocol-connection/src/test/scala/io/iohk/atala/mercury/protocol/connection/ConnectionSpec.scala rename to mercury/protocol-connection/src/test/scala/org/hyperledger/identus/mercury/protocol/connection/ConnectionSpec.scala index 2af194eacf..73f3d34d05 100644 --- a/mercury/mercury-library/protocol-connection/src/test/scala/io/iohk/atala/mercury/protocol/connection/ConnectionSpec.scala +++ b/mercury/protocol-connection/src/test/scala/org/hyperledger/identus/mercury/protocol/connection/ConnectionSpec.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.mercury.protocol.connection +package org.hyperledger.identus.mercury.protocol.connection import io.circe._ import io.circe.parser._ import munit.* -import io.iohk.atala.mercury.model.* +import org.hyperledger.identus.mercury.model.{Message, DidId} -/** protocolConnection/testOnly io.iohk.atala.mercury.protocol.connection.CoordinateMediationSpec */ +/** protocolConnection/testOnly org.hyperledger.identus.mercury.protocol.connection.CoordinateMediationSpec */ class CoordinateMediationSpec extends ZSuite { test("parse ConnectionRequest") { diff --git a/mercury/mercury-library/protocol-coordinate-mediation/Coordinate-Mediation-Protocol.md b/mercury/protocol-coordinate-mediation/Coordinate-Mediation-Protocol.md similarity index 100% rename from mercury/mercury-library/protocol-coordinate-mediation/Coordinate-Mediation-Protocol.md rename to mercury/protocol-coordinate-mediation/Coordinate-Mediation-Protocol.md diff --git a/mercury/mercury-library/protocol-coordinate-mediation/src/main/scala/io/iohk/atala/mercury/protocol/coordinatemediation/CoordinateMediation.scala b/mercury/protocol-coordinate-mediation/src/main/scala/org/hyperledger/identus/mercury/protocol/coordinatemediation/CoordinateMediation.scala similarity index 97% rename from mercury/mercury-library/protocol-coordinate-mediation/src/main/scala/io/iohk/atala/mercury/protocol/coordinatemediation/CoordinateMediation.scala rename to mercury/protocol-coordinate-mediation/src/main/scala/org/hyperledger/identus/mercury/protocol/coordinatemediation/CoordinateMediation.scala index cc6c9f7f65..640cd9ebb2 100644 --- a/mercury/mercury-library/protocol-coordinate-mediation/src/main/scala/io/iohk/atala/mercury/protocol/coordinatemediation/CoordinateMediation.scala +++ b/mercury/protocol-coordinate-mediation/src/main/scala/org/hyperledger/identus/mercury/protocol/coordinatemediation/CoordinateMediation.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.mercury.protocol.coordinatemediation +package org.hyperledger.identus.mercury.protocol.coordinatemediation -import io.iohk.atala.mercury.model.PIURI +import org.hyperledger.identus.mercury.model.PIURI import io.circe._ import io.circe.generic.semiauto._ diff --git a/mercury/mercury-library/protocol-coordinate-mediation/src/test/scala/io/iohk/atala/mercury/protocol/coordinatemediation/CoordinateMediationSpec.scala b/mercury/protocol-coordinate-mediation/src/test/scala/org/hyperledger/identus/mercury/protocol/coordinatemediation/CoordinateMediationSpec.scala similarity index 94% rename from mercury/mercury-library/protocol-coordinate-mediation/src/test/scala/io/iohk/atala/mercury/protocol/coordinatemediation/CoordinateMediationSpec.scala rename to mercury/protocol-coordinate-mediation/src/test/scala/org/hyperledger/identus/mercury/protocol/coordinatemediation/CoordinateMediationSpec.scala index 066917aca1..76e5464f17 100644 --- a/mercury/mercury-library/protocol-coordinate-mediation/src/test/scala/io/iohk/atala/mercury/protocol/coordinatemediation/CoordinateMediationSpec.scala +++ b/mercury/protocol-coordinate-mediation/src/test/scala/org/hyperledger/identus/mercury/protocol/coordinatemediation/CoordinateMediationSpec.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.mercury.protocol.coordinatemediation +package org.hyperledger.identus.mercury.protocol.coordinatemediation import io.circe._ import io.circe.parser._ diff --git a/mercury/mercury-library/protocol-did-exchange/DidExchange-Protocol.md b/mercury/protocol-did-exchange/DidExchange-Protocol.md similarity index 100% rename from mercury/mercury-library/protocol-did-exchange/DidExchange-Protocol.md rename to mercury/protocol-did-exchange/DidExchange-Protocol.md diff --git a/mercury/mercury-library/protocol-did-exchange/src/main/scala/io/iohk/atala/mercury/protocol/didexchange/v1/DidExchangeRequest.scala b/mercury/protocol-did-exchange/src/main/scala/org/hyperledger/identus/mercury/protocol/didexchange/v1/DidExchangeRequest.scala similarity index 65% rename from mercury/mercury-library/protocol-did-exchange/src/main/scala/io/iohk/atala/mercury/protocol/didexchange/v1/DidExchangeRequest.scala rename to mercury/protocol-did-exchange/src/main/scala/org/hyperledger/identus/mercury/protocol/didexchange/v1/DidExchangeRequest.scala index 038611036b..877a50ba0c 100644 --- a/mercury/mercury-library/protocol-did-exchange/src/main/scala/io/iohk/atala/mercury/protocol/didexchange/v1/DidExchangeRequest.scala +++ b/mercury/protocol-did-exchange/src/main/scala/org/hyperledger/identus/mercury/protocol/didexchange/v1/DidExchangeRequest.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.mercury.protocol.didexchange.v1 +package org.hyperledger.identus.mercury.protocol.didexchange.v1 -import io.iohk.atala.mercury.model.{AttachmentDescriptor, PIURI} +import org.hyperledger.identus.mercury.model.{AttachmentDescriptor, PIURI} final case class Thread(thid: String, pthid: String) diff --git a/mercury/mercury-library/protocol-invitation/Invitation-Protocol.md b/mercury/protocol-invitation/Invitation-Protocol.md similarity index 100% rename from mercury/mercury-library/protocol-invitation/Invitation-Protocol.md rename to mercury/protocol-invitation/Invitation-Protocol.md diff --git a/mercury/mercury-library/protocol-invitation/src/main/scala/io/iohk/atala/mercury/protocol/invitation/OutOfBand.scala b/mercury/protocol-invitation/src/main/scala/org/hyperledger/identus/mercury/protocol/invitation/OutOfBand.scala similarity index 84% rename from mercury/mercury-library/protocol-invitation/src/main/scala/io/iohk/atala/mercury/protocol/invitation/OutOfBand.scala rename to mercury/protocol-invitation/src/main/scala/org/hyperledger/identus/mercury/protocol/invitation/OutOfBand.scala index 8a8976cb0e..7cd2a59be5 100644 --- a/mercury/mercury-library/protocol-invitation/src/main/scala/io/iohk/atala/mercury/protocol/invitation/OutOfBand.scala +++ b/mercury/protocol-invitation/src/main/scala/org/hyperledger/identus/mercury/protocol/invitation/OutOfBand.scala @@ -1,11 +1,10 @@ -package io.iohk.atala.mercury.protocol.invitation +package org.hyperledger.identus.mercury.protocol.invitation import java.net.URL import java.{util => ju} -import io.iohk.atala.mercury.protocol.invitation.v2._ +import org.hyperledger.identus.mercury.protocol.invitation.v2._ import io.circe._ import io.circe.parser._ -import io.iohk.atala.mercury object OutOfBand { diff --git a/mercury/mercury-library/protocol-invitation/src/main/scala/io/iohk/atala/mercury/protocol/invitation/ServiceType.scala b/mercury/protocol-invitation/src/main/scala/org/hyperledger/identus/mercury/protocol/invitation/ServiceType.scala similarity index 95% rename from mercury/mercury-library/protocol-invitation/src/main/scala/io/iohk/atala/mercury/protocol/invitation/ServiceType.scala rename to mercury/protocol-invitation/src/main/scala/org/hyperledger/identus/mercury/protocol/invitation/ServiceType.scala index 8581355844..7f3ea642ec 100644 --- a/mercury/mercury-library/protocol-invitation/src/main/scala/io/iohk/atala/mercury/protocol/invitation/ServiceType.scala +++ b/mercury/protocol-invitation/src/main/scala/org/hyperledger/identus/mercury/protocol/invitation/ServiceType.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.mercury.protocol.invitation +package org.hyperledger.identus.mercury.protocol.invitation import cats.implicits._ import io.circe.syntax._ import io.circe.generic.semiauto.{deriveDecoder, deriveEncoder} diff --git a/mercury/mercury-library/protocol-invitation/src/main/scala/io/iohk/atala/mercury/protocol/invitation/package.scala b/mercury/protocol-invitation/src/main/scala/org/hyperledger/identus/mercury/protocol/invitation/package.scala similarity index 74% rename from mercury/mercury-library/protocol-invitation/src/main/scala/io/iohk/atala/mercury/protocol/invitation/package.scala rename to mercury/protocol-invitation/src/main/scala/org/hyperledger/identus/mercury/protocol/invitation/package.scala index d6e04a4d5c..cd6e3156fa 100644 --- a/mercury/mercury-library/protocol-invitation/src/main/scala/io/iohk/atala/mercury/protocol/invitation/package.scala +++ b/mercury/protocol-invitation/src/main/scala/org/hyperledger/identus/mercury/protocol/invitation/package.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.mercury.protocol +package org.hyperledger.identus.mercury.protocol package object invitation { diff --git a/mercury/mercury-library/protocol-invitation/src/main/scala/io/iohk/atala/mercury/protocol/invitation/v1/Invitation.scala b/mercury/protocol-invitation/src/main/scala/org/hyperledger/identus/mercury/protocol/invitation/v1/Invitation.scala similarity index 75% rename from mercury/mercury-library/protocol-invitation/src/main/scala/io/iohk/atala/mercury/protocol/invitation/v1/Invitation.scala rename to mercury/protocol-invitation/src/main/scala/org/hyperledger/identus/mercury/protocol/invitation/v1/Invitation.scala index f38625ea98..05245b0d57 100644 --- a/mercury/mercury-library/protocol-invitation/src/main/scala/io/iohk/atala/mercury/protocol/invitation/v1/Invitation.scala +++ b/mercury/protocol-invitation/src/main/scala/org/hyperledger/identus/mercury/protocol/invitation/v1/Invitation.scala @@ -1,12 +1,12 @@ -package io.iohk.atala.mercury.protocol.invitation.v1 +package org.hyperledger.identus.mercury.protocol.invitation.v1 import io.circe.syntax.* import io.circe.generic.semiauto.* import io.circe.{Decoder, Encoder, Json} -import io.iohk.atala.mercury.model.PIURI +import org.hyperledger.identus.mercury.model.PIURI -import io.iohk.atala.mercury.model.AttachmentDescriptor -import io.iohk.atala.mercury.model.AttachmentDescriptor.attachmentDescriptorEncoderV1 -import io.iohk.atala.mercury.protocol.invitation.ServiceType +import org.hyperledger.identus.mercury.model.AttachmentDescriptor +import org.hyperledger.identus.mercury.model.AttachmentDescriptor.attachmentDescriptorEncoderV1 +import org.hyperledger.identus.mercury.protocol.invitation.ServiceType /** Out-Of-Band invitation Example * @see @@ -21,7 +21,7 @@ import io.iohk.atala.mercury.protocol.invitation.ServiceType * @param services */ final case class Invitation( - `@id`: String = io.iohk.atala.mercury.protocol.invitation.getNewMsgId, + `@id`: String = org.hyperledger.identus.mercury.protocol.invitation.getNewMsgId, label: String, goal: String, goal_code: String, diff --git a/mercury/mercury-library/protocol-invitation/src/main/scala/io/iohk/atala/mercury/protocol/invitation/v2/Invitation.scala b/mercury/protocol-invitation/src/main/scala/org/hyperledger/identus/mercury/protocol/invitation/v2/Invitation.scala similarity index 81% rename from mercury/mercury-library/protocol-invitation/src/main/scala/io/iohk/atala/mercury/protocol/invitation/v2/Invitation.scala rename to mercury/protocol-invitation/src/main/scala/org/hyperledger/identus/mercury/protocol/invitation/v2/Invitation.scala index 9cfb4711c4..e4105deb8b 100644 --- a/mercury/mercury-library/protocol-invitation/src/main/scala/io/iohk/atala/mercury/protocol/invitation/v2/Invitation.scala +++ b/mercury/protocol-invitation/src/main/scala/org/hyperledger/identus/mercury/protocol/invitation/v2/Invitation.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.mercury.protocol.invitation.v2 +package org.hyperledger.identus.mercury.protocol.invitation.v2 import io.circe.syntax.* import io.circe.{Decoder, Encoder} -import io.iohk.atala.mercury.model.* -import AttachmentDescriptor.attachmentDescriptorEncoderV2 +import org.hyperledger.identus.mercury.model.AttachmentDescriptor.attachmentDescriptorEncoderV2 import io.circe.generic.semiauto._ +import org.hyperledger.identus.mercury.model.{PIURI, AttachmentDescriptor, DidId} /** Out-Of-Band invitation * @see diff --git a/mercury/mercury-library/protocol-invitation/src/test/scala/io/iohk/atala/mercury/protocol/invitation/v1/InvitationV1Spec.scala b/mercury/protocol-invitation/src/test/scala/org/hyperledger/identus/mercury/protocol/invitation/v1/InvitationV1Spec.scala similarity index 92% rename from mercury/mercury-library/protocol-invitation/src/test/scala/io/iohk/atala/mercury/protocol/invitation/v1/InvitationV1Spec.scala rename to mercury/protocol-invitation/src/test/scala/org/hyperledger/identus/mercury/protocol/invitation/v1/InvitationV1Spec.scala index 470c230557..520d66b5a5 100644 --- a/mercury/mercury-library/protocol-invitation/src/test/scala/io/iohk/atala/mercury/protocol/invitation/v1/InvitationV1Spec.scala +++ b/mercury/protocol-invitation/src/test/scala/org/hyperledger/identus/mercury/protocol/invitation/v1/InvitationV1Spec.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.mercury.protocol.invitation.v1 +package org.hyperledger.identus.mercury.protocol.invitation.v1 import munit.* import io.circe.syntax._ import io.circe.Json import io.circe.parser._ -import io.iohk.atala.mercury.protocol.invitation._ -import io.iohk.atala.mercury.model.AttachmentDescriptor +import org.hyperledger.identus.mercury.protocol.invitation._ +import org.hyperledger.identus.mercury.model.AttachmentDescriptor class InvitationV1Spec extends ZSuite { diff --git a/mercury/mercury-library/protocol-invitation/src/test/scala/io/iohk/atala/mercury/protocol/invitation/v2/OutOfBandSpec.scala b/mercury/protocol-invitation/src/test/scala/org/hyperledger/identus/mercury/protocol/invitation/v2/OutOfBandSpec.scala similarity index 80% rename from mercury/mercury-library/protocol-invitation/src/test/scala/io/iohk/atala/mercury/protocol/invitation/v2/OutOfBandSpec.scala rename to mercury/protocol-invitation/src/test/scala/org/hyperledger/identus/mercury/protocol/invitation/v2/OutOfBandSpec.scala index 87eb8f60e0..0ab35ce3ff 100644 --- a/mercury/mercury-library/protocol-invitation/src/test/scala/io/iohk/atala/mercury/protocol/invitation/v2/OutOfBandSpec.scala +++ b/mercury/protocol-invitation/src/test/scala/org/hyperledger/identus/mercury/protocol/invitation/v2/OutOfBandSpec.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.mercury.protocol.invitation.v2 +package org.hyperledger.identus.mercury.protocol.invitation.v2 import munit.* -import io.iohk.atala.mercury.protocol.invitation.v2._ -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.mercury.protocol.invitation.v2.Invitation.Body -import io.iohk.atala.mercury.protocol.invitation.OutOfBand +import org.hyperledger.identus.mercury.protocol.invitation.v2._ +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.mercury.protocol.invitation.v2.Invitation.Body +import org.hyperledger.identus.mercury.protocol.invitation.OutOfBand class OutOfBandSpec extends FunSuite { test("out-of-band (_oob URL) messagem parsing into Invitation") { diff --git a/mercury/mercury-library/protocol-issue-credential/Issue-Credential-Protocol.md b/mercury/protocol-issue-credential/Issue-Credential-Protocol.md similarity index 100% rename from mercury/mercury-library/protocol-issue-credential/Issue-Credential-Protocol.md rename to mercury/protocol-issue-credential/Issue-Credential-Protocol.md diff --git a/mercury/mercury-library/protocol-issue-credential/src/main/scala/io/iohk/atala/mercury/protocol/issuecredential/Credential.scala b/mercury/protocol-issue-credential/src/main/scala/org/hyperledger/identus/mercury/protocol/issuecredential/Credential.scala similarity index 92% rename from mercury/mercury-library/protocol-issue-credential/src/main/scala/io/iohk/atala/mercury/protocol/issuecredential/Credential.scala rename to mercury/protocol-issue-credential/src/main/scala/org/hyperledger/identus/mercury/protocol/issuecredential/Credential.scala index 405c2a8065..d49bfc4403 100644 --- a/mercury/mercury-library/protocol-issue-credential/src/main/scala/io/iohk/atala/mercury/protocol/issuecredential/Credential.scala +++ b/mercury/protocol-issue-credential/src/main/scala/org/hyperledger/identus/mercury/protocol/issuecredential/Credential.scala @@ -1,5 +1,5 @@ /* -package io.iohk.atala.mercury.protocol.issuecredential +package org.hyperledger.identus.mercury.protocol.issuecredential import io.circe.generic.semiauto.* import io.circe.{Decoder, Encoder} final case class Attribute( diff --git a/mercury/mercury-library/protocol-issue-credential/src/main/scala/io/iohk/atala/mercury/protocol/issuecredential/CredentialPreview.scala b/mercury/protocol-issue-credential/src/main/scala/org/hyperledger/identus/mercury/protocol/issuecredential/CredentialPreview.scala similarity index 97% rename from mercury/mercury-library/protocol-issue-credential/src/main/scala/io/iohk/atala/mercury/protocol/issuecredential/CredentialPreview.scala rename to mercury/protocol-issue-credential/src/main/scala/org/hyperledger/identus/mercury/protocol/issuecredential/CredentialPreview.scala index f354cc0136..5ea3ef8308 100644 --- a/mercury/mercury-library/protocol-issue-credential/src/main/scala/io/iohk/atala/mercury/protocol/issuecredential/CredentialPreview.scala +++ b/mercury/protocol-issue-credential/src/main/scala/org/hyperledger/identus/mercury/protocol/issuecredential/CredentialPreview.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.mercury.protocol.issuecredential +package org.hyperledger.identus.mercury.protocol.issuecredential import io.circe.generic.semiauto.* import io.circe.{Decoder, Encoder} diff --git a/mercury/mercury-library/protocol-issue-credential/src/main/scala/io/iohk/atala/mercury/protocol/issuecredential/IssueCredential.scala b/mercury/protocol-issue-credential/src/main/scala/org/hyperledger/identus/mercury/protocol/issuecredential/IssueCredential.scala similarity index 95% rename from mercury/mercury-library/protocol-issue-credential/src/main/scala/io/iohk/atala/mercury/protocol/issuecredential/IssueCredential.scala rename to mercury/protocol-issue-credential/src/main/scala/org/hyperledger/identus/mercury/protocol/issuecredential/IssueCredential.scala index 1d5fa0ca14..bb14f716fe 100644 --- a/mercury/mercury-library/protocol-issue-credential/src/main/scala/io/iohk/atala/mercury/protocol/issuecredential/IssueCredential.scala +++ b/mercury/protocol-issue-credential/src/main/scala/org/hyperledger/identus/mercury/protocol/issuecredential/IssueCredential.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.mercury.protocol.issuecredential +package org.hyperledger.identus.mercury.protocol.issuecredential import io.circe._ import io.circe.generic.semiauto._ import io.circe.syntax._ -import io.iohk.atala.mercury.model._ +import org.hyperledger.identus.mercury.model.{PIURI, AttachmentDescriptor, Message, DidId} /** ALL parameterS are DIDCOMMV2 format and naming conventions and follows the protocol * @see diff --git a/mercury/mercury-library/protocol-issue-credential/src/main/scala/io/iohk/atala/mercury/protocol/issuecredential/IssueFormats.scala b/mercury/protocol-issue-credential/src/main/scala/org/hyperledger/identus/mercury/protocol/issuecredential/IssueFormats.scala similarity index 99% rename from mercury/mercury-library/protocol-issue-credential/src/main/scala/io/iohk/atala/mercury/protocol/issuecredential/IssueFormats.scala rename to mercury/protocol-issue-credential/src/main/scala/org/hyperledger/identus/mercury/protocol/issuecredential/IssueFormats.scala index f731449e0b..0ac5ab79dd 100644 --- a/mercury/mercury-library/protocol-issue-credential/src/main/scala/io/iohk/atala/mercury/protocol/issuecredential/IssueFormats.scala +++ b/mercury/protocol-issue-credential/src/main/scala/org/hyperledger/identus/mercury/protocol/issuecredential/IssueFormats.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.mercury.protocol.issuecredential +package org.hyperledger.identus.mercury.protocol.issuecredential import io.circe.generic.semiauto.* import io.circe.{Decoder, Encoder} diff --git a/mercury/mercury-library/protocol-issue-credential/src/main/scala/io/iohk/atala/mercury/protocol/issuecredential/OfferCredential.scala b/mercury/protocol-issue-credential/src/main/scala/org/hyperledger/identus/mercury/protocol/issuecredential/OfferCredential.scala similarity index 94% rename from mercury/mercury-library/protocol-issue-credential/src/main/scala/io/iohk/atala/mercury/protocol/issuecredential/OfferCredential.scala rename to mercury/protocol-issue-credential/src/main/scala/org/hyperledger/identus/mercury/protocol/issuecredential/OfferCredential.scala index ef66589de5..6a8cb76d26 100644 --- a/mercury/mercury-library/protocol-issue-credential/src/main/scala/io/iohk/atala/mercury/protocol/issuecredential/OfferCredential.scala +++ b/mercury/protocol-issue-credential/src/main/scala/org/hyperledger/identus/mercury/protocol/issuecredential/OfferCredential.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.mercury.protocol.issuecredential +package org.hyperledger.identus.mercury.protocol.issuecredential import io.circe._ import io.circe.generic.semiauto._ import io.circe.syntax._ -import io.iohk.atala.mercury.model.PIURI -import io.iohk.atala.mercury.model._ +import org.hyperledger.identus.mercury.model.PIURI +import org.hyperledger.identus.mercury.model.{AttachmentDescriptor, Message, DidId} /** ALL parameterS are DIDCOMMV2 format and naming conventions and follows the protocol * @see diff --git a/mercury/mercury-library/protocol-issue-credential/src/main/scala/io/iohk/atala/mercury/protocol/issuecredential/ProposeCredential.scala b/mercury/protocol-issue-credential/src/main/scala/org/hyperledger/identus/mercury/protocol/issuecredential/ProposeCredential.scala similarity index 93% rename from mercury/mercury-library/protocol-issue-credential/src/main/scala/io/iohk/atala/mercury/protocol/issuecredential/ProposeCredential.scala rename to mercury/protocol-issue-credential/src/main/scala/org/hyperledger/identus/mercury/protocol/issuecredential/ProposeCredential.scala index b8e24f204b..445a9e5d57 100644 --- a/mercury/mercury-library/protocol-issue-credential/src/main/scala/io/iohk/atala/mercury/protocol/issuecredential/ProposeCredential.scala +++ b/mercury/protocol-issue-credential/src/main/scala/org/hyperledger/identus/mercury/protocol/issuecredential/ProposeCredential.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.mercury.protocol.issuecredential +package org.hyperledger.identus.mercury.protocol.issuecredential import io.circe._ import io.circe.generic.semiauto._ import io.circe.syntax._ -import io.iohk.atala.mercury.model.PIURI -import io.iohk.atala.mercury.model._ +import org.hyperledger.identus.mercury.model.PIURI +import org.hyperledger.identus.mercury.model.{AttachmentDescriptor, Message, DidId} /** ALL parameterS are DIDCOMMV2 format and naming conventions and follows the protocol * @see diff --git a/mercury/mercury-library/protocol-issue-credential/src/main/scala/io/iohk/atala/mercury/protocol/issuecredential/RequestCredential.scala b/mercury/protocol-issue-credential/src/main/scala/org/hyperledger/identus/mercury/protocol/issuecredential/RequestCredential.scala similarity index 93% rename from mercury/mercury-library/protocol-issue-credential/src/main/scala/io/iohk/atala/mercury/protocol/issuecredential/RequestCredential.scala rename to mercury/protocol-issue-credential/src/main/scala/org/hyperledger/identus/mercury/protocol/issuecredential/RequestCredential.scala index 294b564a2b..4d40f4da5e 100644 --- a/mercury/mercury-library/protocol-issue-credential/src/main/scala/io/iohk/atala/mercury/protocol/issuecredential/RequestCredential.scala +++ b/mercury/protocol-issue-credential/src/main/scala/org/hyperledger/identus/mercury/protocol/issuecredential/RequestCredential.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.mercury.protocol.issuecredential +package org.hyperledger.identus.mercury.protocol.issuecredential import io.circe._ import io.circe.generic.semiauto._ import io.circe.syntax._ -import io.iohk.atala.mercury.model.PIURI -import io.iohk.atala.mercury.model._ +import org.hyperledger.identus.mercury.model.PIURI +import org.hyperledger.identus.mercury.model.{AttachmentDescriptor, Message, DidId} final case class RequestCredential( id: String = java.util.UUID.randomUUID.toString(), diff --git a/mercury/mercury-library/protocol-issue-credential/src/main/scala/io/iohk/atala/mercury/protocol/issuecredential/Utils.scala b/mercury/protocol-issue-credential/src/main/scala/org/hyperledger/identus/mercury/protocol/issuecredential/Utils.scala similarity index 88% rename from mercury/mercury-library/protocol-issue-credential/src/main/scala/io/iohk/atala/mercury/protocol/issuecredential/Utils.scala rename to mercury/protocol-issue-credential/src/main/scala/org/hyperledger/identus/mercury/protocol/issuecredential/Utils.scala index 61f5ed5000..d87c49a7e5 100644 --- a/mercury/mercury-library/protocol-issue-credential/src/main/scala/io/iohk/atala/mercury/protocol/issuecredential/Utils.scala +++ b/mercury/protocol-issue-credential/src/main/scala/org/hyperledger/identus/mercury/protocol/issuecredential/Utils.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.mercury.protocol.issuecredential +package org.hyperledger.identus.mercury.protocol.issuecredential import io.circe.syntax._ import io.circe.parser._ -import io.iohk.atala.mercury.model._ import io.circe.Decoder +import org.hyperledger.identus.mercury.model.{LinkData, JsonData, AttachmentDescriptor, Base64, JwsData} private[this] trait ReadAttachmentsUtils { diff --git a/mercury/mercury-library/protocol-issue-credential/src/test/scala/io/iohk/atala/mercury/protocol/anotherclasspath/UtilsCredentialSpec.scala b/mercury/protocol-issue-credential/src/test/scala/org/hyperledger/identus/mercury/protocol/anotherclasspath/UtilsCredentialSpec.scala similarity index 88% rename from mercury/mercury-library/protocol-issue-credential/src/test/scala/io/iohk/atala/mercury/protocol/anotherclasspath/UtilsCredentialSpec.scala rename to mercury/protocol-issue-credential/src/test/scala/org/hyperledger/identus/mercury/protocol/anotherclasspath/UtilsCredentialSpec.scala index a9875c4fdd..8ad4467c9c 100644 --- a/mercury/mercury-library/protocol-issue-credential/src/test/scala/io/iohk/atala/mercury/protocol/anotherclasspath/UtilsCredentialSpec.scala +++ b/mercury/protocol-issue-credential/src/test/scala/org/hyperledger/identus/mercury/protocol/anotherclasspath/UtilsCredentialSpec.scala @@ -1,12 +1,22 @@ -package io.iohk.atala.mercury.protocol.anotherclasspath +package org.hyperledger.identus.mercury.protocol.anotherclasspath import io.circe.* import io.circe.syntax.* import io.circe.generic.semiauto.* import munit.* -import io.iohk.atala.mercury.model._ -import io.iohk.atala.mercury.protocol.issuecredential._ +import org.hyperledger.identus.mercury.model.{AttachmentDescriptor, DidId} +import org.hyperledger.identus.mercury.protocol.issuecredential.{ + IssueCredential, + IssueCredentialProposeFormat, + OfferCredential, + ProposeCredential, + CredentialPreview, + RequestCredential, + IssueCredentialIssuedFormat, + IssueCredentialOfferFormat, + IssueCredentialRequestFormat +} private[this] case class TestCredentialType(a: String, b: Int, x: Long, name: String, dob: String) private[this] object TestCredentialType { @@ -14,7 +24,7 @@ private[this] object TestCredentialType { given Decoder[TestCredentialType] = deriveDecoder[TestCredentialType] } -/** testOnly io.iohk.atala.mercury.protocol.anotherclasspath.UtilsCredentialSpec +/** testOnly org.hyperledger.identus.mercury.protocol.anotherclasspath.UtilsCredentialSpec */ class UtilsCredentialSpec extends ZSuite { val nameCredentialType = "prism/TestCredentialType" diff --git a/mercury/mercury-library/protocol-issue-credential/src/test/scala/io/iohk/atala/mercury/protocol/issuecredential/IssueCredentialSpec.scala b/mercury/protocol-issue-credential/src/test/scala/org/hyperledger/identus/mercury/protocol/issuecredential/IssueCredentialSpec.scala similarity index 89% rename from mercury/mercury-library/protocol-issue-credential/src/test/scala/io/iohk/atala/mercury/protocol/issuecredential/IssueCredentialSpec.scala rename to mercury/protocol-issue-credential/src/test/scala/org/hyperledger/identus/mercury/protocol/issuecredential/IssueCredentialSpec.scala index c6bdc7d749..d79b9195e8 100644 --- a/mercury/mercury-library/protocol-issue-credential/src/test/scala/io/iohk/atala/mercury/protocol/issuecredential/IssueCredentialSpec.scala +++ b/mercury/protocol-issue-credential/src/test/scala/org/hyperledger/identus/mercury/protocol/issuecredential/IssueCredentialSpec.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.mercury.protocol.issuecredential +package org.hyperledger.identus.mercury.protocol.issuecredential import io.circe.Json import io.circe.parser.* import io.circe.syntax.* -import io.iohk.atala.mercury.model.AttachmentDescriptor +import org.hyperledger.identus.mercury.model.AttachmentDescriptor import munit.* -import io.iohk.atala.mercury.model._ +import org.hyperledger.identus.mercury.model.DidId class IssueCredentialSpec extends ZSuite { diff --git a/mercury/mercury-library/protocol-issue-credential/src/test/scala/io/iohk/atala/mercury/protocol/issuecredential/OfferCredentialSpec.scala b/mercury/protocol-issue-credential/src/test/scala/org/hyperledger/identus/mercury/protocol/issuecredential/OfferCredentialSpec.scala similarity index 89% rename from mercury/mercury-library/protocol-issue-credential/src/test/scala/io/iohk/atala/mercury/protocol/issuecredential/OfferCredentialSpec.scala rename to mercury/protocol-issue-credential/src/test/scala/org/hyperledger/identus/mercury/protocol/issuecredential/OfferCredentialSpec.scala index 68dc9cdb9a..f0c7589a3b 100644 --- a/mercury/mercury-library/protocol-issue-credential/src/test/scala/io/iohk/atala/mercury/protocol/issuecredential/OfferCredentialSpec.scala +++ b/mercury/protocol-issue-credential/src/test/scala/org/hyperledger/identus/mercury/protocol/issuecredential/OfferCredentialSpec.scala @@ -1,12 +1,12 @@ -package io.iohk.atala.mercury.protocol.issuecredential +package org.hyperledger.identus.mercury.protocol.issuecredential import io.circe.Json import io.circe.parser.* import io.circe.syntax.* -import io.iohk.atala.mercury.model.{AttachmentDescriptor, DidId} -import io.iohk.atala.mercury.model.AttachmentDescriptor.attachmentDescriptorEncoderV2 +import org.hyperledger.identus.mercury.model.{AttachmentDescriptor, DidId} +import org.hyperledger.identus.mercury.model.AttachmentDescriptor.attachmentDescriptorEncoderV2 import munit.* -import io.iohk.atala.mercury.model._ + class OfferCredentialSpec extends ZSuite { test("Issuer OfferCredential") { diff --git a/mercury/mercury-library/protocol-issue-credential/src/test/scala/io/iohk/atala/mercury/protocol/issuecredential/ProposeCredentialSpec.scala b/mercury/protocol-issue-credential/src/test/scala/org/hyperledger/identus/mercury/protocol/issuecredential/ProposeCredentialSpec.scala similarity index 87% rename from mercury/mercury-library/protocol-issue-credential/src/test/scala/io/iohk/atala/mercury/protocol/issuecredential/ProposeCredentialSpec.scala rename to mercury/protocol-issue-credential/src/test/scala/org/hyperledger/identus/mercury/protocol/issuecredential/ProposeCredentialSpec.scala index e186fcf21b..05615f298a 100644 --- a/mercury/mercury-library/protocol-issue-credential/src/test/scala/io/iohk/atala/mercury/protocol/issuecredential/ProposeCredentialSpec.scala +++ b/mercury/protocol-issue-credential/src/test/scala/org/hyperledger/identus/mercury/protocol/issuecredential/ProposeCredentialSpec.scala @@ -1,12 +1,13 @@ -package io.iohk.atala.mercury.protocol.issuecredential +package org.hyperledger.identus.mercury.protocol.issuecredential import io.circe.Json import io.circe.parser.* import io.circe.syntax.* -import io.iohk.atala.mercury.model.AttachmentDescriptor -import io.iohk.atala.mercury.model.AttachmentDescriptor.attachmentDescriptorEncoderV2 +import org.hyperledger.identus.mercury.model.AttachmentDescriptor +import org.hyperledger.identus.mercury.model.AttachmentDescriptor.attachmentDescriptorEncoderV2 import munit.* -import io.iohk.atala.mercury.model._ +import org.hyperledger.identus.mercury.model.DidId + class ProposeCredentialSpec extends ZSuite { test("Holder ProposeCredential") { diff --git a/mercury/mercury-library/protocol-issue-credential/src/test/scala/io/iohk/atala/mercury/protocol/issuecredential/RequestCredentialSpec.scala b/mercury/protocol-issue-credential/src/test/scala/org/hyperledger/identus/mercury/protocol/issuecredential/RequestCredentialSpec.scala similarity index 86% rename from mercury/mercury-library/protocol-issue-credential/src/test/scala/io/iohk/atala/mercury/protocol/issuecredential/RequestCredentialSpec.scala rename to mercury/protocol-issue-credential/src/test/scala/org/hyperledger/identus/mercury/protocol/issuecredential/RequestCredentialSpec.scala index 99e06079e1..7a184edb33 100644 --- a/mercury/mercury-library/protocol-issue-credential/src/test/scala/io/iohk/atala/mercury/protocol/issuecredential/RequestCredentialSpec.scala +++ b/mercury/protocol-issue-credential/src/test/scala/org/hyperledger/identus/mercury/protocol/issuecredential/RequestCredentialSpec.scala @@ -1,12 +1,11 @@ -package io.iohk.atala.mercury.protocol.issuecredential +package org.hyperledger.identus.mercury.protocol.issuecredential import io.circe.Json import io.circe.parser.* import io.circe.syntax.* -import io.iohk.atala.mercury.model.AttachmentDescriptor.attachmentDescriptorEncoderV2 -import io.iohk.atala.mercury.model.{AttachmentDescriptor, DidId} +import org.hyperledger.identus.mercury.model.AttachmentDescriptor.attachmentDescriptorEncoderV2 +import org.hyperledger.identus.mercury.model.{AttachmentDescriptor, DidId} import munit.* -import io.iohk.atala.mercury.model._ class RequestCredentialSpec extends ZSuite { test("Holder RequestCredential") { diff --git a/mercury/mercury-library/protocol-outofband-login/OutOfBand-Login-Protocol.md b/mercury/protocol-outofband-login/OutOfBand-Login-Protocol.md similarity index 100% rename from mercury/mercury-library/protocol-outofband-login/OutOfBand-Login-Protocol.md rename to mercury/protocol-outofband-login/OutOfBand-Login-Protocol.md diff --git a/mercury/mercury-library/protocol-outofband-login/src/main/scala/io/iohk/atala/mercury/protocol/outofbandlogin/OutOfBandLogin.scala b/mercury/protocol-outofband-login/src/main/scala/org/hyperledger/identus/mercury/protocol/outofbandlogin/OutOfBandLogin.scala similarity index 85% rename from mercury/mercury-library/protocol-outofband-login/src/main/scala/io/iohk/atala/mercury/protocol/outofbandlogin/OutOfBandLogin.scala rename to mercury/protocol-outofband-login/src/main/scala/org/hyperledger/identus/mercury/protocol/outofbandlogin/OutOfBandLogin.scala index 2cf2b5e592..49ba39d758 100644 --- a/mercury/mercury-library/protocol-outofband-login/src/main/scala/io/iohk/atala/mercury/protocol/outofbandlogin/OutOfBandLogin.scala +++ b/mercury/protocol-outofband-login/src/main/scala/org/hyperledger/identus/mercury/protocol/outofbandlogin/OutOfBandLogin.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.mercury.protocol.outofbandlogin +package org.hyperledger.identus.mercury.protocol.outofbandlogin -import io.iohk.atala.mercury.model.PIURI -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.mercury.model.Message +import org.hyperledger.identus.mercury.model.PIURI +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.mercury.model.Message /** Out-Of-Band Login Invitation * @see diff --git a/mercury/mercury-library/protocol-outofband-login/src/main/scala/io/iohk/atala/mercury/protocol/outofbandlogin/Utils.scala b/mercury/protocol-outofband-login/src/main/scala/org/hyperledger/identus/mercury/protocol/outofbandlogin/Utils.scala similarity index 86% rename from mercury/mercury-library/protocol-outofband-login/src/main/scala/io/iohk/atala/mercury/protocol/outofbandlogin/Utils.scala rename to mercury/protocol-outofband-login/src/main/scala/org/hyperledger/identus/mercury/protocol/outofbandlogin/Utils.scala index 3046f9054d..675933383e 100644 --- a/mercury/mercury-library/protocol-outofband-login/src/main/scala/io/iohk/atala/mercury/protocol/outofbandlogin/Utils.scala +++ b/mercury/protocol-outofband-login/src/main/scala/org/hyperledger/identus/mercury/protocol/outofbandlogin/Utils.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.mercury.protocol.outofbandlogin +package org.hyperledger.identus.mercury.protocol.outofbandlogin import java.net.URL -import io.iohk.atala.mercury +import org.hyperledger.identus.mercury object Utils { diff --git a/mercury/mercury-library/protocol-present-proof/Present-Proof-Protocol.md b/mercury/protocol-present-proof/Present-Proof-Protocol.md similarity index 100% rename from mercury/mercury-library/protocol-present-proof/Present-Proof-Protocol.md rename to mercury/protocol-present-proof/Present-Proof-Protocol.md diff --git a/mercury/mercury-library/protocol-present-proof/src/main/scala/io/iohk/atala/mercury/protocol/presentproof/PresentFormats.scala b/mercury/protocol-present-proof/src/main/scala/org/hyperledger/identus/mercury/protocol/presentproof/PresentFormats.scala similarity index 98% rename from mercury/mercury-library/protocol-present-proof/src/main/scala/io/iohk/atala/mercury/protocol/presentproof/PresentFormats.scala rename to mercury/protocol-present-proof/src/main/scala/org/hyperledger/identus/mercury/protocol/presentproof/PresentFormats.scala index 010f7f8df3..8eb6340370 100644 --- a/mercury/mercury-library/protocol-present-proof/src/main/scala/io/iohk/atala/mercury/protocol/presentproof/PresentFormats.scala +++ b/mercury/protocol-present-proof/src/main/scala/org/hyperledger/identus/mercury/protocol/presentproof/PresentFormats.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.mercury.protocol.presentproof +package org.hyperledger.identus.mercury.protocol.presentproof import io.circe.generic.semiauto.* import io.circe.{Decoder, Encoder} diff --git a/mercury/mercury-library/protocol-present-proof/src/main/scala/io/iohk/atala/mercury/protocol/presentproof/Presentation.scala b/mercury/protocol-present-proof/src/main/scala/org/hyperledger/identus/mercury/protocol/presentproof/Presentation.scala similarity index 95% rename from mercury/mercury-library/protocol-present-proof/src/main/scala/io/iohk/atala/mercury/protocol/presentproof/Presentation.scala rename to mercury/protocol-present-proof/src/main/scala/org/hyperledger/identus/mercury/protocol/presentproof/Presentation.scala index e7873bb70e..acedadc0aa 100644 --- a/mercury/mercury-library/protocol-present-proof/src/main/scala/io/iohk/atala/mercury/protocol/presentproof/Presentation.scala +++ b/mercury/protocol-present-proof/src/main/scala/org/hyperledger/identus/mercury/protocol/presentproof/Presentation.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.mercury.protocol.presentproof +package org.hyperledger.identus.mercury.protocol.presentproof import io.circe.{Decoder, Encoder} import io.circe.generic.semiauto.* -import io.iohk.atala.mercury.model.{AttachmentDescriptor, DidId, Message, PIURI} +import org.hyperledger.identus.mercury.model.{AttachmentDescriptor, DidId, Message, PIURI} import io.circe.syntax._ /** @param attach_id diff --git a/mercury/mercury-library/protocol-present-proof/src/main/scala/io/iohk/atala/mercury/protocol/presentproof/ProofType.scala b/mercury/protocol-present-proof/src/main/scala/org/hyperledger/identus/mercury/protocol/presentproof/ProofType.scala similarity index 77% rename from mercury/mercury-library/protocol-present-proof/src/main/scala/io/iohk/atala/mercury/protocol/presentproof/ProofType.scala rename to mercury/protocol-present-proof/src/main/scala/org/hyperledger/identus/mercury/protocol/presentproof/ProofType.scala index 7a2abba6cc..be90209ff4 100644 --- a/mercury/mercury-library/protocol-present-proof/src/main/scala/io/iohk/atala/mercury/protocol/presentproof/ProofType.scala +++ b/mercury/protocol-present-proof/src/main/scala/org/hyperledger/identus/mercury/protocol/presentproof/ProofType.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.mercury.protocol.presentproof +package org.hyperledger.identus.mercury.protocol.presentproof import io.circe._ import io.circe.generic.semiauto._ -import io.iohk.atala.mercury.model.DidId +import org.hyperledger.identus.mercury.model.DidId case class ProofType( schema: String, // Schema ID EX: https://schema.org/Person diff --git a/mercury/mercury-library/protocol-present-proof/src/main/scala/io/iohk/atala/mercury/protocol/presentproof/ProposePresentation.scala b/mercury/protocol-present-proof/src/main/scala/org/hyperledger/identus/mercury/protocol/presentproof/ProposePresentation.scala similarity index 94% rename from mercury/mercury-library/protocol-present-proof/src/main/scala/io/iohk/atala/mercury/protocol/presentproof/ProposePresentation.scala rename to mercury/protocol-present-proof/src/main/scala/org/hyperledger/identus/mercury/protocol/presentproof/ProposePresentation.scala index 5d83f64cdf..faf310ca3d 100644 --- a/mercury/mercury-library/protocol-present-proof/src/main/scala/io/iohk/atala/mercury/protocol/presentproof/ProposePresentation.scala +++ b/mercury/protocol-present-proof/src/main/scala/org/hyperledger/identus/mercury/protocol/presentproof/ProposePresentation.scala @@ -1,11 +1,10 @@ -package io.iohk.atala.mercury.protocol.presentproof +package org.hyperledger.identus.mercury.protocol.presentproof import io.circe._ import io.circe.generic.semiauto._ import io.circe.syntax._ -import io.iohk.atala.mercury.model.PIURI -import io.iohk.atala.mercury.model._ +import org.hyperledger.identus.mercury.model._ /** ALL parameterS are DIDCOMMV2 format and naming conventions and follows the protocol * @see diff --git a/mercury/mercury-library/protocol-present-proof/src/main/scala/io/iohk/atala/mercury/protocol/presentproof/RequestPresentation.scala b/mercury/protocol-present-proof/src/main/scala/org/hyperledger/identus/mercury/protocol/presentproof/RequestPresentation.scala similarity index 95% rename from mercury/mercury-library/protocol-present-proof/src/main/scala/io/iohk/atala/mercury/protocol/presentproof/RequestPresentation.scala rename to mercury/protocol-present-proof/src/main/scala/org/hyperledger/identus/mercury/protocol/presentproof/RequestPresentation.scala index e4ec59ee87..f787cdecbf 100644 --- a/mercury/mercury-library/protocol-present-proof/src/main/scala/io/iohk/atala/mercury/protocol/presentproof/RequestPresentation.scala +++ b/mercury/protocol-present-proof/src/main/scala/org/hyperledger/identus/mercury/protocol/presentproof/RequestPresentation.scala @@ -1,11 +1,10 @@ -package io.iohk.atala.mercury.protocol.presentproof +package org.hyperledger.identus.mercury.protocol.presentproof import io.circe._ import io.circe.generic.semiauto._ import io.circe.syntax._ -import io.iohk.atala.mercury.model.PIURI -import io.iohk.atala.mercury.model._ +import org.hyperledger.identus.mercury.model._ final case class RequestPresentation( id: String = java.util.UUID.randomUUID.toString(), diff --git a/mercury/mercury-library/protocol-present-proof/src/test/scala/io/iohk/atala/mercury/protocol/presentproof/PresentationSpec.scala b/mercury/protocol-present-proof/src/test/scala/org/hyperledger/identus/mercury/protocol/presentproof/PresentationSpec.scala similarity index 79% rename from mercury/mercury-library/protocol-present-proof/src/test/scala/io/iohk/atala/mercury/protocol/presentproof/PresentationSpec.scala rename to mercury/protocol-present-proof/src/test/scala/org/hyperledger/identus/mercury/protocol/presentproof/PresentationSpec.scala index 612bd83b60..90c7121b31 100644 --- a/mercury/mercury-library/protocol-present-proof/src/test/scala/io/iohk/atala/mercury/protocol/presentproof/PresentationSpec.scala +++ b/mercury/protocol-present-proof/src/test/scala/org/hyperledger/identus/mercury/protocol/presentproof/PresentationSpec.scala @@ -1,12 +1,13 @@ -package io.iohk.atala.mercury.protocol.presentproof +package org.hyperledger.identus.mercury.protocol.presentproof import io.circe.Json import io.circe.parser.* import io.circe.syntax.* -import io.iohk.atala.mercury.model.AttachmentDescriptor -import io.iohk.atala.mercury.model.AttachmentDescriptor.attachmentDescriptorEncoderV2 +import org.hyperledger.identus.mercury.model.AttachmentDescriptor +import org.hyperledger.identus.mercury.model.AttachmentDescriptor.attachmentDescriptorEncoderV2 import munit.* -import io.iohk.atala.mercury.model._ +import org.hyperledger.identus.mercury.model.{LinkData, DidId} +import org.hyperledger.identus.mercury.protocol.presentproof.Presentation class PresentationSpec extends ZSuite { diff --git a/mercury/mercury-library/protocol-present-proof/src/test/scala/io/iohk/atala/mercury/protocol/presentproof/ProposePresentationProofSpec.scala b/mercury/protocol-present-proof/src/test/scala/org/hyperledger/identus/mercury/protocol/presentproof/ProposePresentationProofSpec.scala similarity index 82% rename from mercury/mercury-library/protocol-present-proof/src/test/scala/io/iohk/atala/mercury/protocol/presentproof/ProposePresentationProofSpec.scala rename to mercury/protocol-present-proof/src/test/scala/org/hyperledger/identus/mercury/protocol/presentproof/ProposePresentationProofSpec.scala index 73763129a1..c87618d489 100644 --- a/mercury/mercury-library/protocol-present-proof/src/test/scala/io/iohk/atala/mercury/protocol/presentproof/ProposePresentationProofSpec.scala +++ b/mercury/protocol-present-proof/src/test/scala/org/hyperledger/identus/mercury/protocol/presentproof/ProposePresentationProofSpec.scala @@ -1,12 +1,12 @@ -package io.iohk.atala.mercury.protocol.presentproof +package org.hyperledger.identus.mercury.protocol.presentproof import io.circe.Json import io.circe.parser.* import io.circe.syntax.* -import io.iohk.atala.mercury.model.AttachmentDescriptor -import io.iohk.atala.mercury.model.AttachmentDescriptor.attachmentDescriptorEncoderV2 +import org.hyperledger.identus.mercury.model.AttachmentDescriptor +import org.hyperledger.identus.mercury.model.AttachmentDescriptor.attachmentDescriptorEncoderV2 import munit.* -import io.iohk.atala.mercury.model._ +import org.hyperledger.identus.mercury.model.{LinkData, DidId} class ProposePresentationSpec extends ZSuite { diff --git a/mercury/mercury-library/protocol-present-proof/src/test/scala/io/iohk/atala/mercury/protocol/presentproof/RequestPresentationSpec.scala b/mercury/protocol-present-proof/src/test/scala/org/hyperledger/identus/mercury/protocol/presentproof/RequestPresentationSpec.scala similarity index 83% rename from mercury/mercury-library/protocol-present-proof/src/test/scala/io/iohk/atala/mercury/protocol/presentproof/RequestPresentationSpec.scala rename to mercury/protocol-present-proof/src/test/scala/org/hyperledger/identus/mercury/protocol/presentproof/RequestPresentationSpec.scala index 2e13b84118..4e2ba8525a 100644 --- a/mercury/mercury-library/protocol-present-proof/src/test/scala/io/iohk/atala/mercury/protocol/presentproof/RequestPresentationSpec.scala +++ b/mercury/protocol-present-proof/src/test/scala/org/hyperledger/identus/mercury/protocol/presentproof/RequestPresentationSpec.scala @@ -1,12 +1,12 @@ -package io.iohk.atala.mercury.protocol.presentproof +package org.hyperledger.identus.mercury.protocol.presentproof import io.circe.Json import io.circe.parser.* import io.circe.syntax.* -import io.iohk.atala.mercury.model.AttachmentDescriptor.attachmentDescriptorEncoderV2 -import io.iohk.atala.mercury.model.{AttachmentDescriptor, DidId} +import org.hyperledger.identus.mercury.model.AttachmentDescriptor.attachmentDescriptorEncoderV2 +import org.hyperledger.identus.mercury.model.{AttachmentDescriptor, DidId} import munit.* -import io.iohk.atala.mercury.model._ +import org.hyperledger.identus.mercury.model.LinkData class RequestCredentialSpec extends ZSuite { diff --git a/mercury/mercury-library/protocol-report-problem/Report-Problem-Protocol.md b/mercury/protocol-report-problem/Report-Problem-Protocol.md similarity index 100% rename from mercury/mercury-library/protocol-report-problem/Report-Problem-Protocol.md rename to mercury/protocol-report-problem/Report-Problem-Protocol.md diff --git a/mercury/mercury-library/protocol-report-problem/src/main/scala/io/iohk/atala/mercury/protocol/reportproblem/v1/ReportProblem.scala b/mercury/protocol-report-problem/src/main/scala/org/hyperledger/identus/mercury/protocol/reportproblem/v1/ReportProblem.scala similarity index 94% rename from mercury/mercury-library/protocol-report-problem/src/main/scala/io/iohk/atala/mercury/protocol/reportproblem/v1/ReportProblem.scala rename to mercury/protocol-report-problem/src/main/scala/org/hyperledger/identus/mercury/protocol/reportproblem/v1/ReportProblem.scala index 55f1d9a44e..6a4e9e4e15 100644 --- a/mercury/mercury-library/protocol-report-problem/src/main/scala/io/iohk/atala/mercury/protocol/reportproblem/v1/ReportProblem.scala +++ b/mercury/protocol-report-problem/src/main/scala/org/hyperledger/identus/mercury/protocol/reportproblem/v1/ReportProblem.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.mercury.protocol.reportproblem.v1 +package org.hyperledger.identus.mercury.protocol.reportproblem.v1 -import io.iohk.atala.mercury.model.Message -import io.iohk.atala.mercury.model.PIURI +import org.hyperledger.identus.mercury.model.Message +import org.hyperledger.identus.mercury.model.PIURI /** ReportProblem * diff --git a/mercury/mercury-library/protocol-report-problem/src/main/scala/io/iohk/atala/mercury/protocol/reportproblem/v2/ReportProblem.scala b/mercury/protocol-report-problem/src/main/scala/org/hyperledger/identus/mercury/protocol/reportproblem/v2/ReportProblem.scala similarity index 98% rename from mercury/mercury-library/protocol-report-problem/src/main/scala/io/iohk/atala/mercury/protocol/reportproblem/v2/ReportProblem.scala rename to mercury/protocol-report-problem/src/main/scala/org/hyperledger/identus/mercury/protocol/reportproblem/v2/ReportProblem.scala index 6b96ed052d..2c621a4d16 100644 --- a/mercury/mercury-library/protocol-report-problem/src/main/scala/io/iohk/atala/mercury/protocol/reportproblem/v2/ReportProblem.scala +++ b/mercury/protocol-report-problem/src/main/scala/org/hyperledger/identus/mercury/protocol/reportproblem/v2/ReportProblem.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.mercury.protocol.reportproblem.v2 +package org.hyperledger.identus.mercury.protocol.reportproblem.v2 import io.circe._ -import io.iohk.atala.mercury.model.{DidId, Message, PIURI} +import org.hyperledger.identus.mercury.model.{DidId, Message, PIURI} import io.circe.generic.semiauto.{deriveDecoder, deriveEncoder} import io.circe.{Decoder, Encoder} import io.circe.syntax.* diff --git a/mercury/mercury-library/protocol-report-problem/src/test/scala/io/iohk/mercury/protocol/reportproblem/v2/ReportProblemSpec.scala b/mercury/protocol-report-problem/src/test/scala/org/hyperledger/identus/mercury/protocol/reportproblem/v2/ReportProblemSpec.scala similarity index 93% rename from mercury/mercury-library/protocol-report-problem/src/test/scala/io/iohk/mercury/protocol/reportproblem/v2/ReportProblemSpec.scala rename to mercury/protocol-report-problem/src/test/scala/org/hyperledger/identus/mercury/protocol/reportproblem/v2/ReportProblemSpec.scala index 2d650f0126..d40eb86604 100644 --- a/mercury/mercury-library/protocol-report-problem/src/test/scala/io/iohk/mercury/protocol/reportproblem/v2/ReportProblemSpec.scala +++ b/mercury/protocol-report-problem/src/test/scala/org/hyperledger/identus/mercury/protocol/reportproblem/v2/ReportProblemSpec.scala @@ -1,11 +1,12 @@ -package io.iohk.atala.mercury.protocol.reportproblem.v2 +package org.hyperledger.identus.mercury.protocol.reportproblem.v2 import io.circe.Json import io.circe.syntax.* import munit.* -import io.iohk.atala.mercury.model._ import io.circe.* import io.circe.parser.* +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.mercury.protocol.reportproblem.v2._ class ReportProblemSpec extends ZSuite { test("ReportProblem") { diff --git a/mercury/mercury-library/protocol-revocation-notification/Revocation-notification-protocol.md b/mercury/protocol-revocation-notification/Revocation-notification-protocol.md similarity index 100% rename from mercury/mercury-library/protocol-revocation-notification/Revocation-notification-protocol.md rename to mercury/protocol-revocation-notification/Revocation-notification-protocol.md diff --git a/mercury/mercury-library/protocol-revocation-notification/src/main/scala/io/iohk/atala/mercury/protocol/revocationnotificaiton/RevocationNotification.scala b/mercury/protocol-revocation-notification/src/main/scala/org/hyperledger/identus/mercury/protocol/revocationnotificaiton/RevocationNotification.scala similarity index 93% rename from mercury/mercury-library/protocol-revocation-notification/src/main/scala/io/iohk/atala/mercury/protocol/revocationnotificaiton/RevocationNotification.scala rename to mercury/protocol-revocation-notification/src/main/scala/org/hyperledger/identus/mercury/protocol/revocationnotificaiton/RevocationNotification.scala index 9deed3edea..5dfc001bc2 100644 --- a/mercury/mercury-library/protocol-revocation-notification/src/main/scala/io/iohk/atala/mercury/protocol/revocationnotificaiton/RevocationNotification.scala +++ b/mercury/protocol-revocation-notification/src/main/scala/org/hyperledger/identus/mercury/protocol/revocationnotificaiton/RevocationNotification.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.mercury.protocol.revocationnotificaiton +package org.hyperledger.identus.mercury.protocol.revocationnotificaiton import io.circe._ import io.circe.generic.semiauto._ import io.circe.syntax._ -import io.iohk.atala.mercury.model._ +import org.hyperledger.identus.mercury.model.{PIURI, Message, DidId} final case class RevocationNotification( id: String = java.util.UUID.randomUUID.toString(), diff --git a/mercury/mercury-library/protocol-routing/Routing-Protocol.md b/mercury/protocol-routing/Routing-Protocol.md similarity index 100% rename from mercury/mercury-library/protocol-routing/Routing-Protocol.md rename to mercury/protocol-routing/Routing-Protocol.md diff --git a/mercury/mercury-library/protocol-routing/src/main/scala/io/iohk/atala/mercury/protocol/routing/ForwardMessage.scala b/mercury/protocol-routing/src/main/scala/org/hyperledger/identus/mercury/protocol/routing/ForwardMessage.scala similarity index 95% rename from mercury/mercury-library/protocol-routing/src/main/scala/io/iohk/atala/mercury/protocol/routing/ForwardMessage.scala rename to mercury/protocol-routing/src/main/scala/org/hyperledger/identus/mercury/protocol/routing/ForwardMessage.scala index 31cca44f16..1024c7bd0f 100644 --- a/mercury/mercury-library/protocol-routing/src/main/scala/io/iohk/atala/mercury/protocol/routing/ForwardMessage.scala +++ b/mercury/protocol-routing/src/main/scala/org/hyperledger/identus/mercury/protocol/routing/ForwardMessage.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.mercury.protocol.routing +package org.hyperledger.identus.mercury.protocol.routing import io.circe._ -import io.iohk.atala.mercury.model._ +import org.hyperledger.identus.mercury.model.{PIURI, AttachmentDescriptor, Message, DidId} type ForwardAttachment = AttachmentDescriptor diff --git a/mercury/mercury-library/protocol-trust-ping/src/main/scala/io/iohk/atala/mercury/protocol/trustping/TrustPing.scala b/mercury/protocol-trust-ping/src/main/scala/org/hyperledger/identus/mercury/protocol/trustping/TrustPing.scala similarity index 94% rename from mercury/mercury-library/protocol-trust-ping/src/main/scala/io/iohk/atala/mercury/protocol/trustping/TrustPing.scala rename to mercury/protocol-trust-ping/src/main/scala/org/hyperledger/identus/mercury/protocol/trustping/TrustPing.scala index 8992911ce5..16166c856c 100644 --- a/mercury/mercury-library/protocol-trust-ping/src/main/scala/io/iohk/atala/mercury/protocol/trustping/TrustPing.scala +++ b/mercury/protocol-trust-ping/src/main/scala/org/hyperledger/identus/mercury/protocol/trustping/TrustPing.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.mercury.protocol.trustping +package org.hyperledger.identus.mercury.protocol.trustping import io.circe._ import io.circe.syntax._ import io.circe.generic.semiauto.{deriveDecoder, deriveEncoder} -import io.iohk.atala.mercury.model._ +import org.hyperledger.identus.mercury.model.{PIURI, Message, DidId} /** https://identity.foundation/didcomm-messaging/spec/#trust-ping-protocol-20 */ final case class TrustPing( diff --git a/mercury/mercury-library/protocol-trust-ping/src/main/scala/io/iohk/atala/mercury/protocol/trustping/TrustPingResponse.scala b/mercury/protocol-trust-ping/src/main/scala/org/hyperledger/identus/mercury/protocol/trustping/TrustPingResponse.scala similarity index 92% rename from mercury/mercury-library/protocol-trust-ping/src/main/scala/io/iohk/atala/mercury/protocol/trustping/TrustPingResponse.scala rename to mercury/protocol-trust-ping/src/main/scala/org/hyperledger/identus/mercury/protocol/trustping/TrustPingResponse.scala index 8a58baa671..1020d67a95 100644 --- a/mercury/mercury-library/protocol-trust-ping/src/main/scala/io/iohk/atala/mercury/protocol/trustping/TrustPingResponse.scala +++ b/mercury/protocol-trust-ping/src/main/scala/org/hyperledger/identus/mercury/protocol/trustping/TrustPingResponse.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.mercury.protocol.trustping +package org.hyperledger.identus.mercury.protocol.trustping import io.circe._ -import io.iohk.atala.mercury.model._ +import org.hyperledger.identus.mercury.model.{PIURI, Message, DidId} final case class TrustPingResponse( `type`: PIURI = TrustPingResponse.`type`, diff --git a/mercury/mercury-library/resolver/src/main/scala/io/iohk/atala/resolvers/DidValidator.scala b/mercury/resolver/src/main/scala/org/hyperledger/identus/resolvers/DidValidator.scala similarity index 94% rename from mercury/mercury-library/resolver/src/main/scala/io/iohk/atala/resolvers/DidValidator.scala rename to mercury/resolver/src/main/scala/org/hyperledger/identus/resolvers/DidValidator.scala index 3180e4da50..f2dfde95a8 100644 --- a/mercury/mercury-library/resolver/src/main/scala/io/iohk/atala/resolvers/DidValidator.scala +++ b/mercury/resolver/src/main/scala/org/hyperledger/identus/resolvers/DidValidator.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.resolvers +package org.hyperledger.identus.resolvers -import io.iohk.atala.mercury.model.DidId +import org.hyperledger.identus.mercury.model.DidId object DidValidator extends DidValidator trait DidValidator { diff --git a/mercury/mercury-library/resolver/src/main/scala/io/iohk/atala/resolvers/PeerDidResolver.scala b/mercury/resolver/src/main/scala/org/hyperledger/identus/resolvers/PeerDidResolver.scala similarity index 99% rename from mercury/mercury-library/resolver/src/main/scala/io/iohk/atala/resolvers/PeerDidResolver.scala rename to mercury/resolver/src/main/scala/org/hyperledger/identus/resolvers/PeerDidResolver.scala index a6df34ca72..e881bc50da 100644 --- a/mercury/mercury-library/resolver/src/main/scala/io/iohk/atala/resolvers/PeerDidResolver.scala +++ b/mercury/resolver/src/main/scala/org/hyperledger/identus/resolvers/PeerDidResolver.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.resolvers +package org.hyperledger.identus.resolvers import org.didcommx.didcomm.diddoc.{DIDCommService, DIDDoc, VerificationMethod} import org.didcommx.peerdid.PeerDIDResolver.resolvePeerDID diff --git a/mercury/mercury-library/resolver/src/main/scala/io/iohk/atala/resolvers/UniversalDidResolver.scala b/mercury/resolver/src/main/scala/org/hyperledger/identus/resolvers/UniversalDidResolver.scala similarity index 91% rename from mercury/mercury-library/resolver/src/main/scala/io/iohk/atala/resolvers/UniversalDidResolver.scala rename to mercury/resolver/src/main/scala/org/hyperledger/identus/resolvers/UniversalDidResolver.scala index b7424f63b5..3e543f0380 100644 --- a/mercury/mercury-library/resolver/src/main/scala/io/iohk/atala/resolvers/UniversalDidResolver.scala +++ b/mercury/resolver/src/main/scala/org/hyperledger/identus/resolvers/UniversalDidResolver.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.resolvers +package org.hyperledger.identus.resolvers import org.didcommx.didcomm.diddoc._ @@ -7,7 +7,7 @@ import scala.jdk.CollectionConverters._ import scala.jdk.OptionConverters._ import zio._ -import io.iohk.atala.mercury.model.DidId +import org.hyperledger.identus.mercury.model.DidId trait DIDResolver { def resolveDID(did: DidId): Task[DIDDoc] // TODO return Task[DIDDocument] diff --git a/mercury/mercury-library/resolver/src/test/scala/io/iohk/atala/resolvers/AliceDidDoc.scala b/mercury/resolver/src/test/scala/org/hyperledger/identus/resolvers/AliceDidDoc.scala similarity index 97% rename from mercury/mercury-library/resolver/src/test/scala/io/iohk/atala/resolvers/AliceDidDoc.scala rename to mercury/resolver/src/test/scala/org/hyperledger/identus/resolvers/AliceDidDoc.scala index c1218d488f..ffd47519f9 100644 --- a/mercury/mercury-library/resolver/src/test/scala/io/iohk/atala/resolvers/AliceDidDoc.scala +++ b/mercury/resolver/src/test/scala/org/hyperledger/identus/resolvers/AliceDidDoc.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.resolvers +package org.hyperledger.identus.resolvers import org.didcommx.didcomm.common.{VerificationMaterial, VerificationMaterialFormat, VerificationMethodType} import org.didcommx.didcomm.diddoc.{DIDCommService, DIDDoc, VerificationMethod} diff --git a/mercury/mercury-library/resolver/src/test/scala/io/iohk/atala/resolvers/BobDidDoc.scala b/mercury/resolver/src/test/scala/org/hyperledger/identus/resolvers/BobDidDoc.scala similarity index 96% rename from mercury/mercury-library/resolver/src/test/scala/io/iohk/atala/resolvers/BobDidDoc.scala rename to mercury/resolver/src/test/scala/org/hyperledger/identus/resolvers/BobDidDoc.scala index aeb003df3f..86eafe4c7b 100644 --- a/mercury/mercury-library/resolver/src/test/scala/io/iohk/atala/resolvers/BobDidDoc.scala +++ b/mercury/resolver/src/test/scala/org/hyperledger/identus/resolvers/BobDidDoc.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.resolvers +package org.hyperledger.identus.resolvers import org.didcommx.didcomm.common.{VerificationMaterial, VerificationMaterialFormat, VerificationMethodType} import org.didcommx.didcomm.diddoc.{DIDCommService, DIDDoc, VerificationMethod} @@ -53,7 +53,7 @@ object BobDidDoc { val didCommServices = Seq( new DIDCommService( "did:example:mediator#didcomm-1", - "http://atalaprism.io/path", + "http://identus.io/path", Seq("did:example:mediator#key-agreement-1").asJava, Seq("didcomm/v2").asJava ) diff --git a/mercury/mercury-library/resolver/src/test/scala/io/iohk/atala/resolvers/DidValidatorSpec.scala b/mercury/resolver/src/test/scala/org/hyperledger/identus/resolvers/DidValidatorSpec.scala similarity index 90% rename from mercury/mercury-library/resolver/src/test/scala/io/iohk/atala/resolvers/DidValidatorSpec.scala rename to mercury/resolver/src/test/scala/org/hyperledger/identus/resolvers/DidValidatorSpec.scala index 0949b9f9e1..33c2da5bd5 100644 --- a/mercury/mercury-library/resolver/src/test/scala/io/iohk/atala/resolvers/DidValidatorSpec.scala +++ b/mercury/resolver/src/test/scala/org/hyperledger/identus/resolvers/DidValidatorSpec.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.resolvers +package org.hyperledger.identus.resolvers import munit.* -/** resolver/testOnly io.iohk.atala.resolvers.DidValidatorSpec +/** resolver/testOnly org.hyperledger.identus.resolvers.DidValidatorSpec */ class DidValidatorSpec extends ZSuite { val exPRISM = "did:prism:66940961cc0f6a884ff5876992991b994ca518aa34b3bacfd15f2b51a7b042cf" diff --git a/mercury/mercury-library/resolver/src/test/scala/io/iohk/atala/resolvers/MediatorDidDoc.scala b/mercury/resolver/src/test/scala/org/hyperledger/identus/resolvers/MediatorDidDoc.scala similarity index 97% rename from mercury/mercury-library/resolver/src/test/scala/io/iohk/atala/resolvers/MediatorDidDoc.scala rename to mercury/resolver/src/test/scala/org/hyperledger/identus/resolvers/MediatorDidDoc.scala index 8f6bc38abc..cd145a962b 100644 --- a/mercury/mercury-library/resolver/src/test/scala/io/iohk/atala/resolvers/MediatorDidDoc.scala +++ b/mercury/resolver/src/test/scala/org/hyperledger/identus/resolvers/MediatorDidDoc.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.resolvers +package org.hyperledger.identus.resolvers import org.didcommx.didcomm.common.{VerificationMaterial, VerificationMaterialFormat, VerificationMethodType} import org.didcommx.didcomm.diddoc.{DIDCommService, DIDDoc, VerificationMethod} diff --git a/mercury/mercury-library/resolver/src/test/scala/io/iohk/atala/resolvers/PeerDidResolverSpec.scala b/mercury/resolver/src/test/scala/org/hyperledger/identus/resolvers/PeerDidResolverSpec.scala similarity index 99% rename from mercury/mercury-library/resolver/src/test/scala/io/iohk/atala/resolvers/PeerDidResolverSpec.scala rename to mercury/resolver/src/test/scala/org/hyperledger/identus/resolvers/PeerDidResolverSpec.scala index a21c7b204a..56ee214bd8 100644 --- a/mercury/mercury-library/resolver/src/test/scala/io/iohk/atala/resolvers/PeerDidResolverSpec.scala +++ b/mercury/resolver/src/test/scala/org/hyperledger/identus/resolvers/PeerDidResolverSpec.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.resolvers +package org.hyperledger.identus.resolvers import io.circe.Json import zio.* import munit.* diff --git a/mercury/roots-id-mediator/Dockerfile b/mercury/roots-id-mediator/Dockerfile deleted file mode 100644 index 7bc55bbc59..0000000000 --- a/mercury/roots-id-mediator/Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM jupyter/scipy-notebook - -# Install Python 3 packages -RUN pip install 'qrcode' 'pymongo' 'didcomm' 'peerdid==0.4.0' - -# Downgrade packages -# See authlib==1.0.0b1 https://github.com/sicpa-dlab/didcomm-python/blob/ca962db30ac7c1492ed6e3654575cce2dd3a5e0e/didcomm/core/from_prior.py#L107 -RUN pip install 'authlib==1.2.0' diff --git a/mercury/roots-id-mediator/REAMDE-ROOTS-ID-mediator.md b/mercury/roots-id-mediator/REAMDE-ROOTS-ID-mediator.md deleted file mode 100644 index 5c18555bc7..0000000000 --- a/mercury/roots-id-mediator/REAMDE-ROOTS-ID-mediator.md +++ /dev/null @@ -1,81 +0,0 @@ -# ROOTS-ID MEDIATOR - -See [ATL-1857](https://input-output.atlassian.net/browse/ATL-1857) from more info. - -## Note LICENSE - -This [ROOTS-ID's Mediator probject is LICENSE](https://raw.githubusercontent.com/roots-id/didcomm-mediator/main/LICENSE) under the [apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) - -## Goal - -The idea is to test the interoperability of our agents (the client side) against this mediator. - -So our client agents should work exactly the same way with this mediator and our mediator. - -This will serve as a sanity check that we are compliant with DID Comm v2. - -## Starting point - -### Git submodules - -We added a link to the ROOTS-ID Mediator's repository as a git submodule. - -**NOTE:** The submodule is tracking the HEAD of the master branch. - -```shell -git submodule init -git submodule update - -# or use the flag '--recurse-submodules' when cloning our repository -# git clone --recurse-submodules ... -``` - -### BUILD working station - -- Build the `docker` image for Jupyter. - -```shell -docker build -f ./Dockerfile . --platform=linux/amd64 -t atala/didcomm-jupyter -``` - -```shell -docker run -p 8888:8888 -v /home/fabio/workspace/iohk/atala-prism-building-blocks/mercury/roots-id-mediator/didcomm-mediator/sample-notebooks:/home/jovyan atala/didcomm-jupyter -``` - -### Build the mediator (docker image) - -- Build the `docker` image for the ROOTS-ID mediator (`rodopincha/didcomm-mediator`). - -```shell -cd ./didcomm-mediator/ -docker build -f ./Dockerfile . --platform=linux/amd64 -t rodopincha/didcomm-mediator -``` - -### Start the mediator and working station - -- Start `docker-compose` (mongodb container instance + mediator container instance) - -```shell -docker-compose up # -d -``` - -- Find the out-of-band invitation link. - - This inforamation is print on the logs of the container instance. - - We can get the _oob message in: - - - `http://0.0.0.0:8000/oob_qrcode` - QRcode - - `http://127.0.0.1:8000/oob_url` - URL - -In the logs we can also see something like this: - -```shell -> docker logs roots-id-mediator-rootsid-mediator-1 - -roots-id-mediator-rootsid-mediator-1 | did:peer:2.Ez6LSmLmWmTvwjgLSuUaEQHdHSFWPwyibgzomWjFmnC6FhLnU.Vz6MktNgLh4N1u9KNhDiqe8KZ8bsLzLcqsifoNiUtBoSs9jxf.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOiJodHRwOi8vMTI3LjAuMC4xOjgwMDAiLCJhIjpbImRpZGNvbW0vdjIiXX0 -... -roots-id-mediator-rootsid-mediator-1 | http://127.0.0.1:8000?_oob=eyJ0eXBlIjoiaHR0cHM6Ly9kaWRjb21tLm9yZy9vdXQtb2YtYmFuZC8yLjAvaW52aXRhdGlvbiIsImlkIjoiNDIxZGJiYzgtNTdjYS00MzQxLWFhM2EtZjViNDIxNWM1NjhmIiwiZnJvbSI6ImRpZDpwZWVyOjIuRXo2TFNtTG1XbVR2d2pnTFN1VWFFUUhkSFNGV1B3eWliZ3pvbVdqRm1uQzZGaExuVS5WejZNa3ROZ0xoNE4xdTlLTmhEaXFlOEtaOGJzTHpMY3FzaWZvTmlVdEJvU3M5anhmLlNleUpwWkNJNkltNWxkeTFwWkNJc0luUWlPaUprYlNJc0luTWlPaUpvZEhSd09pOHZNVEkzTGpBdU1DNHhPamd3TURBaUxDSmhJanBiSW1ScFpHTnZiVzB2ZGpJaVhYMCIsImJvZHkiOnsiZ29hbF9jb2RlIjoicmVxdWVzdC1tZWRpYXRlIiwiZ29hbCI6IlJlcXVlc3RNZWRpYXRlIiwiYWNjZXB0IjpbImRpZGNvbW0vdjIiLCJkaWRjb21tL2FpcDI7ZW52PXJmYzU4NyJdfX0 -``` - -- To stop and remove the container instances use `docker-compose down` diff --git a/mercury/roots-id-mediator/docker-compose.yaml b/mercury/roots-id-mediator/docker-compose.yaml deleted file mode 100644 index 26b3421295..0000000000 --- a/mercury/roots-id-mediator/docker-compose.yaml +++ /dev/null @@ -1,44 +0,0 @@ -version: '3.9' - -services: - mongo: - image: mongo:5.0 - ports: - - 27017:27017 - #volumes: - # - ./tmp/mongo:/data/db - environment: - - MONGO_INITDB_ROOT_USERNAME=admin - - MONGO_INITDB_ROOT_PASSWORD=admin - - rootsid-mediator: - image: rodopincha/didcomm-mediator - ports: - - 8000:8000 - environment: - - DB_URL=mongodb://admin:admin@mongo:27017 - - MONGODB_USER=admin - - MONGODB_PASSWORD=admin - - PUBLIC_URL=http://rootsid-mediator:8000 - - ROTATE_OOB=0 - depends_on: - - "mongo" - - notebooks: - image: atala/didcomm-jupyter - ports: - - 8888:8888 - volumes: - - ./notebooks:/home/jovyan - depends_on: - - "rootsid-mediator" - -# GET invitation with -# docker logs roots-id-mediator-rootsid-mediator-1 - -# RUN -# docker-compose up -d -# docker-compose ps -# docker-compose exec mongo /bin/sh -# docker-compose exec rootsid-mediator /bin/sh -# docker exec -it roots-id-mediator-rootsid-mediator-1 bash \ No newline at end of file diff --git a/mercury/roots-id-mediator/notebooks/.gitignore b/mercury/roots-id-mediator/notebooks/.gitignore deleted file mode 100644 index f85a34ac7e..0000000000 --- a/mercury/roots-id-mediator/notebooks/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -secrets.json - -.local -.jupyter -.ipython -.ipynb_checkpoints -.config -.cache diff --git a/mercury/roots-id-mediator/notebooks/Alice.ipynb b/mercury/roots-id-mediator/notebooks/Alice.ipynb deleted file mode 100644 index da07e03302..0000000000 --- a/mercury/roots-id-mediator/notebooks/Alice.ipynb +++ /dev/null @@ -1,757 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "import json\n", - "import base64\n", - "import qrcode\n", - "import requests\n", - "import datetime\n", - "import uuid\n", - "import matplotlib.pyplot as plt\n", - "from pymongo import MongoClient\n", - "from typing import Optional, List\n", - "from didcomm.common.types import DID, VerificationMethodType, VerificationMaterial, VerificationMaterialFormat\n", - "from didcomm.did_doc.did_doc import DIDDoc, VerificationMethod, DIDCommService\n", - "from didcomm.did_doc.did_resolver import DIDResolver\n", - "from didcomm.message import Message, FromPrior\n", - "from didcomm.secrets.secrets_resolver_demo import SecretsResolverDemo\n", - "from didcomm.unpack import unpack, UnpackResult\n", - "from didcomm.common.resolvers import ResolversConfig\n", - "from didcomm.pack_encrypted import pack_encrypted, PackEncryptedConfig, PackEncryptedResult\n", - "from peerdid.core.did_doc_types import DIDCommServicePeerDID\n", - "from didcomm.secrets.secrets_util import generate_x25519_keys_as_jwk_dict, generate_ed25519_keys_as_jwk_dict, jwk_to_secret\n", - "from peerdid import peer_did\n", - "from peerdid.did_doc import DIDDocPeerDID\n", - "from peerdid.types import VerificationMaterialAuthentication, VerificationMethodTypeAuthentication, VerificationMaterialAgreement, VerificationMethodTypeAgreement, VerificationMaterialFormatPeerDID" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "secrets_resolver = SecretsResolverDemo()" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "class DIDResolverPeerDID(DIDResolver):\n", - " async def resolve(self, did: DID) -> DIDDoc:\n", - " did_doc_json = peer_did.resolve_peer_did(did, format = VerificationMaterialFormatPeerDID.JWK)\n", - " did_doc = DIDDocPeerDID.from_json(did_doc_json)\n", - "\n", - " return DIDDoc(\n", - " did=did_doc.did,\n", - " key_agreement_kids = did_doc.agreement_kids,\n", - " authentication_kids = did_doc.auth_kids,\n", - " verification_methods = [\n", - " VerificationMethod(\n", - " id = m.id,\n", - " type = VerificationMethodType.JSON_WEB_KEY_2020,\n", - " controller = m.controller,\n", - " verification_material = VerificationMaterial(\n", - " format = VerificationMaterialFormat.JWK,\n", - " value = json.dumps(m.ver_material.value)\n", - " )\n", - " )\n", - " for m in did_doc.authentication + did_doc.key_agreement\n", - " ],\n", - " didcomm_services = [\n", - " DIDCommService(\n", - " id = s.id,\n", - " service_endpoint = s.service_endpoint,\n", - " routing_keys = s.routing_keys,\n", - " accept = s.accept\n", - " )\n", - " for s in did_doc.service\n", - " if isinstance(s, DIDCommServicePeerDID)\n", - " ] if did_doc.service else []\n", - " )" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [], - "source": [ - "async def create_peer_did(self,\n", - " auth_keys_count: int = 1,\n", - " agreement_keys_count: int = 1,\n", - " service_endpoint: Optional[str] = None,\n", - " service_routing_keys: Optional[List[str]] = None\n", - " ) -> str:\n", - " # 1. generate keys in JWK format\n", - " agreem_keys = [generate_x25519_keys_as_jwk_dict() for _ in range(agreement_keys_count)]\n", - " auth_keys = [generate_ed25519_keys_as_jwk_dict() for _ in range(auth_keys_count)]\n", - "\n", - " # 2. prepare the keys for peer DID lib\n", - " agreem_keys_peer_did = [\n", - " VerificationMaterialAgreement(\n", - " type=VerificationMethodTypeAgreement.JSON_WEB_KEY_2020,\n", - " format=VerificationMaterialFormatPeerDID.JWK,\n", - " value=k[1],\n", - " )\n", - " for k in agreem_keys\n", - " ]\n", - " auth_keys_peer_did = [\n", - " VerificationMaterialAuthentication(\n", - " type=VerificationMethodTypeAuthentication.JSON_WEB_KEY_2020,\n", - " format=VerificationMaterialFormatPeerDID.JWK,\n", - " value=k[1],\n", - " )\n", - " for k in auth_keys\n", - " ]\n", - "\n", - " # 3. generate service\n", - " service = None\n", - " if service_endpoint:\n", - " service = json.dumps(\n", - " DIDCommServicePeerDID(\n", - " id=\"new-id\",\n", - " service_endpoint=service_endpoint, routing_keys=service_routing_keys,\n", - " accept=[\"didcomm/v2\"]\n", - " ).to_dict()\n", - " )\n", - "\n", - " # 4. call peer DID lib\n", - " # if we have just one key (auth), then use numalg0 algorithm\n", - " # otherwise use numalg2 algorithm\n", - " if len(auth_keys_peer_did) == 1 and not agreem_keys_peer_did and not service:\n", - " did = peer_did.create_peer_did_numalgo_0(auth_keys_peer_did[0])\n", - " else:\n", - " did = peer_did.create_peer_did_numalgo_2(\n", - " encryption_keys=agreem_keys_peer_did,\n", - " signing_keys=auth_keys_peer_did,\n", - " service=service,\n", - " )\n", - "\n", - " # 5. set KIDs as in DID DOC for secrets and store the secret in the secrets resolver\n", - " did_doc = DIDDocPeerDID.from_json(peer_did.resolve_peer_did(did))\n", - " for auth_key, kid in zip(auth_keys, did_doc.auth_kids):\n", - " private_key = auth_key[0]\n", - " private_key[\"kid\"] = kid\n", - " print(private_key)\n", - " await secrets_resolver.add_key(jwk_to_secret(private_key))\n", - "\n", - " for agreem_key, kid in zip(agreem_keys, did_doc.agreement_kids):\n", - " private_key = agreem_key[0]\n", - " private_key[\"kid\"] = kid\n", - " print(private_key)\n", - " await secrets_resolver.add_key(jwk_to_secret(private_key))\n", - "\n", - " return did\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Alice get OOB from Mediator" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "oob_url = requests.get(\"http://rootsid-mediator:8000/oob_url\").text\n", - "#oob_url = requests.get(\"http://127.0.0.1:8000/oob_url\").text\n", - "#oob_url = requests.get(\"https://mediator.rootsid.cloud/oob_url\").text" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "http://rootsid-mediator:8000?_oob=eyJ0eXBlIjoiaHR0cHM6Ly9kaWRjb21tLm9yZy9vdXQtb2YtYmFuZC8yLjAvaW52aXRhdGlvbiIsImlkIjoiYjFkN2Y0OWYtYzUyMS00NDk0LTg3MzQtYzAwZDhmY2M2NGFlIiwiZnJvbSI6ImRpZDpwZWVyOjIuRXo2TFNmdVlvZUU4QXJvclJuVkVIRzZnMVRVYjlZNjZLZkczNVdYcmdEbnJmWGtkVi5WejZNa3ZaVlp3SzlSVGtuTThEN0JKM0Q3aVphdTNBSFlKV0M2a1VLcWtvZEtobVdYLlNleUpwWkNJNkltNWxkeTFwWkNJc0luUWlPaUprYlNJc0luTWlPaUpvZEhSd09pOHZjbTl2ZEhOcFpDMXRaV1JwWVhSdmNqbzRNREF3SWl3aVlTSTZXeUprYVdSamIyMXRMM1l5SWwxOSIsImJvZHkiOnsiZ29hbF9jb2RlIjoicmVxdWVzdC1tZWRpYXRlIiwiZ29hbCI6IlJlcXVlc3RNZWRpYXRlIiwiYWNjZXB0IjpbImRpZGNvbW0vdjIiLCJkaWRjb21tL2FpcDI7ZW52PXJmYzU4NyJdfX0\n" - ] - } - ], - "source": [ - "print(oob_url)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'crv': 'Ed25519', 'x': 'ahRGFauYqLNRt713YmCqkTuwIj6o15WJfmwC6wXmGZQ', 'd': 'bQfbuHb9By5CUSToXBh_2n2-4-8v9nVFtWixtib_jaE', 'kty': 'OKP', 'kid': 'did:peer:2.Ez6LSi6SDgieS8H7FC3UREj2H1iYVCL7S9M8iTCPEmoGtiutJ.Vz6MkmbMC51u4xFNabEXoB32LP9aqJt6f39A3mmmqwuQYMhVm#6MkmbMC51u4xFNabEXoB32LP9aqJt6f39A3mmmqwuQYMhVm'}\n", - "{'crv': 'X25519', 'x': 'X10VSyUGc2y_uGQU1PZPglsQZD4l73-TBCG11eSxSGc', 'd': 'sP7MbcTnExW9NW9ucc_A7GJ41-shNo2zzAW9PTFonlk', 'kty': 'OKP', 'kid': 'did:peer:2.Ez6LSi6SDgieS8H7FC3UREj2H1iYVCL7S9M8iTCPEmoGtiutJ.Vz6MkmbMC51u4xFNabEXoB32LP9aqJt6f39A3mmmqwuQYMhVm#6LSi6SDgieS8H7FC3UREj2H1iYVCL7S9M8iTCPEmoGtiutJ'}\n", - "Alice's DID: did:peer:2.Ez6LSi6SDgieS8H7FC3UREj2H1iYVCL7S9M8iTCPEmoGtiutJ.Vz6MkmbMC51u4xFNabEXoB32LP9aqJt6f39A3mmmqwuQYMhVm\n" - ] - } - ], - "source": [ - "received_msg_encoded = oob_url.split(\"=\")[1]\n", - "received_msg_decoded = json.loads(str(base64.urlsafe_b64decode(received_msg_encoded + \"==\"), \"utf-8\"))\n", - "alice_did_for_mediator = await create_peer_did(1,1)\n", - "print(\"Alice's DID:\", alice_did_for_mediator)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Alice request mediate" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": {}, - "outputs": [], - "source": [ - "alice_mediate_grant = Message(\n", - " custom_headers = [{\"return_route\": \"all\"}],\n", - " id = str(uuid.uuid4()),\n", - " type = \"https://didcomm.org/coordinate-mediation/2.0/mediate-request\",\n", - " body = {}\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "PackEncryptedResult(packed_msg='{\"protected\":\"eyJ0eXAiOiJhcHBsaWNhdGlvbi9kaWRjb21tLWVuY3J5cHRlZCtqc29uIiwiYWxnIjoiRUNESC0xUFUrQTI1NktXIiwiZW5jIjoiQTI1NkNCQy1IUzUxMiIsImFwdSI6IlpHbGtPbkJsWlhJNk1pNUZlalpNVTJrMlUwUm5hV1ZUT0VnM1JrTXpWVkpGYWpKSU1XbFpWa05NTjFNNVRUaHBWRU5RUlcxdlIzUnBkWFJLTGxaNk5rMXJiV0pOUXpVeGRUUjRSazVoWWtWWWIwSXpNa3hRT1dGeFNuUTJaak01UVROdGJXMXhkM1ZSV1Uxb1ZtMGpOa3hUYVRaVFJHZHBaVk00U0RkR1F6TlZVa1ZxTWtneGFWbFdRMHczVXpsTk9HbFVRMUJGYlc5SGRHbDFkRW8iLCJhcHYiOiJUVTRLbXh3eDB3RWxBb0pac21FMG1HZ05GWkI5LVFfWDJCdG1RQzdtRllRIiwic2tpZCI6ImRpZDpwZWVyOjIuRXo2TFNpNlNEZ2llUzhIN0ZDM1VSRWoySDFpWVZDTDdTOU04aVRDUEVtb0d0aXV0Si5WejZNa21iTUM1MXU0eEZOYWJFWG9CMzJMUDlhcUp0NmYzOUEzbW1tcXd1UVlNaFZtIzZMU2k2U0RnaWVTOEg3RkMzVVJFajJIMWlZVkNMN1M5TThpVENQRW1vR3RpdXRKIiwiZXBrIjp7ImNydiI6IlgyNTUxOSIsIngiOiJ1QjJfQWRCTWZSSjEzR2R5Z0lFUmFUYVU2SGh5SFBFRF94ZDlEWnlsYkI0Iiwia3R5IjoiT0tQIn19\",\"recipients\":[{\"header\":{\"kid\":\"did:peer:2.Ez6LSfuYoeE8ArorRnVEHG6g1TUb9Y66KfG35WXrgDnrfXkdV.Vz6MkvZVZwK9RTknM8D7BJ3D7iZau3AHYJWC6kUKqkodKhmWX.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOiJodHRwOi8vcm9vdHNpZC1tZWRpYXRvcjo4MDAwIiwiYSI6WyJkaWRjb21tL3YyIl19#6LSfuYoeE8ArorRnVEHG6g1TUb9Y66KfG35WXrgDnrfXkdV\"},\"encrypted_key\":\"aeWrV-8Bcn1eULHu6LsTAtAlJpxqucew1nsY07DhL2-OpUMtaLsNu2Q4l9hDccEOterU0Ofwgvfr0jJDDD4XAvxEoJT8rv5o\"}],\"iv\":\"HlLWUj9lUvYeg0wrF6bn_A\",\"ciphertext\":\"H8J-NB7f2dmws8ilS_A9fYmo3ZL655SSobYLjEBhGKn2JLWoNZyc6E9dug9GtG-0YTUauEE2YU-oxLHRcerN2TJQiGRNgck5z1WEOriMdubTKV_koQEqvdl-bu2VpxWBpVHlGNKlpIX2fQgXkSeSP_piNvr2QPusA6_N6LsKXBdBpWwx46kSGHSWtOUjU3aoQm1fA74jWvXsEQl3NArVNFuAQWsl86sOALfPLr4M2ikGEjacOWMSdCkvw6GjXQGorOLxZSdsPhCYTdzvP4oIXw\",\"tag\":\"nXDYAIeIiSC6-pUWSzP0PaEXmZsG4eOIGLCn2N3BBdo\"}', to_kids=['did:peer:2.Ez6LSfuYoeE8ArorRnVEHG6g1TUb9Y66KfG35WXrgDnrfXkdV.Vz6MkvZVZwK9RTknM8D7BJ3D7iZau3AHYJWC6kUKqkodKhmWX.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOiJodHRwOi8vcm9vdHNpZC1tZWRpYXRvcjo4MDAwIiwiYSI6WyJkaWRjb21tL3YyIl19#6LSfuYoeE8ArorRnVEHG6g1TUb9Y66KfG35WXrgDnrfXkdV'], from_kid='did:peer:2.Ez6LSi6SDgieS8H7FC3UREj2H1iYVCL7S9M8iTCPEmoGtiutJ.Vz6MkmbMC51u4xFNabEXoB32LP9aqJt6f39A3mmmqwuQYMhVm#6LSi6SDgieS8H7FC3UREj2H1iYVCL7S9M8iTCPEmoGtiutJ', sign_from_kid=None, from_prior_issuer_kid=None, service_metadata=ServiceMetadata(id='did:peer:2.Ez6LSfuYoeE8ArorRnVEHG6g1TUb9Y66KfG35WXrgDnrfXkdV.Vz6MkvZVZwK9RTknM8D7BJ3D7iZau3AHYJWC6kUKqkodKhmWX.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOiJodHRwOi8vcm9vdHNpZC1tZWRpYXRvcjo4MDAwIiwiYSI6WyJkaWRjb21tL3YyIl19#didcommmessaging-0', service_endpoint='http://rootsid-mediator:8000'))\n" - ] - } - ], - "source": [ - "alice_mediate_grant_packed = await pack_encrypted(\n", - " resolvers_config = ResolversConfig(\n", - " secrets_resolver = secrets_resolver,\n", - " did_resolver = DIDResolverPeerDID()\n", - " ),\n", - " message = alice_mediate_grant,\n", - " frm = alice_did_for_mediator,\n", - " to = received_msg_decoded[\"from\"],\n", - " sign_frm = None,\n", - " pack_config = PackEncryptedConfig(protect_sender_id=False)\n", - ")\n", - "print(alice_mediate_grant_packed)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Sending to Mediator" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'id': 'did:peer:2.Ez6LSfuYoeE8ArorRnVEHG6g1TUb9Y66KfG35WXrgDnrfXkdV.Vz6MkvZVZwK9RTknM8D7BJ3D7iZau3AHYJWC6kUKqkodKhmWX.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOiJodHRwOi8vcm9vdHNpZC1tZWRpYXRvcjo4MDAwIiwiYSI6WyJkaWRjb21tL3YyIl19', 'authentication': [{'id': 'did:peer:2.Ez6LSfuYoeE8ArorRnVEHG6g1TUb9Y66KfG35WXrgDnrfXkdV.Vz6MkvZVZwK9RTknM8D7BJ3D7iZau3AHYJWC6kUKqkodKhmWX.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOiJodHRwOi8vcm9vdHNpZC1tZWRpYXRvcjo4MDAwIiwiYSI6WyJkaWRjb21tL3YyIl19#6MkvZVZwK9RTknM8D7BJ3D7iZau3AHYJWC6kUKqkodKhmWX', 'type': 'Ed25519VerificationKey2020', 'controller': 'did:peer:2.Ez6LSfuYoeE8ArorRnVEHG6g1TUb9Y66KfG35WXrgDnrfXkdV.Vz6MkvZVZwK9RTknM8D7BJ3D7iZau3AHYJWC6kUKqkodKhmWX.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOiJodHRwOi8vcm9vdHNpZC1tZWRpYXRvcjo4MDAwIiwiYSI6WyJkaWRjb21tL3YyIl19', 'publicKeyMultibase': 'z6MkvZVZwK9RTknM8D7BJ3D7iZau3AHYJWC6kUKqkodKhmWX'}], 'keyAgreement': [{'id': 'did:peer:2.Ez6LSfuYoeE8ArorRnVEHG6g1TUb9Y66KfG35WXrgDnrfXkdV.Vz6MkvZVZwK9RTknM8D7BJ3D7iZau3AHYJWC6kUKqkodKhmWX.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOiJodHRwOi8vcm9vdHNpZC1tZWRpYXRvcjo4MDAwIiwiYSI6WyJkaWRjb21tL3YyIl19#6LSfuYoeE8ArorRnVEHG6g1TUb9Y66KfG35WXrgDnrfXkdV', 'type': 'X25519KeyAgreementKey2020', 'controller': 'did:peer:2.Ez6LSfuYoeE8ArorRnVEHG6g1TUb9Y66KfG35WXrgDnrfXkdV.Vz6MkvZVZwK9RTknM8D7BJ3D7iZau3AHYJWC6kUKqkodKhmWX.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOiJodHRwOi8vcm9vdHNpZC1tZWRpYXRvcjo4MDAwIiwiYSI6WyJkaWRjb21tL3YyIl19', 'publicKeyMultibase': 'z6LSfuYoeE8ArorRnVEHG6g1TUb9Y66KfG35WXrgDnrfXkdV'}], 'service': [{'id': 'did:peer:2.Ez6LSfuYoeE8ArorRnVEHG6g1TUb9Y66KfG35WXrgDnrfXkdV.Vz6MkvZVZwK9RTknM8D7BJ3D7iZau3AHYJWC6kUKqkodKhmWX.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOiJodHRwOi8vcm9vdHNpZC1tZWRpYXRvcjo4MDAwIiwiYSI6WyJkaWRjb21tL3YyIl19#didcommmessaging-0', 'type': 'DIDCommMessaging', 'serviceEndpoint': 'http://rootsid-mediator:8000', 'accept': ['didcomm/v2']}]}\n", - "http://rootsid-mediator:8000\n" - ] - } - ], - "source": [ - "mediator_did_doc = json.loads(peer_did.resolve_peer_did(received_msg_decoded[\"from\"]))\n", - "mediator_endpoint = mediator_did_doc[\"service\"][0][\"serviceEndpoint\"]\n", - "print(mediator_did_doc)\n", - "print(mediator_endpoint)" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [], - "source": [ - "headers = {\"Content-Type\": \"application/didcomm-encrypted+json\"}\n", - "resp = requests.post(mediator_endpoint, headers=headers, data = alice_mediate_grant_packed.packed_msg)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{\"protected\":\"eyJ0eXAiOiJhcHBsaWNhdGlvbi9kaWRjb21tLWVuY3J5cHRlZCtqc29uIiwiYWxnIjoiRUNESC0xUFUrQTI1NktXIiwiZW5jIjoiQTI1NkNCQy1IUzUxMiIsImFwdSI6IlpHbGtPbkJsWlhJNk1pNUZlalpNVTI4M2JubG1kMWt6YlRkM1UxRjJRekZOTTFVMU5sUm9kbXBaYURVMFlrdEtUVU5ZYVhONlRuZEhNMlp0TGxaNk5rMXJiMDVaYWpGMGQyTlZaSFJJWWs1RFV6WlpjMUprZEZGdVZYWnBXbFkwVVVoRFFXNXJla3BLTW1seFZVTXVVMlY1U25CYVEwazJTVzAxYkdSNU1YQmFRMGx6U1c1UmFVOXBTbXRpVTBselNXNU5hVTlwU205a1NGSjNUMms0ZG1OdE9YWmtTRTV3V2tNeGRGcFhVbkJaV0ZKMlkycHZORTFFUVhkSmFYZHBXVk5KTmxkNVNtdGhWMUpxWWpJeGRFd3pXWGxKYkRFNUl6Wk1VMjgzYm5sbWQxa3piVGQzVTFGMlF6Rk5NMVUxTmxSb2RtcFphRFUwWWt0S1RVTllhWE42VG5kSE0yWnQiLCJhcHYiOiJpWlpVYklVZ25fWVlCeFlxNHdxaXR5N0s0aVZWVFJwUjZvaC1BSEEteFVNIiwic2tpZCI6ImRpZDpwZWVyOjIuRXo2TFNvN255ZndZM203d1NRdkMxTTNVNTZUaHZqWWg1NGJLSk1DWGlzek53RzNmbS5WejZNa29OWWoxdHdjVWR0SGJOQ1M2WXNSZHRRblV2aVpWNFFIQ0Fua3pKSjJpcVVDLlNleUpwWkNJNkltNWxkeTFwWkNJc0luUWlPaUprYlNJc0luTWlPaUpvZEhSd09pOHZjbTl2ZEhOcFpDMXRaV1JwWVhSdmNqbzRNREF3SWl3aVlTSTZXeUprYVdSamIyMXRMM1l5SWwxOSM2TFNvN255ZndZM203d1NRdkMxTTNVNTZUaHZqWWg1NGJLSk1DWGlzek53RzNmbSIsImVwayI6eyJjcnYiOiJYMjU1MTkiLCJ4IjoiYVZjaWtzaEpWR3VjX09rdkFBako4X2dVMllhRnl2TUhNTEYwRVNRallXdyIsImt0eSI6Ik9LUCJ9fQ\",\"recipients\":[{\"header\":{\"kid\":\"did:peer:2.Ez6LSi6SDgieS8H7FC3UREj2H1iYVCL7S9M8iTCPEmoGtiutJ.Vz6MkmbMC51u4xFNabEXoB32LP9aqJt6f39A3mmmqwuQYMhVm#6LSi6SDgieS8H7FC3UREj2H1iYVCL7S9M8iTCPEmoGtiutJ\"},\"encrypted_key\":\"ToAtopK3nJ6qDF4a4toVw10fP3kfTHtCx6jRWH3wqVNayBbIGV5P75Cb6WAMgcjfudwYOjJI_mW_vmLcTIVuKEtRJh4hWUlK\"}],\"iv\":\"a_ZKxTw5CjmCJuwWBuWQ8w\",\"ciphertext\":\"y3JWYjiBC3ApAEa14gn97UZbwEwyf2DpDkA8i1IpCfzRAXatAGkkpPsOGUOM2W-xw0WBnUvctAQhqEn0yrkTFhXQ_-FTgcfLn1Xgf4BFOfLjToJXxAxw1_sziU86nzqnnTic8VqyOr-L2DLILypNaRsb2Nd-HBwJeYSMVvRbwaqFMLyeNq5rMlNOG-OKOPI8WJeWXOEQL3an90SAUlELn9c8X6zJIJEn4FIyiprBvGVAe-jlYfe9XC5-Zk4j5kSbcxbVaMd92_F2XmxDKfDkpf7CZCrcB-q0FWFE7jF4WuJzDr_EKqOXamttaIyW9a4ZaaBZjx68uAG6GDFMAQ8eAn1iVEXWzC13FiBK34oHiLq3r5MaYPWR8BHjt8Nuri2bchSpyvc4aeQxaKNLcuzAVXlfyrUI0Z8DwAlwsg-rfTDNjqxZjGOactAPREo3Yt0tm6nI32wOAEPWZ1D_ICS9l2hMjp7Qf2_iHow60-3bWI0Zw4zPiRQlYwIg108xnbEdw85i1HVZwCViAXze5W16ujKjVLqbP2Bl-lAGsJgn16xZNNC7ssqk5FBDfpRQO_oxKAz_lXm94TaaMHAdW6sTCGxBPjmOkWm2s_RpFCHD4zBQ4qjG6_YroG1IELHCG6uyQJvP1ja4N1uWfE725rDKu64NPmFB1OSBkxGs36TXvXbk-W7S1GfvS_IWy2FxzdTrhIELUhlYGHUiYVxt1_kpH4CHXLHnw7vCbZcCj_s9PhPZjfzuNMmKPis1dKZ2toWfHmPNRbRJgfvm57RTeS2Du69AbWTdrv7-dMyVGyApKdpOB2ze2BwVdwOF_-UQ022QlrhEqOXT5YexKpoHs1XC_uzMSXOnltT3ruDVQDiW-hi_qBSDKcpbmP3cv0Ph2VOd2z9RfIy8cMzDLUtNgTumTW1nUo9wRq7GfssHGp5QCuBoDpr_jHEzeOEcB0AftfO1rFJe8NWs72H1ZNqlxaSYUJUN1n6zqTPGm4TRHOIpG4MbR4pqm8PXp2jB2H81kyfqIvjyblN0lrjrV8_X252cm_Bx8pPbCWf1rm7XnpkdD9QLukl4VhqihNvWsbI23sZP7OaAYkAvgefXW8cSb_nXf0yCY0T9zfzM8fXyGLU8KTA4us_fzfup416GS4s-p7Ag00nadQLowoSW2SfDWBgi1BUKY2cnZqbkRNZjEcw3QttJjpa5CwPm_os47VdphHAgKPGg9z46sHCTSuupYDgmUzXj7JAgtPagO8B3xr80P46GcdliykUoj6a7NdhAeaUpBD7SHY_uPA2vYQ_3DRc5y86TZ_dYARGnOH5ccJZ6ty-Zv4xBD8dhuI-VCwcI73FD4-zp1ac7FcRSKEbPsmSnadz3T2qiRcHuU3KH-R8vILV3z4gIiAW1o5bHnd5xSQV3wOxOFdE7K8FiqKGdTEsHi2mki0mb_y_5x5caFe7sK1-zWQhp_XsnmxKURxAbYss2HEf-lNDqMHwZdtY8ajn6zXy4cBdn8HbI4HjIqSo3bnA0FrIyo-8PwqcLvBZoY1PEer_WIN6RG7xiyNF0zPl23aX3Tk8sJCeZjAygIjWYEW5HLplpQnAKSLGfEXaZk1fW8_BvAEHt-UERt-SSRN8ExhLoZUk_8YfZ8HXXFI-jIg20a6sPWrUVN48sU9wmVURu4zXhFC3iIdhv2LFnYsQ_r_Y49zrnmWoD9TK4imaCGAZljNq6vL1sIbNOksmf9YnwLXkf0_HMvLy3sAYatf7972I0kGrLHw9BDp0Vn7adji5McJu_XAo3eNww0BdIgHc9jHqD5diUaZkPaFGARFCNY6YGGjIAgrbP_HGUYr0gppcoQg2O__rlbXRJVBS29z57NCCYCOurZvgsIfXQJ41j59Jx6Ya0DrsAp9igpSHNVzW7eMYvPTCSxNKX21Wdv6kf62GaOCBohYgGMqE_fi0pgSxoH4x0LKDqQ5zuf2E94cdy_7VmVgpzUSSSZFZfQYrjFE5EPzU8xj7eNgbyHpAoNg\",\"tag\":\"1MQCtvVbytfnNjg5MXAul6TFG1d2pTtsi3D8HxXPTHg\"}\n" - ] - } - ], - "source": [ - "print(resp.json())" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Get mediator grant response" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "https://didcomm.org/coordinate-mediation/2.0/mediate-grant\n", - "Routing Key: did:peer:2.Ez6LSh86cZe85p4LLsNc28nAp9rtLvg2tdS7KA9cYcB9DpnNY.Vz6Mknau6GqSR279G1akj6imwmXGqxLk5sskPZcnnT83ym1Wa.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOiJodHRwOi8vcm9vdHNpZC1tZWRpYXRvcjo4MDAwIiwiYSI6WyJkaWRjb21tL3YyIl19\n", - "Mediator new DID: did:peer:2.Ez6LSo7nyfwY3m7wSQvC1M3U56ThvjYh54bKJMCXiszNwG3fm.Vz6MkoNYj1twcUdtHbNCS6YsRdtQnUviZV4QHCAnkzJJ2iqUC.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOiJodHRwOi8vcm9vdHNpZC1tZWRpYXRvcjo4MDAwIiwiYSI6WyJkaWRjb21tL3YyIl19\n" - ] - } - ], - "source": [ - "mediator_unpack_msg = await unpack(\n", - " resolvers_config=ResolversConfig(\n", - " secrets_resolver=secrets_resolver,\n", - " did_resolver=DIDResolverPeerDID()\n", - " ),\n", - " packed_msg= resp.json()\n", - ")\n", - "print(mediator_unpack_msg.message.type)\n", - "print(\"Routing Key: \" + mediator_unpack_msg.message.body[\"routing_did\"])\n", - "print(\"Mediator new DID: \" + mediator_unpack_msg.message.from_prior.sub)\n", - "# mediator rotated did\n", - "mediator_routing_key = mediator_unpack_msg.message.body[\"routing_did\"]\n", - "mediator_did = mediator_unpack_msg.message.from_prior.sub" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Keylist update" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Alice create a new DID to share with other peers using mediator routing keys " - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'crv': 'Ed25519', 'x': 'VbWFIhfT1aUvzxVcZJlGm40KZ7iw3swu2BfKUiS32Q0', 'd': 'fjpPxHmNxBCYOj2Mbi8Zdqw4HKCxaNBXcINIfQNrlhs', 'kty': 'OKP', 'kid': 'did:peer:2.Ez6LSqrUDvHgg8WbUH2gRfgGdNNhABreeuCYmBRTjMDe1AmVL.Vz6MkkDqEhfa7BUpaKsHM4Cph7YnjndRZfLJdqMtixA4jUV3r.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOlt7InVyaSI6ImRpZDpwZWVyOjIuRXo2TFNoODZjWmU4NXA0TExzTmMyOG5BcDlydEx2ZzJ0ZFM3S0E5Y1ljQjlEcG5OWS5WejZNa25hdTZHcVNSMjc5RzFha2o2aW13bVhHcXhMazVzc2tQWmNublQ4M3ltMVdhLlNleUpwWkNJNkltNWxkeTFwWkNJc0luUWlPaUprYlNJc0luTWlPaUpvZEhSd09pOHZjbTl2ZEhOcFpDMXRaV1JwWVhSdmNqbzRNREF3SWl3aVlTSTZXeUprYVdSamIyMXRMM1l5SWwxOSJ9XSwiYSI6WyJkaWRjb21tL3YyIl19#6MkkDqEhfa7BUpaKsHM4Cph7YnjndRZfLJdqMtixA4jUV3r'}\n", - "{'crv': 'X25519', 'x': '0qa2ljtJpd5hOoV-1TP9NUrQJdeT4HyzQq2onFVbjyM', 'd': 'aEoknbH22Fnm9cCdVJRbNpryELRBSX8nGGerzVcYh0o', 'kty': 'OKP', 'kid': 'did:peer:2.Ez6LSqrUDvHgg8WbUH2gRfgGdNNhABreeuCYmBRTjMDe1AmVL.Vz6MkkDqEhfa7BUpaKsHM4Cph7YnjndRZfLJdqMtixA4jUV3r.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOlt7InVyaSI6ImRpZDpwZWVyOjIuRXo2TFNoODZjWmU4NXA0TExzTmMyOG5BcDlydEx2ZzJ0ZFM3S0E5Y1ljQjlEcG5OWS5WejZNa25hdTZHcVNSMjc5RzFha2o2aW13bVhHcXhMazVzc2tQWmNublQ4M3ltMVdhLlNleUpwWkNJNkltNWxkeTFwWkNJc0luUWlPaUprYlNJc0luTWlPaUpvZEhSd09pOHZjbTl2ZEhOcFpDMXRaV1JwWVhSdmNqbzRNREF3SWl3aVlTSTZXeUprYVdSamIyMXRMM1l5SWwxOSJ9XSwiYSI6WyJkaWRjb21tL3YyIl19#6LSqrUDvHgg8WbUH2gRfgGdNNhABreeuCYmBRTjMDe1AmVL'}\n", - "Alice's DID for Bob: did:peer:2.Ez6LSqrUDvHgg8WbUH2gRfgGdNNhABreeuCYmBRTjMDe1AmVL.Vz6MkkDqEhfa7BUpaKsHM4Cph7YnjndRZfLJdqMtixA4jUV3r.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOlt7InVyaSI6ImRpZDpwZWVyOjIuRXo2TFNoODZjWmU4NXA0TExzTmMyOG5BcDlydEx2ZzJ0ZFM3S0E5Y1ljQjlEcG5OWS5WejZNa25hdTZHcVNSMjc5RzFha2o2aW13bVhHcXhMazVzc2tQWmNublQ4M3ltMVdhLlNleUpwWkNJNkltNWxkeTFwWkNJc0luUWlPaUprYlNJc0luTWlPaUpvZEhSd09pOHZjbTl2ZEhOcFpDMXRaV1JwWVhSdmNqbzRNREF3SWl3aVlTSTZXeUprYVdSamIyMXRMM1l5SWwxOSJ9XSwiYSI6WyJkaWRjb21tL3YyIl19\n" - ] - } - ], - "source": [ - "#alice_did_new = await create_peer_did(1, 1, service_endpoint=mediator_endpoint, service_routing_keys=[mediator_routing_key])\n", - "alice_did_for_bob = await create_peer_did(1, 1, service_endpoint=[{\"uri\": mediator_routing_key}])\n", - "\n", - "print(\"Alice's DID for Bob:\", alice_did_for_bob)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Alice create and send the keylist update message" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "alice_keylist_update = Message(\n", - " id = \"unique-id-293e9a922efff\",\n", - " type = \"https://didcomm.org/coordinate-mediation/2.0/keylist-update\",\n", - " body = {\n", - " \"updates\":[\n", - " {\n", - " \"recipient_did\": alice_did_for_bob,\n", - " \"action\": \"add\"\n", - " }\n", - " ]\n", - " }\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [], - "source": [ - "alice_keylist_update_packed_msg = await pack_encrypted(\n", - " resolvers_config = ResolversConfig(\n", - " secrets_resolver = secrets_resolver,\n", - " did_resolver = DIDResolverPeerDID()\n", - " ),\n", - " message = alice_keylist_update,\n", - " frm = alice_did_for_mediator,\n", - " to = mediator_did,\n", - " sign_frm = None,\n", - " pack_config = PackEncryptedConfig(protect_sender_id=False)\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [], - "source": [ - "headers = {\"Content-Type\": \"application/didcomm-encrypted+json\"}\n", - "resp = requests.post(mediator_endpoint, headers=headers, data = alice_keylist_update_packed_msg.packed_msg)" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "https://didcomm.org/coordinate-mediation/2.0/keylist-update-response\n", - "{'updated': [{'recipient_did': 'did:peer:2.Ez6LSqrUDvHgg8WbUH2gRfgGdNNhABreeuCYmBRTjMDe1AmVL.Vz6MkkDqEhfa7BUpaKsHM4Cph7YnjndRZfLJdqMtixA4jUV3r.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOlt7InVyaSI6ImRpZDpwZWVyOjIuRXo2TFNoODZjWmU4NXA0TExzTmMyOG5BcDlydEx2ZzJ0ZFM3S0E5Y1ljQjlEcG5OWS5WejZNa25hdTZHcVNSMjc5RzFha2o2aW13bVhHcXhMazVzc2tQWmNublQ4M3ltMVdhLlNleUpwWkNJNkltNWxkeTFwWkNJc0luUWlPaUprYlNJc0luTWlPaUpvZEhSd09pOHZjbTl2ZEhOcFpDMXRaV1JwWVhSdmNqbzRNREF3SWl3aVlTSTZXeUprYVdSamIyMXRMM1l5SWwxOSJ9XSwiYSI6WyJkaWRjb21tL3YyIl19', 'action': 'add', 'result': 'success'}]}\n" - ] - } - ], - "source": [ - "mediator_unpack_msg2 = await unpack(\n", - " resolvers_config=ResolversConfig(\n", - " secrets_resolver=secrets_resolver,\n", - " did_resolver=DIDResolverPeerDID()\n", - " ),\n", - " packed_msg= resp.json()\n", - ")\n", - "print(mediator_unpack_msg2.message.type)\n", - "print(mediator_unpack_msg2.message.body)\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Alice can now send her DID to Bob." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Alice check status of queued messages from the Mediator" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": {}, - "outputs": [], - "source": [ - "alice_status_check = Message(\n", - " id = \"unique-id-293e9a922efffxxx\",\n", - " type = \"https://didcomm.org/messagepickup/3.0/status-request\",\n", - " body = {}\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": 20, - "metadata": {}, - "outputs": [], - "source": [ - "alice_status_check_packed_msg = await pack_encrypted(\n", - " resolvers_config = ResolversConfig(\n", - " secrets_resolver = secrets_resolver,\n", - " did_resolver = DIDResolverPeerDID()\n", - " ),\n", - " message = alice_status_check,\n", - " to = mediator_did,\n", - " frm = alice_did_for_mediator,\n", - " sign_frm = None,\n", - " pack_config = PackEncryptedConfig(protect_sender_id=False)\n", - ")\n", - "headers = {\"Content-Type\": \"application/didcomm-encrypted+json\"}\n", - "resp3 = requests.post(mediator_endpoint, headers=headers, data = alice_status_check_packed_msg.packed_msg)" - ] - }, - { - "cell_type": "code", - "execution_count": 21, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "https://didcomm.org/messagepickup/3.0/status\n", - "Messages in Mediator queue: 0\n" - ] - } - ], - "source": [ - "mediator_unpack_status = await unpack(\n", - " resolvers_config=ResolversConfig(\n", - " secrets_resolver=secrets_resolver,\n", - " did_resolver=DIDResolverPeerDID()\n", - " ),\n", - " packed_msg= resp3.json()\n", - ")\n", - "print(mediator_unpack_status.message.type)\n", - "print(\"Messages in Mediator queue: \" + str(mediator_unpack_status.message.body[\"message_count\"]))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### If there are messages, Alice can pickup from the mediator (delivery request)" - ] - }, - { - "cell_type": "code", - "execution_count": 22, - "metadata": {}, - "outputs": [], - "source": [ - "alice_delivery_request = Message(\n", - " id = \"unique-id-293e9a922efffxxxff\",\n", - " type = \"https://didcomm.org/messagepickup/3.0/delivery-request\",\n", - " body = {\"limit\": 1}\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "metadata": {}, - "outputs": [], - "source": [ - "alice_delivery_request_packed_msg = await pack_encrypted(\n", - " resolvers_config = ResolversConfig(\n", - " secrets_resolver = secrets_resolver,\n", - " did_resolver = DIDResolverPeerDID()\n", - " ),\n", - " message = alice_delivery_request,\n", - " to = mediator_did,\n", - " frm = alice_did_for_mediator,\n", - " sign_frm = None,\n", - " pack_config = PackEncryptedConfig(protect_sender_id=False)\n", - ")\n", - "headers = {\"Content-Type\": \"application/didcomm-encrypted+json\"}\n", - "resp4 = requests.post(mediator_endpoint, headers=headers, data = alice_delivery_request_packed_msg.packed_msg)" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "https://didcomm.org/messagepickup/3.0/status\n", - "{'recipient_key': None, 'message_count': 0, 'live_delivery': False}\n" - ] - } - ], - "source": [ - "mediator_delivery = await unpack(\n", - " resolvers_config=ResolversConfig(\n", - " secrets_resolver=secrets_resolver,\n", - " did_resolver=DIDResolverPeerDID()\n", - " ),\n", - " packed_msg= resp4.json()\n", - ")\n", - "print(mediator_delivery.message.type)\n", - "print(mediator_delivery.message.body)" - ] - }, - { - "cell_type": "code", - "execution_count": 25, - "metadata": {}, - "outputs": [ - { - "ename": "TypeError", - "evalue": "'NoneType' object is not subscriptable", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn [25], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m bob_packed_msg \u001b[38;5;241m=\u001b[39m \u001b[43mmediator_delivery\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmessage\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mattachments\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;241;43m0\u001b[39;49m\u001b[43m]\u001b[49m\u001b[38;5;241m.\u001b[39mdata\u001b[38;5;241m.\u001b[39mjson\n\u001b[1;32m 2\u001b[0m msg_id \u001b[38;5;241m=\u001b[39m mediator_delivery\u001b[38;5;241m.\u001b[39mmessage\u001b[38;5;241m.\u001b[39mattachments[\u001b[38;5;241m0\u001b[39m]\u001b[38;5;241m.\u001b[39mid\n", - "\u001b[0;31mTypeError\u001b[0m: 'NoneType' object is not subscriptable" - ] - } - ], - "source": [ - "bob_packed_msg = mediator_delivery.message.attachments[0].data.json\n", - "msg_id = mediator_delivery.message.attachments[0].id" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(bob_packed_msg)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "bob_msg = await unpack(\n", - " resolvers_config=ResolversConfig(\n", - " secrets_resolver=secrets_resolver,\n", - " did_resolver=DIDResolverPeerDID()\n", - " ),\n", - " packed_msg= bob_packed_msg\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(\"Message ID:\", msg_id)\n", - "print(bob_msg.message.body[\"content\"])" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Alice acknowledge so the mediator can delete the message" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "alice_ack = Message(\n", - " id = \"unique-id-293e9a922efffxxxffsss\",\n", - " type = \"https://didcomm.org/messagepickup/3.0/messages-received\",\n", - " body = {\"message_id_list\": [msg_id]}\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "alice_ack_packed_msg = await pack_encrypted(\n", - " resolvers_config = ResolversConfig(\n", - " secrets_resolver = secrets_resolver,\n", - " did_resolver = DIDResolverPeerDID()\n", - " ),\n", - " message = alice_ack,\n", - " to = mediator_did,\n", - " frm = alice_did_for_mediator,\n", - " sign_frm = None,\n", - " pack_config = PackEncryptedConfig(protect_sender_id=False)\n", - ")\n", - "headers = {\"Content-Type\": \"application/didcomm-encrypted+json\"}\n", - "resp5 = requests.post(mediator_endpoint, headers=headers, data = alice_ack_packed_msg.packed_msg)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "mediator_ack_status = await unpack(\n", - " resolvers_config=ResolversConfig(\n", - " secrets_resolver=secrets_resolver,\n", - " did_resolver=DIDResolverPeerDID()\n", - " ),\n", - " packed_msg= resp5.json()\n", - ")\n", - "print(mediator_ack_status.message.type)\n", - "print(mediator_ack_status.message.body)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "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.10.6" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/mercury/roots-id-mediator/notebooks/Bob.ipynb b/mercury/roots-id-mediator/notebooks/Bob.ipynb deleted file mode 100644 index a2bae3c924..0000000000 --- a/mercury/roots-id-mediator/notebooks/Bob.ipynb +++ /dev/null @@ -1,393 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "import json\n", - "import base64\n", - "import qrcode\n", - "import requests\n", - "import datetime\n", - "import uuid\n", - "import matplotlib.pyplot as plt\n", - "from pymongo import MongoClient\n", - "from typing import Optional, List\n", - "from didcomm.common.types import DID, VerificationMethodType, VerificationMaterial, VerificationMaterialFormat\n", - "from didcomm.did_doc.did_doc import DIDDoc, VerificationMethod, DIDCommService\n", - "from didcomm.did_doc.did_resolver import DIDResolver\n", - "from didcomm.message import Message, FromPrior\n", - "from didcomm.secrets.secrets_resolver_demo import SecretsResolverDemo\n", - "from didcomm.unpack import unpack, UnpackResult\n", - "from didcomm.message import Attachment, AttachmentDataJson, AttachmentDataLinks\n", - "from didcomm.common.resolvers import ResolversConfig\n", - "from didcomm.pack_encrypted import pack_encrypted, PackEncryptedConfig, PackEncryptedResult\n", - "from peerdid.core.did_doc_types import DIDCommServicePeerDID\n", - "from didcomm.secrets.secrets_util import generate_x25519_keys_as_jwk_dict, generate_ed25519_keys_as_jwk_dict, jwk_to_secret\n", - "from peerdid import peer_did\n", - "from peerdid.did_doc import DIDDocPeerDID\n", - "from peerdid.types import VerificationMaterialAuthentication, VerificationMethodTypeAuthentication, VerificationMaterialAgreement, VerificationMethodTypeAgreement, VerificationMaterialFormatPeerDID" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "secrets_resolver = SecretsResolverDemo()" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "class DIDResolverPeerDID(DIDResolver):\n", - " async def resolve(self, did: DID) -> DIDDoc:\n", - " did_doc_json = peer_did.resolve_peer_did(did, format = VerificationMaterialFormatPeerDID.JWK)\n", - " did_doc = DIDDocPeerDID.from_json(did_doc_json)\n", - "\n", - " return DIDDoc(\n", - " did=did_doc.did,\n", - " key_agreement_kids = did_doc.agreement_kids,\n", - " authentication_kids = did_doc.auth_kids,\n", - " verification_methods = [\n", - " VerificationMethod(\n", - " id = m.id,\n", - " type = VerificationMethodType.JSON_WEB_KEY_2020,\n", - " controller = m.controller,\n", - " verification_material = VerificationMaterial(\n", - " format = VerificationMaterialFormat.JWK,\n", - " value = json.dumps(m.ver_material.value)\n", - " )\n", - " )\n", - " for m in did_doc.authentication + did_doc.key_agreement\n", - " ],\n", - " didcomm_services = [\n", - " DIDCommService(\n", - " id = s.id,\n", - " service_endpoint = s.service_endpoint[0][\"uri\"] if \"uri\" in s.service_endpoint[0] else s.service_endpoint[0],\n", - " routing_keys = s.routing_keys,\n", - " accept = s.accept\n", - " )\n", - " for s in did_doc.service\n", - " if isinstance(s, DIDCommServicePeerDID)\n", - " ] if did_doc.service else []\n", - " )" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [], - "source": [ - "async def create_peer_did(self,\n", - " auth_keys_count: int = 1,\n", - " agreement_keys_count: int = 1,\n", - " service_endpoint: Optional[str] = None,\n", - " service_routing_keys: Optional[List[str]] = None\n", - " ) -> str:\n", - " # 1. generate keys in JWK format\n", - " agreem_keys = [generate_x25519_keys_as_jwk_dict() for _ in range(agreement_keys_count)]\n", - " auth_keys = [generate_ed25519_keys_as_jwk_dict() for _ in range(auth_keys_count)]\n", - "\n", - " # 2. prepare the keys for peer DID lib\n", - " agreem_keys_peer_did = [\n", - " VerificationMaterialAgreement(\n", - " type=VerificationMethodTypeAgreement.JSON_WEB_KEY_2020,\n", - " format=VerificationMaterialFormatPeerDID.JWK,\n", - " value=k[1],\n", - " )\n", - " for k in agreem_keys\n", - " ]\n", - " auth_keys_peer_did = [\n", - " VerificationMaterialAuthentication(\n", - " type=VerificationMethodTypeAuthentication.JSON_WEB_KEY_2020,\n", - " format=VerificationMaterialFormatPeerDID.JWK,\n", - " value=k[1],\n", - " )\n", - " for k in auth_keys\n", - " ]\n", - "\n", - " # 3. generate service\n", - " service = None\n", - " if service_endpoint:\n", - " service = json.dumps(\n", - " DIDCommServicePeerDID(\n", - " id=\"new-id\",\n", - " service_endpoint=service_endpoint, \n", - " routing_keys=service_routing_keys,\n", - " accept=[\"didcomm/v2\"]\n", - " ).to_dict()\n", - " )\n", - "\n", - " # 4. call peer DID lib\n", - " # if we have just one key (auth), then use numalg0 algorithm\n", - " # otherwise use numalg2 algorithm\n", - " if len(auth_keys_peer_did) == 1 and not agreem_keys_peer_did and not service:\n", - " did = peer_did.create_peer_did_numalgo_0(auth_keys_peer_did[0])\n", - " else:\n", - " did = peer_did.create_peer_did_numalgo_2(\n", - " encryption_keys=agreem_keys_peer_did,\n", - " signing_keys=auth_keys_peer_did,\n", - " service=service,\n", - " )\n", - "\n", - " # 5. set KIDs as in DID DOC for secrets and store the secret in the secrets resolver\n", - " did_doc = DIDDocPeerDID.from_json(peer_did.resolve_peer_did(did))\n", - " for auth_key, kid in zip(auth_keys, did_doc.auth_kids):\n", - " private_key = auth_key[0]\n", - " private_key[\"kid\"] = kid\n", - " await secrets_resolver.add_key(jwk_to_secret(private_key))\n", - "\n", - " for agreem_key, kid in zip(agreem_keys, did_doc.agreement_kids):\n", - " private_key = agreem_key[0]\n", - " private_key[\"kid\"] = kid\n", - " await secrets_resolver.add_key(jwk_to_secret(private_key))\n", - "\n", - " return did\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Get OOB get somehow Alice DID (not covered here) --> Copy did from Alice notebook" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "alice_did = \"did:peer:2.Ez6LSdiyKeupskKv1GvBoYYaSGLfwBzE9AAkm4jc5vrqsVDsF.Vz6Mkf2FzueL7AGjtuDAmiY8QjiXeRLzSJ725UR5RTdBjpZfG.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOlt7InVyaSI6ImRpZDpwZWVyOjIuRXo2TFNpOXoybnFpZU5OejdDUHpvS0JOcWhIbTF5UDlkY05DOVRuenh1UjJrQUtFeC5WejZNa3BTb2ZXS2M0RkxXU0pEeVh1OEd4UHNTMzZHWGVBb0FTcUNQenRTVVhRODJQLlNleUpwWkNJNkltNWxkeTFwWkNJc0luUWlPaUprYlNJc0luTWlPaUpvZEhSd2N6b3ZMMjFsWkdsaGRHOXlMbkp2YjNSemFXUXVZMnh2ZFdRaUxDSmhJanBiSW1ScFpHTnZiVzB2ZGpJaVhYMCJ9XSwiYSI6WyJkaWRjb21tL3YyIl19\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Get mediator DID from Alice DID and endpoint from mediator DID" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "did:peer:2.Ez6LSi9z2nqieNNz7CPzoKBNqhHm1yP9dcNC9TnzxuR2kAKEx.Vz6MkpSofWKc4FLWSJDyXu8GxPsS36GXeAoASqCPztSUXQ82P.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOiJodHRwczovL21lZGlhdG9yLnJvb3RzaWQuY2xvdWQiLCJhIjpbImRpZGNvbW0vdjIiXX0\n" - ] - } - ], - "source": [ - "alice_did_doc = json.loads(peer_did.resolve_peer_did(alice_did))\n", - "mediator_did = alice_did_doc[\"service\"][0][\"serviceEndpoint\"][0][\"uri\"]\n", - "print(mediator_did)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "https://mediator.rootsid.cloud\n" - ] - } - ], - "source": [ - "mediator_did_doc = json.loads(peer_did.resolve_peer_did(mediator_did))\n", - "mediator_endpoint = mediator_did_doc[\"service\"][0][\"serviceEndpoint\"]\n", - "print(mediator_endpoint)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### BOB creates DID and a basic msg to Bob" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Bob's DID: did:peer:2.Ez6LSmCUMvEKyJVpmQmg83apzBZMh5BNzDhXfMRzKacAWe7k5.Vz6MkrosMqqLEjU8sSMs9NDg6gQyRjXgJ77PFLhq1S3h4A538.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOiJodHRwczovL3d3dy5leGFtcGxlLmNvbS9ib2IiLCJhIjpbImRpZGNvbW0vdjIiXX0\n" - ] - } - ], - "source": [ - "bob_did_to_alice = await create_peer_did(1,1, service_endpoint=\"https://www.example.com/bob\")\n", - "print(\"Bob's DID:\", bob_did_to_alice)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "bob_basic_message = Message(\n", - " id = str(uuid.uuid4()),\n", - " type=\"https://didcomm.org/basicmessage/2.0/message\",\n", - " body={\"content\": \"Hola Alice\"},\n", - " created_time= int(datetime.datetime.now().timestamp()) \n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "bob_basic_message_packed = await pack_encrypted(\n", - " resolvers_config = ResolversConfig(\n", - " secrets_resolver = secrets_resolver,\n", - " did_resolver = DIDResolverPeerDID()\n", - " ),\n", - " message = bob_basic_message,\n", - " frm = bob_did_to_alice,\n", - " to = alice_did,\n", - " sign_frm = None,\n", - " pack_config = PackEncryptedConfig(protect_sender_id=False)\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "eyJ0eXAiOiJhcHBsaWNhdGlvbi9kaWRjb21tLWVuY3J5cHRlZCtqc29uIiwiYWxnIjoiRUNESC0xUFUrQTI1NktXIiwiZW5jIjoiQTI1NkNCQy1IUzUxMiIsImFwdSI6IlpHbGtPbkJsWlhJNk1pNUZlalpNVTIxRFZVMTJSVXQ1U2xad2JWRnRaemd6WVhCNlFscE5hRFZDVG5wRWFGaG1UVko2UzJGalFWZGxOMnMxTGxaNk5rMXJjbTl6VFhGeFRFVnFWVGh6VTAxek9VNUVaelpuVVhsU2FsaG5TamMzVUVaTWFIRXhVek5vTkVFMU16Z3VVMlY1U25CYVEwazJTVzAxYkdSNU1YQmFRMGx6U1c1UmFVOXBTbXRpVTBselNXNU5hVTlwU205a1NGSjNZM3B2ZGt3elpETmtlVFZzWlVkR2RHTkhlR3hNYlU1MllsTTVhV0l5U1dsTVEwcG9TV3B3WWtsdFVuQmFSMDUyWWxjd2RtUnFTV2xZV0RBak5reFRiVU5WVFhaRlMzbEtWbkJ0VVcxbk9ETmhjSHBDV2sxb05VSk9la1JvV0daTlVucExZV05CVjJVM2F6VSIsImFwdiI6Imw5NllfX3M5cHYxbG1CaEdxb0h2eF96eHBPamxxMVY2QUdGWWRVcDBBQjQiLCJza2lkIjoiZGlkOnBlZXI6Mi5FejZMU21DVU12RUt5SlZwbVFtZzgzYXB6QlpNaDVCTnpEaFhmTVJ6S2FjQVdlN2s1LlZ6Nk1rcm9zTXFxTEVqVThzU01zOU5EZzZnUXlSalhnSjc3UEZMaHExUzNoNEE1MzguU2V5SnBaQ0k2SW01bGR5MXBaQ0lzSW5RaU9pSmtiU0lzSW5NaU9pSm9kSFJ3Y3pvdkwzZDNkeTVsZUdGdGNHeGxMbU52YlM5aWIySWlMQ0poSWpwYkltUnBaR052YlcwdmRqSWlYWDAjNkxTbUNVTXZFS3lKVnBtUW1nODNhcHpCWk1oNUJOekRoWGZNUnpLYWNBV2U3azUiLCJlcGsiOnsiY3J2IjoiWDI1NTE5IiwieCI6IkF5Zm9vekhmb0J4OHM0TE00ZnRVdW5LVllydkhvSTJxY0l3X0V3bmlEQ1kiLCJrdHkiOiJPS1AifX0\n" - ] - } - ], - "source": [ - "print(json.loads(bob_basic_message_packed.packed_msg)[\"protected\"])" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Bobs cread DID and msg routed via Mediator" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [], - "source": [ - "bob_did_to_mediator = await create_peer_did(1,1, service_endpoint=\"https://www.example.com/bob\")" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": {}, - "outputs": [], - "source": [ - "bob_routed_message = Message(\n", - " id = str(uuid.uuid4()),\n", - " type=\"https://didcomm.org/routing/2.0/forward\",\n", - " body={\"next\": alice_did},\n", - " to=[mediator_did],\n", - " attachments=[Attachment(\n", - " data=AttachmentDataJson(json=json.loads(bob_basic_message_packed.packed_msg))\n", - " )]\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "bob_routed_message_packed = await pack_encrypted(\n", - " resolvers_config = ResolversConfig(\n", - " secrets_resolver = secrets_resolver,\n", - " did_resolver = DIDResolverPeerDID()\n", - " ),\n", - " message = bob_routed_message,\n", - " frm = bob_did_to_mediator,\n", - " to = mediator_did,\n", - " sign_frm = None,\n", - " pack_config = PackEncryptedConfig(protect_sender_id=False)\n", - ")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Sending to Mediator" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "headers = {\"Content-Type\": \"application/didcomm-encrypted+json\"}\n", - "resp = requests.post(mediator_endpoint, headers=headers, data = bob_routed_message_packed.packed_msg)\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "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.10.6" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/mercury/roots-id-mediator/notebooks/test_mediator.ipynb b/mercury/roots-id-mediator/notebooks/test_mediator.ipynb deleted file mode 100644 index e91775992c..0000000000 --- a/mercury/roots-id-mediator/notebooks/test_mediator.ipynb +++ /dev/null @@ -1,414 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 13, - "metadata": {}, - "outputs": [], - "source": [ - "import json\n", - "import base64\n", - "import qrcode\n", - "import requests\n", - "import datetime\n", - "import urllib.parse\n", - "import uuid\n", - "import matplotlib.pyplot as plt\n", - "from pymongo import MongoClient\n", - "from typing import Optional, List\n", - "from didcomm.common.types import DID, VerificationMethodType, VerificationMaterial, VerificationMaterialFormat\n", - "from didcomm.did_doc.did_doc import DIDDoc, VerificationMethod, DIDCommService\n", - "from didcomm.did_doc.did_resolver import DIDResolver\n", - "from didcomm.message import Message, FromPrior\n", - "from didcomm.secrets.secrets_resolver_demo import SecretsResolverDemo\n", - "from didcomm.unpack import unpack, UnpackResult\n", - "from didcomm.common.resolvers import ResolversConfig\n", - "from didcomm.pack_encrypted import pack_encrypted, PackEncryptedConfig, PackEncryptedResult\n", - "from peerdid.core.did_doc_types import DIDCommServicePeerDID\n", - "from didcomm.secrets.secrets_util import generate_x25519_keys_as_jwk_dict, generate_ed25519_keys_as_jwk_dict, jwk_to_secret\n", - "from peerdid import peer_did\n", - "from peerdid.did_doc import DIDDocPeerDID\n", - "from peerdid.types import VerificationMaterialAuthentication, VerificationMethodTypeAuthentication, VerificationMaterialAgreement, VerificationMethodTypeAgreement, VerificationMaterialFormatPeerDID" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Helpers" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "secrets_resolver = SecretsResolverDemo()" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "class DIDResolverPeerDID(DIDResolver):\n", - " async def resolve(self, did: DID) -> DIDDoc:\n", - " did_doc_json = peer_did.resolve_peer_did(did, format = VerificationMaterialFormatPeerDID.JWK)\n", - " did_doc = DIDDocPeerDID.from_json(did_doc_json)\n", - "\n", - " return DIDDoc(\n", - " did=did_doc.did,\n", - " key_agreement_kids = did_doc.agreement_kids,\n", - " authentication_kids = did_doc.auth_kids,\n", - " verification_methods = [\n", - " VerificationMethod(\n", - " id = m.id,\n", - " type = VerificationMethodType.JSON_WEB_KEY_2020,\n", - " controller = m.controller,\n", - " verification_material = VerificationMaterial(\n", - " format = VerificationMaterialFormat.JWK,\n", - " value = json.dumps(m.ver_material.value)\n", - " )\n", - " )\n", - " for m in did_doc.authentication + did_doc.key_agreement\n", - " ],\n", - " didcomm_services = [\n", - " DIDCommService(\n", - " id = s.id,\n", - " service_endpoint = s.service_endpoint,\n", - " routing_keys = s.routing_keys,\n", - " accept = s.accept\n", - " )\n", - " for s in did_doc.service\n", - " if isinstance(s, DIDCommServicePeerDID)\n", - " ] if did_doc.service else []\n", - " )" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [], - "source": [ - "async def create_peer_did(self,\n", - " auth_keys_count: int = 1,\n", - " agreement_keys_count: int = 1,\n", - " service_endpoint: Optional[str] = None,\n", - " service_routing_keys: Optional[List[str]] = None\n", - " ) -> str:\n", - " # 1. generate keys in JWK format\n", - " agreem_keys = [generate_x25519_keys_as_jwk_dict() for _ in range(agreement_keys_count)]\n", - " auth_keys = [generate_ed25519_keys_as_jwk_dict() for _ in range(auth_keys_count)]\n", - "\n", - " # 2. prepare the keys for peer DID lib\n", - " agreem_keys_peer_did = [\n", - " VerificationMaterialAgreement(\n", - " type=VerificationMethodTypeAgreement.JSON_WEB_KEY_2020,\n", - " format=VerificationMaterialFormatPeerDID.JWK,\n", - " value=k[1],\n", - " )\n", - " for k in agreem_keys\n", - " ]\n", - " auth_keys_peer_did = [\n", - " VerificationMaterialAuthentication(\n", - " type=VerificationMethodTypeAuthentication.JSON_WEB_KEY_2020,\n", - " format=VerificationMaterialFormatPeerDID.JWK,\n", - " value=k[1],\n", - " )\n", - " for k in auth_keys\n", - " ]\n", - "\n", - " # 3. generate service\n", - " service = None\n", - " if service_endpoint:\n", - " service = json.dumps(\n", - " DIDCommServicePeerDID(\n", - " id=\"new-id\",\n", - " service_endpoint=service_endpoint, routing_keys=service_routing_keys,\n", - " accept=[\"didcomm/v2\"]\n", - " ).to_dict()\n", - " )\n", - "\n", - " # 4. call peer DID lib\n", - " # if we have just one key (auth), then use numalg0 algorithm\n", - " # otherwise use numalg2 algorithm\n", - " if len(auth_keys_peer_did) == 1 and not agreem_keys_peer_did and not service:\n", - " did = peer_did.create_peer_did_numalgo_0(auth_keys_peer_did[0])\n", - " else:\n", - " did = peer_did.create_peer_did_numalgo_2(\n", - " encryption_keys=agreem_keys_peer_did,\n", - " signing_keys=auth_keys_peer_did,\n", - " service=service,\n", - " )\n", - "\n", - " # 5. set KIDs as in DID DOC for secrets and store the secret in the secrets resolver\n", - " did_doc = DIDDocPeerDID.from_json(peer_did.resolve_peer_did(did))\n", - " for auth_key, kid in zip(auth_keys, did_doc.auth_kids):\n", - " private_key = auth_key[0]\n", - " private_key[\"kid\"] = kid\n", - " await secrets_resolver.add_key(jwk_to_secret(private_key))\n", - "\n", - " for agreem_key, kid in zip(agreem_keys, did_doc.agreement_kids):\n", - " private_key = agreem_key[0]\n", - " private_key[\"kid\"] = kid\n", - " await secrets_resolver.add_key(jwk_to_secret(private_key))\n", - "\n", - " return did\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Receiving the OOB message" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "metadata": {}, - "outputs": [], - "source": [ - "oob_url = requests.get(\"http://rootsid-mediator:8000/oob_url\").text\n", - "#oob_url = requests.get(\"https://mediator.rootsid.cloud/oob_url\").text\n", - "#oob_url = requests.get(\"http://127.0.0.1:8000/oob_url\").text\n", - "received_msg_encoded = oob_url.split(\"=\")[1]\n", - "received_msg_decoded = json.loads(str(base64.urlsafe_b64decode(received_msg_encoded + \"==\"), \"utf-8\"))\n", - "\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Preparing message" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [], - "source": [ - "bob_did = await create_peer_did(1,1, service_endpoint=\"https://www.example.com/bob\")" - ] - }, - { - "cell_type": "code", - "execution_count": 25, - "metadata": {}, - "outputs": [], - "source": [ - "# bob_response_message = Message(\n", - "# body = { \"response_requested\": True },\n", - "# custom_headers = [{\"return_route\": \"all\"}],\n", - "# id = str(uuid.uuid4()),\n", - "# #pthid = received_msg_decoded[\"id\"],\n", - "# type = \"https://didcomm.org/trust-ping/2.0/ping\",\n", - "# frm = bob_did,\n", - "# to = [received_msg_decoded[\"from\"]]\n", - "# )\n", - "# bob_response_message = Message(\n", - "# custom_headers = [{\n", - "# \"return_route\": \"all\",\n", - "# \"created_time\": int(datetime.datetime.now().timestamp()) \n", - "# }],\n", - "# id = str(uuid.uuid4()),\n", - "# #pthid = received_msg_decoded[\"id\"],\n", - "# type = \"https://didcomm.org/basicmessage/2.0/message\",\n", - "# frm = bob_did,\n", - "# to = [received_msg_decoded[\"from\"]],\n", - "# body = {\"content\": \"Who won the soccer world cup in 1986?\"}\n", - "# )\n", - "# bob_response_message = Message(\n", - "# custom_headers = [{\"return_route\": \"all\"}],\n", - "# id = str(uuid.uuid4()),\n", - "# #pthid = received_msg_decoded[\"id\"],\n", - "# type = \"https://didcomm.org/coordinate-mediation/2.0/keylist-query\",\n", - "# body = {}\n", - "# )\n", - "# bob_response_message = Message(\n", - "# custom_headers = [{\"return_route\": \"all\"}],\n", - "# id = str(uuid.uuid4()),\n", - "# #pthid = received_msg_decoded[\"id\"],\n", - "# type = \"https://didcomm.org/coordinate-mediation/2.0/keylist-update\",\n", - "# body = {\n", - "# \"updates\": [\n", - "# {\n", - "# \"recipient_key\": \"did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH2\",\n", - "# \"action\": \"remove\"\n", - "# }\n", - "# ]\n", - " \n", - "# }\n", - "# )\n", - "# bob_response_message = Message(\n", - "# custom_headers = [{\n", - "# \"return_route\": \"all\"}],\n", - "# id = str(uuid.uuid4()),\n", - "# #pthid = received_msg_decoded[\"id\"],\n", - "# type = \"https://didcomm.org/discover-features/2.0/queries\",\n", - "# frm = bob_did,\n", - "# to = [received_msg_decoded[\"from\"]],\n", - "# body = {\n", - "# \"queries\": [\n", - "# { \"feature-type\": \"protocol\", \"match\": \"https://didcomm.org/basicmessage/2.*\" }\n", - "# ]\n", - "# }\n", - "# )\n", - "bob_response_message = Message(\n", - " custom_headers = [{\n", - " \"return_route\": \"all\"}],\n", - " id = str(uuid.uuid4()),\n", - " #pthid = received_msg_decoded[\"id\"],\n", - " type = \"https://didcomm.org/shorten-url/1.0/request-shortened-url\",\n", - " frm = bob_did,\n", - " to = [received_msg_decoded[\"from\"]],\n", - " body = {\n", - " \"url\": \"https://my.example.com/superlongurl\",\n", - " \"requested_validity_seconds\": 86400,\n", - " \"goal_code\": \"shorten.oobv2\",\n", - "# \"short_url_slug\": \"algo\"\n", - " }\n", - ")\n", - "# bob_response_message = Message(\n", - "# custom_headers = [{\n", - "# \"return_route\": \"all\"}],\n", - "# id = str(uuid.uuid4()),\n", - "# #pthid = received_msg_decoded[\"id\"],\n", - "# type = \"https://didcomm.org/shorten-url/1.0/invalidate-shortened-url\",\n", - "# frm = bob_did,\n", - "# to = [received_msg_decoded[\"from\"]],\n", - "# body = {\n", - "# \"shortened_url\": \"http://127.0.0.1:8000/qr?_oobid=eaf4166322d04ddba2829f0807b6a7cf\",\n", - "# }\n", - "# )\n" - ] - }, - { - "cell_type": "code", - "execution_count": 26, - "metadata": {}, - "outputs": [], - "source": [ - "bob_packed_msg = await pack_encrypted(\n", - " resolvers_config = ResolversConfig(\n", - " secrets_resolver = secrets_resolver,\n", - " did_resolver = DIDResolverPeerDID()\n", - " ),\n", - " message = bob_response_message,\n", - " frm = bob_did,\n", - " to = received_msg_decoded[\"from\"],\n", - " sign_frm = None,\n", - " pack_config = PackEncryptedConfig(protect_sender_id=False)\n", - ")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Sending the message to Mediator" - ] - }, - { - "cell_type": "code", - "execution_count": 27, - "metadata": {}, - "outputs": [], - "source": [ - "alice_did_doc = json.loads(peer_did.resolve_peer_did(received_msg_decoded[\"from\"]))\n", - "alice_endpoint = alice_did_doc[\"service\"][0][\"serviceEndpoint\"]\n", - "headers = {\"Content-Type\": \"application/didcomm-encrypted+json\"}\n", - "resp = requests.post(alice_endpoint, headers=headers, data = bob_packed_msg.packed_msg)\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Decoding response\n" - ] - }, - { - "cell_type": "code", - "execution_count": 28, - "metadata": {}, - "outputs": [], - "source": [ - "bob_unpack_msg = await unpack(\n", - " resolvers_config=ResolversConfig(\n", - " secrets_resolver=secrets_resolver,\n", - " did_resolver=DIDResolverPeerDID()\n", - " ),\n", - " packed_msg= resp.json()\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": 29, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "UnpackResult(message=Message(id='f7c12a75-692d-4ebf-8acb-8fc48643ccdd', type='https://didcomm.org/shorten-url/1.0/shortened-url', body={'shortened_url': 'http://rootsid-mediator:8000/qr?_oobid=d74c9499dbb641fdb1a68127db13a104', 'expires_time': 1663691324}, frm=None, to=None, created_time=None, expires_time=None, from_prior=FromPrior(iss='did:peer:2.Ez6LSfuYoeE8ArorRnVEHG6g1TUb9Y66KfG35WXrgDnrfXkdV.Vz6MkvZVZwK9RTknM8D7BJ3D7iZau3AHYJWC6kUKqkodKhmWX.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOiJodHRwOi8vcm9vdHNpZC1tZWRpYXRvcjo4MDAwIiwiYSI6WyJkaWRjb21tL3YyIl19', sub='did:peer:2.Ez6LSbqVNNhbMNXdtL7ez2niXipSj62mDLVeU8MEFTVsPvKNZ.Vz6MkrjCuG265wE87Czr91xx6eReNbcRs4WAxjwKsCiZksYrh.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOiJodHRwOi8vcm9vdHNpZC1tZWRpYXRvcjo4MDAwIiwiYSI6WyJkaWRjb21tL3YyIl19', aud=None, exp=None, nbf=None, iat=None, jti=None), please_ack=None, ack=None, thid='1f76f358-c442-43ec-a681-5d062b2f1e87', pthid=None, attachments=None, custom_headers=None), metadata=Metadata(encrypted=True, authenticated=True, non_repudiation=False, anonymous_sender=False, re_wrapped_in_forward=False, encrypted_from='did:peer:2.Ez6LSbqVNNhbMNXdtL7ez2niXipSj62mDLVeU8MEFTVsPvKNZ.Vz6MkrjCuG265wE87Czr91xx6eReNbcRs4WAxjwKsCiZksYrh.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOiJodHRwOi8vcm9vdHNpZC1tZWRpYXRvcjo4MDAwIiwiYSI6WyJkaWRjb21tL3YyIl19#6LSbqVNNhbMNXdtL7ez2niXipSj62mDLVeU8MEFTVsPvKNZ', encrypted_to=['did:peer:2.Ez6LSoa8yc91UCZ7joALgHiWDCnCHjywHVVtzPFvXuUTkiaaz.Vz6MkhcYw1on97mu1Z38pkndRMUMQnGzijYuv1H3ymxxNG6az.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOiJodHRwczovL3d3dy5leGFtcGxlLmNvbS9ib2IiLCJhIjpbImRpZGNvbW0vdjIiXX0#6LSoa8yc91UCZ7joALgHiWDCnCHjywHVVtzPFvXuUTkiaaz'], sign_from=None, from_prior_issuer_kid='did:peer:2.Ez6LSfuYoeE8ArorRnVEHG6g1TUb9Y66KfG35WXrgDnrfXkdV.Vz6MkvZVZwK9RTknM8D7BJ3D7iZau3AHYJWC6kUKqkodKhmWX.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOiJodHRwOi8vcm9vdHNpZC1tZWRpYXRvcjo4MDAwIiwiYSI6WyJkaWRjb21tL3YyIl19#6MkvZVZwK9RTknM8D7BJ3D7iZau3AHYJWC6kUKqkodKhmWX', enc_alg_auth=, enc_alg_anon=None, sign_alg=None, signed_message=None, from_prior_jwt='eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCIsImtpZCI6ImRpZDpwZWVyOjIuRXo2TFNmdVlvZUU4QXJvclJuVkVIRzZnMVRVYjlZNjZLZkczNVdYcmdEbnJmWGtkVi5WejZNa3ZaVlp3SzlSVGtuTThEN0JKM0Q3aVphdTNBSFlKV0M2a1VLcWtvZEtobVdYLlNleUpwWkNJNkltNWxkeTFwWkNJc0luUWlPaUprYlNJc0luTWlPaUpvZEhSd09pOHZjbTl2ZEhOcFpDMXRaV1JwWVhSdmNqbzRNREF3SWl3aVlTSTZXeUprYVdSamIyMXRMM1l5SWwxOSM2TWt2WlZad0s5UlRrbk04RDdCSjNEN2laYXUzQUhZSldDNmtVS3Frb2RLaG1XWCJ9.eyJpc3MiOiJkaWQ6cGVlcjoyLkV6NkxTZnVZb2VFOEFyb3JSblZFSEc2ZzFUVWI5WTY2S2ZHMzVXWHJnRG5yZlhrZFYuVno2TWt2WlZad0s5UlRrbk04RDdCSjNEN2laYXUzQUhZSldDNmtVS3Frb2RLaG1XWC5TZXlKcFpDSTZJbTVsZHkxcFpDSXNJblFpT2lKa2JTSXNJbk1pT2lKb2RIUndPaTh2Y205dmRITnBaQzF0WldScFlYUnZjam80TURBd0lpd2lZU0k2V3lKa2FXUmpiMjF0TDNZeUlsMTkiLCJzdWIiOiJkaWQ6cGVlcjoyLkV6NkxTYnFWTk5oYk1OWGR0TDdlejJuaVhpcFNqNjJtRExWZVU4TUVGVFZzUHZLTlouVno2TWtyakN1RzI2NXdFODdDenI5MXh4NmVSZU5iY1JzNFdBeGp3S3NDaVprc1lyaC5TZXlKcFpDSTZJbTVsZHkxcFpDSXNJblFpT2lKa2JTSXNJbk1pT2lKb2RIUndPaTh2Y205dmRITnBaQzF0WldScFlYUnZjam80TURBd0lpd2lZU0k2V3lKa2FXUmpiMjF0TDNZeUlsMTkifQ.dJc_Vb81O17RxR5jnaoZUF3q6L06ilvEZij_8fA8jImjnxYaX-d_I6KF6uZq6eP0xc79MTLUZg05E2P4-UlhAg'))\n" - ] - } - ], - "source": [ - "print(bob_unpack_msg)" - ] - }, - { - "cell_type": "code", - "execution_count": 30, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Message(id='f7c12a75-692d-4ebf-8acb-8fc48643ccdd', type='https://didcomm.org/shorten-url/1.0/shortened-url', body={'shortened_url': 'http://rootsid-mediator:8000/qr?_oobid=d74c9499dbb641fdb1a68127db13a104', 'expires_time': 1663691324}, frm=None, to=None, created_time=None, expires_time=None, from_prior=FromPrior(iss='did:peer:2.Ez6LSfuYoeE8ArorRnVEHG6g1TUb9Y66KfG35WXrgDnrfXkdV.Vz6MkvZVZwK9RTknM8D7BJ3D7iZau3AHYJWC6kUKqkodKhmWX.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOiJodHRwOi8vcm9vdHNpZC1tZWRpYXRvcjo4MDAwIiwiYSI6WyJkaWRjb21tL3YyIl19', sub='did:peer:2.Ez6LSbqVNNhbMNXdtL7ez2niXipSj62mDLVeU8MEFTVsPvKNZ.Vz6MkrjCuG265wE87Czr91xx6eReNbcRs4WAxjwKsCiZksYrh.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOiJodHRwOi8vcm9vdHNpZC1tZWRpYXRvcjo4MDAwIiwiYSI6WyJkaWRjb21tL3YyIl19', aud=None, exp=None, nbf=None, iat=None, jti=None), please_ack=None, ack=None, thid='1f76f358-c442-43ec-a681-5d062b2f1e87', pthid=None, attachments=None, custom_headers=None)\n" - ] - } - ], - "source": [ - "print(bob_unpack_msg.message)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "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.10.6" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/mercury/mercury-library/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/CredentialFilterFormat.scala b/mercury/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/CredentialFilterFormat.scala similarity index 78% rename from mercury/mercury-library/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/CredentialFilterFormat.scala rename to mercury/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/CredentialFilterFormat.scala index 4a8f415ad0..e7c0296801 100644 --- a/mercury/mercury-library/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/CredentialFilterFormat.scala +++ b/mercury/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/CredentialFilterFormat.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.mercury.vc.anoncreds +package org.hyperledger.identus.vc.anoncreds -import io.iohk.atala.mercury.protocol.issuecredential.IssueCredentialProposeFormat +import org.hyperledger.identus.mercury.protocol.issuecredential.IssueCredentialProposeFormat /** @see * https://github.com/hyperledger/aries-rfcs/blob/main/features/0771-anoncreds-attachments/README.md#credential-filter-format diff --git a/mercury/mercury-library/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/CredentialFormat.scala b/mercury/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/CredentialFormat.scala similarity index 81% rename from mercury/mercury-library/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/CredentialFormat.scala rename to mercury/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/CredentialFormat.scala index 2f44f70f1f..04f00f68ae 100644 --- a/mercury/mercury-library/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/CredentialFormat.scala +++ b/mercury/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/CredentialFormat.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.mercury.vc.anoncreds +package org.hyperledger.identus.vc.anoncreds -import io.iohk.atala.mercury.protocol.issuecredential.IssueCredentialIssuedFormat +import org.hyperledger.identus.mercury.protocol.issuecredential.IssueCredentialIssuedFormat /** @see * https://github.com/hyperledger/aries-rfcs/blob/main/features/0771-anoncreds-attachments/README.md#credential-format diff --git a/mercury/mercury-library/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/CredentialOfferFormat.scala b/mercury/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/CredentialOfferFormat.scala similarity index 85% rename from mercury/mercury-library/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/CredentialOfferFormat.scala rename to mercury/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/CredentialOfferFormat.scala index 823ec1a3ce..d77fd0f1f3 100644 --- a/mercury/mercury-library/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/CredentialOfferFormat.scala +++ b/mercury/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/CredentialOfferFormat.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.mercury.vc.anoncreds +package org.hyperledger.identus.vc.anoncreds -import io.iohk.atala.mercury.protocol.issuecredential.IssueCredentialOfferFormat +import org.hyperledger.identus.mercury.protocol.issuecredential.IssueCredentialOfferFormat /** @see * https://github.com/hyperledger/aries-rfcs/blob/main/features/0771-anoncreds-attachments/README.md#credential-offer-format diff --git a/mercury/mercury-library/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/CredentialRequestFormat.scala b/mercury/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/CredentialRequestFormat.scala similarity index 77% rename from mercury/mercury-library/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/CredentialRequestFormat.scala rename to mercury/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/CredentialRequestFormat.scala index 9cb886b32e..4f849234b7 100644 --- a/mercury/mercury-library/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/CredentialRequestFormat.scala +++ b/mercury/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/CredentialRequestFormat.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.mercury.vc.anoncreds +package org.hyperledger.identus.vc.anoncreds -import io.iohk.atala.mercury.protocol.issuecredential.IssueCredentialRequestFormat +import org.hyperledger.identus.mercury.protocol.issuecredential.IssueCredentialRequestFormat /** https://github.com/hyperledger/aries-rfcs/blob/main/features/0771-anoncreds-attachments/README.md#credential-request-format */ diff --git a/mercury/mercury-library/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/ProofFormat.scala b/mercury/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/ProofFormat.scala similarity index 80% rename from mercury/mercury-library/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/ProofFormat.scala rename to mercury/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/ProofFormat.scala index 2d1d7d5246..802f388f35 100644 --- a/mercury/mercury-library/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/ProofFormat.scala +++ b/mercury/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/ProofFormat.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.mercury.vc.anoncreds +package org.hyperledger.identus.vc.anoncreds -import io.iohk.atala.mercury.protocol.issuecredential.IssueCredentialRequestFormat +import org.hyperledger.identus.mercury.protocol.issuecredential.IssueCredentialRequestFormat type TODO = Any diff --git a/mercury/mercury-library/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/ProofRequestFormat.scala b/mercury/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/ProofRequestFormat.scala similarity index 88% rename from mercury/mercury-library/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/ProofRequestFormat.scala rename to mercury/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/ProofRequestFormat.scala index 51c3c636cc..f379214e37 100644 --- a/mercury/mercury-library/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/ProofRequestFormat.scala +++ b/mercury/vc/src/main/scala/io/iohk/atala/mercury/vc/anoncreds/ProofRequestFormat.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.mercury.vc.anoncreds +package org.hyperledger.identus.vc.anoncreds -import io.iohk.atala.mercury.protocol.presentproof.PresentCredentialRequestFormat +import org.hyperledger.identus.mercury.protocol.presentproof.PresentCredentialRequestFormat /** @see * https://github.com/hyperledger/aries-rfcs/blob/main/features/0771-anoncreds-attachments/README.md#proof-request-format diff --git a/mercury/mercury-library/vc/src/main/scala/io/iohk/atala/mercury/vc/jwt/ProposeCredential.scala b/mercury/vc/src/main/scala/io/iohk/atala/mercury/vc/dif/ProposeCredential.scala similarity index 98% rename from mercury/mercury-library/vc/src/main/scala/io/iohk/atala/mercury/vc/jwt/ProposeCredential.scala rename to mercury/vc/src/main/scala/io/iohk/atala/mercury/vc/dif/ProposeCredential.scala index 01caa50161..0e832e405e 100644 --- a/mercury/mercury-library/vc/src/main/scala/io/iohk/atala/mercury/vc/jwt/ProposeCredential.scala +++ b/mercury/vc/src/main/scala/io/iohk/atala/mercury/vc/dif/ProposeCredential.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.mercury.vc.jwt +package org.hyperledger.identus.vc.dif type DID = String diff --git a/mercury/mercury-library/vc/src/main/scala/io/iohk/atala/mercury/vc/dif/ProposeCredential.scala b/mercury/vc/src/main/scala/io/iohk/atala/mercury/vc/jwt/ProposeCredential.scala similarity index 98% rename from mercury/mercury-library/vc/src/main/scala/io/iohk/atala/mercury/vc/dif/ProposeCredential.scala rename to mercury/vc/src/main/scala/io/iohk/atala/mercury/vc/jwt/ProposeCredential.scala index df53ca6dc1..27996720b3 100644 --- a/mercury/mercury-library/vc/src/main/scala/io/iohk/atala/mercury/vc/dif/ProposeCredential.scala +++ b/mercury/vc/src/main/scala/io/iohk/atala/mercury/vc/jwt/ProposeCredential.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.mercury.vc.dif +package org.hyperledger.identus.vc.jwt type DID = String diff --git a/package.json b/package.json index b3d7ac8d33..63e3ebe4cb 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "atala-prism-building-blocks", + "name": "identus-cloud-agent", "version": "1.31.0", "engines": { "node": ">=16.13.0" @@ -28,7 +28,7 @@ "prerelease": "snapshot" } ], - "tagFormat": "prism-agent-v${version}", + "tagFormat": "cloud-agent-v${version}", "plugins": [ "@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator", @@ -41,7 +41,7 @@ [ "@semantic-release/exec", { - "prepareCmd": "sed -i.bak \"s/PRISM_AGENT_VERSION=.*/PRISM_AGENT_VERSION=${nextRelease.version}/\" ./infrastructure/local/.env && rm -f ./infrastructure/local/.env.bak" + "prepareCmd": "sed -i.bak \"s/AGENT_VERSION=.*/AGENT_VERSION=${nextRelease.version}/\" ./infrastructure/local/.env && rm -f ./infrastructure/local/.env.bak" } ], [ @@ -53,7 +53,7 @@ [ "@semantic-release/exec", { - "prepareCmd": "sbt \"prismAgentServer/test:runMain io.iohk.atala.api.util.Tapir2StaticOAS ${process.env.PWD}/prism-agent/service/api/http/prism-agent-openapi-spec.yaml ${nextRelease.version}\"" + "prepareCmd": "sbt \"prismAgentServer/test:runMain org.hyperledger.identus.api.util.Tapir2StaticOAS ${process.env.PWD}/cloud-agent/service/api/http/cloud-agent-openapi-spec.yaml ${nextRelease.version}\"" } ], [ @@ -89,7 +89,7 @@ [ "@semantic-release/exec", { - "prepareCmd": "docker buildx build --platform=linux/arm64,linux/amd64 --push -t ghcr.io/hyperledger/identus-cloud-agent:${nextRelease.version} ./prism-agent/service/server/target/docker/stage" + "prepareCmd": "docker buildx build --platform=linux/arm64,linux/amd64 --push -t ghcr.io/hyperledger/identus-cloud-agent:${nextRelease.version} ./cloud-agent/service/server/target/docker/stage" } ], [ @@ -107,13 +107,13 @@ "DEPENDENCIES.md", "package.json", "package-lock.json", - "prism-agent/service/api/http/prism-agent-openapi-spec.yaml", + "cloud-agent/service/api/http/cloud-agent-openapi-spec.yaml", "infrastructure/charts/agent/Chart.yaml", "infrastructure/charts/index.yaml", "infrastructure/charts/*.tgz", "infrastructure/local/.env" ], - "message": "chore(release): cut open enterprise agent ${nextRelease.version} release\n\n${nextRelease.notes}\n\nSigned-off-by: Allain Magyar " + "message": "chore(release): cut Identus Cloud agent ${nextRelease.version} release\n\n${nextRelease.notes}\n\nSigned-off-by: Allain Magyar " } ], [ @@ -123,7 +123,7 @@ "notifyOnFail": true, "markdownReleaseNotes": true, "onSuccessTemplate": { - "text": "A new version of Opent Enterprise Agent successfully released!\nVersion: `$npm_package_version`\nTag: $repo_url/releases/tag/$npm_package_version\n\nRelease notes:\n$release_notes" + "text": "A new version of Identus Cloud Agent successfully released!\nVersion: `$npm_package_version`\nTag: $repo_url/releases/tag/$npm_package_version\n\nRelease notes:\n$release_notes" } } ] diff --git a/pollux/lib/CHANGELOG.md b/pollux/CHANGELOG.md similarity index 100% rename from pollux/lib/CHANGELOG.md rename to pollux/CHANGELOG.md diff --git a/pollux/lib/README.md b/pollux/README.md similarity index 100% rename from pollux/lib/README.md rename to pollux/README.md diff --git a/pollux/lib/anoncreds/README_anoncreds.md b/pollux/anoncreds/README_anoncreds.md similarity index 100% rename from pollux/lib/anoncreds/README_anoncreds.md rename to pollux/anoncreds/README_anoncreds.md diff --git a/pollux/lib/anoncreds/anoncreds-jvm-1.0-SNAPSHOT.jar b/pollux/anoncreds/anoncreds-jvm-1.0-SNAPSHOT.jar similarity index 100% rename from pollux/lib/anoncreds/anoncreds-jvm-1.0-SNAPSHOT.jar rename to pollux/anoncreds/anoncreds-jvm-1.0-SNAPSHOT.jar diff --git a/pollux/lib/anoncreds/native-lib/NATIVE/darwin-aarch64/libuniffi_anoncreds_wrapper.dylib b/pollux/anoncreds/native-lib/NATIVE/darwin-aarch64/libuniffi_anoncreds_wrapper.dylib similarity index 100% rename from pollux/lib/anoncreds/native-lib/NATIVE/darwin-aarch64/libuniffi_anoncreds_wrapper.dylib rename to pollux/anoncreds/native-lib/NATIVE/darwin-aarch64/libuniffi_anoncreds_wrapper.dylib diff --git a/pollux/lib/anoncreds/native-lib/NATIVE/darwin-x86-64/libuniffi_anoncreds_wrapper.dylib b/pollux/anoncreds/native-lib/NATIVE/darwin-x86-64/libuniffi_anoncreds_wrapper.dylib similarity index 100% rename from pollux/lib/anoncreds/native-lib/NATIVE/darwin-x86-64/libuniffi_anoncreds_wrapper.dylib rename to pollux/anoncreds/native-lib/NATIVE/darwin-x86-64/libuniffi_anoncreds_wrapper.dylib diff --git a/pollux/lib/anoncreds/native-lib/NATIVE/linux-aarch64/libuniffi_anoncreds_wrapper.so b/pollux/anoncreds/native-lib/NATIVE/linux-aarch64/libuniffi_anoncreds_wrapper.so similarity index 100% rename from pollux/lib/anoncreds/native-lib/NATIVE/linux-aarch64/libuniffi_anoncreds_wrapper.so rename to pollux/anoncreds/native-lib/NATIVE/linux-aarch64/libuniffi_anoncreds_wrapper.so diff --git a/pollux/lib/anoncreds/native-lib/NATIVE/linux-x86-64/libuniffi_anoncreds_wrapper.so b/pollux/anoncreds/native-lib/NATIVE/linux-x86-64/libuniffi_anoncreds_wrapper.so similarity index 100% rename from pollux/lib/anoncreds/native-lib/NATIVE/linux-x86-64/libuniffi_anoncreds_wrapper.so rename to pollux/anoncreds/native-lib/NATIVE/linux-x86-64/libuniffi_anoncreds_wrapper.so diff --git a/pollux/lib/anoncreds/native-lib/helper_script_to_update.sh b/pollux/anoncreds/native-lib/helper_script_to_update.sh similarity index 100% rename from pollux/lib/anoncreds/native-lib/helper_script_to_update.sh rename to pollux/anoncreds/native-lib/helper_script_to_update.sh diff --git a/pollux/lib/anoncreds/src/main/scala/io/iohk/atala/pollux/anoncreds/AnoncredLib.scala b/pollux/anoncreds/src/main/scala/org/hyperledger/identus/pollux/anoncreds/AnoncredLib.scala similarity index 99% rename from pollux/lib/anoncreds/src/main/scala/io/iohk/atala/pollux/anoncreds/AnoncredLib.scala rename to pollux/anoncreds/src/main/scala/org/hyperledger/identus/pollux/anoncreds/AnoncredLib.scala index 5d6b3c7cf4..28ce3726b9 100644 --- a/pollux/lib/anoncreds/src/main/scala/io/iohk/atala/pollux/anoncreds/AnoncredLib.scala +++ b/pollux/anoncreds/src/main/scala/org/hyperledger/identus/pollux/anoncreds/AnoncredLib.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.anoncreds +package org.hyperledger.identus.pollux.anoncreds import scala.jdk.CollectionConverters.* import scala.language.implicitConversions diff --git a/pollux/lib/anoncreds/src/main/scala/io/iohk/atala/pollux/anoncreds/Models.scala b/pollux/anoncreds/src/main/scala/org/hyperledger/identus/pollux/anoncreds/Models.scala similarity index 99% rename from pollux/lib/anoncreds/src/main/scala/io/iohk/atala/pollux/anoncreds/Models.scala rename to pollux/anoncreds/src/main/scala/org/hyperledger/identus/pollux/anoncreds/Models.scala index 38f9d4014e..180aa19949 100644 --- a/pollux/lib/anoncreds/src/main/scala/io/iohk/atala/pollux/anoncreds/Models.scala +++ b/pollux/anoncreds/src/main/scala/org/hyperledger/identus/pollux/anoncreds/Models.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.anoncreds +package org.hyperledger.identus.pollux.anoncreds import uniffi.anoncreds_wrapper.{ Nonce, diff --git a/pollux/lib/anoncredsTest/src/test/scala/Uniffy.scala b/pollux/anoncredsTest/src/test/scala/Uniffy.scala similarity index 100% rename from pollux/lib/anoncredsTest/src/test/scala/Uniffy.scala rename to pollux/anoncredsTest/src/test/scala/Uniffy.scala diff --git a/pollux/lib/anoncredsTest/src/test/scala/io/iohk/atala/pollux/anoncreds/PoCNewLib.scala b/pollux/anoncredsTest/src/test/scala/org/hyperledger/identus/pollux/anoncreds/PoCNewLib.scala similarity index 94% rename from pollux/lib/anoncredsTest/src/test/scala/io/iohk/atala/pollux/anoncreds/PoCNewLib.scala rename to pollux/anoncredsTest/src/test/scala/org/hyperledger/identus/pollux/anoncreds/PoCNewLib.scala index fd75b61a4b..6c74014750 100644 --- a/pollux/lib/anoncredsTest/src/test/scala/io/iohk/atala/pollux/anoncreds/PoCNewLib.scala +++ b/pollux/anoncredsTest/src/test/scala/org/hyperledger/identus/pollux/anoncreds/PoCNewLib.scala @@ -1,10 +1,17 @@ -package io.iohk.atala.pollux.anoncreds +package org.hyperledger.identus.pollux.anoncreds import org.scalatest.flatspec.AnyFlatSpec import scala.jdk.CollectionConverters.* +import org.hyperledger.identus.pollux.anoncreds.{ + AnoncredLinkSecretWithId, + AnoncredLinkSecret, + AnoncredPresentationRequest, + AnoncredLib, + AnoncredCredentialRequests +} -/** polluxAnoncredsTest/Test/testOnly io.iohk.atala.pollux.anoncreds.PoCNewLib +/** polluxAnoncredsTest/Test/testOnly org.hyperledger.identus.pollux.anoncreds.PoCNewLib */ class PoCNewLib extends AnyFlatSpec { diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/CredentialFormat.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/CredentialFormat.scala similarity index 86% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/CredentialFormat.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/CredentialFormat.scala index 0208a9f848..94bf99ca62 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/CredentialFormat.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/CredentialFormat.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.core.model +package org.hyperledger.identus.pollux.core.model enum CredentialFormat: case JWT extends CredentialFormat diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/CredentialOfferAttachment.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/CredentialOfferAttachment.scala similarity index 68% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/CredentialOfferAttachment.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/CredentialOfferAttachment.scala index 7a5d89faaf..101d528b8e 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/CredentialOfferAttachment.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/CredentialOfferAttachment.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.pollux.core.model +package org.hyperledger.identus.pollux.core.model import io.circe._ import io.circe.generic.semiauto._ -import io.iohk.atala.pollux.core.model.presentation.{Options, PresentationDefinition} +import org.hyperledger.identus.pollux.core.model.presentation.{Options, PresentationDefinition} final case class CredentialOfferAttachment(options: Options, presentation_definition: PresentationDefinition) diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/CredentialStatusList.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/CredentialStatusList.scala similarity index 83% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/CredentialStatusList.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/CredentialStatusList.scala index c59e02533e..748d6f0512 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/CredentialStatusList.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/CredentialStatusList.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.pollux.core.model +package org.hyperledger.identus.pollux.core.model -import io.iohk.atala.castor.core.model.did.CanonicalPrismDID -import io.iohk.atala.pollux.vc.jwt.StatusPurpose -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.castor.core.model.did.CanonicalPrismDID +import org.hyperledger.identus.pollux.vc.jwt.StatusPurpose +import org.hyperledger.identus.shared.models.WalletId import java.time.Instant import java.util.UUID diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/DidCommID.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/DidCommID.scala similarity index 83% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/DidCommID.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/DidCommID.scala index fdab0c041e..47fcced892 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/DidCommID.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/DidCommID.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.core.model +package org.hyperledger.identus.pollux.core.model import java.util.UUID diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/IssueCredentialRecord.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/IssueCredentialRecord.scala similarity index 93% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/IssueCredentialRecord.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/IssueCredentialRecord.scala index c803f3421f..f9c6d1b5ad 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/IssueCredentialRecord.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/IssueCredentialRecord.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.pollux.core.model +package org.hyperledger.identus.pollux.core.model -import io.iohk.atala.castor.core.model.did.CanonicalPrismDID -import io.iohk.atala.mercury.protocol.issuecredential.{ +import org.hyperledger.identus.castor.core.model.did.CanonicalPrismDID +import org.hyperledger.identus.mercury.protocol.issuecredential.{ IssueCredential, IssueCredentialIssuedFormat, IssueCredentialOfferFormat, @@ -9,8 +9,8 @@ import io.iohk.atala.mercury.protocol.issuecredential.{ OfferCredential, RequestCredential } -import io.iohk.atala.pollux.anoncreds.AnoncredCredentialRequestMetadata -import io.iohk.atala.pollux.core.model.IssueCredentialRecord.* +import org.hyperledger.identus.pollux.anoncreds.AnoncredCredentialRequestMetadata +import org.hyperledger.identus.pollux.core.model.IssueCredentialRecord.* import java.time.Instant import java.time.temporal.ChronoUnit diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/PresentationRecord.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/PresentationRecord.scala similarity index 94% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/PresentationRecord.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/PresentationRecord.scala index 7d0c5f2ef9..874c46348d 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/PresentationRecord.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/PresentationRecord.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.pollux.core.model +package org.hyperledger.identus.pollux.core.model -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.mercury.protocol.presentproof.{Presentation, ProposePresentation, RequestPresentation} +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.mercury.protocol.presentproof.{Presentation, ProposePresentation, RequestPresentation} import java.time.Instant import java.time.temporal.ChronoUnit diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/VerificationPolicy.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/VerificationPolicy.scala similarity index 95% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/VerificationPolicy.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/VerificationPolicy.scala index fa4bf4693b..8b93e8140e 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/VerificationPolicy.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/VerificationPolicy.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.core.model +package org.hyperledger.identus.pollux.core.model import zio.{Clock, Random} diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/error/CredentialRepositoryError.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/error/CredentialRepositoryError.scala similarity index 94% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/error/CredentialRepositoryError.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/error/CredentialRepositoryError.scala index 7d74c40b8a..4d83cdef1e 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/error/CredentialRepositoryError.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/error/CredentialRepositoryError.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.core.model.error +package org.hyperledger.identus.pollux.core.model.error sealed trait CredentialRepositoryError extends Throwable diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/error/CredentialSchemaError.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/error/CredentialSchemaError.scala similarity index 80% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/error/CredentialSchemaError.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/error/CredentialSchemaError.scala index ac7cd1f1bf..e536fafac6 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/error/CredentialSchemaError.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/error/CredentialSchemaError.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.pollux.core.model.error +package org.hyperledger.identus.pollux.core.model.error -import io.iohk.atala.pollux.core.model.schema.validator.JsonSchemaError +import org.hyperledger.identus.pollux.core.model.schema.validator.JsonSchemaError sealed trait CredentialSchemaError { def message: String diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/error/CredentialServiceError.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/error/CredentialServiceError.scala similarity index 92% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/error/CredentialServiceError.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/error/CredentialServiceError.scala index 0087db326b..567b3d96db 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/error/CredentialServiceError.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/error/CredentialServiceError.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.pollux.core.model.error +package org.hyperledger.identus.pollux.core.model.error -import io.iohk.atala.pollux.core.model.DidCommID -import io.iohk.atala.pollux.vc.jwt.W3cCredentialPayload +import org.hyperledger.identus.pollux.core.model.DidCommID +import org.hyperledger.identus.pollux.vc.jwt.W3cCredentialPayload import java.util.UUID @@ -49,7 +49,7 @@ object CredentialServiceError { final case class CreateCredentialPayloadFromRecordError(cause: Throwable) extends CredentialServiceError final case class CredentialRequestValidationError(error: String) extends CredentialServiceError final case class CredentialIdNotDefined(credential: W3cCredentialPayload) extends CredentialServiceError - final case class CredentialSchemaError(cause: io.iohk.atala.pollux.core.model.error.CredentialSchemaError) + final case class CredentialSchemaError(cause: org.hyperledger.identus.pollux.core.model.error.CredentialSchemaError) extends CredentialServiceError final case class UnsupportedVCClaimsValue(error: String) extends CredentialServiceError final case class UnsupportedVCClaimsMediaType(media_type: String) extends CredentialServiceError diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/error/CredentialStatusListServiceError.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/error/CredentialStatusListServiceError.scala similarity index 89% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/error/CredentialStatusListServiceError.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/error/CredentialStatusListServiceError.scala index d0ffc298b9..acc655ff89 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/error/CredentialStatusListServiceError.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/error/CredentialStatusListServiceError.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.pollux.core.model.error +package org.hyperledger.identus.pollux.core.model.error -import io.iohk.atala.pollux.core.model.DidCommID +import org.hyperledger.identus.pollux.core.model.DidCommID import java.util.UUID diff --git a/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/error/LinkSecretError.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/error/LinkSecretError.scala new file mode 100644 index 0000000000..f3974e92c3 --- /dev/null +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/error/LinkSecretError.scala @@ -0,0 +1,3 @@ +package org.hyperledger.identus.pollux.core.model.error + +final case class LinkSecretError(cause: Throwable) diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/error/PresentationError.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/error/PresentationError.scala similarity index 93% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/error/PresentationError.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/error/PresentationError.scala index 257116b21e..3957089e68 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/error/PresentationError.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/error/PresentationError.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.pollux.core.model.error +package org.hyperledger.identus.pollux.core.model.error -import io.iohk.atala.pollux.core.model.DidCommID +import org.hyperledger.identus.pollux.core.model.DidCommID sealed trait PresentationError diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/error/VerificationPolicyError.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/error/VerificationPolicyError.scala similarity index 85% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/error/VerificationPolicyError.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/error/VerificationPolicyError.scala index 295fdc606a..4eceb217e8 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/error/VerificationPolicyError.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/error/VerificationPolicyError.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.core.model.error +package org.hyperledger.identus.pollux.core.model.error import java.util.UUID diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/presentation/PresentationAttachment.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/presentation/PresentationAttachment.scala similarity index 97% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/presentation/PresentationAttachment.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/presentation/PresentationAttachment.scala index dd21733d6f..1086a6f15a 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/presentation/PresentationAttachment.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/presentation/PresentationAttachment.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.core.model.presentation +package org.hyperledger.identus.pollux.core.model.presentation import io.circe._ import io.circe.generic.semiauto._ diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/CredentialDefinition.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/CredentialDefinition.scala similarity index 95% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/CredentialDefinition.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/CredentialDefinition.scala index 98823ed3f5..4fa741851a 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/CredentialDefinition.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/CredentialDefinition.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.pollux.core.model.schema +package org.hyperledger.identus.pollux.core.model.schema -import io.iohk.atala.pollux.core.model.error.CredentialSchemaError -import io.iohk.atala.pollux.core.model.error.CredentialSchemaError.* +import org.hyperledger.identus.pollux.core.model.error.CredentialSchemaError +import org.hyperledger.identus.pollux.core.model.error.CredentialSchemaError.* import zio.* import zio.json.* diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/CredentialSchema.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/CredentialSchema.scala similarity index 92% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/CredentialSchema.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/CredentialSchema.scala index 8c12ad125a..eced17c030 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/CredentialSchema.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/CredentialSchema.scala @@ -1,15 +1,15 @@ -package io.iohk.atala.pollux.core.model.schema +package org.hyperledger.identus.pollux.core.model.schema -import io.iohk.atala.pollux.core.model.error.CredentialSchemaError -import io.iohk.atala.pollux.core.model.error.CredentialSchemaError.* -import io.iohk.atala.pollux.core.model.schema.`type`.anoncred.AnoncredSchemaSerDesV1 -import io.iohk.atala.pollux.core.model.schema.`type`.{ +import org.hyperledger.identus.pollux.core.model.error.CredentialSchemaError +import org.hyperledger.identus.pollux.core.model.error.CredentialSchemaError.* +import org.hyperledger.identus.pollux.core.model.schema.`type`.anoncred.AnoncredSchemaSerDesV1 +import org.hyperledger.identus.pollux.core.model.schema.`type`.{ AnoncredSchemaType, CredentialJsonSchemaType, CredentialSchemaType } -import io.iohk.atala.pollux.core.model.schema.validator.{JsonSchemaValidator, JsonSchemaValidatorImpl} -import io.iohk.atala.pollux.core.service.URIDereferencer +import org.hyperledger.identus.pollux.core.model.schema.validator.{JsonSchemaValidator, JsonSchemaValidatorImpl} +import org.hyperledger.identus.pollux.core.service.URIDereferencer import zio.* import zio.json.* import zio.json.ast.Json diff --git a/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/type/AnoncredSchemaType.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/type/AnoncredSchemaType.scala new file mode 100644 index 0000000000..68b8b134c2 --- /dev/null +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/type/AnoncredSchemaType.scala @@ -0,0 +1,27 @@ +package org.hyperledger.identus.pollux.core.model.schema.`type` + +import com.networknt.schema.* +import org.hyperledger.identus.pollux.core.model.schema.Schema +import org.hyperledger.identus.pollux.core.model.schema.`type`.anoncred.AnoncredSchemaSerDesV1 +import org.hyperledger.identus.pollux.core.model.schema.`type`.anoncred.AnoncredSchemaSerDesV1.* +import org.hyperledger.identus.pollux.core.model.schema.validator.JsonSchemaError +import org.hyperledger.identus.pollux.core.model.schema.validator.JsonSchemaUtils +import org.hyperledger.identus.pollux.core.model.schema.validator.JsonSchemaValidatorImpl +import org.hyperledger.identus.pollux.core.model.schema.validator.SchemaSerDes +import zio.* +import zio.json.* + +object AnoncredSchemaType extends CredentialSchemaType { + + val anondcredShemaBasedSerDes: SchemaSerDes[AnoncredSchemaSerDesV1] = AnoncredSchemaSerDesV1.schemaSerDes + val `type`: String = AnoncredSchemaSerDesV1.version + + override def validate(schema: Schema): IO[JsonSchemaError, Unit] = { + for { + jsonSchemaSchema <- anondcredShemaBasedSerDes.initialiseJsonSchema + schemaValidator = JsonSchemaValidatorImpl(jsonSchemaSchema) + jsonSchemaNode <- JsonSchemaUtils.toJsonNode(schema) + _ <- schemaValidator.validate(jsonSchemaNode) + } yield () + } +} diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/type/CredentialJsonSchemaSerDesV1.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/type/CredentialJsonSchemaSerDesV1.scala similarity index 98% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/type/CredentialJsonSchemaSerDesV1.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/type/CredentialJsonSchemaSerDesV1.scala index d256711bae..e0659beae9 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/type/CredentialJsonSchemaSerDesV1.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/type/CredentialJsonSchemaSerDesV1.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.pollux.core.model.schema.`type` +package org.hyperledger.identus.pollux.core.model.schema.`type` -import io.iohk.atala.pollux.core.model.schema.validator.SchemaSerDes +import org.hyperledger.identus.pollux.core.model.schema.validator.SchemaSerDes import zio.* import zio.json.* import zio.json.ast.Json diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/type/CredentialJsonSchemaType.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/type/CredentialJsonSchemaType.scala similarity index 61% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/type/CredentialJsonSchemaType.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/type/CredentialJsonSchemaType.scala index 0d13270551..dba94c421c 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/type/CredentialJsonSchemaType.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/type/CredentialJsonSchemaType.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.pollux.core.model.schema.`type` +package org.hyperledger.identus.pollux.core.model.schema.`type` -import io.iohk.atala.pollux.core.model.schema.Schema -import io.iohk.atala.pollux.core.model.schema.validator.JsonSchemaError -import io.iohk.atala.pollux.core.model.schema.validator.JsonSchemaValidatorImpl +import org.hyperledger.identus.pollux.core.model.schema.Schema +import org.hyperledger.identus.pollux.core.model.schema.validator.JsonSchemaError +import org.hyperledger.identus.pollux.core.model.schema.validator.JsonSchemaValidatorImpl import zio.* import zio.json.* diff --git a/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/type/CredentialSchemaType.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/type/CredentialSchemaType.scala new file mode 100644 index 0000000000..a63a363be0 --- /dev/null +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/type/CredentialSchemaType.scala @@ -0,0 +1,11 @@ +package org.hyperledger.identus.pollux.core.model.schema.`type` + +import org.hyperledger.identus.pollux.core.model.schema.Schema +import org.hyperledger.identus.pollux.core.model.schema.validator.JsonSchemaError +import zio.IO + +trait CredentialSchemaType { + val `type`: String + + def validate(schema: Schema): IO[JsonSchemaError, Unit] +} diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/type/anoncred/AnoncredSchemaSerDesV1.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/type/anoncred/AnoncredSchemaSerDesV1.scala similarity index 89% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/type/anoncred/AnoncredSchemaSerDesV1.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/type/anoncred/AnoncredSchemaSerDesV1.scala index 580a2dab54..3890974da2 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/type/anoncred/AnoncredSchemaSerDesV1.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/type/anoncred/AnoncredSchemaSerDesV1.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.pollux.core.model.schema.`type`.anoncred +package org.hyperledger.identus.pollux.core.model.schema.`type`.anoncred -import io.iohk.atala.pollux.core.model.schema.validator.SchemaSerDes +import org.hyperledger.identus.pollux.core.model.schema.validator.SchemaSerDes import zio.* import zio.json.* diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/validator/JsonSchemaError.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/validator/JsonSchemaError.scala similarity index 86% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/validator/JsonSchemaError.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/validator/JsonSchemaError.scala index 5fbff289a0..73993f1959 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/validator/JsonSchemaError.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/validator/JsonSchemaError.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.core.model.schema.validator +package org.hyperledger.identus.pollux.core.model.schema.validator sealed trait JsonSchemaError { def error: String diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/validator/JsonSchemaUtils.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/validator/JsonSchemaUtils.scala similarity index 92% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/validator/JsonSchemaUtils.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/validator/JsonSchemaUtils.scala index bf1b687e1f..b19f4a5da8 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/validator/JsonSchemaUtils.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/validator/JsonSchemaUtils.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.pollux.core.model.schema.validator +package org.hyperledger.identus.pollux.core.model.schema.validator import com.fasterxml.jackson.databind.JsonNode import com.fasterxml.jackson.databind.ObjectMapper import com.networknt.schema.* import com.networknt.schema.SpecVersion.VersionFlag -import io.iohk.atala.pollux.core.model.schema.validator.JsonSchemaError.* +import org.hyperledger.identus.pollux.core.model.schema.validator.JsonSchemaError.* import zio.* import zio.json.ast.Json diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/validator/JsonSchemaValidator.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/validator/JsonSchemaValidator.scala similarity index 79% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/validator/JsonSchemaValidator.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/validator/JsonSchemaValidator.scala index 39ac14cbe7..31e002323e 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/validator/JsonSchemaValidator.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/validator/JsonSchemaValidator.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.core.model.schema.validator +package org.hyperledger.identus.pollux.core.model.schema.validator import com.fasterxml.jackson.databind.JsonNode import zio.* diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/validator/JsonSchemaValidatorImpl.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/validator/JsonSchemaValidatorImpl.scala similarity index 78% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/validator/JsonSchemaValidatorImpl.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/validator/JsonSchemaValidatorImpl.scala index ccc0e2d662..7ad58c51b1 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/validator/JsonSchemaValidatorImpl.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/validator/JsonSchemaValidatorImpl.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.pollux.core.model.schema.validator +package org.hyperledger.identus.pollux.core.model.schema.validator import com.networknt.schema.* -import io.iohk.atala.pollux.core.model.error.CredentialSchemaError -import io.iohk.atala.pollux.core.model.error.CredentialSchemaError.* -import io.iohk.atala.pollux.core.model.schema.Schema +import org.hyperledger.identus.pollux.core.model.error.CredentialSchemaError +import org.hyperledger.identus.pollux.core.model.error.CredentialSchemaError.* +import org.hyperledger.identus.pollux.core.model.schema.Schema import zio.* case class JsonSchemaValidatorImpl(schemaValidator: JsonSchema) extends JsonSchemaValidator { diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/validator/SchemaSerDes.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/validator/SchemaSerDes.scala similarity index 91% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/validator/SchemaSerDes.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/validator/SchemaSerDes.scala index 365f8a0251..be7010e055 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/validator/SchemaSerDes.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/schema/validator/SchemaSerDes.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.pollux.core.model.schema.validator +package org.hyperledger.identus.pollux.core.model.schema.validator import com.networknt.schema.JsonSchema -import io.iohk.atala.pollux.core.model.schema.validator.JsonSchemaError.* +import org.hyperledger.identus.pollux.core.model.schema.validator.JsonSchemaError.* import zio.json.* import zio.json.ast.Json import zio.json.ast.Json.* diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/secret/CredentialDefinitionSecret.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/secret/CredentialDefinitionSecret.scala similarity index 80% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/secret/CredentialDefinitionSecret.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/secret/CredentialDefinitionSecret.scala index 6fabba4e35..5697d331d0 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/secret/CredentialDefinitionSecret.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/secret/CredentialDefinitionSecret.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.pollux.core.model.secret +package org.hyperledger.identus.pollux.core.model.secret -import io.iohk.atala.agent.walletapi.storage.GenericSecret +import org.hyperledger.identus.agent.walletapi.storage.GenericSecret import zio.json.ast.Json import java.util.UUID diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/CredentialDefinitionRepository.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/CredentialDefinitionRepository.scala similarity index 71% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/CredentialDefinitionRepository.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/CredentialDefinitionRepository.scala index 9948aea3f5..29e892fa5c 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/CredentialDefinitionRepository.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/CredentialDefinitionRepository.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.pollux.core.repository +package org.hyperledger.identus.pollux.core.repository -import io.iohk.atala.pollux.core.model.schema.CredentialDefinition -import io.iohk.atala.pollux.core.repository.Repository.SearchCapability -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.pollux.core.model.schema.CredentialDefinition +import org.hyperledger.identus.pollux.core.repository.Repository.SearchCapability +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.{RIO, Task} import java.util.UUID diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/CredentialDefinitionRepositoryInMemory.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/CredentialDefinitionRepositoryInMemory.scala similarity index 92% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/CredentialDefinitionRepositoryInMemory.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/CredentialDefinitionRepositoryInMemory.scala index f3d4743f88..dd70e656c9 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/CredentialDefinitionRepositoryInMemory.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/CredentialDefinitionRepositoryInMemory.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.pollux.core.repository +package org.hyperledger.identus.pollux.core.repository -import io.iohk.atala.pollux.core.model.* -import io.iohk.atala.pollux.core.model.error.CredentialRepositoryError.* -import io.iohk.atala.pollux.core.model.schema.CredentialDefinition -import io.iohk.atala.shared.models.{WalletAccessContext, WalletId} +import org.hyperledger.identus.pollux.core.model.* +import org.hyperledger.identus.pollux.core.model.error.CredentialRepositoryError.* +import org.hyperledger.identus.pollux.core.model.schema.CredentialDefinition +import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} import zio.* import java.util.UUID diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/CredentialRepository.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/CredentialRepository.scala similarity index 85% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/CredentialRepository.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/CredentialRepository.scala index f919f33e46..659cc01aac 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/CredentialRepository.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/CredentialRepository.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.pollux.core.repository +package org.hyperledger.identus.pollux.core.repository -import io.iohk.atala.mercury.protocol.issuecredential.{IssueCredential, RequestCredential} -import io.iohk.atala.pollux.anoncreds.AnoncredCredentialRequestMetadata -import io.iohk.atala.pollux.core.model.* -import io.iohk.atala.pollux.core.model.IssueCredentialRecord.ProtocolState -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.mercury.protocol.issuecredential.{IssueCredential, RequestCredential} +import org.hyperledger.identus.pollux.anoncreds.AnoncredCredentialRequestMetadata +import org.hyperledger.identus.pollux.core.model.* +import org.hyperledger.identus.pollux.core.model.IssueCredentialRecord.ProtocolState +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* trait CredentialRepository { diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/CredentialRepositoryInMemory.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/CredentialRepositoryInMemory.scala similarity index 95% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/CredentialRepositoryInMemory.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/CredentialRepositoryInMemory.scala index a952b8b223..a407ba898e 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/CredentialRepositoryInMemory.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/CredentialRepositoryInMemory.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.pollux.core.repository +package org.hyperledger.identus.pollux.core.repository -import io.iohk.atala.mercury.protocol.issuecredential.{IssueCredential, RequestCredential} -import io.iohk.atala.pollux.anoncreds.AnoncredCredentialRequestMetadata -import io.iohk.atala.pollux.core.model.* -import io.iohk.atala.pollux.core.model.IssueCredentialRecord.ProtocolState -import io.iohk.atala.pollux.core.model.error.CredentialRepositoryError.* -import io.iohk.atala.shared.models.{WalletAccessContext, WalletId} +import org.hyperledger.identus.mercury.protocol.issuecredential.{IssueCredential, RequestCredential} +import org.hyperledger.identus.pollux.anoncreds.AnoncredCredentialRequestMetadata +import org.hyperledger.identus.pollux.core.model.* +import org.hyperledger.identus.pollux.core.model.IssueCredentialRecord.ProtocolState +import org.hyperledger.identus.pollux.core.model.error.CredentialRepositoryError.* +import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} import zio.* import java.time.Instant diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/CredentialSchemaRepository.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/CredentialSchemaRepository.scala similarity index 65% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/CredentialSchemaRepository.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/CredentialSchemaRepository.scala index 85315d0162..bcbbbc62cc 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/CredentialSchemaRepository.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/CredentialSchemaRepository.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.pollux.core.repository +package org.hyperledger.identus.pollux.core.repository -import io.iohk.atala.pollux.core.model.schema.CredentialSchema -import io.iohk.atala.pollux.core.model.schema.CredentialSchema.* -import io.iohk.atala.pollux.core.repository.Repository.SearchCapability -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.pollux.core.model.schema.CredentialSchema +import org.hyperledger.identus.pollux.core.model.schema.CredentialSchema.* +import org.hyperledger.identus.pollux.core.repository.Repository.SearchCapability +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.{RIO, Task} import java.util.UUID diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/CredentialStatusListRepository.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/CredentialStatusListRepository.scala similarity index 81% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/CredentialStatusListRepository.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/CredentialStatusListRepository.scala index f6c3958797..66497fd5cd 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/CredentialStatusListRepository.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/CredentialStatusListRepository.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.pollux.core.repository +package org.hyperledger.identus.pollux.core.repository -import io.iohk.atala.pollux.core.model.* -import io.iohk.atala.pollux.vc.jwt.Issuer -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.pollux.core.model.* +import org.hyperledger.identus.pollux.vc.jwt.Issuer +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import java.util.UUID diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/CredentialStatusListRepositoryInMemory.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/CredentialStatusListRepositoryInMemory.scala similarity index 94% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/CredentialStatusListRepositoryInMemory.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/CredentialStatusListRepositoryInMemory.scala index cb4521dddb..7b0c95f5d6 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/CredentialStatusListRepositoryInMemory.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/CredentialStatusListRepositoryInMemory.scala @@ -1,18 +1,18 @@ -package io.iohk.atala.pollux.core.repository +package org.hyperledger.identus.pollux.core.repository -import io.iohk.atala.pollux.core.model.CredentialStatusList -import io.iohk.atala.pollux.vc.jwt.{Issuer, StatusPurpose, revocation} -import io.iohk.atala.shared.models.{WalletAccessContext, WalletId} +import org.hyperledger.identus.pollux.core.model.CredentialStatusList +import org.hyperledger.identus.pollux.vc.jwt.{Issuer, StatusPurpose, revocation} +import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} import zio.* -import io.iohk.atala.pollux.core.model.* -import io.iohk.atala.pollux.vc.jwt.revocation.BitStringError.{ +import org.hyperledger.identus.pollux.core.model.* +import org.hyperledger.identus.pollux.vc.jwt.revocation.BitStringError.{ DecodingError, EncodingError, IndexOutOfBounds, InvalidSize } -import io.iohk.atala.castor.core.model.did.{CanonicalPrismDID, PrismDID} -import io.iohk.atala.pollux.vc.jwt.revocation.{BitString, VCStatusList2021} +import org.hyperledger.identus.castor.core.model.did.{CanonicalPrismDID, PrismDID} +import org.hyperledger.identus.pollux.vc.jwt.revocation.{BitString, VCStatusList2021} import java.time.Instant import java.util.UUID diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/PresentationRepository.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/PresentationRepository.scala similarity index 87% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/PresentationRepository.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/PresentationRepository.scala index 5f361ac2fa..2a04082ea4 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/PresentationRepository.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/PresentationRepository.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.pollux.core.repository +package org.hyperledger.identus.pollux.core.repository -import io.iohk.atala.mercury.protocol.presentproof.* -import io.iohk.atala.pollux.core.model.* -import io.iohk.atala.pollux.core.model.PresentationRecord.ProtocolState -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.mercury.protocol.presentproof.* +import org.hyperledger.identus.pollux.core.model.* +import org.hyperledger.identus.pollux.core.model.PresentationRecord.ProtocolState +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* trait PresentationRepository { diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/PresentationRepositoryInMemory.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/PresentationRepositoryInMemory.scala similarity index 95% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/PresentationRepositoryInMemory.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/PresentationRepositoryInMemory.scala index 76cb0f0154..f96a943002 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/PresentationRepositoryInMemory.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/PresentationRepositoryInMemory.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.pollux.core.repository +package org.hyperledger.identus.pollux.core.repository -import io.iohk.atala.mercury.protocol.presentproof.* -import io.iohk.atala.pollux.core.model.* -import io.iohk.atala.pollux.core.model.PresentationRecord.ProtocolState -import io.iohk.atala.pollux.core.model.error.PresentationError.* -import io.iohk.atala.shared.models.{WalletAccessContext, WalletId} +import org.hyperledger.identus.mercury.protocol.presentproof.* +import org.hyperledger.identus.pollux.core.model.* +import org.hyperledger.identus.pollux.core.model.PresentationRecord.ProtocolState +import org.hyperledger.identus.pollux.core.model.error.PresentationError.* +import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} import zio.* import java.time.Instant diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/VerificationPolicyRepository.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/VerificationPolicyRepository.scala similarity index 82% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/VerificationPolicyRepository.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/VerificationPolicyRepository.scala index 773e90d57e..cf8b9b0df8 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/VerificationPolicyRepository.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/VerificationPolicyRepository.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.pollux.core.repository +package org.hyperledger.identus.pollux.core.repository -import io.iohk.atala.pollux.core.model.VerificationPolicy -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.pollux.core.model.VerificationPolicy +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import java.util.UUID diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/repository.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/repository.scala similarity index 77% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/repository.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/repository.scala index 7b4ea2940f..5b8f422039 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/repository/repository.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/repository/repository.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.pollux.core.repository +package org.hyperledger.identus.pollux.core.repository -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.RIO trait Repository[F[_], T] diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/CredentialDefinitionService.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialDefinitionService.scala similarity index 83% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/CredentialDefinitionService.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialDefinitionService.scala index d6933172b8..7d562f67bd 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/CredentialDefinitionService.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialDefinitionService.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.pollux.core.service +package org.hyperledger.identus.pollux.core.service -import io.iohk.atala.pollux.core.model.error.CredentialSchemaError -import io.iohk.atala.pollux.core.model.schema.CredentialDefinition -import io.iohk.atala.pollux.core.model.schema.CredentialDefinition.* -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.pollux.core.model.error.CredentialSchemaError +import org.hyperledger.identus.pollux.core.model.schema.CredentialDefinition +import org.hyperledger.identus.pollux.core.model.schema.CredentialDefinition.* +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.{IO, ZIO} import java.util.UUID diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/CredentialDefinitionServiceImpl.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialDefinitionServiceImpl.scala similarity index 77% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/CredentialDefinitionServiceImpl.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialDefinitionServiceImpl.scala index 01ea444476..fd49b15378 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/CredentialDefinitionServiceImpl.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialDefinitionServiceImpl.scala @@ -1,19 +1,19 @@ -package io.iohk.atala.pollux.core.service +package org.hyperledger.identus.pollux.core.service -import io.iohk.atala.agent.walletapi.storage -import io.iohk.atala.agent.walletapi.storage.GenericSecretStorage -import io.iohk.atala.pollux.anoncreds.{AnoncredLib, AnoncredSchemaDef} -import io.iohk.atala.pollux.core.model.error.CredentialSchemaError -import io.iohk.atala.pollux.core.model.error.CredentialSchemaError.{SchemaError, URISyntaxError} -import io.iohk.atala.pollux.core.model.schema.CredentialDefinition -import io.iohk.atala.pollux.core.model.schema.CredentialDefinition.{Filter, FilteredEntries} -import io.iohk.atala.pollux.core.model.schema.`type`.anoncred.AnoncredSchemaSerDesV1 -import io.iohk.atala.pollux.core.model.schema.validator.JsonSchemaError -import io.iohk.atala.pollux.core.model.secret.CredentialDefinitionSecret -import io.iohk.atala.pollux.core.repository.CredentialDefinitionRepository -import io.iohk.atala.pollux.core.repository.Repository.SearchQuery -import io.iohk.atala.pollux.core.service.CredentialDefinitionService.Error.* -import io.iohk.atala.pollux.core.service.serdes.{ +import org.hyperledger.identus.agent.walletapi.storage +import org.hyperledger.identus.agent.walletapi.storage.GenericSecretStorage +import org.hyperledger.identus.pollux.anoncreds.{AnoncredLib, AnoncredSchemaDef} +import org.hyperledger.identus.pollux.core.model.error.CredentialSchemaError +import org.hyperledger.identus.pollux.core.model.error.CredentialSchemaError.{SchemaError, URISyntaxError} +import org.hyperledger.identus.pollux.core.model.schema.CredentialDefinition +import org.hyperledger.identus.pollux.core.model.schema.CredentialDefinition.{Filter, FilteredEntries} +import org.hyperledger.identus.pollux.core.model.schema.`type`.anoncred.AnoncredSchemaSerDesV1 +import org.hyperledger.identus.pollux.core.model.schema.validator.JsonSchemaError +import org.hyperledger.identus.pollux.core.model.secret.CredentialDefinitionSecret +import org.hyperledger.identus.pollux.core.repository.CredentialDefinitionRepository +import org.hyperledger.identus.pollux.core.repository.Repository.SearchQuery +import org.hyperledger.identus.pollux.core.service.CredentialDefinitionService.Error.* +import org.hyperledger.identus.pollux.core.service.serdes.{ PrivateCredentialDefinitionSchemaSerDesV1, ProofKeyCredentialDefinitionSchemaSerDesV1, PublicCredentialDefinitionSerDesV1 diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/CredentialSchemaService.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialSchemaService.scala similarity index 83% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/CredentialSchemaService.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialSchemaService.scala index d8ed4d6f75..7066f87bcf 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/CredentialSchemaService.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialSchemaService.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.pollux.core.service +package org.hyperledger.identus.pollux.core.service -import io.iohk.atala.pollux.core.model.error.CredentialSchemaError -import io.iohk.atala.pollux.core.model.schema.CredentialSchema -import io.iohk.atala.pollux.core.model.schema.CredentialSchema.* +import org.hyperledger.identus.pollux.core.model.error.CredentialSchemaError +import org.hyperledger.identus.pollux.core.model.schema.CredentialSchema +import org.hyperledger.identus.pollux.core.model.schema.CredentialSchema.* import zio.{IO, ZIO} -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletAccessContext import java.util.UUID trait CredentialSchemaService { diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/CredentialSchemaServiceImpl.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialSchemaServiceImpl.scala similarity index 86% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/CredentialSchemaServiceImpl.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialSchemaServiceImpl.scala index 29b943f601..d99475344c 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/CredentialSchemaServiceImpl.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialSchemaServiceImpl.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.pollux.core.service +package org.hyperledger.identus.pollux.core.service -import io.iohk.atala.pollux.core.model.error.CredentialSchemaError -import io.iohk.atala.pollux.core.model.schema.CredentialSchema -import io.iohk.atala.pollux.core.model.schema.CredentialSchema.FilteredEntries -import io.iohk.atala.pollux.core.repository.CredentialSchemaRepository -import io.iohk.atala.pollux.core.repository.Repository.SearchQuery -import io.iohk.atala.pollux.core.service.CredentialSchemaService.Error.* +import org.hyperledger.identus.pollux.core.model.error.CredentialSchemaError +import org.hyperledger.identus.pollux.core.model.schema.CredentialSchema +import org.hyperledger.identus.pollux.core.model.schema.CredentialSchema.FilteredEntries +import org.hyperledger.identus.pollux.core.repository.CredentialSchemaRepository +import org.hyperledger.identus.pollux.core.repository.Repository.SearchQuery +import org.hyperledger.identus.pollux.core.service.CredentialSchemaService.Error.* import zio.ZIO.{fail, getOrFailWith, succeed} import zio.{URLayer, ZLayer} import zio.IO diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/CredentialService.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialService.scala similarity index 90% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/CredentialService.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialService.scala index 85e453ce08..bfa79f650f 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/CredentialService.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialService.scala @@ -1,14 +1,19 @@ -package io.iohk.atala.pollux.core.service +package org.hyperledger.identus.pollux.core.service import io.circe.syntax.* import io.circe.{Json, JsonObject} -import io.iohk.atala.castor.core.model.did.CanonicalPrismDID -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.mercury.protocol.issuecredential.{Attribute, IssueCredential, OfferCredential, RequestCredential} -import io.iohk.atala.pollux.core.model.* -import io.iohk.atala.pollux.core.model.error.CredentialServiceError -import io.iohk.atala.pollux.core.model.error.CredentialServiceError.* -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.castor.core.model.did.CanonicalPrismDID +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.mercury.protocol.issuecredential.{ + Attribute, + IssueCredential, + OfferCredential, + RequestCredential +} +import org.hyperledger.identus.pollux.core.model.* +import org.hyperledger.identus.pollux.core.model.error.CredentialServiceError +import org.hyperledger.identus.pollux.core.model.error.CredentialServiceError.* +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.{IO, ZIO} import java.nio.charset.StandardCharsets diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/CredentialServiceImpl.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialServiceImpl.scala similarity index 96% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/CredentialServiceImpl.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialServiceImpl.scala index 9b4e5fe06e..c59868ffce 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/CredentialServiceImpl.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialServiceImpl.scala @@ -1,34 +1,34 @@ -package io.iohk.atala.pollux.core.service +package org.hyperledger.identus.pollux.core.service import io.circe.Json import io.circe.syntax.* -import io.iohk.atala.agent.walletapi.model.{ManagedDIDState, PublicationState} -import io.iohk.atala.agent.walletapi.service.ManagedDIDService -import io.iohk.atala.agent.walletapi.storage.GenericSecretStorage -import io.iohk.atala.castor.core.model.did.{CanonicalPrismDID, PrismDID, VerificationRelationship} -import io.iohk.atala.castor.core.service.DIDService -import io.iohk.atala.mercury.model.* -import io.iohk.atala.mercury.protocol.issuecredential.* -import io.iohk.atala.pollux.* -import io.iohk.atala.pollux.anoncreds.{ +import org.hyperledger.identus.agent.walletapi.model.{ManagedDIDState, PublicationState} +import org.hyperledger.identus.agent.walletapi.service.ManagedDIDService +import org.hyperledger.identus.agent.walletapi.storage.GenericSecretStorage +import org.hyperledger.identus.castor.core.model.did.{CanonicalPrismDID, PrismDID, VerificationRelationship} +import org.hyperledger.identus.castor.core.service.DIDService +import org.hyperledger.identus.mercury.model.* +import org.hyperledger.identus.mercury.protocol.issuecredential.* +import org.hyperledger.identus.pollux.* +import org.hyperledger.identus.pollux.anoncreds.{ AnoncredCreateCredentialDefinition, AnoncredCredential, AnoncredCredentialOffer, AnoncredLib } -import io.iohk.atala.pollux.core.model.* -import io.iohk.atala.pollux.core.model.CredentialFormat.AnonCreds -import io.iohk.atala.pollux.core.model.IssueCredentialRecord.ProtocolState.OfferReceived -import io.iohk.atala.pollux.core.model.error.CredentialServiceError -import io.iohk.atala.pollux.core.model.error.CredentialServiceError.* -import io.iohk.atala.pollux.core.model.presentation.* -import io.iohk.atala.pollux.core.model.schema.CredentialSchema -import io.iohk.atala.pollux.core.model.secret.CredentialDefinitionSecret -import io.iohk.atala.pollux.core.repository.{CredentialRepository, CredentialStatusListRepository} -import io.iohk.atala.pollux.vc.jwt.{ES256KSigner, Issuer as JwtIssuer, *} -import io.iohk.atala.shared.http.{DataUrlResolver, GenericUriResolver} -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.utils.aspects.CustomMetricsAspect +import org.hyperledger.identus.pollux.core.model.* +import org.hyperledger.identus.pollux.core.model.CredentialFormat.AnonCreds +import org.hyperledger.identus.pollux.core.model.IssueCredentialRecord.ProtocolState.OfferReceived +import org.hyperledger.identus.pollux.core.model.error.CredentialServiceError +import org.hyperledger.identus.pollux.core.model.error.CredentialServiceError.* +import org.hyperledger.identus.pollux.core.model.presentation.* +import org.hyperledger.identus.pollux.core.model.schema.CredentialSchema +import org.hyperledger.identus.pollux.core.model.secret.CredentialDefinitionSecret +import org.hyperledger.identus.pollux.core.repository.{CredentialRepository, CredentialStatusListRepository} +import org.hyperledger.identus.pollux.vc.jwt.{ES256KSigner, Issuer as JwtIssuer, *} +import org.hyperledger.identus.shared.http.{DataUrlResolver, GenericUriResolver} +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.utils.aspects.CustomMetricsAspect import zio.* import zio.prelude.ZValidation @@ -470,7 +470,7 @@ private class CredentialServiceImpl( ) (privateKey, publicKey) = ecKeyPair jwtIssuer = JwtIssuer( - io.iohk.atala.pollux.vc.jwt.DID(jwtIssuerDID.toString), + org.hyperledger.identus.pollux.vc.jwt.DID(jwtIssuerDID.toString), ES256KSigner(privateKey), publicKey ) @@ -1088,7 +1088,7 @@ private class CredentialServiceImpl( issuanceDate = issuanceDate, maybeExpirationDate = record.validityPeriod.map(sec => issuanceDate.plusSeconds(sec.toLong)), maybeCredentialSchema = - record.schemaUri.map(id => io.iohk.atala.pollux.vc.jwt.CredentialSchema(id, VC_JSON_SCHEMA_TYPE)), + record.schemaUri.map(id => org.hyperledger.identus.pollux.vc.jwt.CredentialSchema(id, VC_JSON_SCHEMA_TYPE)), maybeCredentialStatus = Some(credentialStatus), credentialSubject = claims.add("id", jwtPresentation.iss.asJson).asJson, maybeRefreshService = None, diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/CredentialServiceNotifier.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialServiceNotifier.scala similarity index 92% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/CredentialServiceNotifier.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialServiceNotifier.scala index 504b82b5d1..b350435772 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/CredentialServiceNotifier.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialServiceNotifier.scala @@ -1,13 +1,13 @@ -package io.iohk.atala.pollux.core.service +package org.hyperledger.identus.pollux.core.service import io.circe.Json -import io.iohk.atala.castor.core.model.did.CanonicalPrismDID -import io.iohk.atala.event.notification.* -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.mercury.protocol.issuecredential.{IssueCredential, OfferCredential, RequestCredential} -import io.iohk.atala.pollux.core.model.error.CredentialServiceError -import io.iohk.atala.pollux.core.model.{DidCommID, IssueCredentialRecord} -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.castor.core.model.did.CanonicalPrismDID +import org.hyperledger.identus.event.notification.* +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.mercury.protocol.issuecredential.{IssueCredential, OfferCredential, RequestCredential} +import org.hyperledger.identus.pollux.core.model.error.CredentialServiceError +import org.hyperledger.identus.pollux.core.model.{DidCommID, IssueCredentialRecord} +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.{URLayer, ZIO, ZLayer, IO} import java.util.UUID diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/CredentialStatusListService.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialStatusListService.scala similarity index 67% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/CredentialStatusListService.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialStatusListService.scala index e3b9930c9a..59c96f37bc 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/CredentialStatusListService.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialStatusListService.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.pollux.core.service +package org.hyperledger.identus.pollux.core.service -import io.iohk.atala.pollux.core.model.{CredentialStatusList, CredentialStatusListWithCreds, DidCommID} -import io.iohk.atala.pollux.core.model.error.CredentialStatusListServiceError +import org.hyperledger.identus.pollux.core.model.{CredentialStatusList, CredentialStatusListWithCreds, DidCommID} +import org.hyperledger.identus.pollux.core.model.error.CredentialStatusListServiceError import zio.* -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletAccessContext import java.util.UUID diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/CredentialStatusListServiceImpl.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialStatusListServiceImpl.scala similarity index 78% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/CredentialStatusListServiceImpl.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialStatusListServiceImpl.scala index f272a1784d..1b6e7c0b13 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/CredentialStatusListServiceImpl.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialStatusListServiceImpl.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.pollux.core.service +package org.hyperledger.identus.pollux.core.service -import io.iohk.atala.pollux.core.model.{CredentialStatusList, CredentialStatusListWithCreds, DidCommID} -import io.iohk.atala.pollux.core.repository.CredentialStatusListRepository +import org.hyperledger.identus.pollux.core.model.{CredentialStatusList, CredentialStatusListWithCreds, DidCommID} +import org.hyperledger.identus.pollux.core.repository.CredentialStatusListRepository import zio.* -import io.iohk.atala.pollux.core.model.error.CredentialStatusListServiceError -import io.iohk.atala.pollux.core.model.error.CredentialStatusListServiceError.* -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.pollux.core.model.error.CredentialStatusListServiceError +import org.hyperledger.identus.pollux.core.model.error.CredentialStatusListServiceError.* +import org.hyperledger.identus.shared.models.WalletAccessContext import java.util.UUID diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/HttpURIDereferencerImpl.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/HttpURIDereferencerImpl.scala similarity index 88% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/HttpURIDereferencerImpl.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/HttpURIDereferencerImpl.scala index 56057c9f7b..3e6afcd3e4 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/HttpURIDereferencerImpl.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/HttpURIDereferencerImpl.scala @@ -1,6 +1,10 @@ -package io.iohk.atala.pollux.core.service +package org.hyperledger.identus.pollux.core.service -import io.iohk.atala.pollux.core.service.URIDereferencerError.{ConnectionError, ResourceNotFound, UnexpectedError} +import org.hyperledger.identus.pollux.core.service.URIDereferencerError.{ + ConnectionError, + ResourceNotFound, + UnexpectedError +} import zio.* import zio.http.* import java.net.URI diff --git a/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/LinkSecretService.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/LinkSecretService.scala new file mode 100644 index 0000000000..553078b39b --- /dev/null +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/LinkSecretService.scala @@ -0,0 +1,12 @@ +package org.hyperledger.identus.pollux.core.service + +import org.hyperledger.identus.pollux.anoncreds.AnoncredLinkSecretWithId +import org.hyperledger.identus.pollux.core.model.error.LinkSecretError +import org.hyperledger.identus.shared.models.WalletAccessContext +import zio.ZIO + +trait LinkSecretService { + type Result[T] = ZIO[WalletAccessContext, LinkSecretError, T] + + def fetchOrCreate(): Result[AnoncredLinkSecretWithId] +} diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/LinkSecretServiceImpl.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/LinkSecretServiceImpl.scala similarity index 80% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/LinkSecretServiceImpl.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/LinkSecretServiceImpl.scala index 88e51199be..ced6cfdbf1 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/LinkSecretServiceImpl.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/LinkSecretServiceImpl.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.pollux.core.service +package org.hyperledger.identus.pollux.core.service -import io.iohk.atala.agent.walletapi.storage.{GenericSecret, GenericSecretStorage} -import io.iohk.atala.pollux.anoncreds.{AnoncredLinkSecret, AnoncredLinkSecretWithId} -import io.iohk.atala.pollux.core.model.error.LinkSecretError -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.agent.walletapi.storage.{GenericSecret, GenericSecretStorage} +import org.hyperledger.identus.pollux.anoncreds.{AnoncredLinkSecret, AnoncredLinkSecretWithId} +import org.hyperledger.identus.pollux.core.model.error.LinkSecretError +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import zio.json.ast.Json diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/MockCredentialService.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/MockCredentialService.scala similarity index 93% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/MockCredentialService.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/MockCredentialService.scala index 75ba7a19f8..41012cbd55 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/MockCredentialService.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/MockCredentialService.scala @@ -1,12 +1,12 @@ -package io.iohk.atala.pollux.core.service +package org.hyperledger.identus.pollux.core.service import io.circe.Json -import io.iohk.atala.castor.core.model.did.CanonicalPrismDID -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.mercury.protocol.issuecredential.{IssueCredential, OfferCredential, RequestCredential} -import io.iohk.atala.pollux.core.model.error.CredentialServiceError -import io.iohk.atala.pollux.core.model.{DidCommID, IssueCredentialRecord} -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.castor.core.model.did.CanonicalPrismDID +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.mercury.protocol.issuecredential.{IssueCredential, OfferCredential, RequestCredential} +import org.hyperledger.identus.pollux.core.model.error.CredentialServiceError +import org.hyperledger.identus.pollux.core.model.{DidCommID, IssueCredentialRecord} +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.mock.{Mock, Proxy} import zio.{IO, URLayer, ZIO, ZLayer, mock} diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/MockPresentationService.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/MockPresentationService.scala similarity index 91% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/MockPresentationService.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/MockPresentationService.scala index 3faba1a4c9..7093eaed45 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/MockPresentationService.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/MockPresentationService.scala @@ -1,14 +1,19 @@ -package io.iohk.atala.pollux.core.service - -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.mercury.protocol.presentproof.{Presentation, ProofType, ProposePresentation, RequestPresentation} -import io.iohk.atala.pollux.anoncreds.AnoncredPresentation -import io.iohk.atala.pollux.core.model.error.PresentationError -import io.iohk.atala.pollux.core.model.presentation.Options -import io.iohk.atala.pollux.core.model.{DidCommID, PresentationRecord} -import io.iohk.atala.pollux.core.service.serdes.{AnoncredCredentialProofsV1, AnoncredPresentationRequestV1} -import io.iohk.atala.pollux.vc.jwt.{Issuer, PresentationPayload, W3cCredentialPayload} -import io.iohk.atala.shared.models.WalletAccessContext +package org.hyperledger.identus.pollux.core.service + +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.mercury.protocol.presentproof.{ + Presentation, + ProofType, + ProposePresentation, + RequestPresentation +} +import org.hyperledger.identus.pollux.anoncreds.AnoncredPresentation +import org.hyperledger.identus.pollux.core.model.error.PresentationError +import org.hyperledger.identus.pollux.core.model.presentation.Options +import org.hyperledger.identus.pollux.core.model.{DidCommID, PresentationRecord} +import org.hyperledger.identus.pollux.core.service.serdes.{AnoncredCredentialProofsV1, AnoncredPresentationRequestV1} +import org.hyperledger.identus.pollux.vc.jwt.{Issuer, PresentationPayload, W3cCredentialPayload} +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.mock.{Mock, Proxy} import zio.{IO, URLayer, ZIO, ZLayer, mock} diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/PresentationService.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/PresentationService.scala similarity index 87% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/PresentationService.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/PresentationService.scala index b54df6784c..621f38f570 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/PresentationService.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/PresentationService.scala @@ -1,14 +1,14 @@ -package io.iohk.atala.pollux.core.service - -import io.iohk.atala.mercury.model.* -import io.iohk.atala.mercury.protocol.presentproof.* -import io.iohk.atala.pollux.anoncreds.AnoncredPresentation -import io.iohk.atala.pollux.core.model.* -import io.iohk.atala.pollux.core.model.error.PresentationError -import io.iohk.atala.pollux.core.model.presentation.* -import io.iohk.atala.pollux.core.service.serdes.{AnoncredCredentialProofsV1, AnoncredPresentationRequestV1} -import io.iohk.atala.pollux.vc.jwt.* -import io.iohk.atala.shared.models.WalletAccessContext +package org.hyperledger.identus.pollux.core.service + +import org.hyperledger.identus.mercury.model.* +import org.hyperledger.identus.mercury.protocol.presentproof.* +import org.hyperledger.identus.pollux.anoncreds.AnoncredPresentation +import org.hyperledger.identus.pollux.core.model.* +import org.hyperledger.identus.pollux.core.model.error.PresentationError +import org.hyperledger.identus.pollux.core.model.presentation.* +import org.hyperledger.identus.pollux.core.service.serdes.{AnoncredCredentialProofsV1, AnoncredPresentationRequestV1} +import org.hyperledger.identus.pollux.vc.jwt.* +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import java.time.Instant @@ -24,7 +24,7 @@ trait PresentationService { thid: DidCommID, connectionId: Option[String], proofTypes: Seq[ProofType], - options: Option[io.iohk.atala.pollux.core.model.presentation.Options], + options: Option[org.hyperledger.identus.pollux.core.model.presentation.Options], ): ZIO[WalletAccessContext, PresentationError, PresentationRecord] def createAnoncredPresentationRecord( diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/PresentationServiceImpl.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/PresentationServiceImpl.scala similarity index 96% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/PresentationServiceImpl.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/PresentationServiceImpl.scala index a355f9d847..0670081021 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/PresentationServiceImpl.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/PresentationServiceImpl.scala @@ -1,24 +1,24 @@ -package io.iohk.atala.pollux.core.service +package org.hyperledger.identus.pollux.core.service import cats.* import cats.implicits.* import io.circe.* import io.circe.parser.* import io.circe.syntax.* -import io.iohk.atala.mercury.model.* -import io.iohk.atala.mercury.protocol.issuecredential.IssueCredentialIssuedFormat -import io.iohk.atala.mercury.protocol.presentproof.* -import io.iohk.atala.pollux.anoncreds.* -import io.iohk.atala.pollux.core.model.* -import io.iohk.atala.pollux.core.model.error.PresentationError -import io.iohk.atala.pollux.core.model.error.PresentationError.* -import io.iohk.atala.pollux.core.model.presentation.* -import io.iohk.atala.pollux.core.model.schema.`type`.anoncred.AnoncredSchemaSerDesV1 -import io.iohk.atala.pollux.core.repository.{CredentialRepository, PresentationRepository} -import io.iohk.atala.pollux.core.service.serdes.* -import io.iohk.atala.pollux.vc.jwt.* -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.utils.aspects.CustomMetricsAspect +import org.hyperledger.identus.mercury.model.* +import org.hyperledger.identus.mercury.protocol.issuecredential.IssueCredentialIssuedFormat +import org.hyperledger.identus.mercury.protocol.presentproof.* +import org.hyperledger.identus.pollux.anoncreds.* +import org.hyperledger.identus.pollux.core.model.* +import org.hyperledger.identus.pollux.core.model.error.PresentationError +import org.hyperledger.identus.pollux.core.model.error.PresentationError.* +import org.hyperledger.identus.pollux.core.model.presentation.* +import org.hyperledger.identus.pollux.core.model.schema.`type`.anoncred.AnoncredSchemaSerDesV1 +import org.hyperledger.identus.pollux.core.repository.{CredentialRepository, PresentationRepository} +import org.hyperledger.identus.pollux.core.service.serdes.* +import org.hyperledger.identus.pollux.vc.jwt.* +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.utils.aspects.CustomMetricsAspect import zio.* import java.net.URI @@ -230,7 +230,7 @@ private class PresentationServiceImpl( thid: DidCommID, connectionId: Option[String], proofTypes: Seq[ProofType], - maybeOptions: Option[io.iohk.atala.pollux.core.model.presentation.Options] + maybeOptions: Option[org.hyperledger.identus.pollux.core.model.presentation.Options] ): ZIO[WalletAccessContext, PresentationError, PresentationRecord] = { createPresentationRecord( pairwiseVerifierDID, @@ -409,7 +409,7 @@ private class PresentationServiceImpl( Seq[JwtVerifiableCredentialPayload] ] = issuedCredentials.map { signedCredential => - decode[io.iohk.atala.mercury.model.Base64](signedCredential) + decode[org.hyperledger.identus.mercury.model.Base64](signedCredential) .flatMap(x => Right(new String(java.util.Base64.getDecoder.decode(x.base64)))) .flatMap(x => Right(JwtVerifiableCredentialPayload(JWT(x)))) .left @@ -417,12 +417,12 @@ private class PresentationServiceImpl( }.sequence val maybePresentationOptions - : Either[PresentationError, Option[io.iohk.atala.pollux.core.model.presentation.Options]] = + : Either[PresentationError, Option[org.hyperledger.identus.pollux.core.model.presentation.Options]] = requestPresentation.attachments.headOption .map(attachment => - decode[io.iohk.atala.mercury.model.JsonData](attachment.data.asJson.noSpaces) + decode[org.hyperledger.identus.mercury.model.JsonData](attachment.data.asJson.noSpaces) .flatMap(data => - io.iohk.atala.pollux.core.model.presentation.PresentationAttachment.given_Decoder_PresentationAttachment + org.hyperledger.identus.pollux.core.model.presentation.PresentationAttachment.given_Decoder_PresentationAttachment .decodeJson(data.json.asJson) .map(_.options) .leftMap(err => diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/PresentationServiceNotifier.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/PresentationServiceNotifier.scala similarity index 90% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/PresentationServiceNotifier.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/PresentationServiceNotifier.scala index 0739b63067..662dec0066 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/PresentationServiceNotifier.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/PresentationServiceNotifier.scala @@ -1,15 +1,20 @@ -package io.iohk.atala.pollux.core.service - -import io.iohk.atala.event.notification.{Event, EventNotificationService} -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.mercury.protocol.presentproof.{Presentation, ProofType, ProposePresentation, RequestPresentation} -import io.iohk.atala.pollux.anoncreds.AnoncredPresentation -import io.iohk.atala.pollux.core.model.error.PresentationError -import io.iohk.atala.pollux.core.model.presentation.Options -import io.iohk.atala.pollux.core.model.{DidCommID, PresentationRecord} -import io.iohk.atala.pollux.core.service.serdes.{AnoncredCredentialProofsV1, AnoncredPresentationRequestV1} -import io.iohk.atala.pollux.vc.jwt.{Issuer, PresentationPayload, W3cCredentialPayload} -import io.iohk.atala.shared.models.WalletAccessContext +package org.hyperledger.identus.pollux.core.service + +import org.hyperledger.identus.event.notification.{Event, EventNotificationService} +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.mercury.protocol.presentproof.{ + Presentation, + ProofType, + ProposePresentation, + RequestPresentation +} +import org.hyperledger.identus.pollux.anoncreds.AnoncredPresentation +import org.hyperledger.identus.pollux.core.model.error.PresentationError +import org.hyperledger.identus.pollux.core.model.presentation.Options +import org.hyperledger.identus.pollux.core.model.{DidCommID, PresentationRecord} +import org.hyperledger.identus.pollux.core.service.serdes.{AnoncredCredentialProofsV1, AnoncredPresentationRequestV1} +import org.hyperledger.identus.pollux.vc.jwt.{Issuer, PresentationPayload, W3cCredentialPayload} +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.{IO, URLayer, ZIO, ZLayer} import java.time.Instant diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/ResourceURIDereferencerImpl.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/ResourceURIDereferencerImpl.scala similarity index 88% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/ResourceURIDereferencerImpl.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/ResourceURIDereferencerImpl.scala index 9acace6865..7b79ed8f2c 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/ResourceURIDereferencerImpl.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/ResourceURIDereferencerImpl.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.pollux.core.service +package org.hyperledger.identus.pollux.core.service -import io.iohk.atala.pollux.core.service.URIDereferencerError.ResourceNotFound +import org.hyperledger.identus.pollux.core.service.URIDereferencerError.ResourceNotFound import zio.* import java.net.URI diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/URIDereferencer.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/URIDereferencer.scala similarity index 90% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/URIDereferencer.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/URIDereferencer.scala index a53a119f51..7dab42afb9 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/URIDereferencer.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/URIDereferencer.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.core.service +package org.hyperledger.identus.pollux.core.service import zio.IO diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/VerificationPolicyService.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/VerificationPolicyService.scala similarity index 77% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/VerificationPolicyService.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/VerificationPolicyService.scala index 63c0c5c0bc..20da0f5ad6 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/VerificationPolicyService.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/VerificationPolicyService.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.pollux.core.service +package org.hyperledger.identus.pollux.core.service -import io.iohk.atala.pollux.core.model.error.VerificationPolicyError -import io.iohk.atala.pollux.core.model.{VerificationPolicy, VerificationPolicyConstraint} -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.pollux.core.model.error.VerificationPolicyError +import org.hyperledger.identus.pollux.core.model.{VerificationPolicy, VerificationPolicyConstraint} +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import java.util.UUID diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/VerificationPolicyServiceImpl.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/VerificationPolicyServiceImpl.scala similarity index 85% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/VerificationPolicyServiceImpl.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/VerificationPolicyServiceImpl.scala index 96dd1bb20a..70ddce207d 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/VerificationPolicyServiceImpl.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/VerificationPolicyServiceImpl.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.pollux.core.service +package org.hyperledger.identus.pollux.core.service -import io.iohk.atala.pollux.core.model.error.VerificationPolicyError -import io.iohk.atala.pollux.core.model.{VerificationPolicy, VerificationPolicyConstraint} -import io.iohk.atala.pollux.core.repository.VerificationPolicyRepository -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.pollux.core.model.error.VerificationPolicyError +import org.hyperledger.identus.pollux.core.model.{VerificationPolicy, VerificationPolicyConstraint} +import org.hyperledger.identus.pollux.core.repository.VerificationPolicyRepository +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import java.util.UUID diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/serdes/AnoncredCredentialProofsV1.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/serdes/AnoncredCredentialProofsV1.scala similarity index 93% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/serdes/AnoncredCredentialProofsV1.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/serdes/AnoncredCredentialProofsV1.scala index fc8dfdd3ef..a28807b781 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/serdes/AnoncredCredentialProofsV1.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/serdes/AnoncredCredentialProofsV1.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.pollux.core.service.serdes +package org.hyperledger.identus.pollux.core.service.serdes -import io.iohk.atala.pollux.core.model.schema.validator.SchemaSerDes +import org.hyperledger.identus.pollux.core.model.schema.validator.SchemaSerDes import zio.* import zio.json.* diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/serdes/AnoncredPresentationRequestV1.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/serdes/AnoncredPresentationRequestV1.scala similarity index 96% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/serdes/AnoncredPresentationRequestV1.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/serdes/AnoncredPresentationRequestV1.scala index e16fe79fff..18edcfe9e0 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/serdes/AnoncredPresentationRequestV1.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/serdes/AnoncredPresentationRequestV1.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.pollux.core.service.serdes +package org.hyperledger.identus.pollux.core.service.serdes -import io.iohk.atala.pollux.core.model.schema.validator.SchemaSerDes +import org.hyperledger.identus.pollux.core.model.schema.validator.SchemaSerDes import zio.* import zio.json.* diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/serdes/AnoncredPresentationV1.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/serdes/AnoncredPresentationV1.scala similarity index 99% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/serdes/AnoncredPresentationV1.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/serdes/AnoncredPresentationV1.scala index f773f8311a..ccca4fa58c 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/serdes/AnoncredPresentationV1.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/serdes/AnoncredPresentationV1.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.pollux.core.service.serdes +package org.hyperledger.identus.pollux.core.service.serdes -import io.iohk.atala.pollux.core.model.schema.validator.SchemaSerDes +import org.hyperledger.identus.pollux.core.model.schema.validator.SchemaSerDes import zio.* import zio.json.* diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/serdes/PrivateCredentialDefinitionSchemaSerDesV1.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/serdes/PrivateCredentialDefinitionSchemaSerDesV1.scala similarity index 95% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/serdes/PrivateCredentialDefinitionSchemaSerDesV1.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/serdes/PrivateCredentialDefinitionSchemaSerDesV1.scala index 6f7cadea72..5bea91b7f2 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/serdes/PrivateCredentialDefinitionSchemaSerDesV1.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/serdes/PrivateCredentialDefinitionSchemaSerDesV1.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.pollux.core.service.serdes +package org.hyperledger.identus.pollux.core.service.serdes -import io.iohk.atala.pollux.core.model.schema.validator.SchemaSerDes +import org.hyperledger.identus.pollux.core.model.schema.validator.SchemaSerDes import zio.* import zio.json.* diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/serdes/ProofKeyCredentialDefinitionSchemaSerDesV1.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/serdes/ProofKeyCredentialDefinitionSchemaSerDesV1.scala similarity index 90% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/serdes/ProofKeyCredentialDefinitionSchemaSerDesV1.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/serdes/ProofKeyCredentialDefinitionSchemaSerDesV1.scala index cf840d3f54..ee15cf065e 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/serdes/ProofKeyCredentialDefinitionSchemaSerDesV1.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/serdes/ProofKeyCredentialDefinitionSchemaSerDesV1.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.pollux.core.service.serdes +package org.hyperledger.identus.pollux.core.service.serdes -import io.iohk.atala.pollux.core.model.schema.validator.SchemaSerDes +import org.hyperledger.identus.pollux.core.model.schema.validator.SchemaSerDes import zio.* import zio.json.* diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/serdes/PublicCredentialDefinitionSchemaSerDesV1.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/serdes/PublicCredentialDefinitionSchemaSerDesV1.scala similarity index 97% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/serdes/PublicCredentialDefinitionSchemaSerDesV1.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/serdes/PublicCredentialDefinitionSchemaSerDesV1.scala index 98f0055459..af6e84ae26 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/serdes/PublicCredentialDefinitionSchemaSerDesV1.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/serdes/PublicCredentialDefinitionSchemaSerDesV1.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.pollux.core.service.serdes +package org.hyperledger.identus.pollux.core.service.serdes -import io.iohk.atala.pollux.core.model.schema.validator.SchemaSerDes +import org.hyperledger.identus.pollux.core.model.schema.validator.SchemaSerDes import zio.* import zio.json.* diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/verification/VcVerification.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/verification/VcVerification.scala similarity index 92% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/verification/VcVerification.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/verification/VcVerification.scala index 670849bd89..187c73eba8 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/verification/VcVerification.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/verification/VcVerification.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.core.service.verification +package org.hyperledger.identus.pollux.core.service.verification import java.time.OffsetDateTime diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/verification/VcVerificationService.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/verification/VcVerificationService.scala similarity index 85% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/verification/VcVerificationService.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/verification/VcVerificationService.scala index 915bd6e10b..272a4c5fbd 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/verification/VcVerificationService.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/verification/VcVerificationService.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.core.service.verification +package org.hyperledger.identus.pollux.core.service.verification import zio.* diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/verification/VcVerificationServiceError.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/verification/VcVerificationServiceError.scala similarity index 74% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/verification/VcVerificationServiceError.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/verification/VcVerificationServiceError.scala index 500fdcb052..17a8d99f7a 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/verification/VcVerificationServiceError.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/verification/VcVerificationServiceError.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.core.service.verification +package org.hyperledger.identus.pollux.core.service.verification sealed trait VcVerificationServiceError { def error: String diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/verification/VcVerificationServiceImpl.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/verification/VcVerificationServiceImpl.scala similarity index 96% rename from pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/verification/VcVerificationServiceImpl.scala rename to pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/verification/VcVerificationServiceImpl.scala index 3a3665f9ab..f32099b66b 100644 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/verification/VcVerificationServiceImpl.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/verification/VcVerificationServiceImpl.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.pollux.core.service.verification +package org.hyperledger.identus.pollux.core.service.verification -import io.iohk.atala.pollux.core.model.schema.CredentialSchema -import io.iohk.atala.pollux.core.service.URIDereferencer -import io.iohk.atala.pollux.vc.jwt.{DidResolver, JWT, JWTVerification, JwtCredential} +import org.hyperledger.identus.pollux.core.model.schema.CredentialSchema +import org.hyperledger.identus.pollux.core.service.URIDereferencer +import org.hyperledger.identus.pollux.vc.jwt.{DidResolver, JWT, JWTVerification, JwtCredential} import zio.{IO, *} import java.time.OffsetDateTime diff --git a/pollux/lib/core/src/test/resources/anoncred-presentation-schema-example.json b/pollux/core/src/test/resources/anoncred-presentation-schema-example.json similarity index 100% rename from pollux/lib/core/src/test/resources/anoncred-presentation-schema-example.json rename to pollux/core/src/test/resources/anoncred-presentation-schema-example.json diff --git a/pollux/lib/core/src/test/resources/anoncred-schema-example.json b/pollux/core/src/test/resources/anoncred-schema-example.json similarity index 100% rename from pollux/lib/core/src/test/resources/anoncred-schema-example.json rename to pollux/core/src/test/resources/anoncred-schema-example.json diff --git a/pollux/lib/core/src/test/resources/logback.xml b/pollux/core/src/test/resources/logback.xml similarity index 100% rename from pollux/lib/core/src/test/resources/logback.xml rename to pollux/core/src/test/resources/logback.xml diff --git a/prism-agent/service/server/src/test/resources/vc-schema-example.json b/pollux/core/src/test/resources/vc-schema-example.json similarity index 100% rename from prism-agent/service/server/src/test/resources/vc-schema-example.json rename to pollux/core/src/test/resources/vc-schema-example.json diff --git a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/model/presentation/PresentationAttachmentSpec.scala b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/model/presentation/PresentationAttachmentSpec.scala similarity index 98% rename from pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/model/presentation/PresentationAttachmentSpec.scala rename to pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/model/presentation/PresentationAttachmentSpec.scala index 56b973c376..b7532faa79 100644 --- a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/model/presentation/PresentationAttachmentSpec.scala +++ b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/model/presentation/PresentationAttachmentSpec.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.core.model.presentation +package org.hyperledger.identus.pollux.core.model.presentation import io.circe.Json import io.circe.parser.* diff --git a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/model/schema/AnoncredSchemaTypeSpec.scala b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/model/schema/AnoncredSchemaTypeSpec.scala similarity index 95% rename from pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/model/schema/AnoncredSchemaTypeSpec.scala rename to pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/model/schema/AnoncredSchemaTypeSpec.scala index 3fe70a7f31..6668608db2 100644 --- a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/model/schema/AnoncredSchemaTypeSpec.scala +++ b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/model/schema/AnoncredSchemaTypeSpec.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.pollux.core.model.schema +package org.hyperledger.identus.pollux.core.model.schema -import io.iohk.atala.pollux.core.model.schema.`type`.AnoncredSchemaType -import io.iohk.atala.pollux.core.model.schema.validator.JsonSchemaError +import org.hyperledger.identus.pollux.core.model.schema.`type`.AnoncredSchemaType +import org.hyperledger.identus.pollux.core.model.schema.validator.JsonSchemaError import zio.* import zio.json.* import zio.json.ast.Json diff --git a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/model/schema/CredentialSchemaSpec.scala b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/model/schema/CredentialSchemaSpec.scala similarity index 94% rename from pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/model/schema/CredentialSchemaSpec.scala rename to pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/model/schema/CredentialSchemaSpec.scala index 52eecfc3ad..91875493ae 100644 --- a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/model/schema/CredentialSchemaSpec.scala +++ b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/model/schema/CredentialSchemaSpec.scala @@ -1,12 +1,12 @@ -package io.iohk.atala.pollux.core.model.schema +package org.hyperledger.identus.pollux.core.model.schema -import io.iohk.atala.pollux.core.model.error.CredentialSchemaError -import io.iohk.atala.pollux.core.model.error.CredentialSchemaError.SchemaError -import io.iohk.atala.pollux.core.model.schema.AnoncredSchemaTypeSpec.test -import io.iohk.atala.pollux.core.model.schema.`type`.AnoncredSchemaType -import io.iohk.atala.pollux.core.model.schema.`type`.CredentialJsonSchemaType -import io.iohk.atala.pollux.core.model.schema.`type`.anoncred.AnoncredSchemaSerDesV1 -import io.iohk.atala.pollux.core.model.schema.validator.JsonSchemaError.JsonValidationErrors +import org.hyperledger.identus.pollux.core.model.error.CredentialSchemaError +import org.hyperledger.identus.pollux.core.model.error.CredentialSchemaError.SchemaError +import org.hyperledger.identus.pollux.core.model.schema.AnoncredSchemaTypeSpec.test +import org.hyperledger.identus.pollux.core.model.schema.`type`.AnoncredSchemaType +import org.hyperledger.identus.pollux.core.model.schema.`type`.CredentialJsonSchemaType +import org.hyperledger.identus.pollux.core.model.schema.`type`.anoncred.AnoncredSchemaSerDesV1 +import org.hyperledger.identus.pollux.core.model.schema.validator.JsonSchemaError.JsonValidationErrors import zio.Scope import zio.json.* import zio.json.ast.Json diff --git a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/repository/CredentialRepositoryInMemorySpec.scala b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/repository/CredentialRepositoryInMemorySpec.scala similarity index 70% rename from pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/repository/CredentialRepositoryInMemorySpec.scala rename to pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/repository/CredentialRepositoryInMemorySpec.scala index 159707de7f..4693dbdb87 100644 --- a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/repository/CredentialRepositoryInMemorySpec.scala +++ b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/repository/CredentialRepositoryInMemorySpec.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.pollux.core.repository +package org.hyperledger.identus.pollux.core.repository import zio._ import zio.test._ -/** core/testOnly io.iohk.atala.pollux.core.repository.CredentialRepositoryInMemorySpec */ +/** core/testOnly org.hyperledger.identus.pollux.core.repository.CredentialRepositoryInMemorySpec */ object CredentialRepositoryInMemorySpec extends ZIOSpecDefault { override def spec: Spec[TestEnvironment with Scope, Any] = diff --git a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/repository/CredentialRepositorySpecSuite.scala b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/repository/CredentialRepositorySpecSuite.scala similarity index 97% rename from pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/repository/CredentialRepositorySpecSuite.scala rename to pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/repository/CredentialRepositorySpecSuite.scala index 39e3f65995..4935966a79 100644 --- a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/repository/CredentialRepositorySpecSuite.scala +++ b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/repository/CredentialRepositorySpecSuite.scala @@ -1,12 +1,12 @@ -package io.iohk.atala.pollux.core.repository +package org.hyperledger.identus.pollux.core.repository -import io.iohk.atala.castor.core.model.did.PrismDID -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.mercury.protocol.issuecredential.{IssueCredential, RequestCredential} -import io.iohk.atala.pollux.core.model.* -import io.iohk.atala.pollux.core.model.IssueCredentialRecord.* -import io.iohk.atala.pollux.core.model.error.CredentialRepositoryError.* -import io.iohk.atala.shared.models.{WalletAccessContext, WalletId} +import org.hyperledger.identus.castor.core.model.did.PrismDID +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.mercury.protocol.issuecredential.{IssueCredential, RequestCredential} +import org.hyperledger.identus.pollux.core.model.* +import org.hyperledger.identus.pollux.core.model.IssueCredentialRecord.* +import org.hyperledger.identus.pollux.core.model.error.CredentialRepositoryError.* +import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} import zio.test.* import zio.test.Assertion.* import zio.{Exit, ZIO, ZLayer} diff --git a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/repository/PresentationRepositoryInMemorySpec.scala b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/repository/PresentationRepositoryInMemorySpec.scala similarity index 87% rename from pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/repository/PresentationRepositoryInMemorySpec.scala rename to pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/repository/PresentationRepositoryInMemorySpec.scala index b18b570dc3..3cf53f45e1 100644 --- a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/repository/PresentationRepositoryInMemorySpec.scala +++ b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/repository/PresentationRepositoryInMemorySpec.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.core.repository +package org.hyperledger.identus.pollux.core.repository import zio._ import zio.test._ diff --git a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/repository/PresentationRepositorySpecSuite.scala b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/repository/PresentationRepositorySpecSuite.scala similarity index 97% rename from pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/repository/PresentationRepositorySpecSuite.scala rename to pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/repository/PresentationRepositorySpecSuite.scala index b396ee05f5..5b51bf6c10 100644 --- a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/repository/PresentationRepositorySpecSuite.scala +++ b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/repository/PresentationRepositorySpecSuite.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.pollux.core.repository +package org.hyperledger.identus.pollux.core.repository -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.mercury.protocol.presentproof.{Presentation, ProposePresentation, RequestPresentation} -import io.iohk.atala.pollux.core.model.* -import io.iohk.atala.pollux.core.model.PresentationRecord.* -import io.iohk.atala.pollux.core.service.serdes.{AnoncredCredentialProofV1, AnoncredCredentialProofsV1} -import io.iohk.atala.shared.models.{WalletAccessContext, WalletId} +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.mercury.protocol.presentproof.{Presentation, ProposePresentation, RequestPresentation} +import org.hyperledger.identus.pollux.core.model.* +import org.hyperledger.identus.pollux.core.model.PresentationRecord.* +import org.hyperledger.identus.pollux.core.service.serdes.{AnoncredCredentialProofV1, AnoncredCredentialProofsV1} +import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} import zio.test.* import zio.test.Assertion.* import zio.{ZIO, ZLayer} diff --git a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/CredentialDefinitionServiceImplSpec.scala b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/CredentialDefinitionServiceImplSpec.scala similarity index 96% rename from pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/CredentialDefinitionServiceImplSpec.scala rename to pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/CredentialDefinitionServiceImplSpec.scala index 6ed020b520..49f582b547 100644 --- a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/CredentialDefinitionServiceImplSpec.scala +++ b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/CredentialDefinitionServiceImplSpec.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.core.service +package org.hyperledger.identus.pollux.core.service import zio.* import zio.test.* diff --git a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/CredentialDefinitionServiceSpecHelper.scala b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/CredentialDefinitionServiceSpecHelper.scala similarity index 74% rename from pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/CredentialDefinitionServiceSpecHelper.scala rename to pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/CredentialDefinitionServiceSpecHelper.scala index 723007a49f..c952ae38c1 100644 --- a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/CredentialDefinitionServiceSpecHelper.scala +++ b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/CredentialDefinitionServiceSpecHelper.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.pollux.core.service +package org.hyperledger.identus.pollux.core.service -import io.iohk.atala.agent.walletapi.memory.GenericSecretStorageInMemory -import io.iohk.atala.pollux.core.model.* -import io.iohk.atala.pollux.core.model.schema.CredentialDefinition -import io.iohk.atala.pollux.core.repository.CredentialDefinitionRepositoryInMemory -import io.iohk.atala.shared.models.WalletId.* -import io.iohk.atala.shared.models.{WalletAccessContext, WalletId} +import org.hyperledger.identus.agent.walletapi.memory.GenericSecretStorageInMemory +import org.hyperledger.identus.pollux.core.model.* +import org.hyperledger.identus.pollux.core.model.schema.CredentialDefinition +import org.hyperledger.identus.pollux.core.repository.CredentialDefinitionRepositoryInMemory +import org.hyperledger.identus.shared.models.WalletId.* +import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} import zio.* import java.time.OffsetDateTime diff --git a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/CredentialServiceImplSpec.scala b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/CredentialServiceImplSpec.scala similarity index 96% rename from pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/CredentialServiceImplSpec.scala rename to pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/CredentialServiceImplSpec.scala index 94840909fb..6e41874de8 100644 --- a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/CredentialServiceImplSpec.scala +++ b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/CredentialServiceImplSpec.scala @@ -1,21 +1,20 @@ -package io.iohk.atala.pollux.core.service +package org.hyperledger.identus.pollux.core.service import io.circe.Json import io.circe.syntax.* -import io.iohk.atala.agent.walletapi.service.MockManagedDIDService -import io.iohk.atala.castor.core.model.did.* -import io.iohk.atala.castor.core.model.did.VerificationRelationship.AssertionMethod -import io.iohk.atala.castor.core.service.MockDIDService -import io.iohk.atala.mercury.model -import io.iohk.atala.mercury.model.* -import io.iohk.atala.mercury.protocol.issuecredential.* -import io.iohk.atala.pollux.anoncreds.AnoncredCredential -import io.iohk.atala.pollux.core.model.* -import io.iohk.atala.pollux.core.model.IssueCredentialRecord.{ProtocolState, Role} -import io.iohk.atala.pollux.core.model.error.CredentialServiceError -import io.iohk.atala.pollux.core.model.error.CredentialServiceError.* -import io.iohk.atala.pollux.core.model.schema.CredentialDefinition -import io.iohk.atala.shared.models.{WalletAccessContext, WalletId} +import org.hyperledger.identus.agent.walletapi.service.MockManagedDIDService +import org.hyperledger.identus.castor.core.model.did.* +import org.hyperledger.identus.castor.core.model.did.VerificationRelationship.AssertionMethod +import org.hyperledger.identus.castor.core.service.MockDIDService +import org.hyperledger.identus.mercury.model.{Base64 => MyBase64, *} +import org.hyperledger.identus.mercury.protocol.issuecredential.* +import org.hyperledger.identus.pollux.anoncreds.AnoncredCredential +import org.hyperledger.identus.pollux.core.model.* +import org.hyperledger.identus.pollux.core.model.IssueCredentialRecord.{ProtocolState, Role} +import org.hyperledger.identus.pollux.core.model.error.CredentialServiceError +import org.hyperledger.identus.pollux.core.model.error.CredentialServiceError.* +import org.hyperledger.identus.pollux.core.model.schema.CredentialDefinition +import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} import zio.* import zio.mock.MockSpecDefault import zio.test.* @@ -603,7 +602,7 @@ object CredentialServiceImplSpec extends MockSpecDefault with CredentialServiceS assertTrue(record.issueCredentialData.isDefined) && assertTrue(record.issueCredentialData.get.attachments.nonEmpty) && assertTrue(record.issueCredentialData.get.attachments.head.data match - case model.Base64(value) => + case MyBase64(value) => val ba = new String(Base64.getUrlDecoder.decode(value)) AnoncredCredential(ba).credDefId == credDefId case _ => false diff --git a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/CredentialServiceNotifierSpec.scala b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/CredentialServiceNotifierSpec.scala similarity index 92% rename from pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/CredentialServiceNotifierSpec.scala rename to pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/CredentialServiceNotifierSpec.scala index 4bbba5c2b0..db8e8a3c77 100644 --- a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/CredentialServiceNotifierSpec.scala +++ b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/CredentialServiceNotifierSpec.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.pollux.core.service +package org.hyperledger.identus.pollux.core.service -import io.iohk.atala.event.notification.{EventNotificationService, EventNotificationServiceImpl} -import io.iohk.atala.mercury.protocol.issuecredential.* -import io.iohk.atala.pollux.core.model.* -import io.iohk.atala.pollux.core.model.IssueCredentialRecord.ProtocolState -import io.iohk.atala.pollux.core.model.error.CredentialServiceError -import io.iohk.atala.shared.models.{WalletAccessContext, WalletId} +import org.hyperledger.identus.event.notification.{EventNotificationService, EventNotificationServiceImpl} +import org.hyperledger.identus.mercury.protocol.issuecredential.* +import org.hyperledger.identus.pollux.core.model.* +import org.hyperledger.identus.pollux.core.model.IssueCredentialRecord.ProtocolState +import org.hyperledger.identus.pollux.core.model.error.CredentialServiceError +import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} import zio.* import zio.mock.{Expectation, MockSpecDefault} import zio.test.* diff --git a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/CredentialServiceSpecHelper.scala b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/CredentialServiceSpecHelper.scala similarity index 86% rename from pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/CredentialServiceSpecHelper.scala rename to pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/CredentialServiceSpecHelper.scala index 51921eb8e0..722376ebb8 100644 --- a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/CredentialServiceSpecHelper.scala +++ b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/CredentialServiceSpecHelper.scala @@ -1,22 +1,22 @@ -package io.iohk.atala.pollux.core.service +package org.hyperledger.identus.pollux.core.service import io.circe.Json -import io.iohk.atala.agent.walletapi.memory.GenericSecretStorageInMemory -import io.iohk.atala.agent.walletapi.service.ManagedDIDService -import io.iohk.atala.agent.walletapi.storage.GenericSecretStorage -import io.iohk.atala.castor.core.model.did.PrismDID -import io.iohk.atala.castor.core.service.DIDService -import io.iohk.atala.mercury.model.{AttachmentDescriptor, DidId} -import io.iohk.atala.mercury.protocol.issuecredential.* -import io.iohk.atala.pollux.core.model.* -import io.iohk.atala.pollux.core.model.presentation.{ClaimFormat, Ldp, Options, PresentationDefinition} -import io.iohk.atala.pollux.core.repository.{ +import org.hyperledger.identus.agent.walletapi.memory.GenericSecretStorageInMemory +import org.hyperledger.identus.agent.walletapi.service.ManagedDIDService +import org.hyperledger.identus.agent.walletapi.storage.GenericSecretStorage +import org.hyperledger.identus.castor.core.model.did.PrismDID +import org.hyperledger.identus.castor.core.service.DIDService +import org.hyperledger.identus.mercury.model.{AttachmentDescriptor, DidId} +import org.hyperledger.identus.mercury.protocol.issuecredential.* +import org.hyperledger.identus.pollux.core.model.* +import org.hyperledger.identus.pollux.core.model.presentation.{ClaimFormat, Ldp, Options, PresentationDefinition} +import org.hyperledger.identus.pollux.core.repository.{ CredentialDefinitionRepositoryInMemory, CredentialRepositoryInMemory, CredentialStatusListRepositoryInMemory } -import io.iohk.atala.pollux.vc.jwt.* -import io.iohk.atala.shared.models.{WalletAccessContext, WalletId} +import org.hyperledger.identus.pollux.vc.jwt.* +import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} import zio.* import java.util.UUID diff --git a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/LinkSecretServiceImplSpec.scala b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/LinkSecretServiceImplSpec.scala similarity index 74% rename from pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/LinkSecretServiceImplSpec.scala rename to pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/LinkSecretServiceImplSpec.scala index c65219bc37..49b4fa59fe 100644 --- a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/LinkSecretServiceImplSpec.scala +++ b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/LinkSecretServiceImplSpec.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.pollux.core.service +package org.hyperledger.identus.pollux.core.service -import io.iohk.atala.agent.walletapi.memory.GenericSecretStorageInMemory -import io.iohk.atala.agent.walletapi.storage.GenericSecretStorage -import io.iohk.atala.pollux.anoncreds.AnoncredLinkSecret -import io.iohk.atala.shared.models.WalletId.* -import io.iohk.atala.shared.models.{WalletAccessContext, WalletId} +import org.hyperledger.identus.agent.walletapi.memory.GenericSecretStorageInMemory +import org.hyperledger.identus.agent.walletapi.storage.GenericSecretStorage +import org.hyperledger.identus.pollux.anoncreds.AnoncredLinkSecret +import org.hyperledger.identus.shared.models.WalletId.* +import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} import zio.* import zio.test.* import zio.test.TestAspect.* diff --git a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/PresentationServiceNotifierSpec.scala b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/PresentationServiceNotifierSpec.scala similarity index 92% rename from pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/PresentationServiceNotifierSpec.scala rename to pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/PresentationServiceNotifierSpec.scala index f08aa46f16..adc49fca4c 100644 --- a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/PresentationServiceNotifierSpec.scala +++ b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/PresentationServiceNotifierSpec.scala @@ -1,17 +1,21 @@ -package io.iohk.atala.pollux.core.service - -import io.iohk.atala.event.notification.{EventNotificationService, EventNotificationServiceImpl} -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.mercury.protocol.presentproof.{PresentCredentialRequestFormat, Presentation, RequestPresentation} -import io.iohk.atala.pollux.core.model.PresentationRecord.ProtocolState -import io.iohk.atala.pollux.core.model.{CredentialFormat, DidCommID, PresentationRecord} +package org.hyperledger.identus.pollux.core.service + +import org.hyperledger.identus.event.notification.{EventNotificationService, EventNotificationServiceImpl} +import org.hyperledger.identus.mercury.model.DidId +import org.hyperledger.identus.mercury.protocol.presentproof.{ + PresentCredentialRequestFormat, + Presentation, + RequestPresentation +} +import org.hyperledger.identus.pollux.core.model.PresentationRecord.ProtocolState +import org.hyperledger.identus.pollux.core.model.{CredentialFormat, DidCommID, PresentationRecord} import zio.mock.Expectation import zio.test.{Assertion, Spec, TestEnvironment, ZIOSpecDefault, assertTrue} import zio.{Scope, ZIO, ZLayer} import java.time.Instant -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletId object PresentationServiceNotifierSpec extends ZIOSpecDefault with PresentationServiceSpecHelper { diff --git a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/PresentationServiceSpec.scala b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/PresentationServiceSpec.scala similarity index 96% rename from pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/PresentationServiceSpec.scala rename to pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/PresentationServiceSpec.scala index abe9b32a1a..b647cfd993 100644 --- a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/PresentationServiceSpec.scala +++ b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/PresentationServiceSpec.scala @@ -1,29 +1,29 @@ -package io.iohk.atala.pollux.core.service +package org.hyperledger.identus.pollux.core.service import io.circe.parser.decode import io.circe.syntax.* -import io.iohk.atala.agent.walletapi.storage.GenericSecretStorage -import io.iohk.atala.mercury.model.{AttachmentDescriptor, Base64, DidId} -import io.iohk.atala.mercury.protocol.issuecredential.{IssueCredential, IssueCredentialIssuedFormat} -import io.iohk.atala.mercury.protocol.presentproof.* -import io.iohk.atala.pollux.anoncreds.* -import io.iohk.atala.pollux.core.model.* -import io.iohk.atala.pollux.core.model.IssueCredentialRecord.* -import io.iohk.atala.pollux.core.model.PresentationRecord.* -import io.iohk.atala.pollux.core.model.error.PresentationError -import io.iohk.atala.pollux.core.model.error.PresentationError.* -import io.iohk.atala.pollux.core.model.presentation.Options -import io.iohk.atala.pollux.core.model.schema.CredentialDefinition.Input -import io.iohk.atala.pollux.core.model.secret.CredentialDefinitionSecret -import io.iohk.atala.pollux.core.repository.{CredentialRepository, PresentationRepository} -import io.iohk.atala.pollux.core.service.serdes.{ +import org.hyperledger.identus.agent.walletapi.storage.GenericSecretStorage +import org.hyperledger.identus.mercury.model.{AttachmentDescriptor, Base64, DidId} +import org.hyperledger.identus.mercury.protocol.issuecredential.{IssueCredential, IssueCredentialIssuedFormat} +import org.hyperledger.identus.mercury.protocol.presentproof.* +import org.hyperledger.identus.pollux.anoncreds.* +import org.hyperledger.identus.pollux.core.model.* +import org.hyperledger.identus.pollux.core.model.IssueCredentialRecord.* +import org.hyperledger.identus.pollux.core.model.PresentationRecord.* +import org.hyperledger.identus.pollux.core.model.error.PresentationError +import org.hyperledger.identus.pollux.core.model.error.PresentationError.* +import org.hyperledger.identus.pollux.core.model.presentation.Options +import org.hyperledger.identus.pollux.core.model.schema.CredentialDefinition.Input +import org.hyperledger.identus.pollux.core.model.secret.CredentialDefinitionSecret +import org.hyperledger.identus.pollux.core.repository.{CredentialRepository, PresentationRepository} +import org.hyperledger.identus.pollux.core.service.serdes.{ AnoncredCredentialProofV1, AnoncredCredentialProofsV1, AnoncredPresentationRequestV1, AnoncredPresentationV1 } -import io.iohk.atala.pollux.vc.jwt.* -import io.iohk.atala.shared.models.{WalletAccessContext, WalletId} +import org.hyperledger.identus.pollux.vc.jwt.* +import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} import zio.* import zio.test.* import zio.test.Assertion.* @@ -92,9 +92,9 @@ object PresentationServiceSpec extends ZIOSpecDefault with PresentationServiceSp val maybePresentationOptions = record.requestPresentationData.get.attachments.headOption .map(attachment => - decode[io.iohk.atala.mercury.model.JsonData](attachment.data.asJson.noSpaces) + decode[org.hyperledger.identus.mercury.model.JsonData](attachment.data.asJson.noSpaces) .flatMap(data => - io.iohk.atala.pollux.core.model.presentation.PresentationAttachment.given_Decoder_PresentationAttachment + org.hyperledger.identus.pollux.core.model.presentation.PresentationAttachment.given_Decoder_PresentationAttachment .decodeJson(data.json.asJson) .map(_.options) ) diff --git a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/PresentationServiceSpecHelper.scala b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/PresentationServiceSpecHelper.scala similarity index 86% rename from pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/PresentationServiceSpecHelper.scala rename to pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/PresentationServiceSpecHelper.scala index bbb32df467..558c24be92 100644 --- a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/PresentationServiceSpecHelper.scala +++ b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/PresentationServiceSpecHelper.scala @@ -1,16 +1,16 @@ -package io.iohk.atala.pollux.core.service +package org.hyperledger.identus.pollux.core.service import com.nimbusds.jose.jwk.* -import io.iohk.atala.agent.walletapi.memory.GenericSecretStorageInMemory -import io.iohk.atala.mercury.model.{AttachmentDescriptor, DidId} -import io.iohk.atala.mercury.protocol.presentproof.* -import io.iohk.atala.mercury.{AgentPeerService, PeerDID} -import io.iohk.atala.pollux.core.model.* -import io.iohk.atala.pollux.core.model.error.PresentationError -import io.iohk.atala.pollux.core.repository.* -import io.iohk.atala.pollux.core.service.serdes.* -import io.iohk.atala.pollux.vc.jwt.* -import io.iohk.atala.shared.models.{WalletAccessContext, WalletId} +import org.hyperledger.identus.agent.walletapi.memory.GenericSecretStorageInMemory +import org.hyperledger.identus.mercury.model.{AttachmentDescriptor, DidId} +import org.hyperledger.identus.mercury.protocol.presentproof.* +import org.hyperledger.identus.mercury.{AgentPeerService, PeerDID} +import org.hyperledger.identus.pollux.core.model.* +import org.hyperledger.identus.pollux.core.model.error.PresentationError +import org.hyperledger.identus.pollux.core.repository.* +import org.hyperledger.identus.pollux.core.service.serdes.* +import org.hyperledger.identus.pollux.vc.jwt.* +import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} import zio.* import java.security.* @@ -55,12 +55,12 @@ trait PresentationServiceSpecHelper { ) } - protected def requestCredential = io.iohk.atala.mercury.protocol.issuecredential.RequestCredential( + protected def requestCredential = org.hyperledger.identus.mercury.protocol.issuecredential.RequestCredential( from = DidId("did:prism:aaa"), to = DidId("did:prism:bbb"), thid = Some(UUID.randomUUID.toString), - body = - io.iohk.atala.mercury.protocol.issuecredential.RequestCredential.Body(goal_code = Some("credential issuance")), + body = org.hyperledger.identus.mercury.protocol.issuecredential.RequestCredential + .Body(goal_code = Some("credential issuance")), attachments = Nil ) @@ -158,7 +158,7 @@ trait PresentationServiceSpecHelper { pairwiseProverDID: DidId = DidId("did:prism:prover-pairwise"), thid: DidCommID = DidCommID(), schemaId: _root_.java.lang.String = "schemaId", - options: Option[io.iohk.atala.pollux.core.model.presentation.Options] = None + options: Option[org.hyperledger.identus.pollux.core.model.presentation.Options] = None ): ZIO[WalletAccessContext, PresentationError, PresentationRecord] = { val proofType = ProofType(schemaId, None, None) svc.createJwtPresentationRecord( diff --git a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/serdes/AnoncredPresentationRequestSpec.scala b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/serdes/AnoncredPresentationRequestSpec.scala similarity index 97% rename from pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/serdes/AnoncredPresentationRequestSpec.scala rename to pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/serdes/AnoncredPresentationRequestSpec.scala index 85a18f3204..3abbb9f4db 100644 --- a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/serdes/AnoncredPresentationRequestSpec.scala +++ b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/serdes/AnoncredPresentationRequestSpec.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.core.service.serdes +package org.hyperledger.identus.pollux.core.service.serdes import zio.* import zio.test.* diff --git a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/serdes/AnoncredPresentationSpec.scala b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/serdes/AnoncredPresentationSpec.scala similarity index 97% rename from pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/serdes/AnoncredPresentationSpec.scala rename to pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/serdes/AnoncredPresentationSpec.scala index 275bc181be..d3795f378c 100644 --- a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/serdes/AnoncredPresentationSpec.scala +++ b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/serdes/AnoncredPresentationSpec.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.pollux.core.service.serdes +package org.hyperledger.identus.pollux.core.service.serdes -import io.iohk.atala.pollux.core.service.serdes.AnoncredPresentationV1.* +import org.hyperledger.identus.pollux.core.service.serdes.AnoncredPresentationV1.* import zio.* import zio.test.* import zio.test.Assertion.* diff --git a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/serdes/PublicCredentialDefinitionSchemaSerDesSpec.scala b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/serdes/PublicCredentialDefinitionSchemaSerDesSpec.scala similarity index 98% rename from pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/serdes/PublicCredentialDefinitionSchemaSerDesSpec.scala rename to pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/serdes/PublicCredentialDefinitionSchemaSerDesSpec.scala index aa10648519..e3de5b4407 100644 --- a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/serdes/PublicCredentialDefinitionSchemaSerDesSpec.scala +++ b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/serdes/PublicCredentialDefinitionSchemaSerDesSpec.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.core.service.serdes +package org.hyperledger.identus.pollux.core.service.serdes import zio.* import zio.test.* diff --git a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/verification/VcVerificationServiceImplSpec.scala b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/verification/VcVerificationServiceImplSpec.scala similarity index 98% rename from pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/verification/VcVerificationServiceImplSpec.scala rename to pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/verification/VcVerificationServiceImplSpec.scala index c621819224..53cb5ba626 100644 --- a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/verification/VcVerificationServiceImplSpec.scala +++ b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/verification/VcVerificationServiceImplSpec.scala @@ -1,13 +1,13 @@ -package io.iohk.atala.pollux.core.service.verification +package org.hyperledger.identus.pollux.core.service.verification import io.circe.* import io.circe.syntax.* -import io.iohk.atala.agent.walletapi.service.MockManagedDIDService -import io.iohk.atala.castor.core.service.MockDIDService -import io.iohk.atala.pollux.core.service.ResourceURIDereferencerImpl -import io.iohk.atala.pollux.vc.jwt.* -import io.iohk.atala.pollux.vc.jwt.CredentialPayload.Implicits.* -import io.iohk.atala.shared.models.{WalletAccessContext, WalletId} +import org.hyperledger.identus.agent.walletapi.service.MockManagedDIDService +import org.hyperledger.identus.castor.core.service.MockDIDService +import org.hyperledger.identus.pollux.core.service.ResourceURIDereferencerImpl +import org.hyperledger.identus.pollux.vc.jwt.* +import org.hyperledger.identus.pollux.vc.jwt.CredentialPayload.Implicits.* +import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} import zio.* import zio.Config.OffsetDateTime import zio.test.* diff --git a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/verification/VcVerificationServiceSpecHelper.scala b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/verification/VcVerificationServiceSpecHelper.scala similarity index 72% rename from pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/verification/VcVerificationServiceSpecHelper.scala rename to pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/verification/VcVerificationServiceSpecHelper.scala index a4778a9072..0febf9aded 100644 --- a/pollux/lib/core/src/test/scala/io/iohk/atala/pollux/core/service/verification/VcVerificationServiceSpecHelper.scala +++ b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/verification/VcVerificationServiceSpecHelper.scala @@ -1,12 +1,12 @@ -package io.iohk.atala.pollux.core.service.verification - -import io.iohk.atala.agent.walletapi.service.{ManagedDIDService, MockManagedDIDService} -import io.iohk.atala.castor.core.model.did.VerificationRelationship -import io.iohk.atala.castor.core.service.{DIDService, MockDIDService} -import io.iohk.atala.pollux.core.service.{ResourceURIDereferencerImpl, URIDereferencer} -import io.iohk.atala.pollux.vc.jwt.* -import io.iohk.atala.shared.models.WalletId.* -import io.iohk.atala.shared.models.{WalletAccessContext, WalletId} +package org.hyperledger.identus.pollux.core.service.verification + +import org.hyperledger.identus.agent.walletapi.service.{ManagedDIDService, MockManagedDIDService} +import org.hyperledger.identus.castor.core.model.did.VerificationRelationship +import org.hyperledger.identus.castor.core.service.{DIDService, MockDIDService} +import org.hyperledger.identus.pollux.core.service.{ResourceURIDereferencerImpl, URIDereferencer} +import org.hyperledger.identus.pollux.vc.jwt.* +import org.hyperledger.identus.shared.models.WalletId.* +import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} import zio.* import zio.mock.Expectation @@ -18,7 +18,7 @@ trait VcVerificationServiceSpecHelper { protected val issuer = Issuer( - did = io.iohk.atala.pollux.vc.jwt.DID(issuerDidData.id.did.toString), + did = org.hyperledger.identus.pollux.vc.jwt.DID(issuerDidData.id.did.toString), signer = ES256KSigner(issuerKp.privateKey.toJavaPrivateKey), publicKey = issuerKp.publicKey.toJavaPublicKey ) diff --git a/pollux/lib/issue-protocol-state.md b/pollux/issue-protocol-state.md similarity index 100% rename from pollux/lib/issue-protocol-state.md rename to pollux/issue-protocol-state.md diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/error/LinkSecretError.scala b/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/error/LinkSecretError.scala deleted file mode 100644 index 3854f345c6..0000000000 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/error/LinkSecretError.scala +++ /dev/null @@ -1,3 +0,0 @@ -package io.iohk.atala.pollux.core.model.error - -final case class LinkSecretError(cause: Throwable) diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/type/AnoncredSchemaType.scala b/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/type/AnoncredSchemaType.scala deleted file mode 100644 index 10c53f6f5f..0000000000 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/type/AnoncredSchemaType.scala +++ /dev/null @@ -1,27 +0,0 @@ -package io.iohk.atala.pollux.core.model.schema.`type` - -import com.networknt.schema.* -import io.iohk.atala.pollux.core.model.schema.Schema -import io.iohk.atala.pollux.core.model.schema.`type`.anoncred.AnoncredSchemaSerDesV1 -import io.iohk.atala.pollux.core.model.schema.`type`.anoncred.AnoncredSchemaSerDesV1.* -import io.iohk.atala.pollux.core.model.schema.validator.JsonSchemaError -import io.iohk.atala.pollux.core.model.schema.validator.JsonSchemaUtils -import io.iohk.atala.pollux.core.model.schema.validator.JsonSchemaValidatorImpl -import io.iohk.atala.pollux.core.model.schema.validator.SchemaSerDes -import zio.* -import zio.json.* - -object AnoncredSchemaType extends CredentialSchemaType { - - val anondcredShemaBasedSerDes: SchemaSerDes[AnoncredSchemaSerDesV1] = AnoncredSchemaSerDesV1.schemaSerDes - val `type`: String = AnoncredSchemaSerDesV1.version - - override def validate(schema: Schema): IO[JsonSchemaError, Unit] = { - for { - jsonSchemaSchema <- anondcredShemaBasedSerDes.initialiseJsonSchema - schemaValidator = JsonSchemaValidatorImpl(jsonSchemaSchema) - jsonSchemaNode <- JsonSchemaUtils.toJsonNode(schema) - _ <- schemaValidator.validate(jsonSchemaNode) - } yield () - } -} diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/type/CredentialSchemaType.scala b/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/type/CredentialSchemaType.scala deleted file mode 100644 index dccc047b0f..0000000000 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/type/CredentialSchemaType.scala +++ /dev/null @@ -1,11 +0,0 @@ -package io.iohk.atala.pollux.core.model.schema.`type` - -import io.iohk.atala.pollux.core.model.schema.Schema -import io.iohk.atala.pollux.core.model.schema.validator.JsonSchemaError -import zio.IO - -trait CredentialSchemaType { - val `type`: String - - def validate(schema: Schema): IO[JsonSchemaError, Unit] -} diff --git a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/LinkSecretService.scala b/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/LinkSecretService.scala deleted file mode 100644 index f0d6aa2448..0000000000 --- a/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/service/LinkSecretService.scala +++ /dev/null @@ -1,12 +0,0 @@ -package io.iohk.atala.pollux.core.service - -import io.iohk.atala.pollux.anoncreds.AnoncredLinkSecretWithId -import io.iohk.atala.pollux.core.model.error.LinkSecretError -import io.iohk.atala.shared.models.WalletAccessContext -import zio.ZIO - -trait LinkSecretService { - type Result[T] = ZIO[WalletAccessContext, LinkSecretError, T] - - def fetchOrCreate(): Result[AnoncredLinkSecretWithId] -} diff --git a/pollux/lib/sql-doobie/src/main/resources/sql/pollux/V10__presentation_records_add_thid_unique_constraint.sql b/pollux/sql-doobie/src/main/resources/sql/pollux/V10__presentation_records_add_thid_unique_constraint.sql similarity index 100% rename from pollux/lib/sql-doobie/src/main/resources/sql/pollux/V10__presentation_records_add_thid_unique_constraint.sql rename to pollux/sql-doobie/src/main/resources/sql/pollux/V10__presentation_records_add_thid_unique_constraint.sql diff --git a/pollux/lib/sql-doobie/src/main/resources/sql/pollux/V11__issue_credential_extend_schema_id.sql b/pollux/sql-doobie/src/main/resources/sql/pollux/V11__issue_credential_extend_schema_id.sql similarity index 100% rename from pollux/lib/sql-doobie/src/main/resources/sql/pollux/V11__issue_credential_extend_schema_id.sql rename to pollux/sql-doobie/src/main/resources/sql/pollux/V11__issue_credential_extend_schema_id.sql diff --git a/pollux/lib/sql-doobie/src/main/resources/sql/pollux/V12__verification_policies_reset_nonce.sql b/pollux/sql-doobie/src/main/resources/sql/pollux/V12__verification_policies_reset_nonce.sql similarity index 100% rename from pollux/lib/sql-doobie/src/main/resources/sql/pollux/V12__verification_policies_reset_nonce.sql rename to pollux/sql-doobie/src/main/resources/sql/pollux/V12__verification_policies_reset_nonce.sql diff --git a/pollux/lib/sql-doobie/src/main/resources/sql/pollux/V13__credential_schema_tables.sql b/pollux/sql-doobie/src/main/resources/sql/pollux/V13__credential_schema_tables.sql similarity index 100% rename from pollux/lib/sql-doobie/src/main/resources/sql/pollux/V13__credential_schema_tables.sql rename to pollux/sql-doobie/src/main/resources/sql/pollux/V13__credential_schema_tables.sql diff --git a/pollux/lib/sql-doobie/src/main/resources/sql/pollux/V14__add_rls_policy.sql b/pollux/sql-doobie/src/main/resources/sql/pollux/V14__add_rls_policy.sql similarity index 100% rename from pollux/lib/sql-doobie/src/main/resources/sql/pollux/V14__add_rls_policy.sql rename to pollux/sql-doobie/src/main/resources/sql/pollux/V14__add_rls_policy.sql diff --git a/pollux/lib/sql-doobie/src/main/resources/sql/pollux/V15__add_anoncreds_columns.sql b/pollux/sql-doobie/src/main/resources/sql/pollux/V15__add_anoncreds_columns.sql similarity index 100% rename from pollux/lib/sql-doobie/src/main/resources/sql/pollux/V15__add_anoncreds_columns.sql rename to pollux/sql-doobie/src/main/resources/sql/pollux/V15__add_anoncreds_columns.sql diff --git a/pollux/lib/sql-doobie/src/main/resources/sql/pollux/V16__revocation_status_lists_table_and_columns.sql b/pollux/sql-doobie/src/main/resources/sql/pollux/V16__revocation_status_lists_table_and_columns.sql similarity index 100% rename from pollux/lib/sql-doobie/src/main/resources/sql/pollux/V16__revocation_status_lists_table_and_columns.sql rename to pollux/sql-doobie/src/main/resources/sql/pollux/V16__revocation_status_lists_table_and_columns.sql diff --git a/pollux/lib/sql-doobie/src/main/resources/sql/pollux/V17__add_anoncred_credentials_to_use_columns.sql b/pollux/sql-doobie/src/main/resources/sql/pollux/V17__add_anoncred_credentials_to_use_columns.sql similarity index 100% rename from pollux/lib/sql-doobie/src/main/resources/sql/pollux/V17__add_anoncred_credentials_to_use_columns.sql rename to pollux/sql-doobie/src/main/resources/sql/pollux/V17__add_anoncred_credentials_to_use_columns.sql diff --git a/pollux/lib/sql-doobie/src/main/resources/sql/pollux/V18__issue_credential_rename_schema_id.sql b/pollux/sql-doobie/src/main/resources/sql/pollux/V18__issue_credential_rename_schema_id.sql similarity index 100% rename from pollux/lib/sql-doobie/src/main/resources/sql/pollux/V18__issue_credential_rename_schema_id.sql rename to pollux/sql-doobie/src/main/resources/sql/pollux/V18__issue_credential_rename_schema_id.sql diff --git a/pollux/lib/sql-doobie/src/main/resources/sql/pollux/V19__update_revocation_status_list_table_and_columns.sql b/pollux/sql-doobie/src/main/resources/sql/pollux/V19__update_revocation_status_list_table_and_columns.sql similarity index 100% rename from pollux/lib/sql-doobie/src/main/resources/sql/pollux/V19__update_revocation_status_list_table_and_columns.sql rename to pollux/sql-doobie/src/main/resources/sql/pollux/V19__update_revocation_status_list_table_and_columns.sql diff --git a/pollux/lib/sql-doobie/src/main/resources/sql/pollux/V1__init_tables.sql b/pollux/sql-doobie/src/main/resources/sql/pollux/V1__init_tables.sql similarity index 100% rename from pollux/lib/sql-doobie/src/main/resources/sql/pollux/V1__init_tables.sql rename to pollux/sql-doobie/src/main/resources/sql/pollux/V1__init_tables.sql diff --git a/pollux/lib/sql-doobie/src/main/resources/sql/pollux/V3__schema_registry_tables.sql b/pollux/sql-doobie/src/main/resources/sql/pollux/V3__schema_registry_tables.sql similarity index 100% rename from pollux/lib/sql-doobie/src/main/resources/sql/pollux/V3__schema_registry_tables.sql rename to pollux/sql-doobie/src/main/resources/sql/pollux/V3__schema_registry_tables.sql diff --git a/pollux/lib/sql-doobie/src/main/resources/sql/pollux/V5__create_protocol_state_index.sql b/pollux/sql-doobie/src/main/resources/sql/pollux/V5__create_protocol_state_index.sql similarity index 100% rename from pollux/lib/sql-doobie/src/main/resources/sql/pollux/V5__create_protocol_state_index.sql rename to pollux/sql-doobie/src/main/resources/sql/pollux/V5__create_protocol_state_index.sql diff --git a/pollux/lib/sql-doobie/src/main/resources/sql/pollux/V6__verification_policy_tables.sql b/pollux/sql-doobie/src/main/resources/sql/pollux/V6__verification_policy_tables.sql similarity index 100% rename from pollux/lib/sql-doobie/src/main/resources/sql/pollux/V6__verification_policy_tables.sql rename to pollux/sql-doobie/src/main/resources/sql/pollux/V6__verification_policy_tables.sql diff --git a/pollux/lib/sql-doobie/src/main/resources/sql/pollux/V8__credential_schema_tables.sql b/pollux/sql-doobie/src/main/resources/sql/pollux/V8__credential_schema_tables.sql similarity index 100% rename from pollux/lib/sql-doobie/src/main/resources/sql/pollux/V8__credential_schema_tables.sql rename to pollux/sql-doobie/src/main/resources/sql/pollux/V8__credential_schema_tables.sql diff --git a/pollux/lib/sql-doobie/src/main/resources/sql/pollux/V9__issue_credential_drop_subjectId_not_null.sql b/pollux/sql-doobie/src/main/resources/sql/pollux/V9__issue_credential_drop_subjectId_not_null.sql similarity index 100% rename from pollux/lib/sql-doobie/src/main/resources/sql/pollux/V9__issue_credential_drop_subjectId_not_null.sql rename to pollux/sql-doobie/src/main/resources/sql/pollux/V9__issue_credential_drop_subjectId_not_null.sql diff --git a/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/model/JWTCredentialRow.scala b/pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/model/JWTCredentialRow.scala similarity index 70% rename from pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/model/JWTCredentialRow.scala rename to pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/model/JWTCredentialRow.scala index 697a973cf9..1b889efb3f 100644 --- a/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/model/JWTCredentialRow.scala +++ b/pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/model/JWTCredentialRow.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.sql.model +package org.hyperledger.identus.pollux.sql.model private[sql] final case class JWTCredentialRow( batchId: String, diff --git a/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/model/db/CredentialDefinition.scala b/pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/model/db/CredentialDefinition.scala similarity index 92% rename from pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/model/db/CredentialDefinition.scala rename to pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/model/db/CredentialDefinition.scala index 224c0a81c9..6fa9d39679 100644 --- a/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/model/db/CredentialDefinition.scala +++ b/pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/model/db/CredentialDefinition.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.pollux.sql.model.db +package org.hyperledger.identus.pollux.sql.model.db import io.getquill.* import io.getquill.context.json.PostgresJsonExtensions import io.getquill.doobie.DoobieContext import io.getquill.idiom.* -import io.iohk.atala.pollux.core.model.schema.{CorrectnessProof, Definition} -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.pollux.core.model.schema.{CorrectnessProof, Definition} +import org.hyperledger.identus.shared.models.WalletId import java.time.OffsetDateTime import java.time.temporal.ChronoUnit @@ -37,7 +37,7 @@ case class CredentialDefinition( object CredentialDefinition { def fromModel( - m: io.iohk.atala.pollux.core.model.schema.CredentialDefinition, + m: org.hyperledger.identus.pollux.core.model.schema.CredentialDefinition, walletId: WalletId ): CredentialDefinition = CredentialDefinition( @@ -61,8 +61,8 @@ object CredentialDefinition { def toModel( db: CredentialDefinition - ): io.iohk.atala.pollux.core.model.schema.CredentialDefinition = { - io.iohk.atala.pollux.core.model.schema.CredentialDefinition( + ): org.hyperledger.identus.pollux.core.model.schema.CredentialDefinition = { + org.hyperledger.identus.pollux.core.model.schema.CredentialDefinition( guid = db.guid, id = db.id, name = db.name, diff --git a/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/model/db/CredentialSchema.scala b/pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/model/db/CredentialSchema.scala similarity index 91% rename from pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/model/db/CredentialSchema.scala rename to pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/model/db/CredentialSchema.scala index 54e4dfde32..4649497d25 100644 --- a/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/model/db/CredentialSchema.scala +++ b/pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/model/db/CredentialSchema.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.pollux.sql.model.db +package org.hyperledger.identus.pollux.sql.model.db import io.getquill.* import io.getquill.context.json.PostgresJsonExtensions import io.getquill.doobie.DoobieContext import io.getquill.idiom.* -import io.iohk.atala.pollux.core.model.schema.Schema -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.pollux.core.model.schema.Schema +import org.hyperledger.identus.shared.models.WalletId import java.time.OffsetDateTime import java.time.temporal.ChronoUnit @@ -33,7 +33,7 @@ case class CredentialSchema( object CredentialSchema { def fromModel( - m: io.iohk.atala.pollux.core.model.schema.CredentialSchema, + m: org.hyperledger.identus.pollux.core.model.schema.CredentialSchema, walletId: WalletId ): CredentialSchema = CredentialSchema( @@ -52,8 +52,8 @@ object CredentialSchema { def toModel( db: CredentialSchema - ): io.iohk.atala.pollux.core.model.schema.CredentialSchema = { - io.iohk.atala.pollux.core.model.schema.CredentialSchema( + ): org.hyperledger.identus.pollux.core.model.schema.CredentialSchema = { + org.hyperledger.identus.pollux.core.model.schema.CredentialSchema( guid = db.guid, id = db.id, name = db.name, diff --git a/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/model/db/VerificationPolicy.scala b/pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/model/db/VerificationPolicy.scala similarity index 95% rename from pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/model/db/VerificationPolicy.scala rename to pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/model/db/VerificationPolicy.scala index fbc8120a2c..b2d59df531 100644 --- a/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/model/db/VerificationPolicy.scala +++ b/pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/model/db/VerificationPolicy.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.pollux.sql.model.db +package org.hyperledger.identus.pollux.sql.model.db import io.getquill.* import io.getquill.doobie.DoobieContext -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.shared.models.WalletId import java.util.UUID import java.time.OffsetDateTime @@ -26,7 +26,7 @@ case class VerificationPolicyConstraint( ) object VerificationPolicySql extends DoobieContext.Postgres(SnakeCase) { - import io.iohk.atala.pollux.sql.repository.VerificationPolicyExtensions._ + import org.hyperledger.identus.pollux.sql.repository.VerificationPolicyExtensions._ def insert(verificationPolicy: VerificationPolicy) = { run(quote(query[VerificationPolicy].insertValue(lift(verificationPolicy)).returning(vp => vp))) diff --git a/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/model/db/package.scala b/pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/model/db/package.scala similarity index 68% rename from pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/model/db/package.scala rename to pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/model/db/package.scala index 0ae1c4008c..413cc7b6d3 100644 --- a/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/model/db/package.scala +++ b/pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/model/db/package.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.pollux.sql.model +package org.hyperledger.identus.pollux.sql.model import io.getquill.MappedEncoding import java.util.UUID -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.shared.models.WalletId package object db { diff --git a/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/repository/Implicits.scala b/pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/repository/Implicits.scala similarity index 76% rename from pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/repository/Implicits.scala rename to pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/repository/Implicits.scala index a741410a42..10064bf2e5 100644 --- a/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/repository/Implicits.scala +++ b/pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/repository/Implicits.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.pollux.sql.repository +package org.hyperledger.identus.pollux.sql.repository import doobie.util.{Get, Put} -import io.iohk.atala.castor.core.model.did.{CanonicalPrismDID, PrismDID} -import io.iohk.atala.pollux.core.model.* -import io.iohk.atala.pollux.vc.jwt.StatusPurpose -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.castor.core.model.did.{CanonicalPrismDID, PrismDID} +import org.hyperledger.identus.pollux.core.model.* +import org.hyperledger.identus.pollux.vc.jwt.StatusPurpose +import org.hyperledger.identus.shared.models.WalletId given didCommIDGet: Get[DidCommID] = Get[String].map(DidCommID(_)) given didCommIDPut: Put[DidCommID] = Put[String].contramap(_.value) diff --git a/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/repository/JdbcCredentialDefinitionRepository.scala b/pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/repository/JdbcCredentialDefinitionRepository.scala similarity index 83% rename from pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/repository/JdbcCredentialDefinitionRepository.scala rename to pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/repository/JdbcCredentialDefinitionRepository.scala index 0b56798c6a..580c335bd9 100644 --- a/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/repository/JdbcCredentialDefinitionRepository.scala +++ b/pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/repository/JdbcCredentialDefinitionRepository.scala @@ -1,14 +1,17 @@ -package io.iohk.atala.pollux.sql.repository +package org.hyperledger.identus.pollux.sql.repository import doobie.* import doobie.implicits.* -import io.iohk.atala.pollux.core.model.schema.CredentialDefinition -import io.iohk.atala.pollux.core.repository.Repository.* -import io.iohk.atala.pollux.core.repository.{CredentialDefinitionRepository, Repository} -import io.iohk.atala.pollux.sql.model.db.{CredentialDefinitionSql, CredentialDefinition as CredentialDefinitionRow} -import io.iohk.atala.shared.db.ContextAwareTask -import io.iohk.atala.shared.db.Implicits.* -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.pollux.core.model.schema.CredentialDefinition +import org.hyperledger.identus.pollux.core.repository.Repository.* +import org.hyperledger.identus.pollux.core.repository.{CredentialDefinitionRepository, Repository} +import org.hyperledger.identus.pollux.sql.model.db.{ + CredentialDefinitionSql, + CredentialDefinition as CredentialDefinitionRow +} +import org.hyperledger.identus.shared.db.ContextAwareTask +import org.hyperledger.identus.shared.db.Implicits.* +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import zio.interop.catz.* diff --git a/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/repository/JdbcCredentialRepository.scala b/pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/repository/JdbcCredentialRepository.scala similarity index 95% rename from pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/repository/JdbcCredentialRepository.scala rename to pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/repository/JdbcCredentialRepository.scala index 7adc183485..b3acabca49 100644 --- a/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/repository/JdbcCredentialRepository.scala +++ b/pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/repository/JdbcCredentialRepository.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.sql.repository +package org.hyperledger.identus.pollux.sql.repository import cats.data.NonEmptyList import doobie.* @@ -8,16 +8,16 @@ import doobie.postgres.implicits.* import io.circe.* import io.circe.parser.* import io.circe.syntax.* -import io.iohk.atala.castor.core.model.did.* -import io.iohk.atala.mercury.protocol.issuecredential.{IssueCredential, OfferCredential, RequestCredential} -import io.iohk.atala.pollux.anoncreds.AnoncredCredentialRequestMetadata -import io.iohk.atala.pollux.core.model.* -import io.iohk.atala.pollux.core.model.error.CredentialRepositoryError -import io.iohk.atala.pollux.core.model.error.CredentialRepositoryError.* -import io.iohk.atala.pollux.core.repository.CredentialRepository -import io.iohk.atala.shared.db.ContextAwareTask -import io.iohk.atala.shared.db.Implicits.* -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.castor.core.model.did.* +import org.hyperledger.identus.mercury.protocol.issuecredential.{IssueCredential, OfferCredential, RequestCredential} +import org.hyperledger.identus.pollux.anoncreds.AnoncredCredentialRequestMetadata +import org.hyperledger.identus.pollux.core.model.* +import org.hyperledger.identus.pollux.core.model.error.CredentialRepositoryError +import org.hyperledger.identus.pollux.core.model.error.CredentialRepositoryError.* +import org.hyperledger.identus.pollux.core.repository.CredentialRepository +import org.hyperledger.identus.shared.db.ContextAwareTask +import org.hyperledger.identus.shared.db.Implicits.* +import org.hyperledger.identus.shared.models.WalletAccessContext import org.postgresql.util.PSQLException import zio.* import zio.interop.catz.* diff --git a/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/repository/JdbcCredentialSchemaRepository.scala b/pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/repository/JdbcCredentialSchemaRepository.scala similarity index 83% rename from pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/repository/JdbcCredentialSchemaRepository.scala rename to pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/repository/JdbcCredentialSchemaRepository.scala index b3dc071814..9fc7872121 100644 --- a/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/repository/JdbcCredentialSchemaRepository.scala +++ b/pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/repository/JdbcCredentialSchemaRepository.scala @@ -1,14 +1,14 @@ -package io.iohk.atala.pollux.sql.repository +package org.hyperledger.identus.pollux.sql.repository import doobie.* import doobie.implicits.* -import io.iohk.atala.pollux.core.model.schema.CredentialSchema -import io.iohk.atala.pollux.core.repository.Repository.* -import io.iohk.atala.pollux.core.repository.{CredentialSchemaRepository, Repository} -import io.iohk.atala.pollux.sql.model.db.{CredentialSchemaSql, CredentialSchema as CredentialSchemaRow} -import io.iohk.atala.shared.db.ContextAwareTask -import io.iohk.atala.shared.db.Implicits.* -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.pollux.core.model.schema.CredentialSchema +import org.hyperledger.identus.pollux.core.repository.Repository.* +import org.hyperledger.identus.pollux.core.repository.{CredentialSchemaRepository, Repository} +import org.hyperledger.identus.pollux.sql.model.db.{CredentialSchemaSql, CredentialSchema as CredentialSchemaRow} +import org.hyperledger.identus.shared.db.ContextAwareTask +import org.hyperledger.identus.shared.db.Implicits.* +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import zio.interop.catz.* diff --git a/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/repository/JdbcCredentialStatusListRepository.scala b/pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/repository/JdbcCredentialStatusListRepository.scala similarity index 92% rename from pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/repository/JdbcCredentialStatusListRepository.scala rename to pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/repository/JdbcCredentialStatusListRepository.scala index d32867e714..2d2884e3f9 100644 --- a/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/repository/JdbcCredentialStatusListRepository.scala +++ b/pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/repository/JdbcCredentialStatusListRepository.scala @@ -1,20 +1,20 @@ -package io.iohk.atala.pollux.sql.repository +package org.hyperledger.identus.pollux.sql.repository import doobie.* import doobie.implicits.* import doobie.postgres.* import doobie.postgres.implicits.* -import io.iohk.atala.pollux.vc.jwt.{Issuer, StatusPurpose} -import io.iohk.atala.pollux.vc.jwt.revocation.{BitString, BitStringError, VCStatusList2021} -import io.iohk.atala.castor.core.model.did.* -import io.iohk.atala.pollux.core.model.* -import io.iohk.atala.pollux.core.repository.CredentialStatusListRepository -import io.iohk.atala.shared.db.ContextAwareTask -import io.iohk.atala.shared.db.Implicits.* -import io.iohk.atala.pollux.vc.jwt.revocation.BitStringError.* +import org.hyperledger.identus.pollux.vc.jwt.{Issuer, StatusPurpose} +import org.hyperledger.identus.pollux.vc.jwt.revocation.{BitString, BitStringError, VCStatusList2021} +import org.hyperledger.identus.castor.core.model.did.* +import org.hyperledger.identus.pollux.core.model.* +import org.hyperledger.identus.pollux.core.repository.CredentialStatusListRepository +import org.hyperledger.identus.shared.db.ContextAwareTask +import org.hyperledger.identus.shared.db.Implicits.* +import org.hyperledger.identus.pollux.vc.jwt.revocation.BitStringError.* import zio.* import zio.interop.catz.* -import io.iohk.atala.shared.models.{WalletAccessContext, WalletId} +import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} import java.time.Instant import java.util.UUID diff --git a/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/repository/JdbcPresentationRepository.scala b/pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/repository/JdbcPresentationRepository.scala similarity index 96% rename from pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/repository/JdbcPresentationRepository.scala rename to pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/repository/JdbcPresentationRepository.scala index 377d769ff1..1d7ed7c94e 100644 --- a/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/repository/JdbcPresentationRepository.scala +++ b/pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/repository/JdbcPresentationRepository.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.sql.repository +package org.hyperledger.identus.pollux.sql.repository import cats.data.NonEmptyList import doobie.* @@ -11,13 +11,13 @@ import io.circe import io.circe.* import io.circe.parser.* import io.circe.syntax.* -import io.iohk.atala.mercury.protocol.presentproof.* -import io.iohk.atala.pollux.core.model.* -import io.iohk.atala.pollux.core.model.PresentationRecord.ProtocolState -import io.iohk.atala.pollux.core.repository.PresentationRepository -import io.iohk.atala.shared.db.ContextAwareTask -import io.iohk.atala.shared.db.Implicits.* -import io.iohk.atala.shared.models.WalletAccessContext +import org.hyperledger.identus.mercury.protocol.presentproof.* +import org.hyperledger.identus.pollux.core.model.* +import org.hyperledger.identus.pollux.core.model.PresentationRecord.ProtocolState +import org.hyperledger.identus.pollux.core.repository.PresentationRepository +import org.hyperledger.identus.shared.db.ContextAwareTask +import org.hyperledger.identus.shared.db.Implicits.* +import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* import zio.interop.catz.* import zio.json.* diff --git a/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/repository/JdbcVerificationPolicyRepository.scala b/pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/repository/JdbcVerificationPolicyRepository.scala similarity index 89% rename from pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/repository/JdbcVerificationPolicyRepository.scala rename to pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/repository/JdbcVerificationPolicyRepository.scala index d695cc6eb4..5de7415d14 100644 --- a/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/repository/JdbcVerificationPolicyRepository.scala +++ b/pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/repository/JdbcVerificationPolicyRepository.scala @@ -1,15 +1,15 @@ -package io.iohk.atala.pollux.sql.repository +package org.hyperledger.identus.pollux.sql.repository import doobie.* import doobie.util.transactor.Transactor -import io.iohk.atala.pollux.core.model -import io.iohk.atala.pollux.core.model.{CredentialSchemaAndTrustedIssuersConstraint, VerificationPolicy} -import io.iohk.atala.pollux.core.repository.VerificationPolicyRepository -import io.iohk.atala.pollux.sql.model.db -import io.iohk.atala.shared.db.ContextAwareTask -import io.iohk.atala.shared.db.Implicits.* -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.pollux.core.model +import org.hyperledger.identus.pollux.core.model.{CredentialSchemaAndTrustedIssuersConstraint, VerificationPolicy} +import org.hyperledger.identus.pollux.core.repository.VerificationPolicyRepository +import org.hyperledger.identus.pollux.sql.model.db +import org.hyperledger.identus.shared.db.ContextAwareTask +import org.hyperledger.identus.shared.db.Implicits.* +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletId import zio.* import java.time.{OffsetDateTime, ZoneOffset} @@ -71,7 +71,7 @@ object JdbcVerificationPolicyRepository { class JdbcVerificationPolicyRepository(xa: Transactor[ContextAwareTask]) extends VerificationPolicyRepository { import VerificationPolicyExtensions.* - import io.iohk.atala.pollux.sql.model.db.VerificationPolicySql + import org.hyperledger.identus.pollux.sql.model.db.VerificationPolicySql override def create( verificationPolicy: model.VerificationPolicy diff --git a/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/repository/Migrations.scala b/pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/repository/Migrations.scala similarity index 89% rename from pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/repository/Migrations.scala rename to pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/repository/Migrations.scala index cac7549e18..1a3bf6369b 100644 --- a/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/repository/Migrations.scala +++ b/pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/repository/Migrations.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.pollux.sql.repository +package org.hyperledger.identus.pollux.sql.repository import doobie.* import doobie.implicits.* import doobie.util.transactor.Transactor -import io.iohk.atala.shared.db.ContextAwareTask -import io.iohk.atala.shared.db.DbConfig -import io.iohk.atala.shared.db.Implicits.* +import org.hyperledger.identus.shared.db.ContextAwareTask +import org.hyperledger.identus.shared.db.DbConfig +import org.hyperledger.identus.shared.db.Implicits.* import org.flywaydb.core.Flyway import zio.* import zio.interop.catz.* diff --git a/pollux/lib/sql-doobie/src/test/resources/data/verifiableCredentialClaims.csv b/pollux/sql-doobie/src/test/resources/data/verifiableCredentialClaims.csv similarity index 100% rename from pollux/lib/sql-doobie/src/test/resources/data/verifiableCredentialClaims.csv rename to pollux/sql-doobie/src/test/resources/data/verifiableCredentialClaims.csv diff --git a/pollux/lib/sql-doobie/src/test/resources/data/verifiableCredentialTypes.csv b/pollux/sql-doobie/src/test/resources/data/verifiableCredentialTypes.csv similarity index 100% rename from pollux/lib/sql-doobie/src/test/resources/data/verifiableCredentialTypes.csv rename to pollux/sql-doobie/src/test/resources/data/verifiableCredentialTypes.csv diff --git a/pollux/lib/sql-doobie/src/test/scala/io/iohk/atala/pollux/sql/CredentialDefinitionSqlIntegrationSpec.scala b/pollux/sql-doobie/src/test/scala/org/hyperledger/identus/pollux/sql/CredentialDefinitionSqlIntegrationSpec.scala similarity index 94% rename from pollux/lib/sql-doobie/src/test/scala/io/iohk/atala/pollux/sql/CredentialDefinitionSqlIntegrationSpec.scala rename to pollux/sql-doobie/src/test/scala/org/hyperledger/identus/pollux/sql/CredentialDefinitionSqlIntegrationSpec.scala index 4f1e96510e..c6ffccdadc 100644 --- a/pollux/lib/sql-doobie/src/test/scala/io/iohk/atala/pollux/sql/CredentialDefinitionSqlIntegrationSpec.scala +++ b/pollux/sql-doobie/src/test/scala/org/hyperledger/identus/pollux/sql/CredentialDefinitionSqlIntegrationSpec.scala @@ -1,15 +1,15 @@ -package io.iohk.atala.pollux.sql +package org.hyperledger.identus.pollux.sql import com.dimafeng.testcontainers.PostgreSQLContainer import doobie.* import doobie.util.transactor.Transactor import io.getquill.* -import io.iohk.atala.pollux.sql.model.db.{CredentialDefinition, CredentialDefinitionSql} -import io.iohk.atala.shared.db.ContextAwareTask -import io.iohk.atala.shared.db.Implicits.* -import io.iohk.atala.shared.models.{WalletAccessContext, WalletId} -import io.iohk.atala.sharedtest.containers.PostgresTestContainerSupport -import io.iohk.atala.test.container.MigrationAspects.* +import org.hyperledger.identus.pollux.sql.model.db.{CredentialDefinition, CredentialDefinitionSql} +import org.hyperledger.identus.shared.db.ContextAwareTask +import org.hyperledger.identus.shared.db.Implicits.* +import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} +import org.hyperledger.identus.sharedtest.containers.PostgresTestContainerSupport +import org.hyperledger.identus.test.container.MigrationAspects.* import zio.* import zio.json.ast.Json import zio.test.* diff --git a/pollux/lib/sql-doobie/src/test/scala/io/iohk/atala/pollux/sql/CredentialSchemaSqlIntegrationSpec.scala b/pollux/sql-doobie/src/test/scala/org/hyperledger/identus/pollux/sql/CredentialSchemaSqlIntegrationSpec.scala similarity index 94% rename from pollux/lib/sql-doobie/src/test/scala/io/iohk/atala/pollux/sql/CredentialSchemaSqlIntegrationSpec.scala rename to pollux/sql-doobie/src/test/scala/org/hyperledger/identus/pollux/sql/CredentialSchemaSqlIntegrationSpec.scala index 6d11833ef9..ae379a6f9f 100644 --- a/pollux/lib/sql-doobie/src/test/scala/io/iohk/atala/pollux/sql/CredentialSchemaSqlIntegrationSpec.scala +++ b/pollux/sql-doobie/src/test/scala/org/hyperledger/identus/pollux/sql/CredentialSchemaSqlIntegrationSpec.scala @@ -1,16 +1,16 @@ -package io.iohk.atala.pollux.sql +package org.hyperledger.identus.pollux.sql import com.dimafeng.testcontainers.PostgreSQLContainer import doobie.* import doobie.util.transactor.Transactor import io.getquill.* -import io.iohk.atala.pollux.sql.model.db.{CredentialSchema, CredentialSchemaSql} -import io.iohk.atala.shared.db.ContextAwareTask -import io.iohk.atala.shared.db.Implicits.* -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletId -import io.iohk.atala.sharedtest.containers.PostgresTestContainerSupport -import io.iohk.atala.test.container.MigrationAspects.* +import org.hyperledger.identus.pollux.sql.model.db.{CredentialSchema, CredentialSchemaSql} +import org.hyperledger.identus.shared.db.ContextAwareTask +import org.hyperledger.identus.shared.db.Implicits.* +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletId +import org.hyperledger.identus.sharedtest.containers.PostgresTestContainerSupport +import org.hyperledger.identus.test.container.MigrationAspects.* import zio.* import zio.json.ast.Json import zio.test.* diff --git a/pollux/lib/sql-doobie/src/test/scala/io/iohk/atala/pollux/sql/VerificationPolicySqlIntegrationSpec.scala b/pollux/sql-doobie/src/test/scala/org/hyperledger/identus/pollux/sql/VerificationPolicySqlIntegrationSpec.scala similarity index 93% rename from pollux/lib/sql-doobie/src/test/scala/io/iohk/atala/pollux/sql/VerificationPolicySqlIntegrationSpec.scala rename to pollux/sql-doobie/src/test/scala/org/hyperledger/identus/pollux/sql/VerificationPolicySqlIntegrationSpec.scala index ac24d4851b..57387b8415 100644 --- a/pollux/lib/sql-doobie/src/test/scala/io/iohk/atala/pollux/sql/VerificationPolicySqlIntegrationSpec.scala +++ b/pollux/sql-doobie/src/test/scala/org/hyperledger/identus/pollux/sql/VerificationPolicySqlIntegrationSpec.scala @@ -1,22 +1,22 @@ -package io.iohk.atala.pollux.sql +package org.hyperledger.identus.pollux.sql import com.dimafeng.testcontainers.PostgreSQLContainer import doobie.* import doobie.util.transactor.Transactor -import io.iohk.atala.pollux.core.model.{ +import org.hyperledger.identus.pollux.core.model.{ CredentialSchemaAndTrustedIssuersConstraint, VerificationPolicy, VerificationPolicyConstraint } -import io.iohk.atala.pollux.core.repository.VerificationPolicyRepository -import io.iohk.atala.pollux.sql.model.db.VerificationPolicySql -import io.iohk.atala.pollux.sql.repository.JdbcVerificationPolicyRepository -import io.iohk.atala.shared.db.ContextAwareTask -import io.iohk.atala.shared.db.Implicits.* -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletId -import io.iohk.atala.sharedtest.containers.PostgresTestContainerSupport -import io.iohk.atala.test.container.MigrationAspects.* +import org.hyperledger.identus.pollux.core.repository.VerificationPolicyRepository +import org.hyperledger.identus.pollux.sql.model.db.VerificationPolicySql +import org.hyperledger.identus.pollux.sql.repository.JdbcVerificationPolicyRepository +import org.hyperledger.identus.shared.db.ContextAwareTask +import org.hyperledger.identus.shared.db.Implicits.* +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletId +import org.hyperledger.identus.sharedtest.containers.PostgresTestContainerSupport +import org.hyperledger.identus.test.container.MigrationAspects.* import zio.* import zio.test.* import zio.test.Assertion.* diff --git a/pollux/lib/sql-doobie/src/test/scala/io/iohk/atala/pollux/sql/repository/JdbcCredentialRepositorySpec.scala b/pollux/sql-doobie/src/test/scala/org/hyperledger/identus/pollux/sql/repository/JdbcCredentialRepositorySpec.scala similarity index 79% rename from pollux/lib/sql-doobie/src/test/scala/io/iohk/atala/pollux/sql/repository/JdbcCredentialRepositorySpec.scala rename to pollux/sql-doobie/src/test/scala/org/hyperledger/identus/pollux/sql/repository/JdbcCredentialRepositorySpec.scala index 49e66d9c24..b91608a6d0 100644 --- a/pollux/lib/sql-doobie/src/test/scala/io/iohk/atala/pollux/sql/repository/JdbcCredentialRepositorySpec.scala +++ b/pollux/sql-doobie/src/test/scala/org/hyperledger/identus/pollux/sql/repository/JdbcCredentialRepositorySpec.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.pollux.sql.repository +package org.hyperledger.identus.pollux.sql.repository import com.dimafeng.testcontainers.PostgreSQLContainer -import io.iohk.atala.pollux.core.repository._ -import io.iohk.atala.shared.db.DbConfig -import io.iohk.atala.sharedtest.containers.PostgresTestContainerSupport +import org.hyperledger.identus.pollux.core.repository._ +import org.hyperledger.identus.shared.db.DbConfig +import org.hyperledger.identus.sharedtest.containers.PostgresTestContainerSupport import zio._ import zio.test._ diff --git a/pollux/lib/sql-doobie/src/test/scala/io/iohk/atala/pollux/sql/repository/JdbcPresentationRepositorySpec.scala b/pollux/sql-doobie/src/test/scala/org/hyperledger/identus/pollux/sql/repository/JdbcPresentationRepositorySpec.scala similarity index 79% rename from pollux/lib/sql-doobie/src/test/scala/io/iohk/atala/pollux/sql/repository/JdbcPresentationRepositorySpec.scala rename to pollux/sql-doobie/src/test/scala/org/hyperledger/identus/pollux/sql/repository/JdbcPresentationRepositorySpec.scala index 6d4e2c3cc7..b4ababcef4 100644 --- a/pollux/lib/sql-doobie/src/test/scala/io/iohk/atala/pollux/sql/repository/JdbcPresentationRepositorySpec.scala +++ b/pollux/sql-doobie/src/test/scala/org/hyperledger/identus/pollux/sql/repository/JdbcPresentationRepositorySpec.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.pollux.sql.repository +package org.hyperledger.identus.pollux.sql.repository import com.dimafeng.testcontainers.PostgreSQLContainer -import io.iohk.atala.pollux.core.repository._ -import io.iohk.atala.shared.db.DbConfig -import io.iohk.atala.sharedtest.containers.PostgresTestContainerSupport +import org.hyperledger.identus.pollux.core.repository._ +import org.hyperledger.identus.shared.db.DbConfig +import org.hyperledger.identus.sharedtest.containers.PostgresTestContainerSupport import zio._ import zio.test._ diff --git a/prism-agent/service/server/src/test/scala/io/iohk/atala/container/util/MigrationAspect.scala b/pollux/sql-doobie/src/test/scala/org/hyperledger/identus/test/container/MigrationAspect.scala similarity index 96% rename from prism-agent/service/server/src/test/scala/io/iohk/atala/container/util/MigrationAspect.scala rename to pollux/sql-doobie/src/test/scala/org/hyperledger/identus/test/container/MigrationAspect.scala index 34f2fcfd00..881afaccff 100644 --- a/prism-agent/service/server/src/test/scala/io/iohk/atala/container/util/MigrationAspect.scala +++ b/pollux/sql-doobie/src/test/scala/org/hyperledger/identus/test/container/MigrationAspect.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.container.util +package org.hyperledger.identus.test.container import com.dimafeng.testcontainers.PostgreSQLContainer import org.flywaydb.core.Flyway import zio.ZIO -import zio.test.TestAspect.{beforeAll, before} import zio.test.{TestAspect, TestAspectAtLeastR} +import zio.test.TestAspect.{beforeAll, before} object MigrationAspects { def migrate(schema: String, paths: String*): TestAspectAtLeastR[PostgreSQLContainer] = { diff --git a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/DidJWT.scala b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/DidJWT.scala similarity index 98% rename from pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/DidJWT.scala rename to pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/DidJWT.scala index 909782cd86..7b7c90fdf0 100644 --- a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/DidJWT.scala +++ b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/DidJWT.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.vc.jwt +package org.hyperledger.identus.pollux.vc.jwt import com.nimbusds.jose.{JWSAlgorithm, JWSHeader} import com.nimbusds.jose.crypto.ECDSASigner diff --git a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/DidResolver.scala b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/DidResolver.scala similarity index 97% rename from pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/DidResolver.scala rename to pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/DidResolver.scala index aaf5f5260d..63ff932bdc 100644 --- a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/DidResolver.scala +++ b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/DidResolver.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.pollux.vc.jwt +package org.hyperledger.identus.pollux.vc.jwt -import io.iohk.atala.castor.core.model.did.w3c.{ +import org.hyperledger.identus.castor.core.model.did.w3c.{ DIDDocumentRepr, DIDResolutionErrorRepr, PublicKeyJwk, @@ -9,7 +9,7 @@ import io.iohk.atala.castor.core.model.did.w3c.{ ServiceRepr, makeW3CResolver } -import io.iohk.atala.castor.core.service.DIDService +import org.hyperledger.identus.castor.core.service.DIDService import zio.* import java.time.Instant diff --git a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/InstantDecoderEncoder.scala b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/InstantDecoderEncoder.scala similarity index 89% rename from pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/InstantDecoderEncoder.scala rename to pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/InstantDecoderEncoder.scala index 780b32173a..03c63b74bd 100644 --- a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/InstantDecoderEncoder.scala +++ b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/InstantDecoderEncoder.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.vc.jwt +package org.hyperledger.identus.pollux.vc.jwt import io.circe.{Decoder, Encoder, HCursor} diff --git a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/JWTVerification.scala b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/JWTVerification.scala similarity index 98% rename from pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/JWTVerification.scala rename to pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/JWTVerification.scala index 4b2a21d43c..c40f8f3cdd 100644 --- a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/JWTVerification.scala +++ b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/JWTVerification.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.vc.jwt +package org.hyperledger.identus.pollux.vc.jwt import com.nimbusds.jose.JWSVerifier import com.nimbusds.jose.crypto.ECDSAVerifier @@ -8,7 +8,7 @@ import com.nimbusds.jose.util.Base64URL import com.nimbusds.jwt.SignedJWT import io.circe import io.circe.generic.auto.* -import io.iohk.atala.castor.core.model.did.VerificationRelationship +import org.hyperledger.identus.castor.core.model.did.VerificationRelationship import pdi.jwt.* import zio.* import zio.prelude.* diff --git a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/MultiBaseString.scala b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/MultiBaseString.scala similarity index 94% rename from pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/MultiBaseString.scala rename to pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/MultiBaseString.scala index d1c881e578..510c771469 100644 --- a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/MultiBaseString.scala +++ b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/MultiBaseString.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.pollux.vc.jwt +package org.hyperledger.identus.pollux.vc.jwt import io.circe.* -import io.iohk.atala.shared.utils.Base64Utils +import org.hyperledger.identus.shared.utils.Base64Utils import scodec.bits.ByteVector case class MultiBaseString(header: MultiBaseString.Header, data: String) { diff --git a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/MultiKey.scala b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/MultiKey.scala similarity index 95% rename from pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/MultiKey.scala rename to pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/MultiKey.scala index 765387358b..f1ed33a4ce 100644 --- a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/MultiKey.scala +++ b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/MultiKey.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.vc.jwt +package org.hyperledger.identus.pollux.vc.jwt import io.circe.* import io.circe.syntax.* diff --git a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/Proof.scala b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/Proof.scala similarity index 97% rename from pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/Proof.scala rename to pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/Proof.scala index 80b53ab5b0..c27c6999ba 100644 --- a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/Proof.scala +++ b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/Proof.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.vc.jwt +package org.hyperledger.identus.pollux.vc.jwt import com.nimbusds.jose.crypto.bc.BouncyCastleProviderSingleton import io.circe.* @@ -6,8 +6,8 @@ import io.circe.syntax.* import cats.implicits.* import java.time.{Instant, ZoneOffset} import zio.* -import io.iohk.atala.shared.utils.Json as JsonUtils -import io.iohk.atala.shared.utils.Base64Utils +import org.hyperledger.identus.shared.utils.Json as JsonUtils +import org.hyperledger.identus.shared.utils.Base64Utils import scodec.bits.ByteVector import scala.util.Try import java.security.* diff --git a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/ValidationUtils.scala b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/ValidationUtils.scala similarity index 88% rename from pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/ValidationUtils.scala rename to pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/ValidationUtils.scala index b5b83512b1..e80d1cdea2 100644 --- a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/ValidationUtils.scala +++ b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/ValidationUtils.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.vc.jwt +package org.hyperledger.identus.pollux.vc.jwt import zio.{Trace, ZIO} import zio.prelude.{Validation, ZValidation} diff --git a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/Verifiable.scala b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/Verifiable.scala similarity index 94% rename from pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/Verifiable.scala rename to pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/Verifiable.scala index 7b3e9b7653..3f768d906f 100644 --- a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/Verifiable.scala +++ b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/Verifiable.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.vc.jwt +package org.hyperledger.identus.pollux.vc.jwt import io.circe import io.circe.* diff --git a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/VerifiableCredentialPayload.scala b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/VerifiableCredentialPayload.scala similarity index 99% rename from pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/VerifiableCredentialPayload.scala rename to pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/VerifiableCredentialPayload.scala index aba96e8f76..f99dc7a492 100644 --- a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/VerifiableCredentialPayload.scala +++ b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/VerifiableCredentialPayload.scala @@ -1,14 +1,14 @@ -package io.iohk.atala.pollux.vc.jwt +package org.hyperledger.identus.pollux.vc.jwt import io.circe import io.circe.* import io.circe.generic.auto.* import io.circe.parser.decode import io.circe.syntax.* -import io.iohk.atala.castor.core.model.did.VerificationRelationship -import io.iohk.atala.pollux.vc.jwt.revocation.BitString -import io.iohk.atala.pollux.vc.jwt.schema.{SchemaResolver, SchemaValidator} -import io.iohk.atala.shared.http.UriResolver +import org.hyperledger.identus.castor.core.model.did.VerificationRelationship +import org.hyperledger.identus.pollux.vc.jwt.revocation.BitString +import org.hyperledger.identus.pollux.vc.jwt.schema.{SchemaResolver, SchemaValidator} +import org.hyperledger.identus.shared.http.UriResolver import pdi.jwt.* import zio.* import zio.prelude.* diff --git a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/VerifiablePresentationPayload.scala b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/VerifiablePresentationPayload.scala similarity index 98% rename from pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/VerifiablePresentationPayload.scala rename to pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/VerifiablePresentationPayload.scala index eaeae39529..fa7e98ae2c 100644 --- a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/VerifiablePresentationPayload.scala +++ b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/VerifiablePresentationPayload.scala @@ -1,12 +1,12 @@ -package io.iohk.atala.pollux.vc.jwt +package org.hyperledger.identus.pollux.vc.jwt import io.circe import io.circe.* import io.circe.generic.auto.* import io.circe.parser.decode import io.circe.syntax.* -import io.iohk.atala.castor.core.model.did.VerificationRelationship -import io.iohk.atala.shared.http.UriResolver +import org.hyperledger.identus.castor.core.model.did.VerificationRelationship +import org.hyperledger.identus.shared.http.UriResolver import pdi.jwt.{JwtCirce, JwtOptions} import zio.* import zio.prelude.* @@ -432,7 +432,7 @@ object JwtPresentation { } def verifyHolderBinding(jwt: JWT): Validation[String, Unit] = { - import io.iohk.atala.pollux.vc.jwt.CredentialPayload.Implicits.* + import org.hyperledger.identus.pollux.vc.jwt.CredentialPayload.Implicits.* val decodeJWT = (jwt: JWT) => Validation .fromTry(JwtCirce.decodeRaw(jwt.value, options = JwtOptions(false, false, false))) diff --git a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/CredentialDemo.scala b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/CredentialDemo.scala similarity index 95% rename from pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/CredentialDemo.scala rename to pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/CredentialDemo.scala index bf18fa4f97..fd3c48733a 100644 --- a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/CredentialDemo.scala +++ b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/CredentialDemo.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.pollux.vc.jwt.demos +package org.hyperledger.identus.pollux.vc.jwt.demos import io.circe.* import io.circe.parser.decode import io.circe.syntax.* -import io.iohk.atala.pollux.vc.jwt.* -import io.iohk.atala.pollux.vc.jwt.CredentialPayload.Implicits.* +import org.hyperledger.identus.pollux.vc.jwt.* +import org.hyperledger.identus.pollux.vc.jwt.CredentialPayload.Implicits.* import java.time.Instant @main def CredentialDemo(): Unit = diff --git a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtCredentialDIDDocumentValidationDemo.scala b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtCredentialDIDDocumentValidationDemo.scala similarity index 97% rename from pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtCredentialDIDDocumentValidationDemo.scala rename to pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtCredentialDIDDocumentValidationDemo.scala index bdd1f49740..dc4d4a546e 100644 --- a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtCredentialDIDDocumentValidationDemo.scala +++ b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtCredentialDIDDocumentValidationDemo.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.pollux.vc.jwt.demos +package org.hyperledger.identus.pollux.vc.jwt.demos import com.nimbusds.jose.jwk.* import io.circe.* -import io.iohk.atala.pollux.vc.jwt.* -import io.iohk.atala.pollux.vc.jwt.schema.{PlaceholderSchemaValidator, SchemaResolver} +import org.hyperledger.identus.pollux.vc.jwt.* +import org.hyperledger.identus.pollux.vc.jwt.schema.{PlaceholderSchemaValidator, SchemaResolver} import pdi.jwt.JwtAlgorithm import zio.* import zio.Console.* diff --git a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtCredentialEncodingDemo.scala b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtCredentialEncodingDemo.scala similarity index 95% rename from pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtCredentialEncodingDemo.scala rename to pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtCredentialEncodingDemo.scala index 87efa0a00a..bd3347ae8a 100644 --- a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtCredentialEncodingDemo.scala +++ b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtCredentialEncodingDemo.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.pollux.vc.jwt.demos +package org.hyperledger.identus.pollux.vc.jwt.demos import io.circe.* import io.circe.syntax.* -import io.iohk.atala.pollux.vc.jwt.* -import io.iohk.atala.pollux.vc.jwt.CredentialPayload.Implicits.* +import org.hyperledger.identus.pollux.vc.jwt.* +import org.hyperledger.identus.pollux.vc.jwt.CredentialPayload.Implicits.* import java.security.* import java.security.spec.* import java.time.Instant diff --git a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtCredentialTemporalVerificationDemo.scala b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtCredentialTemporalVerificationDemo.scala similarity index 97% rename from pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtCredentialTemporalVerificationDemo.scala rename to pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtCredentialTemporalVerificationDemo.scala index f4539cdd9a..07ed493702 100644 --- a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtCredentialTemporalVerificationDemo.scala +++ b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtCredentialTemporalVerificationDemo.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.pollux.vc.jwt.demos +package org.hyperledger.identus.pollux.vc.jwt.demos import io.circe.* import io.circe.syntax.* -import io.iohk.atala.pollux.vc.jwt.* -import io.iohk.atala.pollux.vc.jwt.CredentialPayload.Implicits.* +import org.hyperledger.identus.pollux.vc.jwt.* +import org.hyperledger.identus.pollux.vc.jwt.CredentialPayload.Implicits.* import java.security.* import java.security.spec.* diff --git a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtPresentationCredentialDemo.scala b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtPresentationCredentialDemo.scala similarity index 95% rename from pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtPresentationCredentialDemo.scala rename to pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtPresentationCredentialDemo.scala index 0554e26e91..f103d787e3 100644 --- a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtPresentationCredentialDemo.scala +++ b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtPresentationCredentialDemo.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.pollux.vc.jwt.demos +package org.hyperledger.identus.pollux.vc.jwt.demos import io.circe.* import io.circe.syntax.* -import io.iohk.atala.pollux.vc.jwt.* -import io.iohk.atala.pollux.vc.jwt.CredentialPayload.Implicits.* -import io.iohk.atala.pollux.vc.jwt.PresentationPayload.Implicits.* +import org.hyperledger.identus.pollux.vc.jwt.* +import org.hyperledger.identus.pollux.vc.jwt.CredentialPayload.Implicits.* +import org.hyperledger.identus.pollux.vc.jwt.PresentationPayload.Implicits.* import java.security.* import java.security.spec.* diff --git a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtPresentationTemporalVerificationDemo.scala b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtPresentationTemporalVerificationDemo.scala similarity index 97% rename from pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtPresentationTemporalVerificationDemo.scala rename to pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtPresentationTemporalVerificationDemo.scala index ae4ac3ce0e..8eab14abec 100644 --- a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtPresentationTemporalVerificationDemo.scala +++ b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtPresentationTemporalVerificationDemo.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.pollux.vc.jwt.demos +package org.hyperledger.identus.pollux.vc.jwt.demos import io.circe.* import io.circe.syntax.* -import io.iohk.atala.pollux.vc.jwt.* -import io.iohk.atala.pollux.vc.jwt.CredentialPayload.Implicits.* -import io.iohk.atala.pollux.vc.jwt.PresentationPayload.Implicits.* +import org.hyperledger.identus.pollux.vc.jwt.* +import org.hyperledger.identus.pollux.vc.jwt.CredentialPayload.Implicits.* +import org.hyperledger.identus.pollux.vc.jwt.PresentationPayload.Implicits.* import java.security.* import java.security.spec.* diff --git a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtPresentationVerificationDemo.scala b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtPresentationVerificationDemo.scala similarity index 97% rename from pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtPresentationVerificationDemo.scala rename to pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtPresentationVerificationDemo.scala index aed191ac15..2139cb95bd 100644 --- a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtPresentationVerificationDemo.scala +++ b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/JwtPresentationVerificationDemo.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.pollux.vc.jwt.demos +package org.hyperledger.identus.pollux.vc.jwt.demos import com.nimbusds.jose.jwk.{Curve, ECKey} import io.circe.* import io.circe.syntax.* -import io.iohk.atala.pollux.vc.jwt.* -import io.iohk.atala.pollux.vc.jwt.CredentialPayload.Implicits.* -import io.iohk.atala.pollux.vc.jwt.PresentationPayload.Implicits.* +import org.hyperledger.identus.pollux.vc.jwt.* +import org.hyperledger.identus.pollux.vc.jwt.CredentialPayload.Implicits.* +import org.hyperledger.identus.pollux.vc.jwt.PresentationPayload.Implicits.* import pdi.jwt.JwtAlgorithm import zio.Console.printLine import zio.{UIO, ZIO, ZIOAppDefault} diff --git a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/SchemaDemo.scala b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/SchemaDemo.scala similarity index 97% rename from pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/SchemaDemo.scala rename to pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/SchemaDemo.scala index 992c3525ca..77bea1dd20 100644 --- a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/SchemaDemo.scala +++ b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/demos/SchemaDemo.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.vc.jwt.demos +package org.hyperledger.identus.pollux.vc.jwt.demos import io.circe.* import net.reactivecore.cjs.{DocumentValidator, Loader} diff --git a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/revocation/BitString.scala b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/revocation/BitString.scala similarity index 95% rename from pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/revocation/BitString.scala rename to pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/revocation/BitString.scala index 1a0b6cd198..21ca1009ae 100644 --- a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/revocation/BitString.scala +++ b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/revocation/BitString.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.pollux.vc.jwt.revocation +package org.hyperledger.identus.pollux.vc.jwt.revocation -import io.iohk.atala.pollux.vc.jwt.revocation.BitStringError.{DecodingError, EncodingError, IndexOutOfBounds} +import org.hyperledger.identus.pollux.vc.jwt.revocation.BitStringError.{DecodingError, EncodingError, IndexOutOfBounds} import zio.{IO, UIO, ZIO} import java.io.{ByteArrayInputStream, ByteArrayOutputStream} diff --git a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/revocation/VCStatusList2021.scala b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/revocation/VCStatusList2021.scala similarity index 94% rename from pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/revocation/VCStatusList2021.scala rename to pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/revocation/VCStatusList2021.scala index 2822eb36ae..8634947837 100644 --- a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/revocation/VCStatusList2021.scala +++ b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/revocation/VCStatusList2021.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.pollux.vc.jwt.revocation +package org.hyperledger.identus.pollux.vc.jwt.revocation import io.circe.syntax.* import io.circe.{Json, JsonObject} -import io.iohk.atala.pollux.vc.jwt.* -import io.iohk.atala.pollux.vc.jwt.revocation.VCStatusList2021Error.{DecodingError, EncodingError} +import org.hyperledger.identus.pollux.vc.jwt.* +import org.hyperledger.identus.pollux.vc.jwt.revocation.VCStatusList2021Error.{DecodingError, EncodingError} import zio.* import java.time.Instant diff --git a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/schema/PlaceholderSchemaValidator.scala b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/schema/PlaceholderSchemaValidator.scala similarity index 88% rename from pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/schema/PlaceholderSchemaValidator.scala rename to pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/schema/PlaceholderSchemaValidator.scala index e1011927f8..d78e69fc0b 100644 --- a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/schema/PlaceholderSchemaValidator.scala +++ b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/schema/PlaceholderSchemaValidator.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.vc.jwt.schema +package org.hyperledger.identus.pollux.vc.jwt.schema import io.circe import io.circe.Json diff --git a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/schema/ReactiveCoreSchemaValidator.scala b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/schema/ReactiveCoreSchemaValidator.scala similarity index 93% rename from pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/schema/ReactiveCoreSchemaValidator.scala rename to pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/schema/ReactiveCoreSchemaValidator.scala index eebd3da51f..e57ef5299e 100644 --- a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/schema/ReactiveCoreSchemaValidator.scala +++ b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/schema/ReactiveCoreSchemaValidator.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.vc.jwt.schema +package org.hyperledger.identus.pollux.vc.jwt.schema import io.circe import io.circe.generic.auto.* diff --git a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/schema/SchemaResolver.scala b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/schema/SchemaResolver.scala similarity index 53% rename from pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/schema/SchemaResolver.scala rename to pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/schema/SchemaResolver.scala index 5f8ef41ff7..886a758006 100644 --- a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/schema/SchemaResolver.scala +++ b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/schema/SchemaResolver.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.pollux.vc.jwt.schema +package org.hyperledger.identus.pollux.vc.jwt.schema import io.circe.Json -import io.iohk.atala.pollux.vc.jwt.CredentialSchema +import org.hyperledger.identus.pollux.vc.jwt.CredentialSchema import zio.IO trait SchemaResolver { diff --git a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/schema/SchemaValidator.scala b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/schema/SchemaValidator.scala similarity index 73% rename from pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/schema/SchemaValidator.scala rename to pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/schema/SchemaValidator.scala index ad76e91719..8cef04a10a 100644 --- a/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/schema/SchemaValidator.scala +++ b/pollux/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/schema/SchemaValidator.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.vc.jwt.schema +package org.hyperledger.identus.pollux.vc.jwt.schema import zio.prelude.Validation; import io.circe.Json diff --git a/pollux/lib/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/ECDSAVerifierTest.scala b/pollux/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/ECDSAVerifierTest.scala similarity index 94% rename from pollux/lib/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/ECDSAVerifierTest.scala rename to pollux/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/ECDSAVerifierTest.scala index 53ed7d8c98..10e3467227 100644 --- a/pollux/lib/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/ECDSAVerifierTest.scala +++ b/pollux/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/ECDSAVerifierTest.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.vc.jwt +package org.hyperledger.identus.pollux.vc.jwt import com.nimbusds.jose.crypto.bc.BouncyCastleProviderSingleton import com.nimbusds.jose.jwk.Curve diff --git a/pollux/lib/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/ES256KSignerTest.scala b/pollux/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/ES256KSignerTest.scala similarity index 94% rename from pollux/lib/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/ES256KSignerTest.scala rename to pollux/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/ES256KSignerTest.scala index 42dea6ad31..118a4e9156 100644 --- a/pollux/lib/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/ES256KSignerTest.scala +++ b/pollux/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/ES256KSignerTest.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.pollux.vc.jwt +package org.hyperledger.identus.pollux.vc.jwt import com.nimbusds.jose.crypto.bc.BouncyCastleProviderSingleton import com.nimbusds.jose.jwk.Curve diff --git a/pollux/lib/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/JWTVerificationTest.scala b/pollux/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/JWTVerificationTest.scala similarity index 98% rename from pollux/lib/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/JWTVerificationTest.scala rename to pollux/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/JWTVerificationTest.scala index 7f096d5b97..bd4bd545e8 100644 --- a/pollux/lib/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/JWTVerificationTest.scala +++ b/pollux/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/JWTVerificationTest.scala @@ -1,16 +1,16 @@ -package io.iohk.atala.pollux.vc.jwt +package org.hyperledger.identus.pollux.vc.jwt import com.nimbusds.jose.crypto.bc.BouncyCastleProviderSingleton import com.nimbusds.jose.jwk.gen.ECKeyGenerator import com.nimbusds.jose.jwk.{Curve, ECKey} import io.circe.* import io.circe.syntax.* -import io.iohk.atala.castor.core.model.did.VerificationRelationship -import io.iohk.atala.pollux.vc.jwt.CredentialPayload.Implicits.* +import org.hyperledger.identus.castor.core.model.did.VerificationRelationship +import org.hyperledger.identus.pollux.vc.jwt.CredentialPayload.Implicits.* import zio.* import zio.test.* import zio.test.Assertion.* -import io.iohk.atala.shared.http.* +import org.hyperledger.identus.shared.http.* import java.security.Security import java.time.Instant diff --git a/pollux/lib/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/revocation/BitStringSpec.scala b/pollux/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/revocation/BitStringSpec.scala similarity index 95% rename from pollux/lib/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/revocation/BitStringSpec.scala rename to pollux/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/revocation/BitStringSpec.scala index 186d582faf..dcc5d93fc8 100644 --- a/pollux/lib/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/revocation/BitStringSpec.scala +++ b/pollux/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/revocation/BitStringSpec.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.pollux.vc.jwt.revocation +package org.hyperledger.identus.pollux.vc.jwt.revocation -import io.iohk.atala.pollux.vc.jwt.revocation.BitStringError.{IndexOutOfBounds, InvalidSize} +import org.hyperledger.identus.pollux.vc.jwt.revocation.BitStringError.{IndexOutOfBounds, InvalidSize} import zio.* import zio.test.* import zio.test.Assertion.* diff --git a/pollux/lib/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/revocation/VCStatusList2021Spec.scala b/pollux/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/revocation/VCStatusList2021Spec.scala similarity index 95% rename from pollux/lib/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/revocation/VCStatusList2021Spec.scala rename to pollux/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/revocation/VCStatusList2021Spec.scala index a08c2bf0ac..db69cc8952 100644 --- a/pollux/lib/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/revocation/VCStatusList2021Spec.scala +++ b/pollux/vc-jwt/src/test/scala/io/iohk/atala/pollux/vc/jwt/revocation/VCStatusList2021Spec.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.pollux.vc.jwt.revocation +package org.hyperledger.identus.pollux.vc.jwt.revocation -import io.iohk.atala.pollux.vc.jwt.{DID, ES256Signer, Issuer, JwtCredential} +import org.hyperledger.identus.pollux.vc.jwt.{DID, ES256Signer, Issuer, JwtCredential} import zio.test.{Spec, ZIOSpecDefault, assertTrue} import zio.{UIO, ZIO} diff --git a/prism-agent/client/generator/generate-clients.sh b/prism-agent/client/generator/generate-clients.sh deleted file mode 100755 index 8126e84dcb..0000000000 --- a/prism-agent/client/generator/generate-clients.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -set -e - -# generate kotlin models -yarn openapi-generator-cli generate \ - -g kotlin \ - -i ../../service/api/http/prism-agent-openapi-spec.yaml \ - -o ../kotlin \ - --ignore-file-override ../kotlin/.openapi-generator-ignore \ - --additional-properties=packageName=io.iohk.atala.prism,serializationLibrary=gson,enumPropertyNaming=UPPERCASE - -# generate typescript models -yarn openapi-generator-cli generate \ - -g typescript \ - -i ../../service/api/http/prism-agent-openapi-spec.yaml \ - -o ../typescript \ - --ignore-file-override ../typescript/.openapi-generator-ignore - -# generate python models -# yarn openapi-generator-cli generate -g python -i oas.yml --skip-validate-spec -o ../python --ignore-file-override ../python/.openapi-generator-ignore diff --git a/prism-agent/client/generator/publish-clients.sh b/prism-agent/client/generator/publish-clients.sh deleted file mode 100755 index 4cc96205c7..0000000000 --- a/prism-agent/client/generator/publish-clients.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -set -e - -PRISM_AGENT_VERSION=${VERSION_TAG:13} - -# install dependencies -yarn - -# kotlin -gradle -p ../kotlin -Pversion=${PRISM_AGENT_VERSION} publish - -# typescript -yarn --cwd ../typescript -yarn --cwd ../typescript publish --new-version ${PRISM_AGENT_VERSION} --no-git-tag-version - -# python diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/PeerDIDRecord.scala b/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/PeerDIDRecord.scala deleted file mode 100644 index 0d9a0c8ff9..0000000000 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/model/PeerDIDRecord.scala +++ /dev/null @@ -1,8 +0,0 @@ -package io.iohk.atala.agent.walletapi.model - -import io.iohk.atala.mercury.model.DidId -import io.iohk.atala.shared.models.WalletId - -import java.time.Instant - -case class PeerDIDRecord(did: DidId, createdAt: Instant, walletId: WalletId) diff --git a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/storage/WalletSecretStorage.scala b/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/storage/WalletSecretStorage.scala deleted file mode 100644 index bbd7e5316e..0000000000 --- a/prism-agent/service/wallet-api/src/main/scala/io/iohk/atala/agent/walletapi/storage/WalletSecretStorage.scala +++ /dev/null @@ -1,10 +0,0 @@ -package io.iohk.atala.agent.walletapi.storage - -import io.iohk.atala.agent.walletapi.model.WalletSeed -import io.iohk.atala.shared.models.WalletAccessContext -import zio.* - -trait WalletSecretStorage { - def setWalletSeed(seed: WalletSeed): RIO[WalletAccessContext, Unit] - def getWalletSeed: RIO[WalletAccessContext, Option[WalletSeed]] -} diff --git a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/storage/JdbcDIDNonSecretStorageSpec.scala b/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/storage/JdbcDIDNonSecretStorageSpec.scala deleted file mode 100644 index 3ab5831ce1..0000000000 --- a/prism-agent/service/wallet-api/src/test/scala/io/iohk/atala/agent/walletapi/storage/JdbcDIDNonSecretStorageSpec.scala +++ /dev/null @@ -1,288 +0,0 @@ -package io.iohk.atala.agent.walletapi.storage - -import io.iohk.atala.agent.walletapi.model.ManagedDIDState -import io.iohk.atala.agent.walletapi.model.PublicationState -import io.iohk.atala.agent.walletapi.service.WalletManagementService -import io.iohk.atala.agent.walletapi.service.WalletManagementServiceImpl -import io.iohk.atala.agent.walletapi.sql.JdbcDIDNonSecretStorage -import io.iohk.atala.agent.walletapi.sql.JdbcWalletNonSecretStorage -import io.iohk.atala.agent.walletapi.sql.JdbcWalletSecretStorage -import io.iohk.atala.castor.core.model.did.PrismDID -import io.iohk.atala.castor.core.model.did.PrismDIDOperation -import io.iohk.atala.castor.core.model.did.ScheduledDIDOperationStatus -import io.iohk.atala.shared.crypto.ApolloSpecHelper -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.sharedtest.containers.PostgresTestContainerSupport -import io.iohk.atala.test.container.DBTestUtils -import org.postgresql.util.PSQLException -import zio.* -import zio.test.* -import zio.test.Assertion.* - -import scala.collection.compat.immutable.ArraySeq - -object JdbcDIDNonSecretStorageSpec - extends ZIOSpecDefault, - StorageSpecHelper, - PostgresTestContainerSupport, - ApolloSpecHelper { - - private def insertDIDStateWithDelay(operation: Seq[PrismDIDOperation.Create], delay: zio.Duration) = - ZIO.foreach(operation.zipWithIndex) { case (op, idx) => - for { - storage <- ZIO.service[DIDNonSecretStorage] - _ <- storage.insertManagedDID( - op.did, - ManagedDIDState(op, idx, PublicationState.Created()), - Map.empty, - Map.empty - ) - _ <- TestClock.adjust(delay) - } yield () - } - - override def spec = { - val testSuite = - suite("JdbcDIDNonSecretStorageSpec")( - listDIDStateSpec, - getDIDStateSpec, - listDIDLineageSpec, - setDIDLineageStatusSpec - ).globalWallet @@ TestAspect.before(DBTestUtils.runMigrationAgentDB) - - testSuite - .provide( - JdbcDIDNonSecretStorage.layer, - JdbcWalletNonSecretStorage.layer, - JdbcWalletSecretStorage.layer, - WalletManagementServiceImpl.layer, - systemTransactorLayer, - contextAwareTransactorLayer, - pgContainerLayer, - apolloLayer, - ) - } - - private val listDIDStateSpec = suite("listManagedDIDState")( - test("initialize with empty list") { - for { - storage <- ZIO.service[DIDNonSecretStorage] - resultsWithCount <- storage.listManagedDID(None, None) - (results, count) = resultsWithCount - } yield assert(results)(isEmpty) && assert(count)(isZero) - }, - test("list stored dids") { - for { - storage <- ZIO.service[DIDNonSecretStorage] - did1 = PrismDID.buildCanonicalFromSuffix("0" * 64).toOption.get - did2 = PrismDID.buildCanonicalFromSuffix("1" * 64).toOption.get - createOperation1 <- generateCreateOperation(Seq("key-1"), 0).map(_._1) - createOperation2 <- generateCreateOperation(Seq("key-1"), 1).map(_._1) - _ <- storage.insertManagedDID( - did1, - ManagedDIDState(createOperation1, 0, PublicationState.Created()), - Map.empty, - Map.empty - ) - _ <- storage.insertManagedDID( - did2, - ManagedDIDState(createOperation2, 1, PublicationState.Created()), - Map.empty, - Map.empty - ) - states <- storage.listManagedDID(None, None).map(_._1) - } yield assert(states.map(_._1))(hasSameElements(Seq(did1, did2))) - }, - test("list stored dids and return correct item count when using offset and limit") { - for { - storage <- ZIO.service[DIDNonSecretStorage] - operations <- ZIO.foreach(1 to 50)(i => generateCreateOperation(Seq("key-1"), i).map(_._1)) - _ <- insertDIDStateWithDelay(operations, 100.millis) - resultsWithCount <- storage.listManagedDID(offset = Some(20), limit = Some(10)) - (results, count) = resultsWithCount - dids = results.map(_._1.asCanonical) - } yield assert(count)(equalTo(50)) && assert(dids)(hasSameElements(operations.drop(20).take(10).map(_.did))) - }, - test("list stored dids and return correct item count when using offset only") { - for { - storage <- ZIO.service[DIDNonSecretStorage] - operations <- ZIO.foreach(1 to 50)(i => generateCreateOperation(Seq("key-1"), i).map(_._1)) - _ <- insertDIDStateWithDelay(operations, 100.millis) - resultsWithCount <- storage.listManagedDID(offset = Some(20), limit = None) - (results, count) = resultsWithCount - dids = results.map(_._1) - } yield assert(count)(equalTo(50)) && assert(dids)(hasSameElements(operations.drop(20).map(_.did))) - }, - test("list stored dids and return correct item count when using limit only") { - for { - storage <- ZIO.service[DIDNonSecretStorage] - operations <- ZIO.foreach(1 to 50)(i => generateCreateOperation(Seq("key-1"), i).map(_._1)) - _ <- insertDIDStateWithDelay(operations, 100.millis) - resultsWithCount <- storage.listManagedDID(offset = None, limit = Some(10)) - (results, count) = resultsWithCount - dids = results.map(_._1) - } yield assert(count)(equalTo(50)) && assert(dids)(hasSameElements(operations.take(10).map(_.did))) - }, - test("return empty list when limit is zero") { - for { - storage <- ZIO.service[DIDNonSecretStorage] - operations <- ZIO.foreach(1 to 50)(i => generateCreateOperation(Seq("key-1"), i).map(_._1)) - _ <- insertDIDStateWithDelay(operations, 100.millis) - resultsWithCount <- storage.listManagedDID(offset = None, limit = Some(0)) - (results, count) = resultsWithCount - dids = results.map(_._1.asCanonical) - } yield assert(count)(equalTo(50)) && assert(dids)(isEmpty) - }, - test("fail when limit is negative") { - for { - storage <- ZIO.service[DIDNonSecretStorage] - operations <- ZIO.foreach(1 to 50)(i => generateCreateOperation(Seq("key-1"), i).map(_._1)) - _ <- insertDIDStateWithDelay(operations, 100.millis) - exit <- storage.listManagedDID(offset = None, limit = Some(-1)).exit - } yield assert(exit)( - fails( - isSubtype[PSQLException](hasField("getMessage", _.getMessage(), containsString("LIMIT must not be negative"))) - ) - ) - }, - test("fail when offset is negative") { - for { - storage <- ZIO.service[DIDNonSecretStorage] - operations <- ZIO.foreach(1 to 50)(i => generateCreateOperation(Seq("key-1"), i).map(_._1)) - _ <- insertDIDStateWithDelay(operations, 100.millis) - exit <- storage.listManagedDID(offset = Some(-1), limit = None).exit - } yield assert(exit)( - fails( - isSubtype[PSQLException]( - hasField("getMessage", _.getMessage(), containsString("OFFSET must not be negative")) - ) - ) - ) - } - ) - - private val getDIDStateSpec = suite("getManagedDIDState")( - test("return None of state is not found") { - for { - storage <- ZIO.service[DIDNonSecretStorage] - state <- storage.getManagedDIDState(didExample) - } yield assert(state)(isNone) - }, - test("return the same state that was set for all variants") { - for { - storage <- ZIO.service[DIDNonSecretStorage] - inputs = Seq[(Int, PublicationState)]( - (1, PublicationState.Created()), - (2, PublicationState.PublicationPending(ArraySeq.fill(32)(0))), - (3, PublicationState.Published(ArraySeq.fill(32)(1))), - ) - states <- ZIO.foreach(inputs) { case (didIndex, publicationState) => - val operation = generateCreateOperation(Seq("key-1"), didIndex).map(_._1) - operation.map(o => ManagedDIDState(o, didIndex, publicationState)) - } - readStates <- ZIO.foreach(states) { state => - for { - _ <- storage.insertManagedDID(state.createOperation.did, state, Map.empty, Map.empty) - readState <- storage.getManagedDIDState(state.createOperation.did) - } yield readState - } - } yield assert(readStates.flatten)(hasSameElements(states)) - } - ) - - private val listDIDLineageSpec = { - val initDIDLineage = { - for { - storage <- ZIO.service[DIDNonSecretStorage] - did1 <- initializeDIDStateAndKeys(Nil, 0) - did2 <- initializeDIDStateAndKeys(Nil, 1) - input = Seq( - (did1, Array.fill[Byte](32)(0), ScheduledDIDOperationStatus.Pending), - (did1, Array.fill[Byte](32)(1), ScheduledDIDOperationStatus.Confirmed), - (did2, Array.fill[Byte](32)(2), ScheduledDIDOperationStatus.Pending), - (did2, Array.fill[Byte](32)(3), ScheduledDIDOperationStatus.Confirmed), - ) - _ <- ZIO.foreach(input) { case (did, hash, status) => - storage.insertDIDUpdateLineage(did, updateLineage(operationId = hash, status = status)) - } - } yield (did1, did2) - } - - suite("listDIDUpdateLineage")( - test("initialize with empty lineage") { - for { - storage <- ZIO.service[DIDNonSecretStorage] - lineage <- storage.listUpdateLineage(None, None) - } yield assert(lineage)(isEmpty) - }, - test("list all lineage") { - for { - _ <- initDIDLineage - lineage <- ZIO.serviceWithZIO[DIDNonSecretStorage](_.listUpdateLineage(None, None)) - } yield assert(lineage.map(_.operationId))( - hasSameElements( - Seq( - ArraySeq.fill(32)(0), - ArraySeq.fill(32)(1), - ArraySeq.fill(32)(2), - ArraySeq.fill(32)(3), - ) - ) - ) - }, - test("list lineage filtered by did") { - for { - did1 <- initDIDLineage.map(_._1) - lineage <- ZIO.serviceWithZIO[DIDNonSecretStorage](_.listUpdateLineage(Some(did1), None)) - } yield assert(lineage.map(_.operationId))( - hasSameElements(Seq(ArraySeq.fill(32)(0), ArraySeq.fill(32)(1))) - ) - }, - test("list lineage filtered by status") { - for { - did1 <- initDIDLineage.map(_._1) - lineage <- ZIO.serviceWithZIO[DIDNonSecretStorage]( - _.listUpdateLineage(None, Some(ScheduledDIDOperationStatus.Pending)) - ) - } yield assert(lineage.map(_.operationId))( - hasSameElements(Seq(ArraySeq.fill(32)(0), ArraySeq.fill(32)(2))) - ) - }, - test("list lineage filtered by did and status") { - for { - did1 <- initDIDLineage.map(_._1) - lineage <- ZIO.serviceWithZIO[DIDNonSecretStorage]( - _.listUpdateLineage(Some(did1), Some(ScheduledDIDOperationStatus.Pending)) - ) - } yield assert(lineage.map(_.operationId))( - hasSameElements(Seq(ArraySeq.fill(32)(0))) - ) - } - ) - } - - private val setDIDLineageStatusSpec = suite("setDIDLineageStatus")( - test("do not fail on setting non-existing did lineage") { - for { - storage <- ZIO.service[DIDNonSecretStorage] - _ <- storage.setDIDUpdateLineageStatus(Array.fill(32)(0), ScheduledDIDOperationStatus.Pending) - } yield assertCompletes - }, - test("set status for existing did") { - val operationId = Array.fill[Byte](32)(42) - for { - storage <- ZIO.service[DIDNonSecretStorage] - did <- initializeDIDStateAndKeys(Nil, 0) - _ <- storage.insertDIDUpdateLineage( - did, - updateLineage(operationId = operationId, status = ScheduledDIDOperationStatus.Pending) - ) - status1 <- storage.listUpdateLineage(Some(did), None).map(_.head.status) - _ <- storage.setDIDUpdateLineageStatus(operationId, ScheduledDIDOperationStatus.Confirmed) - status2 <- storage.listUpdateLineage(Some(did), None).map(_.head.status) - } yield assert(status1)(equalTo(ScheduledDIDOperationStatus.Pending)) - && assert(status2)(equalTo(ScheduledDIDOperationStatus.Confirmed)) - } - ) - -} diff --git a/prism-node/client/scala-client/src/main/resources/package.proto b/prism-node/client/scala-client/src/main/resources/package.proto index c871a620f7..519ba8f9e4 100644 --- a/prism-node/client/scala-client/src/main/resources/package.proto +++ b/prism-node/client/scala-client/src/main/resources/package.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package io.iohk.atala.prism.protos; +package org.hyperledger.identus.protos; import "scalapb/scalapb.proto"; diff --git a/shared/core/src/main/scala/io/iohk/atala/shared/db/ContextAwareTask.scala b/shared/core/src/main/scala/org/hyperledger/identus/shared/db/ContextAwareTask.scala similarity index 90% rename from shared/core/src/main/scala/io/iohk/atala/shared/db/ContextAwareTask.scala rename to shared/core/src/main/scala/org/hyperledger/identus/shared/db/ContextAwareTask.scala index 6c9f150768..239e2b1c70 100644 --- a/shared/core/src/main/scala/io/iohk/atala/shared/db/ContextAwareTask.scala +++ b/shared/core/src/main/scala/org/hyperledger/identus/shared/db/ContextAwareTask.scala @@ -1,11 +1,11 @@ -package io.iohk.atala.shared.db +package org.hyperledger.identus.shared.db import doobie.* import doobie.postgres.implicits.* import doobie.syntax.ConnectionIOOps import doobie.util.transactor.Transactor -import io.iohk.atala.shared.models.WalletAccessContext -import io.iohk.atala.shared.models.WalletId +import org.hyperledger.identus.shared.models.WalletAccessContext +import org.hyperledger.identus.shared.models.WalletId import zio.* import zio.interop.catz.* diff --git a/shared/core/src/main/scala/io/iohk/atala/shared/db/DbConfig.scala b/shared/core/src/main/scala/org/hyperledger/identus/shared/db/DbConfig.scala similarity index 74% rename from shared/core/src/main/scala/io/iohk/atala/shared/db/DbConfig.scala rename to shared/core/src/main/scala/org/hyperledger/identus/shared/db/DbConfig.scala index c28cf69263..69fcb6897d 100644 --- a/shared/core/src/main/scala/io/iohk/atala/shared/db/DbConfig.scala +++ b/shared/core/src/main/scala/org/hyperledger/identus/shared/db/DbConfig.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.shared.db +package org.hyperledger.identus.shared.db case class DbConfig( username: String, diff --git a/shared/core/src/main/scala/io/iohk/atala/shared/db/TransactorLayer.scala b/shared/core/src/main/scala/org/hyperledger/identus/shared/db/TransactorLayer.scala similarity index 98% rename from shared/core/src/main/scala/io/iohk/atala/shared/db/TransactorLayer.scala rename to shared/core/src/main/scala/org/hyperledger/identus/shared/db/TransactorLayer.scala index fdbb6164a5..fdd23d41ac 100644 --- a/shared/core/src/main/scala/io/iohk/atala/shared/db/TransactorLayer.scala +++ b/shared/core/src/main/scala/org/hyperledger/identus/shared/db/TransactorLayer.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.shared.db +package org.hyperledger.identus.shared.db import cats.effect.Async import cats.effect.kernel.Resource diff --git a/shared/core/src/main/scala/io/iohk/atala/shared/http/GenericUriResolver.scala b/shared/core/src/main/scala/org/hyperledger/identus/shared/http/GenericUriResolver.scala similarity index 97% rename from shared/core/src/main/scala/io/iohk/atala/shared/http/GenericUriResolver.scala rename to shared/core/src/main/scala/org/hyperledger/identus/shared/http/GenericUriResolver.scala index 737d17b35b..46d1b57e3c 100644 --- a/shared/core/src/main/scala/io/iohk/atala/shared/http/GenericUriResolver.scala +++ b/shared/core/src/main/scala/org/hyperledger/identus/shared/http/GenericUriResolver.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.shared.http +package org.hyperledger.identus.shared.http import zio.* import io.lemonlabs.uri.{DataUrl, Uri, Url, Urn} diff --git a/shared/core/src/main/scala/io/iohk/atala/shared/models/Base64UrlString.scala b/shared/core/src/main/scala/org/hyperledger/identus/shared/models/Base64UrlString.scala similarity index 83% rename from shared/core/src/main/scala/io/iohk/atala/shared/models/Base64UrlString.scala rename to shared/core/src/main/scala/org/hyperledger/identus/shared/models/Base64UrlString.scala index 957bc9771d..ca418cc426 100644 --- a/shared/core/src/main/scala/io/iohk/atala/shared/models/Base64UrlString.scala +++ b/shared/core/src/main/scala/org/hyperledger/identus/shared/models/Base64UrlString.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.shared.models +package org.hyperledger.identus.shared.models -import io.iohk.atala.shared.utils.Base64Utils +import org.hyperledger.identus.shared.utils.Base64Utils import scala.util.Try opaque type Base64UrlString = String diff --git a/shared/core/src/main/scala/io/iohk/atala/shared/models/Failure.scala b/shared/core/src/main/scala/org/hyperledger/identus/shared/models/Failure.scala similarity index 86% rename from shared/core/src/main/scala/io/iohk/atala/shared/models/Failure.scala rename to shared/core/src/main/scala/org/hyperledger/identus/shared/models/Failure.scala index c116a78da5..770108ffa0 100644 --- a/shared/core/src/main/scala/io/iohk/atala/shared/models/Failure.scala +++ b/shared/core/src/main/scala/org/hyperledger/identus/shared/models/Failure.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.shared.models +package org.hyperledger.identus.shared.models trait Failure { val statusCode: StatusCode diff --git a/shared/core/src/main/scala/io/iohk/atala/shared/models/HexString.scala b/shared/core/src/main/scala/org/hyperledger/identus/shared/models/HexString.scala similarity index 80% rename from shared/core/src/main/scala/io/iohk/atala/shared/models/HexString.scala rename to shared/core/src/main/scala/org/hyperledger/identus/shared/models/HexString.scala index 333b79bb5e..92dc6641f6 100644 --- a/shared/core/src/main/scala/io/iohk/atala/shared/models/HexString.scala +++ b/shared/core/src/main/scala/org/hyperledger/identus/shared/models/HexString.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.shared.models +package org.hyperledger.identus.shared.models -import io.iohk.atala.shared.utils.BytesOps +import org.hyperledger.identus.shared.utils.BytesOps import scala.util.Try opaque type HexString = String diff --git a/shared/core/src/main/scala/io/iohk/atala/shared/models/MultiTenancy.scala b/shared/core/src/main/scala/org/hyperledger/identus/shared/models/MultiTenancy.scala similarity index 96% rename from shared/core/src/main/scala/io/iohk/atala/shared/models/MultiTenancy.scala rename to shared/core/src/main/scala/org/hyperledger/identus/shared/models/MultiTenancy.scala index 87f2d87995..f16719d258 100644 --- a/shared/core/src/main/scala/io/iohk/atala/shared/models/MultiTenancy.scala +++ b/shared/core/src/main/scala/org/hyperledger/identus/shared/models/MultiTenancy.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.shared.models +package org.hyperledger.identus.shared.models import java.util.UUID import scala.language.implicitConversions diff --git a/shared/core/src/main/scala/io/iohk/atala/shared/utils/Base64Utils.scala b/shared/core/src/main/scala/org/hyperledger/identus/shared/utils/Base64Utils.scala similarity index 92% rename from shared/core/src/main/scala/io/iohk/atala/shared/utils/Base64Utils.scala rename to shared/core/src/main/scala/org/hyperledger/identus/shared/utils/Base64Utils.scala index bc1449736b..6de319955b 100644 --- a/shared/core/src/main/scala/io/iohk/atala/shared/utils/Base64Utils.scala +++ b/shared/core/src/main/scala/org/hyperledger/identus/shared/utils/Base64Utils.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.shared.utils +package org.hyperledger.identus.shared.utils import java.nio.charset.StandardCharsets import java.util.Base64 diff --git a/shared/core/src/main/scala/io/iohk/atala/shared/utils/BytesOps.scala b/shared/core/src/main/scala/org/hyperledger/identus/shared/utils/BytesOps.scala similarity index 94% rename from shared/core/src/main/scala/io/iohk/atala/shared/utils/BytesOps.scala rename to shared/core/src/main/scala/org/hyperledger/identus/shared/utils/BytesOps.scala index afc5c4dabc..14032fb258 100644 --- a/shared/core/src/main/scala/io/iohk/atala/shared/utils/BytesOps.scala +++ b/shared/core/src/main/scala/org/hyperledger/identus/shared/utils/BytesOps.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.shared.utils +package org.hyperledger.identus.shared.utils import java.nio.charset.StandardCharsets diff --git a/shared/core/src/main/scala/io/iohk/atala/shared/utils/DurationOps.scala b/shared/core/src/main/scala/org/hyperledger/identus/shared/utils/DurationOps.scala similarity index 75% rename from shared/core/src/main/scala/io/iohk/atala/shared/utils/DurationOps.scala rename to shared/core/src/main/scala/org/hyperledger/identus/shared/utils/DurationOps.scala index f377973895..f5f297862e 100644 --- a/shared/core/src/main/scala/io/iohk/atala/shared/utils/DurationOps.scala +++ b/shared/core/src/main/scala/org/hyperledger/identus/shared/utils/DurationOps.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.shared.utils +package org.hyperledger.identus.shared.utils import java.time.Duration diff --git a/shared/core/src/main/scala/io/iohk/atala/shared/utils/Json.scala b/shared/core/src/main/scala/org/hyperledger/identus/shared/utils/Json.scala similarity index 91% rename from shared/core/src/main/scala/io/iohk/atala/shared/utils/Json.scala rename to shared/core/src/main/scala/org/hyperledger/identus/shared/utils/Json.scala index 2607ddf997..d7ddbb5670 100644 --- a/shared/core/src/main/scala/io/iohk/atala/shared/utils/Json.scala +++ b/shared/core/src/main/scala/org/hyperledger/identus/shared/utils/Json.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.shared.utils +package org.hyperledger.identus.shared.utils import org.erdtman.jcs.JsonCanonicalizer import scala.util.Try diff --git a/shared/core/src/main/scala/io/iohk/atala/shared/utils/Traverse.scala b/shared/core/src/main/scala/org/hyperledger/identus/shared/utils/Traverse.scala similarity index 91% rename from shared/core/src/main/scala/io/iohk/atala/shared/utils/Traverse.scala rename to shared/core/src/main/scala/org/hyperledger/identus/shared/utils/Traverse.scala index 5b66d85356..422a6b7031 100644 --- a/shared/core/src/main/scala/io/iohk/atala/shared/utils/Traverse.scala +++ b/shared/core/src/main/scala/org/hyperledger/identus/shared/utils/Traverse.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.shared.utils +package org.hyperledger.identus.shared.utils /** A lightweight DIY version of traverse to not rely on Cats because Scala3 + Cats implicits break the IDE compile * server making the development counterproductive. diff --git a/shared/core/src/main/scala/io/iohk/atala/shared/utils/aspects/CustomMetricsAspect.scala b/shared/core/src/main/scala/org/hyperledger/identus/shared/utils/aspects/CustomMetricsAspect.scala similarity index 92% rename from shared/core/src/main/scala/io/iohk/atala/shared/utils/aspects/CustomMetricsAspect.scala rename to shared/core/src/main/scala/org/hyperledger/identus/shared/utils/aspects/CustomMetricsAspect.scala index 6c5515b2fc..946888ebea 100644 --- a/shared/core/src/main/scala/io/iohk/atala/shared/utils/aspects/CustomMetricsAspect.scala +++ b/shared/core/src/main/scala/org/hyperledger/identus/shared/utils/aspects/CustomMetricsAspect.scala @@ -1,10 +1,10 @@ -package io.iohk.atala.shared.utils.aspects +package org.hyperledger.identus.shared.utils.aspects import zio.* import scala.collection.mutable.{Map => MutMap} import zio.metrics.* import java.time.{Instant, Clock, Duration} -import io.iohk.atala.shared.utils.DurationOps.toMetricsSeconds +import org.hyperledger.identus.shared.utils.DurationOps.toMetricsSeconds object CustomMetricsAspect { private val checkpoints: MutMap[String, Instant] = MutMap.empty diff --git a/shared/core/src/main/scala/io/iohk/atala/shared/utils/proto/Path.scala b/shared/core/src/main/scala/org/hyperledger/identus/shared/utils/proto/Path.scala similarity index 86% rename from shared/core/src/main/scala/io/iohk/atala/shared/utils/proto/Path.scala rename to shared/core/src/main/scala/org/hyperledger/identus/shared/utils/proto/Path.scala index 3bec54da43..ff1d9699d7 100644 --- a/shared/core/src/main/scala/io/iohk/atala/shared/utils/proto/Path.scala +++ b/shared/core/src/main/scala/org/hyperledger/identus/shared/utils/proto/Path.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.shared.utils.proto +package org.hyperledger.identus.shared.utils.proto /** Representation of sequence of field names pointing to some place in protobuf message */ diff --git a/shared/core/src/main/scala/io/iohk/atala/shared/utils/proto/ValidationError.scala b/shared/core/src/main/scala/org/hyperledger/identus/shared/utils/proto/ValidationError.scala similarity index 94% rename from shared/core/src/main/scala/io/iohk/atala/shared/utils/proto/ValidationError.scala rename to shared/core/src/main/scala/org/hyperledger/identus/shared/utils/proto/ValidationError.scala index def7687381..ee78c93ada 100644 --- a/shared/core/src/main/scala/io/iohk/atala/shared/utils/proto/ValidationError.scala +++ b/shared/core/src/main/scala/org/hyperledger/identus/shared/utils/proto/ValidationError.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.shared.utils.proto +package org.hyperledger.identus.shared.utils.proto sealed trait ValidationError { def name: String diff --git a/shared/core/src/main/scala/io/iohk/atala/shared/utils/proto/package.scala b/shared/core/src/main/scala/org/hyperledger/identus/shared/utils/proto/package.scala similarity index 95% rename from shared/core/src/main/scala/io/iohk/atala/shared/utils/proto/package.scala rename to shared/core/src/main/scala/org/hyperledger/identus/shared/utils/proto/package.scala index 31cf1161ac..76d129e0ab 100644 --- a/shared/core/src/main/scala/io/iohk/atala/shared/utils/proto/package.scala +++ b/shared/core/src/main/scala/org/hyperledger/identus/shared/utils/proto/package.scala @@ -1,7 +1,7 @@ -package io.iohk.atala.shared.utils +package org.hyperledger.identus.shared.utils import com.google.protobuf.ByteString -import io.iohk.atala.shared.utils.proto.ValidationError.{InvalidValue, MissingValue} +import org.hyperledger.identus.shared.utils.proto.ValidationError.{InvalidValue, MissingValue} package object proto { diff --git a/shared/core/src/main/scala/io/iohk/atala/shared/validation/ValidationUtils.scala b/shared/core/src/main/scala/org/hyperledger/identus/shared/validation/ValidationUtils.scala similarity index 90% rename from shared/core/src/main/scala/io/iohk/atala/shared/validation/ValidationUtils.scala rename to shared/core/src/main/scala/org/hyperledger/identus/shared/validation/ValidationUtils.scala index 6456c0e5c4..455ef82e88 100644 --- a/shared/core/src/main/scala/io/iohk/atala/shared/validation/ValidationUtils.scala +++ b/shared/core/src/main/scala/org/hyperledger/identus/shared/validation/ValidationUtils.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.shared.validation +package org.hyperledger.identus.shared.validation import zio.prelude.* diff --git a/shared/crypto/src/main/scala/io/iohk/atala/shared/crypto/Apollo.scala b/shared/crypto/src/main/scala/org/hyperledger/identus/shared/crypto/Apollo.scala similarity index 97% rename from shared/crypto/src/main/scala/io/iohk/atala/shared/crypto/Apollo.scala rename to shared/crypto/src/main/scala/org/hyperledger/identus/shared/crypto/Apollo.scala index a342fa62d0..8651df618d 100644 --- a/shared/crypto/src/main/scala/io/iohk/atala/shared/crypto/Apollo.scala +++ b/shared/crypto/src/main/scala/org/hyperledger/identus/shared/crypto/Apollo.scala @@ -1,6 +1,6 @@ -package io.iohk.atala.shared.crypto +package org.hyperledger.identus.shared.crypto -import io.iohk.atala.shared.models.HexString +import org.hyperledger.identus.shared.models.HexString import org.bouncycastle.jce.ECNamedCurveTable import org.bouncycastle.jce.provider.BouncyCastleProvider import org.bouncycastle.jce.spec.ECNamedCurveSpec diff --git a/shared/crypto/src/main/scala/io/iohk/atala/shared/crypto/KmpApollo.scala b/shared/crypto/src/main/scala/org/hyperledger/identus/shared/crypto/KmpApollo.scala similarity index 99% rename from shared/crypto/src/main/scala/io/iohk/atala/shared/crypto/KmpApollo.scala rename to shared/crypto/src/main/scala/org/hyperledger/identus/shared/crypto/KmpApollo.scala index 5cc85400c6..4d043521fd 100644 --- a/shared/crypto/src/main/scala/io/iohk/atala/shared/crypto/KmpApollo.scala +++ b/shared/crypto/src/main/scala/org/hyperledger/identus/shared/crypto/KmpApollo.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.shared.crypto +package org.hyperledger.identus.shared.crypto import io.iohk.atala.prism.apollo.derivation import io.iohk.atala.prism.apollo.derivation.MnemonicHelper diff --git a/shared/crypto/src/main/scala/io/iohk/atala/shared/crypto/Prism14Apollo.scala b/shared/crypto/src/main/scala/org/hyperledger/identus/shared/crypto/Prism14Apollo.scala similarity index 98% rename from shared/crypto/src/main/scala/io/iohk/atala/shared/crypto/Prism14Apollo.scala rename to shared/crypto/src/main/scala/org/hyperledger/identus/shared/crypto/Prism14Apollo.scala index 37e049c386..6501618619 100644 --- a/shared/crypto/src/main/scala/io/iohk/atala/shared/crypto/Prism14Apollo.scala +++ b/shared/crypto/src/main/scala/org/hyperledger/identus/shared/crypto/Prism14Apollo.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.shared.crypto +package org.hyperledger.identus.shared.crypto import io.iohk.atala.prism.crypto.EC import io.iohk.atala.prism.crypto.derivation.DerivationAxis diff --git a/shared/crypto/src/main/scala/io/iohk/atala/shared/crypto/jwk/JWK.scala b/shared/crypto/src/main/scala/org/hyperledger/identus/shared/crypto/jwk/JWK.scala similarity index 95% rename from shared/crypto/src/main/scala/io/iohk/atala/shared/crypto/jwk/JWK.scala rename to shared/crypto/src/main/scala/org/hyperledger/identus/shared/crypto/jwk/JWK.scala index 1e4050a121..fb6e7167e4 100644 --- a/shared/crypto/src/main/scala/io/iohk/atala/shared/crypto/jwk/JWK.scala +++ b/shared/crypto/src/main/scala/org/hyperledger/identus/shared/crypto/jwk/JWK.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.shared.crypto.jwk +package org.hyperledger.identus.shared.crypto.jwk import com.nimbusds.jose.jwk.Curve import com.nimbusds.jose.jwk.OctetKeyPair import com.nimbusds.jose.util.Base64URL -import io.iohk.atala.shared.crypto.* +import org.hyperledger.identus.shared.crypto.* import zio.json.* import zio.json.ast.Json diff --git a/shared/crypto/src/test/scala/io/iohk/atala/shared/crypto/ApolloSpec.scala b/shared/crypto/src/test/scala/org/hyperledger/identus/shared/crypto/ApolloSpec.scala similarity index 99% rename from shared/crypto/src/test/scala/io/iohk/atala/shared/crypto/ApolloSpec.scala rename to shared/crypto/src/test/scala/org/hyperledger/identus/shared/crypto/ApolloSpec.scala index c6bd785e43..94cd37ca2b 100644 --- a/shared/crypto/src/test/scala/io/iohk/atala/shared/crypto/ApolloSpec.scala +++ b/shared/crypto/src/test/scala/org/hyperledger/identus/shared/crypto/ApolloSpec.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.shared.crypto +package org.hyperledger.identus.shared.crypto import zio.* import zio.test.* import zio.test.Assertion.* -import io.iohk.atala.shared.models.HexString +import org.hyperledger.identus.shared.models.HexString object ApolloSpec extends ZIOSpecDefault { diff --git a/shared/crypto/src/test/scala/io/iohk/atala/shared/crypto/ApolloSpecHelper.scala b/shared/crypto/src/test/scala/org/hyperledger/identus/shared/crypto/ApolloSpecHelper.scala similarity index 60% rename from shared/crypto/src/test/scala/io/iohk/atala/shared/crypto/ApolloSpecHelper.scala rename to shared/crypto/src/test/scala/org/hyperledger/identus/shared/crypto/ApolloSpecHelper.scala index 98e278a6dc..baff9c483f 100644 --- a/shared/crypto/src/test/scala/io/iohk/atala/shared/crypto/ApolloSpecHelper.scala +++ b/shared/crypto/src/test/scala/org/hyperledger/identus/shared/crypto/ApolloSpecHelper.scala @@ -1,6 +1,7 @@ -package io.iohk.atala.shared.crypto +package org.hyperledger.identus.shared.crypto import zio.* +import org.hyperledger.identus.shared.crypto.Apollo trait ApolloSpecHelper { protected val apollo: Apollo = Apollo.default diff --git a/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/KeycloakContainerCustom.scala b/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/KeycloakContainerCustom.scala index f39af6f44c..ab8344f56d 100644 --- a/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/KeycloakContainerCustom.scala +++ b/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/KeycloakContainerCustom.scala @@ -1,8 +1,8 @@ -package io.iohk.atala.sharedtest.containers +package org.hyperledger.identus.sharedtest.containers import com.dimafeng.testcontainers.SingleContainer import dasniko.testcontainers.keycloak.ExtendableKeycloakContainer -import io.iohk.atala.sharedtest.containers.KeycloakTestContainer.keycloakContainer +import org.hyperledger.identus.sharedtest.containers.KeycloakTestContainer.keycloakContainer import org.testcontainers.utility.DockerImageName import zio.{TaskLayer, ZIO, ZLayer} diff --git a/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/KeycloakTestContainer.scala b/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/KeycloakTestContainer.scala index 4ac35afc86..b8568422d9 100644 --- a/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/KeycloakTestContainer.scala +++ b/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/KeycloakTestContainer.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.sharedtest.containers +package org.hyperledger.identus.sharedtest.containers import org.testcontainers.utility.DockerImageName diff --git a/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/KeycloakTestContainerSupport.scala b/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/KeycloakTestContainerSupport.scala index 53b2a66f8a..506d4673f4 100644 --- a/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/KeycloakTestContainerSupport.scala +++ b/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/KeycloakTestContainerSupport.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.sharedtest.containers +package org.hyperledger.identus.sharedtest.containers import org.keycloak.admin.client.Keycloak import org.keycloak.representations.idm.{ diff --git a/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/KeycloakTestContainerSupportSpec.scala b/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/KeycloakTestContainerSupportSpec.scala index 46722b6641..599209341f 100644 --- a/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/KeycloakTestContainerSupportSpec.scala +++ b/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/KeycloakTestContainerSupportSpec.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.sharedtest.containers +package org.hyperledger.identus.sharedtest.containers import zio.ZIO import zio.test.* diff --git a/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/PostgreSQLContainerCustom.scala b/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/PostgreSQLContainerCustom.scala index b77d3094e6..f29b677e29 100644 --- a/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/PostgreSQLContainerCustom.scala +++ b/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/PostgreSQLContainerCustom.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.sharedtest.containers +package org.hyperledger.identus.sharedtest.containers import com.dimafeng.testcontainers.{JdbcDatabaseContainer, PostgreSQLContainer} import org.testcontainers.utility.DockerImageName diff --git a/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/PostgresLayer.scala b/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/PostgresLayer.scala index 0a7b3912eb..7bc3e3727e 100644 --- a/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/PostgresLayer.scala +++ b/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/PostgresLayer.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.sharedtest.containers +package org.hyperledger.identus.sharedtest.containers import com.dimafeng.testcontainers.PostgreSQLContainer import doobie.util.transactor.Transactor -import io.iohk.atala.shared.db.{ContextAwareTask, DbConfig, TransactorLayer} -import io.iohk.atala.sharedtest.containers.PostgresTestContainer.postgresContainer +import org.hyperledger.identus.shared.db.{ContextAwareTask, DbConfig, TransactorLayer} +import org.hyperledger.identus.sharedtest.containers.PostgresTestContainer.postgresContainer import zio.* object PostgresLayer { diff --git a/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/PostgresTestContainer.scala b/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/PostgresTestContainer.scala index 546b44804f..e5581b1296 100644 --- a/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/PostgresTestContainer.scala +++ b/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/PostgresTestContainer.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.sharedtest.containers +package org.hyperledger.identus.sharedtest.containers import com.dimafeng.testcontainers.PostgreSQLContainer import org.testcontainers.containers.output.OutputFrame diff --git a/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/PostgresTestContainerSupport.scala b/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/PostgresTestContainerSupport.scala index 2527765319..0530a619d9 100644 --- a/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/PostgresTestContainerSupport.scala +++ b/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/PostgresTestContainerSupport.scala @@ -1,9 +1,9 @@ -package io.iohk.atala.sharedtest.containers +package org.hyperledger.identus.sharedtest.containers import com.dimafeng.testcontainers.PostgreSQLContainer import doobie.util.transactor.Transactor -import io.iohk.atala.shared.db.ContextAwareTask -import io.iohk.atala.shared.db.TransactorLayer +import org.hyperledger.identus.shared.db.ContextAwareTask +import org.hyperledger.identus.shared.db.TransactorLayer import zio.* trait PostgresTestContainerSupport { diff --git a/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/VaultContainerCustom.scala b/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/VaultContainerCustom.scala index 6265b031a9..b5bc783506 100644 --- a/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/VaultContainerCustom.scala +++ b/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/VaultContainerCustom.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.sharedtest.containers +package org.hyperledger.identus.sharedtest.containers import com.dimafeng.testcontainers.{SingleContainer, VaultContainer} import org.testcontainers.vault.{VaultContainer => JavaVaultContainer} diff --git a/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/VaultTestContainer.scala b/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/VaultTestContainer.scala index f7e8f9adf1..c43edcb4ae 100644 --- a/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/VaultTestContainer.scala +++ b/shared/test/src/test/scala/io/iohk/atala/sharedtest/containers/VaultTestContainer.scala @@ -1,4 +1,4 @@ -package io.iohk.atala.sharedtest.containers +package org.hyperledger.identus.sharedtest.containers import org.testcontainers.containers.output.OutputFrame import org.testcontainers.utility.DockerImageName diff --git a/tests/performance-tests/atala-performance-tests-k6/.babelrc b/tests/performance-tests/agent-performance-tests-k6/.babelrc similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/.babelrc rename to tests/performance-tests/agent-performance-tests-k6/.babelrc diff --git a/tests/performance-tests/atala-performance-tests-k6/.env b/tests/performance-tests/agent-performance-tests-k6/.env similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/.env rename to tests/performance-tests/agent-performance-tests-k6/.env diff --git a/tests/performance-tests/atala-performance-tests-k6/.gitignore b/tests/performance-tests/agent-performance-tests-k6/.gitignore similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/.gitignore rename to tests/performance-tests/agent-performance-tests-k6/.gitignore diff --git a/tests/performance-tests/atala-performance-tests-k6/.npmrc b/tests/performance-tests/agent-performance-tests-k6/.npmrc similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/.npmrc rename to tests/performance-tests/agent-performance-tests-k6/.npmrc diff --git a/tests/performance-tests/atala-performance-tests-k6/.yarnrc b/tests/performance-tests/agent-performance-tests-k6/.yarnrc similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/.yarnrc rename to tests/performance-tests/agent-performance-tests-k6/.yarnrc diff --git a/tests/performance-tests/atala-performance-tests-k6/README.md b/tests/performance-tests/agent-performance-tests-k6/README.md similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/README.md rename to tests/performance-tests/agent-performance-tests-k6/README.md diff --git a/tests/performance-tests/atala-performance-tests-k6/package.json b/tests/performance-tests/agent-performance-tests-k6/package.json similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/package.json rename to tests/performance-tests/agent-performance-tests-k6/package.json diff --git a/tests/performance-tests/atala-performance-tests-k6/run.sh b/tests/performance-tests/agent-performance-tests-k6/run.sh similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/run.sh rename to tests/performance-tests/agent-performance-tests-k6/run.sh diff --git a/tests/performance-tests/atala-performance-tests-k6/src/actors/Actor.ts b/tests/performance-tests/agent-performance-tests-k6/src/actors/Actor.ts similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/src/actors/Actor.ts rename to tests/performance-tests/agent-performance-tests-k6/src/actors/Actor.ts diff --git a/tests/performance-tests/atala-performance-tests-k6/src/actors/Holder.ts b/tests/performance-tests/agent-performance-tests-k6/src/actors/Holder.ts similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/src/actors/Holder.ts rename to tests/performance-tests/agent-performance-tests-k6/src/actors/Holder.ts diff --git a/tests/performance-tests/atala-performance-tests-k6/src/actors/Issuer.ts b/tests/performance-tests/agent-performance-tests-k6/src/actors/Issuer.ts similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/src/actors/Issuer.ts rename to tests/performance-tests/agent-performance-tests-k6/src/actors/Issuer.ts diff --git a/tests/performance-tests/atala-performance-tests-k6/src/actors/Verifier.ts b/tests/performance-tests/agent-performance-tests-k6/src/actors/Verifier.ts similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/src/actors/Verifier.ts rename to tests/performance-tests/agent-performance-tests-k6/src/actors/Verifier.ts diff --git a/tests/performance-tests/atala-performance-tests-k6/src/actors/index.ts b/tests/performance-tests/agent-performance-tests-k6/src/actors/index.ts similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/src/actors/index.ts rename to tests/performance-tests/agent-performance-tests-k6/src/actors/index.ts diff --git a/tests/performance-tests/atala-performance-tests-k6/src/common/Config.ts b/tests/performance-tests/agent-performance-tests-k6/src/common/Config.ts similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/src/common/Config.ts rename to tests/performance-tests/agent-performance-tests-k6/src/common/Config.ts diff --git a/tests/performance-tests/atala-performance-tests-k6/src/common/ConnectionService.ts b/tests/performance-tests/agent-performance-tests-k6/src/common/ConnectionService.ts similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/src/common/ConnectionService.ts rename to tests/performance-tests/agent-performance-tests-k6/src/common/ConnectionService.ts diff --git a/tests/performance-tests/atala-performance-tests-k6/src/common/CredentialsService.ts b/tests/performance-tests/agent-performance-tests-k6/src/common/CredentialsService.ts similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/src/common/CredentialsService.ts rename to tests/performance-tests/agent-performance-tests-k6/src/common/CredentialsService.ts diff --git a/tests/performance-tests/atala-performance-tests-k6/src/common/DidService.ts b/tests/performance-tests/agent-performance-tests-k6/src/common/DidService.ts similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/src/common/DidService.ts rename to tests/performance-tests/agent-performance-tests-k6/src/common/DidService.ts diff --git a/tests/performance-tests/atala-performance-tests-k6/src/common/HttpService.ts b/tests/performance-tests/agent-performance-tests-k6/src/common/HttpService.ts similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/src/common/HttpService.ts rename to tests/performance-tests/agent-performance-tests-k6/src/common/HttpService.ts diff --git a/tests/performance-tests/atala-performance-tests-k6/src/common/ProofsService.ts b/tests/performance-tests/agent-performance-tests-k6/src/common/ProofsService.ts similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/src/common/ProofsService.ts rename to tests/performance-tests/agent-performance-tests-k6/src/common/ProofsService.ts diff --git a/tests/performance-tests/atala-performance-tests-k6/src/k6chaijs.js b/tests/performance-tests/agent-performance-tests-k6/src/k6chaijs.js similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/src/k6chaijs.js rename to tests/performance-tests/agent-performance-tests-k6/src/k6chaijs.js diff --git a/tests/performance-tests/atala-performance-tests-k6/src/scenarios/default.ts b/tests/performance-tests/agent-performance-tests-k6/src/scenarios/default.ts similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/src/scenarios/default.ts rename to tests/performance-tests/agent-performance-tests-k6/src/scenarios/default.ts diff --git a/tests/performance-tests/atala-performance-tests-k6/src/tests/common.ts b/tests/performance-tests/agent-performance-tests-k6/src/tests/common.ts similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/src/tests/common.ts rename to tests/performance-tests/agent-performance-tests-k6/src/tests/common.ts diff --git a/tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-definition-test.ts b/tests/performance-tests/agent-performance-tests-k6/src/tests/credentials/credential-definition-test.ts similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-definition-test.ts rename to tests/performance-tests/agent-performance-tests-k6/src/tests/credentials/credential-definition-test.ts diff --git a/tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-offer-test.ts b/tests/performance-tests/agent-performance-tests-k6/src/tests/credentials/credential-offer-test.ts similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-offer-test.ts rename to tests/performance-tests/agent-performance-tests-k6/src/tests/credentials/credential-offer-test.ts diff --git a/tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-schema-test.ts b/tests/performance-tests/agent-performance-tests-k6/src/tests/credentials/credential-schema-test.ts similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/src/tests/credentials/credential-schema-test.ts rename to tests/performance-tests/agent-performance-tests-k6/src/tests/credentials/credential-schema-test.ts diff --git a/tests/performance-tests/atala-performance-tests-k6/src/tests/dids/create-prism-did-test.ts b/tests/performance-tests/agent-performance-tests-k6/src/tests/dids/create-prism-did-test.ts similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/src/tests/dids/create-prism-did-test.ts rename to tests/performance-tests/agent-performance-tests-k6/src/tests/dids/create-prism-did-test.ts diff --git a/tests/performance-tests/atala-performance-tests-k6/src/tests/dids/did-publishing-test.ts b/tests/performance-tests/agent-performance-tests-k6/src/tests/dids/did-publishing-test.ts similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/src/tests/dids/did-publishing-test.ts rename to tests/performance-tests/agent-performance-tests-k6/src/tests/dids/did-publishing-test.ts diff --git a/tests/performance-tests/atala-performance-tests-k6/src/tests/flows/connection-flow-test.ts b/tests/performance-tests/agent-performance-tests-k6/src/tests/flows/connection-flow-test.ts similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/src/tests/flows/connection-flow-test.ts rename to tests/performance-tests/agent-performance-tests-k6/src/tests/flows/connection-flow-test.ts diff --git a/tests/performance-tests/atala-performance-tests-k6/src/tests/flows/issuance-flow-test.ts b/tests/performance-tests/agent-performance-tests-k6/src/tests/flows/issuance-flow-test.ts similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/src/tests/flows/issuance-flow-test.ts rename to tests/performance-tests/agent-performance-tests-k6/src/tests/flows/issuance-flow-test.ts diff --git a/tests/performance-tests/atala-performance-tests-k6/src/tests/flows/present-proof-flow-test.ts b/tests/performance-tests/agent-performance-tests-k6/src/tests/flows/present-proof-flow-test.ts similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/src/tests/flows/present-proof-flow-test.ts rename to tests/performance-tests/agent-performance-tests-k6/src/tests/flows/present-proof-flow-test.ts diff --git a/tests/performance-tests/atala-performance-tests-k6/tsconfig.json b/tests/performance-tests/agent-performance-tests-k6/tsconfig.json similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/tsconfig.json rename to tests/performance-tests/agent-performance-tests-k6/tsconfig.json diff --git a/tests/performance-tests/atala-performance-tests-k6/webpack.config.js b/tests/performance-tests/agent-performance-tests-k6/webpack.config.js similarity index 96% rename from tests/performance-tests/atala-performance-tests-k6/webpack.config.js rename to tests/performance-tests/agent-performance-tests-k6/webpack.config.js index 94fe2bcdff..cc145ae88c 100644 --- a/tests/performance-tests/atala-performance-tests-k6/webpack.config.js +++ b/tests/performance-tests/agent-performance-tests-k6/webpack.config.js @@ -24,7 +24,7 @@ module.exports = { ], }, target: 'web', - externals: /^(k6|https?\:\/\/)(\/.*)?/, + externals: /^(k6|https?:\/\/)(\/.*)?/, // Generate map files for compiled scripts devtool: "source-map", stats: { diff --git a/tests/performance-tests/atala-performance-tests-k6/yarn.lock b/tests/performance-tests/agent-performance-tests-k6/yarn.lock similarity index 100% rename from tests/performance-tests/atala-performance-tests-k6/yarn.lock rename to tests/performance-tests/agent-performance-tests-k6/yarn.lock diff --git a/tests/performance-tests/prism-performance-tests/.gitignore b/tests/performance-tests/agent-performance-tests/.gitignore similarity index 100% rename from tests/performance-tests/prism-performance-tests/.gitignore rename to tests/performance-tests/agent-performance-tests/.gitignore diff --git a/tests/performance-tests/prism-performance-tests/README.md b/tests/performance-tests/agent-performance-tests/README.md similarity index 100% rename from tests/performance-tests/prism-performance-tests/README.md rename to tests/performance-tests/agent-performance-tests/README.md diff --git a/tests/performance-tests/prism-performance-tests/src/gatling/kotlin/common/Configuration.kt b/tests/performance-tests/agent-performance-tests/bin/gatling/common/Configuration.kt similarity index 100% rename from tests/performance-tests/prism-performance-tests/src/gatling/kotlin/common/Configuration.kt rename to tests/performance-tests/agent-performance-tests/bin/gatling/common/Configuration.kt diff --git a/tests/performance-tests/prism-performance-tests/src/gatling/kotlin/common/Utils.kt b/tests/performance-tests/agent-performance-tests/bin/gatling/common/Utils.kt similarity index 100% rename from tests/performance-tests/prism-performance-tests/src/gatling/kotlin/common/Utils.kt rename to tests/performance-tests/agent-performance-tests/bin/gatling/common/Utils.kt diff --git a/tests/performance-tests/prism-performance-tests/src/gatling/resources/gatling.conf b/tests/performance-tests/agent-performance-tests/bin/gatling/gatling.conf similarity index 100% rename from tests/performance-tests/prism-performance-tests/src/gatling/resources/gatling.conf rename to tests/performance-tests/agent-performance-tests/bin/gatling/gatling.conf diff --git a/tests/performance-tests/prism-performance-tests/src/gatling/kotlin/simulations/ConnectionSimulation.kt b/tests/performance-tests/agent-performance-tests/bin/gatling/simulations/ConnectionSimulation.kt similarity index 100% rename from tests/performance-tests/prism-performance-tests/src/gatling/kotlin/simulations/ConnectionSimulation.kt rename to tests/performance-tests/agent-performance-tests/bin/gatling/simulations/ConnectionSimulation.kt diff --git a/tests/performance-tests/prism-performance-tests/src/gatling/kotlin/simulations/IssuanceSimulation.kt b/tests/performance-tests/agent-performance-tests/bin/gatling/simulations/IssuanceSimulation.kt similarity index 100% rename from tests/performance-tests/prism-performance-tests/src/gatling/kotlin/simulations/IssuanceSimulation.kt rename to tests/performance-tests/agent-performance-tests/bin/gatling/simulations/IssuanceSimulation.kt diff --git a/tests/performance-tests/prism-performance-tests/src/gatling/kotlin/steps/ConnectionSteps.kt b/tests/performance-tests/agent-performance-tests/bin/gatling/steps/ConnectionSteps.kt similarity index 100% rename from tests/performance-tests/prism-performance-tests/src/gatling/kotlin/steps/ConnectionSteps.kt rename to tests/performance-tests/agent-performance-tests/bin/gatling/steps/ConnectionSteps.kt diff --git a/tests/performance-tests/prism-performance-tests/src/gatling/kotlin/steps/IssuanceSteps.kt b/tests/performance-tests/agent-performance-tests/bin/gatling/steps/IssuanceSteps.kt similarity index 100% rename from tests/performance-tests/prism-performance-tests/src/gatling/kotlin/steps/IssuanceSteps.kt rename to tests/performance-tests/agent-performance-tests/bin/gatling/steps/IssuanceSteps.kt diff --git a/tests/performance-tests/prism-performance-tests/build.gradle.kts b/tests/performance-tests/agent-performance-tests/build.gradle.kts similarity index 100% rename from tests/performance-tests/prism-performance-tests/build.gradle.kts rename to tests/performance-tests/agent-performance-tests/build.gradle.kts diff --git a/tests/performance-tests/prism-performance-tests/gradle.properties b/tests/performance-tests/agent-performance-tests/gradle.properties similarity index 100% rename from tests/performance-tests/prism-performance-tests/gradle.properties rename to tests/performance-tests/agent-performance-tests/gradle.properties diff --git a/tests/performance-tests/prism-performance-tests/gradle/wrapper/gradle-wrapper.jar b/tests/performance-tests/agent-performance-tests/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from tests/performance-tests/prism-performance-tests/gradle/wrapper/gradle-wrapper.jar rename to tests/performance-tests/agent-performance-tests/gradle/wrapper/gradle-wrapper.jar diff --git a/tests/performance-tests/prism-performance-tests/gradle/wrapper/gradle-wrapper.properties b/tests/performance-tests/agent-performance-tests/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from tests/performance-tests/prism-performance-tests/gradle/wrapper/gradle-wrapper.properties rename to tests/performance-tests/agent-performance-tests/gradle/wrapper/gradle-wrapper.properties diff --git a/tests/performance-tests/prism-performance-tests/gradlew b/tests/performance-tests/agent-performance-tests/gradlew similarity index 100% rename from tests/performance-tests/prism-performance-tests/gradlew rename to tests/performance-tests/agent-performance-tests/gradlew diff --git a/tests/performance-tests/prism-performance-tests/gradlew.bat b/tests/performance-tests/agent-performance-tests/gradlew.bat similarity index 100% rename from tests/performance-tests/prism-performance-tests/gradlew.bat rename to tests/performance-tests/agent-performance-tests/gradlew.bat diff --git a/tests/performance-tests/agent-performance-tests/settings.gradle.kts b/tests/performance-tests/agent-performance-tests/settings.gradle.kts new file mode 100644 index 0000000000..c0ded08875 --- /dev/null +++ b/tests/performance-tests/agent-performance-tests/settings.gradle.kts @@ -0,0 +1,3 @@ + +rootProject.name = "agent-performance-tests" + diff --git a/tests/performance-tests/agent-performance-tests/src/gatling/kotlin/common/Configuration.kt b/tests/performance-tests/agent-performance-tests/src/gatling/kotlin/common/Configuration.kt new file mode 100644 index 0000000000..c7e2a8b14d --- /dev/null +++ b/tests/performance-tests/agent-performance-tests/src/gatling/kotlin/common/Configuration.kt @@ -0,0 +1,45 @@ +package common + +import java.util.logging.Level + +/** + * Configuration for simulations running + */ +object Configuration { + // Issuer agent + val ISSUER_AGENT_URL = System.getenv("ISSUER_AGENT_URL") ?: "http://localhost:8080/prism-agent" + val ISSUER_AGENT_API_KEY: String = System.getenv("ISSUER_AGENT_API_KEY") ?: "" + + // Holder agent + val HOLDER_AGENT_URL = System.getenv("HOLDER_AGENT_URL") ?: "http://localhost:8090/prism-agent" + val HOLDER_AGENT_API_KEY: String = System.getenv("HOLDER_AGENT_API_KEY") ?: "" + + // Verbose debugging mode + val LOGGER_LEVEL: Level = if (System.getenv("VERBOSE_SIMULATION").toBoolean()) Level.INFO else Level.WARNING + + // Interval between executing requests while waiting for some condition to happen, seconds + const val WAITING_LOOP_PAUSE_INTERVAL: Long = 2L + + // Max iterations of `WAITING_LOOP_PAUSE_INTERVAL` to wait until exit the session + const val WAITING_LOOP_MAX_ITERATIONS: Int = 15 + + // Name of the counter in the waiting loop + const val WAITING_LOOP_COUNTER_NAME: String = "counter" + + // Random credential to be issued during benchmarks + // it depends on holderDid session variable (!) + val RANDOM_CREDENTIAL: String = + """{ + "schemaId": "schema:1234", + "subjectId": "#{holderDid}", + "validityPeriod": 3600, + "claims": { + "prop1": "value1", + "prop2": "value2", + "prop3": "value3" + }, + "automaticIssuance": false, + "awaitConfirmation": false + } + """.trimIndent() +} diff --git a/tests/performance-tests/agent-performance-tests/src/gatling/kotlin/common/Utils.kt b/tests/performance-tests/agent-performance-tests/src/gatling/kotlin/common/Utils.kt new file mode 100644 index 0000000000..27d92cf981 --- /dev/null +++ b/tests/performance-tests/agent-performance-tests/src/gatling/kotlin/common/Utils.kt @@ -0,0 +1,35 @@ +package common + +import java.util.logging.Logger + +object Utils { + + /** + * Lazy custom logger for any class + * + * Example of usage: + * `val logger by Utils.logger("Connection Steps")` + * + * @param name Logger name + * @return Logger instance + */ + fun R.logger(name: String = this.javaClass.name): Lazy { + return lazy { + val LOG = Logger.getLogger(name) + LOG.level = Configuration.LOGGER_LEVEL + LOG + } + } + + /** + * Extracts out-of-band (OOB) invitation from full Connection invitation URL + * + * Used in Connection protocol of PRISM Agent to get only required OOB part + * + * @param fullUrl + * @return OOB invitation ready to be used in POST request for Prism Agent + */ + fun extractOutOfBandInvitationFromUrl(fullUrl: String): String { + return fullUrl.split("=")[1] + } +} diff --git a/tests/performance-tests/agent-performance-tests/src/gatling/kotlin/simulations/ConnectionSimulation.kt b/tests/performance-tests/agent-performance-tests/src/gatling/kotlin/simulations/ConnectionSimulation.kt new file mode 100644 index 0000000000..0e461e663a --- /dev/null +++ b/tests/performance-tests/agent-performance-tests/src/gatling/kotlin/simulations/ConnectionSimulation.kt @@ -0,0 +1,26 @@ +package simulations + +import io.gatling.javaapi.core.* +import io.gatling.javaapi.core.CoreDsl.* +import steps.ConnectionSteps + +/** + * Simulation for Atala PRISM V2 Connection protocol + */ +class ConnectionSimulation : Simulation() { + + private val settingUpConnection = scenario("Setting up connection").exec( + ConnectionSteps.generateInvitation(), + ConnectionSteps.inviteeSendsConnectionRequest(), + ConnectionSteps.inviterReceivesTheConnectionRequestAndSendsTheConnectionResponseToInvitee(), + ConnectionSteps.inviteeAchievesConnectionResponse() + ) + + init { + setUp( + settingUpConnection + .injectOpen(rampUsers(1) + .during(1)) + ) + } +} diff --git a/tests/performance-tests/agent-performance-tests/src/gatling/kotlin/simulations/IssuanceSimulation.kt b/tests/performance-tests/agent-performance-tests/src/gatling/kotlin/simulations/IssuanceSimulation.kt new file mode 100644 index 0000000000..b821cdb5e0 --- /dev/null +++ b/tests/performance-tests/agent-performance-tests/src/gatling/kotlin/simulations/IssuanceSimulation.kt @@ -0,0 +1,34 @@ +package simulations + +import io.gatling.javaapi.core.* +import io.gatling.javaapi.core.CoreDsl.* +import steps.ConnectionSteps +import steps.IssuanceSteps + +/** + * Simulation for Atala PRISM V2 Credential Issuance protocol + */ +class IssuanceSimulation : Simulation() { + + private val issuingCredential = scenario("Issuing a credential").exec( + ConnectionSteps.generateInvitation(), + ConnectionSteps.inviteeSendsConnectionRequest(), + ConnectionSteps.inviterReceivesTheConnectionRequestAndSendsTheConnectionResponseToInvitee(), + ConnectionSteps.inviteeAchievesConnectionResponse(), + IssuanceSteps.issuerOffersACredential(), + IssuanceSteps.holderAwaitsCredentialOffer(), + IssuanceSteps.holderRequestsCredential(), + IssuanceSteps.issuerReceivesRequest(), + IssuanceSteps.issuerIssuesCredential(), + IssuanceSteps.issuerWaitsCredentialIssued(), + IssuanceSteps.holderAwaitsCredentialReceived() + ) + + init { + setUp( + issuingCredential + .injectOpen(rampUsers(1) + .during(1)) + ) + } +} diff --git a/tests/performance-tests/agent-performance-tests/src/gatling/kotlin/steps/ConnectionSteps.kt b/tests/performance-tests/agent-performance-tests/src/gatling/kotlin/steps/ConnectionSteps.kt new file mode 100644 index 0000000000..e983651578 --- /dev/null +++ b/tests/performance-tests/agent-performance-tests/src/gatling/kotlin/steps/ConnectionSteps.kt @@ -0,0 +1,181 @@ +package steps + +import common.Configuration +import common.Configuration.WAITING_LOOP_COUNTER_NAME +import common.Configuration.WAITING_LOOP_MAX_ITERATIONS +import common.Configuration.WAITING_LOOP_PAUSE_INTERVAL +import common.Utils +import common.Utils.extractOutOfBandInvitationFromUrl +import common.Utils.logger +import io.gatling.javaapi.core.ChainBuilder +import io.gatling.javaapi.core.CoreDsl.* +import io.gatling.javaapi.http.HttpDsl.* +import java.net.HttpURLConnection.HTTP_CREATED +import java.net.HttpURLConnection.HTTP_OK + +object ConnectionSteps { + + private val logger by Utils.logger("Connection Steps") + + /** + * Generates a Connection invitation + * + * Function saves the following session variables to global virtual session user state: + * "invitationUrl" - invitation URL to be used next by the holder + * "inviterConnectionId" - connection ID for the inviter + * + * @param url URL of a PRISM Agent + * @param apikey secret access api key + * @param label Connection invitation label + * @return Builder of a Gatling chain of Actions to be used in Gatling Simulation + */ + fun generateInvitation( + url: String = Configuration.ISSUER_AGENT_URL, + apikey: String = Configuration.ISSUER_AGENT_API_KEY, + label: String = "test" + ): ChainBuilder = + exec( + http("Inviter generates connection invitation") + .post("$url/connections") + .header("content-type", "application/json") + .header("apikey", apikey) + .body(StringBody("""{"label": "$label"}""")) + .check( + status().shouldBe(HTTP_CREATED), + jsonPath("$.invitation.invitationUrl").find().saveAs("invitationUrl"), + jsonPath("$.connectionId").find().saveAs("inviterConnectionId") + ) + ).exec { session -> + logger.info("Inviter connection ID: ${session.getString("inviterConnectionId")}") + session + }.exitHereIfFailed() + + + /** + * Invitee sends a connection request using invitor invitationUrl + * + * Uses `invitationUrl` achieved by executing `generateInvitation` function + * + * @param url URL of a PRISM Agent + * @param apikey secret access api key + * @return Builder of a Gatling chain of Actions to be used in Gatling Simulation + */ + fun inviteeSendsConnectionRequest( + url: String = Configuration.HOLDER_AGENT_URL, + apikey: String = Configuration.HOLDER_AGENT_API_KEY + ): ChainBuilder = + exec( + http("Invitee sends a connection request") + .post("$url/connection-invitations") + .header("content-type", "application/json") + .header("apikey", apikey) + .body( + StringBody { session -> + """{ "invitation": "${extractOutOfBandInvitationFromUrl(session.getString("invitationUrl")!!)}" }""" + } + ) + .check( + status().shouldBe(HTTP_OK), + jsonPath("$.connectionId").find().saveAs("inviteeConnectionId"), + jsonPath("$.myDid").find().saveAs("holderDid") + ) + ).exec { session -> + logger.info("Invitee connection ID: ${session.getString("inviteeConnectionId")}") + session + }.exitHereIfFailed() + + /** + * Inviter receives the connection request and sends the connection response to invitee + * + * @param url URL of a PRISM Agent + * @param apikey secret access api key + * @return Builder of a Gatling chain of Actions to be used in Gatling Simulation + */ + fun inviterReceivesTheConnectionRequestAndSendsTheConnectionResponseToInvitee( + url: String = Configuration.ISSUER_AGENT_URL, + apikey: String = Configuration.ISSUER_AGENT_API_KEY + ): ChainBuilder = + doWhile( + { session -> session.getString("inviterConnectionState") != "ConnectionResponseSent" }, + WAITING_LOOP_COUNTER_NAME) + .on( + exec( + http("Inviter receives connection request and sends response back") + .get("$url/connections/#{inviterConnectionId}") + .header("content-type", "application/json") + .header("apikey", apikey) + .check( + status().shouldBe(HTTP_OK), + jsonPath("$.state").find().saveAs("inviterConnectionState") + ) + ).exec { session -> + logger.info("Inviter connection state: ${session.getString("inviterConnectionState")}") + session + }.pause(WAITING_LOOP_PAUSE_INTERVAL).exitHereIf { session -> + session.getInt(WAITING_LOOP_COUNTER_NAME) == WAITING_LOOP_MAX_ITERATIONS + } + ) + + /** + * Invitee achieves connection response + * + * @param url URL of a PRISM Agent + * @param apikey secret access api key + * @return Builder of a Gatling chain of Actions to be used in Gatling Simulation + */ + fun inviteeAchievesConnectionResponse( + url: String = Configuration.HOLDER_AGENT_URL, + apikey: String = Configuration.HOLDER_AGENT_API_KEY + ): ChainBuilder = + doWhile( + { session -> session.getString("inviteeConnectionState") != "ConnectionResponseReceived" }, + WAITING_LOOP_COUNTER_NAME) + .on( + exec( + http("Invitee achieves connection response") + .get("$url/connections/#{inviteeConnectionId}" ) + .header("content-type", "application/json") + .header("apikey", apikey) + .check( + status().shouldBe(HTTP_OK), + jsonPath("$.state").find().saveAs("inviteeConnectionState"), + ) + ).exec { session -> + logger.info("Invitee connection state: ${session.getString("inviteeConnectionState")}") + session + }.pause(WAITING_LOOP_PAUSE_INTERVAL).exitHereIf { session -> + session.getInt(WAITING_LOOP_COUNTER_NAME) == WAITING_LOOP_MAX_ITERATIONS + } + ) + + /** + * Delete all connections from a PRISM Agent + * + * @param url URL of a PRISM Agent + * @param apikey secret access api key + * @return Builder of a Gatling chain of Actions to be used in Gatling Simulation + */ + fun deleteAllConnections( + url: String = Configuration.ISSUER_AGENT_URL, + apikey: String = Configuration.ISSUER_AGENT_API_KEY + ): ChainBuilder = + exec( + http("Get connections") + .get("$url/connections") + .header("apikey", apikey) + .header("content-type", "application/json") + .check( + status().shouldBe(HTTP_OK), + jsonPath("$..connectionId").findAll().saveAs("connections") + ) + ).foreach({ session -> session.getList("connections") }, "connection").on( + exec( + http("Delete connection") + .delete("${url}/connections/#{connection}") + .header("apikey", apikey) + ).exec { session -> + logger.info("Current connection: ${session.getString("connection")}") + session + } + ) +} diff --git a/tests/performance-tests/agent-performance-tests/src/gatling/kotlin/steps/IssuanceSteps.kt b/tests/performance-tests/agent-performance-tests/src/gatling/kotlin/steps/IssuanceSteps.kt new file mode 100644 index 0000000000..26dc8e5287 --- /dev/null +++ b/tests/performance-tests/agent-performance-tests/src/gatling/kotlin/steps/IssuanceSteps.kt @@ -0,0 +1,168 @@ +package steps + +import common.Configuration +import common.Configuration.RANDOM_CREDENTIAL +import common.Configuration.WAITING_LOOP_COUNTER_NAME +import common.Configuration.WAITING_LOOP_MAX_ITERATIONS +import common.Configuration.WAITING_LOOP_PAUSE_INTERVAL +import common.Utils +import common.Utils.logger +import io.gatling.javaapi.core.ChainBuilder +import io.gatling.javaapi.core.CoreDsl.* +import io.gatling.javaapi.http.HttpDsl.* +import java.net.HttpURLConnection.HTTP_CREATED +import java.net.HttpURLConnection.HTTP_OK + +object IssuanceSteps { + + private val logger by Utils.logger() + + fun issuerOffersACredential( + url: String = Configuration.ISSUER_AGENT_URL, + apikey: String = Configuration.ISSUER_AGENT_API_KEY + ): ChainBuilder = + exec( + http("Issuer offers a credential") + .post("$url/issue-credentials/credential-offers") + .header("content-type", "application/json") + .header("apikey", apikey) + .body(StringBody(RANDOM_CREDENTIAL)) + .check( + status().shouldBe(HTTP_CREATED), + jsonPath("$.recordId").find().saveAs("issuerRecordId") + ) + ).exec { session -> + logger.info("Issuer record ID: ${session.getString("issuerRecordId")}") + session + }.exitHereIfFailed() + + fun holderAwaitsCredentialOffer( + url: String = Configuration.HOLDER_AGENT_URL, + apikey: String = Configuration.HOLDER_AGENT_API_KEY + ): ChainBuilder = + doWhile( + { session -> session.getString("holderRecordId") == "" }, + WAITING_LOOP_COUNTER_NAME + ).on( + exec( + http("Holder gets credential records") + .get("$url/issue-credentials/records") + .header("content-type", "application/json") + .header("apikey", apikey) + .check( + status().shouldBe(HTTP_OK), + jsonPath("$.items[?(@.subjectId==\"#{holderDid}\")].recordId") + .withDefault("") + .saveAs("holderRecordId") + ) + ).exec { session -> + logger.info("Achieved credential ID: ${session.getString("holderRecordId")}") + session + }.pause(WAITING_LOOP_PAUSE_INTERVAL).exitHereIf { session -> + session.getInt(WAITING_LOOP_COUNTER_NAME) == WAITING_LOOP_MAX_ITERATIONS + } + ) + + fun holderRequestsCredential( + url: String = Configuration.HOLDER_AGENT_URL, + apikey: String = Configuration.HOLDER_AGENT_API_KEY + ): ChainBuilder = + exec( + http("Holder requests credential") + .post("$url/issue-credentials/records/#{holderRecordId}/accept-offer") + .header("content-type", "application/json") + .header("apikey", apikey) + .check( + status().shouldBe(HTTP_OK) + ) + ).exitHereIfFailed() + + fun issuerReceivesRequest( + url: String = Configuration.ISSUER_AGENT_URL, + apikey: String = Configuration.ISSUER_AGENT_API_KEY + ): ChainBuilder = + doWhile( + { session -> session.getString("issuerRecordIdState") != "RequestReceived"}, + WAITING_LOOP_COUNTER_NAME + ).on( + exec( + http("Issuer record state achieves RequestReceived") + .get("$url/issue-credentials/records/#{issuerRecordId}") + .header("content-type", "application/json") + .header("apikey", apikey) + .check( + status().shouldBe(HTTP_OK), + jsonPath("$.protocolState").find().saveAs("issuerRecordIdState"), + ) + ).exec { session -> + logger.info("Issuer recordId state: ${session.getString("issuerRecordIdState")}") + session + }.pause(WAITING_LOOP_PAUSE_INTERVAL).exitHereIf { session -> + session.getInt(WAITING_LOOP_COUNTER_NAME) == WAITING_LOOP_MAX_ITERATIONS + } + ) + + fun issuerIssuesCredential( + url: String = Configuration.ISSUER_AGENT_URL, + apikey: String = Configuration.ISSUER_AGENT_API_KEY + ): ChainBuilder = + exec( + http("Issuer issues credential") + .post("$url/issue-credentials/records/#{issuerRecordId}/issue-credential") + .header("content-type", "application/json") + .header("apikey", apikey) + .check( + status().shouldBe(HTTP_OK) + ) + ).exitHereIfFailed() + + fun issuerWaitsCredentialIssued( + url: String = Configuration.ISSUER_AGENT_URL, + apikey: String = Configuration.ISSUER_AGENT_API_KEY + ): ChainBuilder = + doWhile( + { session -> session.getString("issuerRecordIdState") != "CredentialSent" }, + WAITING_LOOP_COUNTER_NAME + ).on( + exec( + http("Issuer record state achieves CredentialSent") + .get("$url/issue-credentials/records/#{issuerRecordId}") + .header("content-type", "application/json") + .header("apikey", apikey) + .check( + status().shouldBe(HTTP_OK), + jsonPath("$.protocolState").find().saveAs("issuerRecordIdState"), + ) + ).exec { session -> + logger.info("Issuer recordId state: ${session.getString("issuerRecordIdState")}") + session + }.pause(WAITING_LOOP_PAUSE_INTERVAL).exitHereIf { session -> + session.getInt(WAITING_LOOP_COUNTER_NAME) == WAITING_LOOP_MAX_ITERATIONS + } + ) + + fun holderAwaitsCredentialReceived( + url: String = Configuration.HOLDER_AGENT_URL, + apikey: String = Configuration.HOLDER_AGENT_API_KEY + ): ChainBuilder = + doWhile( + { session -> session.getString("holderRecordIdState") != "CredentialReceived" }, + WAITING_LOOP_COUNTER_NAME + ).on( + exec( + http("Holder record state achieves CredentialReceived") + .get("$url/issue-credentials/records/#{holderRecordId}") + .header("content-type", "application/json") + .header("apikey", apikey) + .check( + status().shouldBe(HTTP_OK), + jsonPath("$.protocolState").find().saveAs("holderRecordIdState"), + ) + ).exec { session -> + logger.info("Holder recordId state: ${session.getString("holderRecordIdState")}") + session + }.pause(WAITING_LOOP_PAUSE_INTERVAL).exitHereIf { session -> + session.getInt(WAITING_LOOP_COUNTER_NAME) == WAITING_LOOP_MAX_ITERATIONS + } + ) +} diff --git a/tests/performance-tests/agent-performance-tests/src/gatling/resources/gatling.conf b/tests/performance-tests/agent-performance-tests/src/gatling/resources/gatling.conf new file mode 100644 index 0000000000..c6db76269c --- /dev/null +++ b/tests/performance-tests/agent-performance-tests/src/gatling/resources/gatling.conf @@ -0,0 +1,127 @@ +######################### +# Gatling Configuration # +######################### + +# This file contains all the settings configurable for Gatling with their default values + +gatling { + core { + #outputDirectoryBaseName = "" # The prefix for each simulation result folder (then suffixed by the report generation timestamp) + #runDescription = "" # The description for this simulation run, displayed in each report + #encoding = "utf-8" # Encoding to use throughout Gatling for file and string manipulation + #simulationClass = "" # The FQCN of the simulation to run (when used in conjunction with noReports, the simulation for which assertions will be validated) + #elFileBodiesCacheMaxCapacity = 200 # Cache size for request body EL templates, set to 0 to disable + #rawFileBodiesCacheMaxCapacity = 200 # Cache size for request body Raw templates, set to 0 to disable + #rawFileBodiesInMemoryMaxSize = 1000 # Below this limit, raw file bodies will be cached in memory + #pebbleFileBodiesCacheMaxCapacity = 200 # Cache size for request body Peeble templates, set to 0 to disable + #feederAdaptiveLoadModeThreshold = 100 # File size threshold (in MB). Below load eagerly in memory, above use batch mode with default buffer size + #shutdownTimeout = 10000 # Milliseconds to wait for the actor system to shutdown + extract { + regex { + #cacheMaxCapacity = 200 # Cache size for the compiled regexes, set to 0 to disable caching + } + xpath { + #cacheMaxCapacity = 200 # Cache size for the compiled XPath queries, set to 0 to disable caching + } + jsonPath { + #cacheMaxCapacity = 200 # Cache size for the compiled jsonPath queries, set to 0 to disable caching + } + css { + #cacheMaxCapacity = 200 # Cache size for the compiled CSS selectors queries, set to 0 to disable caching + } + } + directory { + #simulations = user-files/simulations # Directory where simulation classes are located (for bundle packaging only) + #resources = user-files/resources # Directory where resources, such as feeder files and request bodies are located (for bundle packaging only) + #reportsOnly = "" # If set, name of report folder to look for in order to generate its report + #binaries = "" # If set, name of the folder where compiles classes are located: Defaults to GATLING_HOME/target. + #results = results # Name of the folder where all reports folder are located + } + } + socket { + #connectTimeout = 10000 # Timeout in millis for establishing a TCP socket + #tcpNoDelay = true + #soKeepAlive = false # if TCP keepalive configured at OS level should be used + #soReuseAddress = false + } + netty { + #useNativeTransport = true # if Netty native transport should be used instead of Java NIO + #allocator = "pooled" # switch to unpooled for unpooled ByteBufAllocator + #maxThreadLocalCharBufferSize = 200000 # Netty's default is 16k + } + ssl { + #useOpenSsl = true # if OpenSSL should be used instead of JSSE (only the latter can be debugged with -Djava.net.debug=ssl) + #useOpenSslFinalizers = false # if OpenSSL contexts should be freed with Finalizer or if using RefCounted is fine + #handshakeTimeout = 10000 # TLS handshake timeout in millis + #useInsecureTrustManager = true # Use an insecure TrustManager that trusts all server certificates + #enabledProtocols = [] # Array of enabled protocols for HTTPS, if empty use Netty's defaults + #enabledCipherSuites = [] # Array of enabled cipher suites for HTTPS, if empty enable all available ciphers + #sessionCacheSize = 0 # SSLSession cache size, set to 0 to use JDK's default + #sessionTimeout = 0 # SSLSession timeout in seconds, set to 0 to use JDK's default (24h) + #enableSni = true # When set to true, enable Server Name indication (SNI) + keyStore { + #type = "" # Type of SSLContext's KeyManagers store + #file = "" # Location of SSLContext's KeyManagers store + #password = "" # Password for SSLContext's KeyManagers store + #algorithm = "" # Algorithm used SSLContext's KeyManagers store + } + trustStore { + #type = "" # Type of SSLContext's TrustManagers store + #file = "" # Location of SSLContext's TrustManagers store + #password = "" # Password for SSLContext's TrustManagers store + #algorithm = "" # Algorithm used by SSLContext's TrustManagers store + } + } + charting { + #noReports = false # When set to true, don't generate HTML reports + #maxPlotPerSeries = 1000 # Number of points per graph in Gatling reports + #useGroupDurationMetric = false # Switch group timings from cumulated response time to group duration. + indicators { + #lowerBound = 800 # Lower bound for the requests' response time to track in the reports and the console summary + #higherBound = 1200 # Higher bound for the requests' response time to track in the reports and the console summary + #percentile1 = 50 # Value for the 1st percentile to track in the reports, the console summary and Graphite + #percentile2 = 75 # Value for the 2nd percentile to track in the reports, the console summary and Graphite + #percentile3 = 95 # Value for the 3rd percentile to track in the reports, the console summary and Graphite + #percentile4 = 99 # Value for the 4th percentile to track in the reports, the console summary and Graphite + } + } + http { + #fetchedCssCacheMaxCapacity = 200 # Cache size for CSS parsed content, set to 0 to disable + #fetchedHtmlCacheMaxCapacity = 200 # Cache size for HTML parsed content, set to 0 to disable + #perUserCacheMaxCapacity = 200 # Per virtual user cache size, set to 0 to disable + #warmUpUrl = "https://gatling.io" # The URL to use to warm-up the HTTP stack (blank means disabled) + #enableGA = true # Very light Google Analytics (Gatling and Java version), please support + #pooledConnectionIdleTimeout = 60000 # Timeout in millis for a connection to stay idle in the pool + #requestTimeout = 60000 # Timeout in millis for performing an HTTP request + #enableHostnameVerification = false # When set to true, enable hostname verification: SSLEngine.setHttpsEndpointIdentificationAlgorithm("HTTPS") + dns { + #queryTimeout = 5000 # Timeout in millis of each DNS query in millis + #maxQueriesPerResolve = 6 # Maximum allowed number of DNS queries for a given name resolution + } + } + jms { + #replyTimeoutScanPeriod = 1000 # scan period for timedout reply messages + } + data { + #writers = [console, file] # The list of DataWriters to which Gatling write simulation data (currently supported : console, file, graphite) + console { + #light = false # When set to true, displays a light version without detailed request stats + #writePeriod = 5 # Write interval, in seconds + } + file { + #bufferSize = 8192 # FileDataWriter's internal data buffer size, in bytes + } + leak { + #noActivityTimeout = 30 # Period, in seconds, for which Gatling may have no activity before considering a leak may be happening + } + graphite { + #light = false # only send the all* stats + #host = "localhost" # The host where the Carbon server is located + #port = 2003 # The port to which the Carbon server listens to (2003 is default for plaintext, 2004 is default for pickle) + #protocol = "tcp" # The protocol used to send data to Carbon (currently supported : "tcp", "udp") + #rootPathPrefix = "gatling" # The common prefix of all metrics sent to Graphite + #bufferSize = 8192 # Internal data buffer size, in bytes + #writePeriod = 1 # Write period, in seconds + } + } +} diff --git a/tests/performance-tests/prism-performance-tests/settings.gradle.kts b/tests/performance-tests/prism-performance-tests/settings.gradle.kts deleted file mode 100644 index e38e4a584d..0000000000 --- a/tests/performance-tests/prism-performance-tests/settings.gradle.kts +++ /dev/null @@ -1,3 +0,0 @@ - -rootProject.name = "prism-performance-tests" -