From d934bcf11a7148a4b8cb96f7d5ec8c564956d0c9 Mon Sep 17 00:00:00 2001
From: Berend Sliedrecht <sliedrecht@berend.io>
Date: Mon, 20 Nov 2023 17:34:04 +0100
Subject: [PATCH] connection.getAll over NATS

Signed-off-by: Berend Sliedrecht <sliedrecht@berend.io>
---
 .gitignore                                    |   2 +-
 apps/ssi-abstraction/.prettierrc              |   2 +-
 apps/ssi-abstraction/EVENTS-DOCUMENTATION.md  |  19 +-
 apps/ssi-abstraction/GDPR.md                  |  13 +-
 apps/ssi-abstraction/README.md                |  59 +-
 apps/ssi-abstraction/SIGN-AND-VERIFY.md       |  20 +-
 .../deployment/helm/Chart.yaml                |   2 +-
 .../ssi-abstraction/deployment/helm/README.md | 127 +--
 .../deployment/helm/templates/service.yaml    |  29 +-
 .../deployment/helm/values.yaml               |  13 +-
 apps/ssi-abstraction/package.json             |   2 -
 .../src/agent/agent.controller.ts             |  13 +-
 .../ssi-abstraction/src/agent/agent.module.ts |  22 +-
 .../src/agent/agent.service.ts                |  13 +-
 .../agent/connection/connection.controller.ts |  13 +
 .../src/agent/connection/connection.module.ts |  11 +
 .../agent/connection/connection.service.ts    |  16 +
 .../src/agent/ledger/register.ts              |   2 +-
 apps/ssi-abstraction/src/app.module.ts        |  34 +-
 apps/ssi-abstraction/src/common/constants.ts  |   4 -
 apps/ssi-abstraction/src/config/config.ts     |   4 +-
 apps/ssi-abstraction/src/config/validation.ts |   4 +-
 .../src/globalUtils/appConfig.spec.ts         |   5 -
 .../src/globalUtils/appConfig.ts              |  43 -
 .../src/globalUtils/exception.handler.ts      |  48 +-
 .../src/health/health.controller.ts           |   2 -
 apps/ssi-abstraction/src/main.ts              |  33 +-
 apps/ssi-abstraction/swagger.json             | 873 ++++--------------
 apps/ssi-abstraction/test/setEnvVars.js       |   5 +-
 apps/ssi-abstraction/tsconfig.build.json      |   2 +-
 package.json                                  |   4 +-
 tsconfig.json                                 |   1 -
 32 files changed, 417 insertions(+), 1023 deletions(-)
 create mode 100644 apps/ssi-abstraction/src/agent/connection/connection.controller.ts
 create mode 100644 apps/ssi-abstraction/src/agent/connection/connection.module.ts
 create mode 100644 apps/ssi-abstraction/src/agent/connection/connection.service.ts
 delete mode 100644 apps/ssi-abstraction/src/globalUtils/appConfig.spec.ts
 delete mode 100644 apps/ssi-abstraction/src/globalUtils/appConfig.ts

diff --git a/.gitignore b/.gitignore
index 03eee29..35073f4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,7 +17,7 @@ node_modules
 # compiled output
 node_modules/
 apps/*/node_modules
-/dist
+dist
 /apps/**/dist/
 *.tsbuildinfo
 
diff --git a/apps/ssi-abstraction/.prettierrc b/apps/ssi-abstraction/.prettierrc
index dcb7279..a20502b 100644
--- a/apps/ssi-abstraction/.prettierrc
+++ b/apps/ssi-abstraction/.prettierrc
@@ -1,4 +1,4 @@
 {
   "singleQuote": true,
   "trailingComma": "all"
-}
\ No newline at end of file
+}
diff --git a/apps/ssi-abstraction/EVENTS-DOCUMENTATION.md b/apps/ssi-abstraction/EVENTS-DOCUMENTATION.md
index 2f8ac63..b858705 100644
--- a/apps/ssi-abstraction/EVENTS-DOCUMENTATION.md
+++ b/apps/ssi-abstraction/EVENTS-DOCUMENTATION.md
@@ -1,40 +1,39 @@
-
 <hr/>
 
 # Event types published on nats
 
-* ```
-  { 
+- ```
+  {
     endpoint: 'SSI_ABSTRACTION_SERVICE/BasicMessageStateChanged',
   }
   ```
-* ```
+- ```
   {
     endpoint: 'SSI_ABSTRACTION_SERVICE/ConnectionStateChanged',
   }
   ```
-* ```
+- ```
   {
     endpoint: 'SSI_ABSTRACTION_SERVICE/CredentialStateChanged',
   }
   ```
-* ```
+- ```
   {
     endpoint: 'SSI_ABSTRACTION_SERVICE/ProofStateChanged',
   }
   ```
-* ```
+- ```
   {
     endpoint: 'SSI_ABSTRACTION_SERVICE/MediationStateChanged',
   }
   ```
-* ```
+- ```
   {
     endpoint: 'SSI_ABSTRACTION_SERVICE/RecipientKeylistUpdated',
   }
   ```
-* ```
+- ```
   {
     endpoint: 'SSI_ABSTRACTION_SERVICE/OutboundWebSocketClosedEvent',
   }
-  ```
\ No newline at end of file
+  ```
diff --git a/apps/ssi-abstraction/GDPR.md b/apps/ssi-abstraction/GDPR.md
index bc74bc1..b8b842a 100644
--- a/apps/ssi-abstraction/GDPR.md
+++ b/apps/ssi-abstraction/GDPR.md
@@ -1,12 +1,16 @@
 # GDPR Compliance Document
+
 The objective of this document is to detail, the data being stored and proccessed by the Organization Credential Manager's, SSI Abstraction Services.
 
 ## What information is stored
+
 ### Source User Information
-- Verifiable Credential Specific Information - The various VC's issued by the particular OCM. 
+
+- Verifiable Credential Specific Information - The various VC's issued by the particular OCM.
 - Proof Presentation Specific Information - Credential Claims.
 
 ### Technical User Information (Public)
+
 - Connection Information - The list of connections with different PCM and OCM agents and Pairwise DID.
 - Schema information (public)
 - Credential/credential definition ids and states
@@ -15,14 +19,19 @@ The objective of this document is to detail, the data being stored and proccesse
 - Created/updated dates
 
 ## How is the information stored
+
 ### Source User Information
+
 User specific Source User Information is encrypted using the Private Key of the Organizations SSI Agent and stored until the issuance of credential in Organization's SSI Agent's PostgreSQL database.
 
 ### Technical User Information (Public)
+
 Technical User Information is encrypted using the Private Key of the Organizations SSI Agent and stored internally (on the agent) on PostgreSQL.
 
 ## Who can access the information
+
 The Source User Information and Technical User Information both are accessible only by the Organization specific SSI agent's private key.
 
-## How long will the information stay 
+## How long will the information stay
+
 The Source User Information and Technical User Information is never wiped out unless the Agent Database is cleared.
diff --git a/apps/ssi-abstraction/README.md b/apps/ssi-abstraction/README.md
index 06a476a..192eaff 100644
--- a/apps/ssi-abstraction/README.md
+++ b/apps/ssi-abstraction/README.md
@@ -1,13 +1,15 @@
 # SSI Abstraction Service
+
 ## Description
 
 <hr/>  
   <p align="center">A core service for the Organizational Credential Manager, providing the DIDComm functionality and initializing the agent, wallet and ledger interactions of the whole application.</p>
 
 ## Usage
+
 <hr/>
 
-### Endpoint documentation at: 
+### Endpoint documentation at:
 
 [Aries REST Extension](swagger.json)
 
@@ -15,55 +17,59 @@
 
 [Sign and Verify Interface](SIGN-AND-VERIFY.md)
 
-with the default exposed ports: 
-* 3010 - Aries REST extension
-* 3009 - Sign and Veify interface exposed
-* 4000 - didcomm interface
+with the default exposed ports:
 
+- 3010 - Aries REST extension
+- 3009 - Sign and Veify interface exposed
+- 4000 - didcomm interface
 
 ## Installation
+
 <hr/>
 
 Dependencies:
+
 ```bash
-$ pnpm install 
+$ pnpm install
 ```
 
-* **If docker is not installed, [Install docker](https://docs.docker.com/engine/install/)**.
-  
+- **If docker is not installed, [Install docker](https://docs.docker.com/engine/install/)**.
 
-* **If docker-compose is not installed, [Install docker-compose](https://docs.docker.com/compose/install/)**.
+- **If docker-compose is not installed, [Install docker-compose](https://docs.docker.com/compose/install/)**.
 
-* (optional) Postgres GUI 
-https://dbeaver.io/download/
+- (optional) Postgres GUI
+  https://dbeaver.io/download/
 
 <hr/>
 
-
 ## Running the app
+
 <hr/>
 
 ### Environment variables
+
 [.env.example](.env.example)
-* PORT is the port for the signing and verification interface
-* AFJ_EXT_PORT is the port for the openapi documentation described in [swagger.json](swagger.json)
-* AGENT_AUTO_ACCEPT_CONNECTION can be either true or false
-* AGENT_AUTO_ACCEPT_CREDENTIAL can be either: always, contentApproved, never
-* AGENT_PUBLIC_DID_SEED will generate the did and verkey (32 symbols)
-* for security reasons AGENT_WALLET_KEY and AGENT_WALLET_ID should be different
-* AGENT_LEDGER_ID can be: ID_UNION,BCOVRIN_TEST,GREEN_LIGHT
+
+- PORT is the port for the signing and verification interface
+- AFJ_EXT_PORT is the port for the openapi documentation described in [swagger.json](swagger.json)
+- AGENT_AUTO_ACCEPT_CONNECTION can be either true or false
+- AGENT_AUTO_ACCEPT_CREDENTIAL can be either: always, contentApproved, never
+- AGENT_PUBLIC_DID_SEED will generate the did and verkey (32 symbols)
+- for security reasons AGENT_WALLET_KEY and AGENT_WALLET_ID should be different
+- AGENT_LEDGER_ID can be: ID_UNION,BCOVRIN_TEST,GREEN_LIGHT
+
   - the three pool transaction genesis are inside the code configuration
   - every ledger can be provided on its own
   - multiple ledgers can also be specified, separated by a comma
 
-* AGENT_ID_UNION_KEY is needed if the ledger of choice is IDUnion
-
+- AGENT_ID_UNION_KEY is needed if the ledger of choice is IDUnion
 
 **Each service in the Organizational Credential Manager can be run from the infrastructure repository with Docker.**
 
 **The .env files are in the infrastructure repository under /env**
 
 ### There are two separate Dockefiles in "./deployment" of every project:
+
 ```bash
     ## production in:
       ./deployment/ci
@@ -71,16 +77,16 @@ https://dbeaver.io/download/
       ./deployment/dev
 ```
 
+- (optional) Edit docker-compose.yml in "infrastructure" to use either **/ci/** or **/dev/** Dockerfiles.
 
-* (optional) Edit docker-compose.yml in "infrastructure" to use either **/ci/** or **/dev/** Dockerfiles.
+- Run while in **"infrastructure"** project:
 
-* Run while in **"infrastructure"** project:
 ```bash
 $ docker-compose up --build
 ```
 
-
 ## Test
+
 <hr/>
 
 ```bash
@@ -94,19 +100,20 @@ $ pnpm test:e2e
 $ pnpm test:cov
 ```
 
-
-
 ## GDPR
+
 <hr/>
 
 [GDPR](GDPR.md)
 
 ## Dependencies
+
 <hr/>
 
 [Dependencies](package.json)
 
 ## License
+
 <hr/>
 
 [Apache 2.0 license](LICENSE)
diff --git a/apps/ssi-abstraction/SIGN-AND-VERIFY.md b/apps/ssi-abstraction/SIGN-AND-VERIFY.md
index 2999e0c..b17386b 100644
--- a/apps/ssi-abstraction/SIGN-AND-VERIFY.md
+++ b/apps/ssi-abstraction/SIGN-AND-VERIFY.md
@@ -1,8 +1,9 @@
-
 ## Signing and verification interface is accessible on SSI Abstraction
 
 ### METHOD: POST
+
 **type: "buffer" is necessary to know internally what transformation needs to be done**
+
 ```
 :3009/v1/agent/wallet/sign
 
@@ -18,7 +19,9 @@ body : {
 
 
 ```
+
 ### Returns
+
 ```
 {
   statusCode: Number,
@@ -31,18 +34,18 @@ body : {
 and
 <hr/>
 
-
 ### METHOD: POST
+
 ```
 :3009/v1/agent/wallet/verify
 
 body : {
   data: [
-    signerVerkey: string, 
+    signerVerkey: string,
     {
       type: "buffer",
       dataBase64: base64 string   //// This is the data to be verified
-    }, 
+    },
     {
       type: "buffer",
       dataBase64: base64 string  //// This is the signature
@@ -50,7 +53,9 @@ body : {
   ]
 }
 ```
+
 ### Returns
+
 ```
 {
   statusCode: Number,
@@ -59,10 +64,6 @@ body : {
 }
 ```
 
-
-
-
-
 ## Get Agent Info endpoint (did, verkey) on SSI Abstraction
 
 ### METHOD: GET
@@ -72,6 +73,7 @@ body : {
 ```
 
 ### Returns
+
 ```
 {
     "statusCode": 200,
@@ -81,4 +83,4 @@ body : {
         "verkey": string // verkey needed for signing and verification
     }
 }
-```
\ No newline at end of file
+```
diff --git a/apps/ssi-abstraction/deployment/helm/Chart.yaml b/apps/ssi-abstraction/deployment/helm/Chart.yaml
index 7dae6f9..a448b1e 100644
--- a/apps/ssi-abstraction/deployment/helm/Chart.yaml
+++ b/apps/ssi-abstraction/deployment/helm/Chart.yaml
@@ -3,4 +3,4 @@ appVersion: v1.0.3-rc
 description: ssi-abstraction deployment
 name: ssi-abstraction
 version: 1.0.3
-icon: "https://www.vereign.com/wp-content/themes/vereign2020/images/vereign-logo.svg"
+icon: 'https://www.vereign.com/wp-content/themes/vereign2020/images/vereign-logo.svg'
diff --git a/apps/ssi-abstraction/deployment/helm/README.md b/apps/ssi-abstraction/deployment/helm/README.md
index cecfc27..7ed99e6 100644
--- a/apps/ssi-abstraction/deployment/helm/README.md
+++ b/apps/ssi-abstraction/deployment/helm/README.md
@@ -6,68 +6,69 @@ ssi-abstraction deployment
 
 ## Values
 
-| Key | Type | Default | Description |
-|-----|------|---------|-------------|
-| autoscaling.enabled | bool | `false` | Enable autoscaling |
-| autoscaling.maxReplicas | int | `3` | Maximum replicas |
-| autoscaling.minReplicas | int | `1` | Minimum replicas |
-| autoscaling.targetCPUUtilizationPercentage | int | `70` | CPU target for autoscaling trigger |
-| autoscaling.targetMemoryUtilizationPercentage | int | `70` | Memory target for autoscaling trigger |
-| image.name | string | `"gaiax/ssi-abstraction"` | Image name |
-| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
-| image.pullSecrets | string | `"deployment-key-light"` | Image pull secret when internal image is used |
-| image.repository | string | `"eu.gcr.io/vrgn-infra-prj"` |  |
-| image.sha | string | `""` | Image sha, usually generated by the CI Uses image.tag if empty |
-| image.tag | string | `""` | Image tag Uses .Chart.AppVersion if empty |
-| ingress.annotations."cert-manager.io/cluster-issuer" | string | `"letsencrypt-production-http"` |  |
-| ingress.annotations."kubernetes.io/ingress.class" | string | `"nginx"` |  |
-| ingress.annotations."kubernetes.io/ingress.global-static-ip-name" | string | `"dev-light-public"` |  |
-| ingress.annotations."nginx.ingress.kubernetes.io/rewrite-target" | string | `"/$2"` |  |
-| ingress.enabled | bool | `true` |  |
-| ingress.frontendDomain | string | `"gaiax.vereign.com"` |  |
-| ingress.frontendTlsSecretName | string | `"cert-manager-tls"` |  |
-| ingress.pathOverride | string | `"didcomm"` |  |
-| ingress.tlsEnabled | bool | `true` |  |
-| log.encoding | string | `"json"` |  |
-| log.level | string | `"INFO"` |  |
-| metrics.enabled | bool | `true` | Enable prometheus metrics |
-| metrics.port | int | `2112` | Port for prometheus metrics |
-| name | string | `"ssi-abstraction"` | Application name |
-| nameOverride | string | `""` | Ovverwrites application name |
-| podAnnotations | object | `{}` |  |
-| replicaCount | int | `1` | Default number of instances to start  |
-| resources.limits.cpu | string | `"150m"` |  |
-| resources.limits.memory | string | `"512Mi"` |  |
-| resources.requests.cpu | string | `"25m"` |  |
-| resources.requests.memory | string | `"64Mi"` |  |
-| security.runAsGid | int | `0` | Group used by the apps |
-| security.runAsNonRoot | bool | `false` | by default, apps run as non-root |
-| security.runAsUid | int | `0` | User used by the apps |
-| service.port | int | `3009` |  |
-| ssiAbstraction.afjExtPort | int | `3010` |  |
-| ssiAbstraction.agent.autoAccept.connection | bool | `true` |  |
-| ssiAbstraction.agent.autoAccept.credential | bool | `true` |  |
-| ssiAbstraction.agent.host | string | `"gaiax.vereign.com"` |  |
-| ssiAbstraction.agent.ledgerId | string | `"ID_UNION"` |  |
-| ssiAbstraction.agent.name | string | `"ssi-abstraction-agent"` |  |
-| ssiAbstraction.agent.peerPort | int | `443` |  |
-| ssiAbstraction.agent.protocol | string | `"http"` |  |
-| ssiAbstraction.agent.publicDidSeed | string | `"6b8b882e2618fa5d45ee7229ca880083"` |  |
-| ssiAbstraction.agent.urlPath | string | `"/ocm/didcomm"` |  |
-| ssiAbstraction.agent.wallet.id | string | `"ssi-wallet-id"` |  |
-| ssiAbstraction.agent.wallet.key | string | `"ssi-wallet-key"` |  |
-| ssiAbstraction.database.db | string | `"postgres"` |  |
-| ssiAbstraction.database.host | string | `"postgresql.infra"` |  |
-| ssiAbstraction.database.password | string | `"password"` |  |
-| ssiAbstraction.database.port | int | `5432` |  |
-| ssiAbstraction.database.schema | string | `"proof"` |  |
-| ssiAbstraction.database.user | string | `"root"` |  |
-| ssiAbstraction.elastic.port | int | `9200` |  |
-| ssiAbstraction.elastic.protocol | string | `"http"` |  |
-| ssiAbstraction.elastic.url | string | `"elasticsearch"` |  |
-| ssiAbstraction.nats.port | int | `4222` |  |
-| ssiAbstraction.nats.protocol | string | `"nats"` |  |
-| ssiAbstraction.nats.url | string | `"nats"` |  |
+| Key                                                               | Type   | Default                              | Description                                                    |
+| ----------------------------------------------------------------- | ------ | ------------------------------------ | -------------------------------------------------------------- |
+| autoscaling.enabled                                               | bool   | `false`                              | Enable autoscaling                                             |
+| autoscaling.maxReplicas                                           | int    | `3`                                  | Maximum replicas                                               |
+| autoscaling.minReplicas                                           | int    | `1`                                  | Minimum replicas                                               |
+| autoscaling.targetCPUUtilizationPercentage                        | int    | `70`                                 | CPU target for autoscaling trigger                             |
+| autoscaling.targetMemoryUtilizationPercentage                     | int    | `70`                                 | Memory target for autoscaling trigger                          |
+| image.name                                                        | string | `"gaiax/ssi-abstraction"`            | Image name                                                     |
+| image.pullPolicy                                                  | string | `"IfNotPresent"`                     | Image pull policy                                              |
+| image.pullSecrets                                                 | string | `"deployment-key-light"`             | Image pull secret when internal image is used                  |
+| image.repository                                                  | string | `"eu.gcr.io/vrgn-infra-prj"`         |                                                                |
+| image.sha                                                         | string | `""`                                 | Image sha, usually generated by the CI Uses image.tag if empty |
+| image.tag                                                         | string | `""`                                 | Image tag Uses .Chart.AppVersion if empty                      |
+| ingress.annotations."cert-manager.io/cluster-issuer"              | string | `"letsencrypt-production-http"`      |                                                                |
+| ingress.annotations."kubernetes.io/ingress.class"                 | string | `"nginx"`                            |                                                                |
+| ingress.annotations."kubernetes.io/ingress.global-static-ip-name" | string | `"dev-light-public"`                 |                                                                |
+| ingress.annotations."nginx.ingress.kubernetes.io/rewrite-target"  | string | `"/$2"`                              |                                                                |
+| ingress.enabled                                                   | bool   | `true`                               |                                                                |
+| ingress.frontendDomain                                            | string | `"gaiax.vereign.com"`                |                                                                |
+| ingress.frontendTlsSecretName                                     | string | `"cert-manager-tls"`                 |                                                                |
+| ingress.pathOverride                                              | string | `"didcomm"`                          |                                                                |
+| ingress.tlsEnabled                                                | bool   | `true`                               |                                                                |
+| log.encoding                                                      | string | `"json"`                             |                                                                |
+| log.level                                                         | string | `"INFO"`                             |                                                                |
+| metrics.enabled                                                   | bool   | `true`                               | Enable prometheus metrics                                      |
+| metrics.port                                                      | int    | `2112`                               | Port for prometheus metrics                                    |
+| name                                                              | string | `"ssi-abstraction"`                  | Application name                                               |
+| nameOverride                                                      | string | `""`                                 | Ovverwrites application name                                   |
+| podAnnotations                                                    | object | `{}`                                 |                                                                |
+| replicaCount                                                      | int    | `1`                                  | Default number of instances to start                           |
+| resources.limits.cpu                                              | string | `"150m"`                             |                                                                |
+| resources.limits.memory                                           | string | `"512Mi"`                            |                                                                |
+| resources.requests.cpu                                            | string | `"25m"`                              |                                                                |
+| resources.requests.memory                                         | string | `"64Mi"`                             |                                                                |
+| security.runAsGid                                                 | int    | `0`                                  | Group used by the apps                                         |
+| security.runAsNonRoot                                             | bool   | `false`                              | by default, apps run as non-root                               |
+| security.runAsUid                                                 | int    | `0`                                  | User used by the apps                                          |
+| service.port                                                      | int    | `3009`                               |                                                                |
+| ssiAbstraction.afjExtPort                                         | int    | `3010`                               |                                                                |
+| ssiAbstraction.agent.autoAccept.connection                        | bool   | `true`                               |                                                                |
+| ssiAbstraction.agent.autoAccept.credential                        | bool   | `true`                               |                                                                |
+| ssiAbstraction.agent.host                                         | string | `"gaiax.vereign.com"`                |                                                                |
+| ssiAbstraction.agent.ledgerId                                     | string | `"ID_UNION"`                         |                                                                |
+| ssiAbstraction.agent.name                                         | string | `"ssi-abstraction-agent"`            |                                                                |
+| ssiAbstraction.agent.peerPort                                     | int    | `443`                                |                                                                |
+| ssiAbstraction.agent.protocol                                     | string | `"http"`                             |                                                                |
+| ssiAbstraction.agent.publicDidSeed                                | string | `"6b8b882e2618fa5d45ee7229ca880083"` |                                                                |
+| ssiAbstraction.agent.urlPath                                      | string | `"/ocm/didcomm"`                     |                                                                |
+| ssiAbstraction.agent.wallet.id                                    | string | `"ssi-wallet-id"`                    |                                                                |
+| ssiAbstraction.agent.wallet.key                                   | string | `"ssi-wallet-key"`                   |                                                                |
+| ssiAbstraction.database.db                                        | string | `"postgres"`                         |                                                                |
+| ssiAbstraction.database.host                                      | string | `"postgresql.infra"`                 |                                                                |
+| ssiAbstraction.database.password                                  | string | `"password"`                         |                                                                |
+| ssiAbstraction.database.port                                      | int    | `5432`                               |                                                                |
+| ssiAbstraction.database.schema                                    | string | `"proof"`                            |                                                                |
+| ssiAbstraction.database.user                                      | string | `"root"`                             |                                                                |
+| ssiAbstraction.elastic.port                                       | int    | `9200`                               |                                                                |
+| ssiAbstraction.elastic.protocol                                   | string | `"http"`                             |                                                                |
+| ssiAbstraction.elastic.url                                        | string | `"elasticsearch"`                    |                                                                |
+| ssiAbstraction.nats.port                                          | int    | `4222`                               |                                                                |
+| ssiAbstraction.nats.protocol                                      | string | `"nats"`                             |                                                                |
+| ssiAbstraction.nats.url                                           | string | `"nats"`                             |                                                                |
+
+---
 
-----------------------------------------------
 Autogenerated from chart metadata using [helm-docs v1.10.0](https://github.com/norwoodj/helm-docs/releases/v1.10.0)
diff --git a/apps/ssi-abstraction/deployment/helm/templates/service.yaml b/apps/ssi-abstraction/deployment/helm/templates/service.yaml
index 5c1da5d..38b7829 100644
--- a/apps/ssi-abstraction/deployment/helm/templates/service.yaml
+++ b/apps/ssi-abstraction/deployment/helm/templates/service.yaml
@@ -1,22 +1,19 @@
 apiVersion: v1
 kind: Service
 metadata:
-  name: {{ template "app.name" . }}
-  namespace: {{ .Release.Namespace }}
-  labels:
-    {{- include "app.labels" . | nindent 4 }}
+  name: { { template "app.name" . } }
+  namespace: { { .Release.Namespace } }
+  labels: { { - include "app.labels" . | nindent 4 } }
 spec:
   clusterIP: None
   ports:
-  - name: http
-    port: {{ .Values.service.port }}
-    targetPort: {{ .Values.service.port }}
-  - name: afj
-    port: {{ .Values.ssiAbstraction.afjExtPort }}
-    targetPort: {{ .Values.ssiAbstraction.afjExtPort }}
-  - name: peer
-    port: {{ .Values.ssiAbstraction.agent.peerPort }}
-    targetPort: {{ .Values.ssiAbstraction.agent.peerPort }}
-  selector:
-    {{- include "app.selectorLabels" . | nindent 4 }}
-
+    - name: http
+      port: { { .Values.service.port } }
+      targetPort: { { .Values.service.port } }
+    - name: afj
+      port: { { .Values.ssiAbstraction.afjExtPort } }
+      targetPort: { { .Values.ssiAbstraction.afjExtPort } }
+    - name: peer
+      port: { { .Values.ssiAbstraction.agent.peerPort } }
+      targetPort: { { .Values.ssiAbstraction.agent.peerPort } }
+  selector: { { - include "app.selectorLabels" . | nindent 4 } }
diff --git a/apps/ssi-abstraction/deployment/helm/values.yaml b/apps/ssi-abstraction/deployment/helm/values.yaml
index 110a0b4..c9facef 100644
--- a/apps/ssi-abstraction/deployment/helm/values.yaml
+++ b/apps/ssi-abstraction/deployment/helm/values.yaml
@@ -1,9 +1,9 @@
-# -- Default number of instances to start 
+# -- Default number of instances to start
 replicaCount: 1
 # -- Application name
 name: ssi-abstraction
 # -- Ovverwrites application name
-nameOverride: ""
+nameOverride: ''
 
 image:
   repository: eu.gcr.io/vrgn-infra-prj
@@ -11,16 +11,15 @@ image:
   name: gaiax/ssi-abstraction
   # -- Image tag
   # Uses .Chart.AppVersion if empty
-  tag: ""
+  tag: ''
   # -- Image sha, usually generated by the CI
   # Uses image.tag if empty
-  sha: ""
+  sha: ''
   # -- Image pull policy
   pullPolicy: IfNotPresent
   # -- Image pull secret when internal image is used
   pullSecrets: deployment-key-light
 
-
 podAnnotations: {}
 ##
 ## Pass extra environment variables to the container.
@@ -67,7 +66,7 @@ metrics:
   port: 2112
 
 log:
-  level: "INFO"
+  level: 'INFO'
   encoding: json
 
 ##
@@ -127,4 +126,4 @@ ingress:
   tlsEnabled: true
   frontendDomain: gaiax.vereign.com
   frontendTlsSecretName: cert-manager-tls
-  pathOverride: didcomm
\ No newline at end of file
+  pathOverride: didcomm
diff --git a/apps/ssi-abstraction/package.json b/apps/ssi-abstraction/package.json
index f73fbc7..cc6c48d 100644
--- a/apps/ssi-abstraction/package.json
+++ b/apps/ssi-abstraction/package.json
@@ -19,8 +19,6 @@
     "start:docker": "pnpm prisma:generate && pnpm dbSchema && pnpm start",
     "lint": "eslint .",
     "lint:fix": "pnpm lint --fix",
-    "format": "prettier --write",
-    "format:all": "npm run format -- .",
     "test": "jest",
     "test:watch": "jest --watch",
     "test:cov": "jest --coverage",
diff --git a/apps/ssi-abstraction/src/agent/agent.controller.ts b/apps/ssi-abstraction/src/agent/agent.controller.ts
index af3ff3b..4b676a5 100644
--- a/apps/ssi-abstraction/src/agent/agent.controller.ts
+++ b/apps/ssi-abstraction/src/agent/agent.controller.ts
@@ -1,18 +1,15 @@
-import { Controller, Get, HttpStatus } from '@nestjs/common';
+import { Controller } from '@nestjs/common';
+import { MessagePattern } from '@nestjs/microservices';
 import { AgentService } from './agent.service.js';
 
 @Controller('agent')
 export class AgentController {
   public constructor(private agent: AgentService) {}
 
-  @Get('info')
-  async getWalletInfo() {
+  @MessagePattern('info.publicDid')
+  async publicDid() {
     return {
-      statusCode: HttpStatus.OK,
-      message: 'Success',
-      data: 'SHOULD_BE_PUBLIC_DID',
+      id: 'test',
     };
   }
 }
-
-export default AgentController;
diff --git a/apps/ssi-abstraction/src/agent/agent.module.ts b/apps/ssi-abstraction/src/agent/agent.module.ts
index ebdf5c2..4666f06 100644
--- a/apps/ssi-abstraction/src/agent/agent.module.ts
+++ b/apps/ssi-abstraction/src/agent/agent.module.ts
@@ -1,28 +1,12 @@
 import { Module } from '@nestjs/common';
 import { ConfigModule } from '@nestjs/config';
-import { ClientsModule, Transport } from '@nestjs/microservices';
-import config from '../config/config.js';
-import { NatsClientService } from '../client/nats.client.js';
-import { NATSServices } from '../common/constants.js';
 import { AgentController } from './agent.controller.js';
 import { AgentService } from './agent.service.js';
 
 @Module({
-  imports: [
-    ConfigModule,
-    ClientsModule.register([
-      {
-        name: NATSServices.SERVICE_NAME,
-        transport: Transport.NATS,
-        options: {
-          servers: [config().nats.url],
-        },
-      },
-    ]),
-  ],
-  providers: [NatsClientService, AgentService],
+  imports: [ConfigModule],
+  providers: [AgentService],
   controllers: [AgentController],
+  exports: [AgentService],
 })
 export class AgentModule {}
-
-export default AgentModule;
diff --git a/apps/ssi-abstraction/src/agent/agent.service.ts b/apps/ssi-abstraction/src/agent/agent.service.ts
index 33755ea..5698114 100644
--- a/apps/ssi-abstraction/src/agent/agent.service.ts
+++ b/apps/ssi-abstraction/src/agent/agent.service.ts
@@ -40,20 +40,16 @@ import { registerPublicDids } from './ledger/register.js';
 import { NatsClientService } from '../client/nats.client.js';
 import logger from '../globalUtils/logger.js';
 
+export type AppAgent = Agent<AgentService['modules']>;
+
 @Injectable()
 export class AgentService {
-  private agent: Agent<this['modules']>;
+  public agent: AppAgent;
 
   private configService: ConfigService;
 
-  private natsClient: NatsClientService;
-
-  public constructor(
-    configService: ConfigService,
-    natsClient: NatsClientService,
-  ) {
+  public constructor(configService: ConfigService) {
     this.configService = configService;
-    this.natsClient = natsClient;
 
     const peerPort = this.configService.get('agent.peerPort');
 
@@ -185,7 +181,6 @@ export class AgentService {
   public async onModuleInit() {
     await this.agent.initialize();
     await this.registerPublicDid();
-    subscribe(this.agent, this.natsClient);
     logger.info('Agent initialized');
   }
 
diff --git a/apps/ssi-abstraction/src/agent/connection/connection.controller.ts b/apps/ssi-abstraction/src/agent/connection/connection.controller.ts
new file mode 100644
index 0000000..ac8c667
--- /dev/null
+++ b/apps/ssi-abstraction/src/agent/connection/connection.controller.ts
@@ -0,0 +1,13 @@
+import { Controller } from '@nestjs/common';
+import { MessagePattern } from '@nestjs/microservices';
+import { ConnectionService } from './connection.service.js';
+
+@Controller('connection')
+export class ConnectionController {
+  public constructor(private connectionService: ConnectionService) {}
+
+  @MessagePattern('connection.getAll')
+  async getAll() {
+    return await this.connectionService.getAll();
+  }
+}
diff --git a/apps/ssi-abstraction/src/agent/connection/connection.module.ts b/apps/ssi-abstraction/src/agent/connection/connection.module.ts
new file mode 100644
index 0000000..e713b17
--- /dev/null
+++ b/apps/ssi-abstraction/src/agent/connection/connection.module.ts
@@ -0,0 +1,11 @@
+import { Module } from '@nestjs/common';
+import { AgentModule } from '../agent.module.js';
+import { ConnectionController } from './connection.controller.js';
+import { ConnectionService } from './connection.service.js';
+
+@Module({
+  imports: [AgentModule],
+  providers: [ConnectionService],
+  controllers: [ConnectionController],
+})
+export class ConnectionModule {}
diff --git a/apps/ssi-abstraction/src/agent/connection/connection.service.ts b/apps/ssi-abstraction/src/agent/connection/connection.service.ts
new file mode 100644
index 0000000..a902b49
--- /dev/null
+++ b/apps/ssi-abstraction/src/agent/connection/connection.service.ts
@@ -0,0 +1,16 @@
+import { ConnectionRecord } from '@aries-framework/core';
+import { Injectable } from '@nestjs/common';
+import AgentService, { AppAgent } from '../agent.service.js';
+
+@Injectable()
+export class ConnectionService {
+  public agent: AppAgent;
+
+  public constructor(agentService: AgentService) {
+    this.agent = agentService.agent;
+  }
+
+  public async getAll(): Promise<Array<ConnectionRecord>> {
+    return await this.agent.connections.getAll();
+  }
+}
diff --git a/apps/ssi-abstraction/src/agent/ledger/register.ts b/apps/ssi-abstraction/src/agent/ledger/register.ts
index 0197185..8f426b7 100644
--- a/apps/ssi-abstraction/src/agent/ledger/register.ts
+++ b/apps/ssi-abstraction/src/agent/ledger/register.ts
@@ -52,7 +52,7 @@ export const registerPublicDids = async ({
       }
     } catch (err) {
       // if did is already registered on IdUnion it will catch 500, but it's ok
-      logAxiosError(err);
+      if (err instanceof axios.AxiosError) logAxiosError(err);
     }
   }
   return responses;
diff --git a/apps/ssi-abstraction/src/app.module.ts b/apps/ssi-abstraction/src/app.module.ts
index 8c3928c..0017009 100644
--- a/apps/ssi-abstraction/src/app.module.ts
+++ b/apps/ssi-abstraction/src/app.module.ts
@@ -1,14 +1,13 @@
 import { APP_FILTER } from '@nestjs/core';
-import { Module, NestModule, MiddlewareConsumer } from '@nestjs/common';
+import { Module } from '@nestjs/common';
 import { ConfigModule } from '@nestjs/config';
 import { TerminusModule } from '@nestjs/terminus';
-
-import config from './config/config.js';
-import validationSchema from './config/validation.js';
-import HealthController from './health/health.controller.js';
-import ExceptionHandler from './globalUtils/exception.handler.js';
-import { AgentMid } from './middleware/agentMid.middleware.js';
+import { config } from './config/config.js';
+import { validationSchema } from './config/validation.js';
+import { HealthController } from './health/health.controller.js';
+import { ExceptionHandler } from './globalUtils/exception.handler.js';
 import { AgentModule } from './agent/agent.module.js';
+import { ConnectionModule } from './agent/connection/connection.module.js';
 
 @Module({
   imports: [
@@ -19,19 +18,14 @@ import { AgentModule } from './agent/agent.module.js';
       validationSchema,
     }),
     AgentModule,
+    ConnectionModule,
   ],
   controllers: [HealthController],
-  providers: [
-    {
-      provide: APP_FILTER,
-      useClass: ExceptionHandler,
-    },
-  ],
+  // providers: [
+  //   {
+  //     provide: APP_FILTER,
+  //     useClass: ExceptionHandler,
+  //   },
+  // ],
 })
-export class AppModule implements NestModule {
-  configure(consumer: MiddlewareConsumer) {
-    consumer.apply(AgentMid).forRoutes('agent', '*/agent');
-  }
-}
-
-export default AppModule;
+export class AppModule {}
diff --git a/apps/ssi-abstraction/src/common/constants.ts b/apps/ssi-abstraction/src/common/constants.ts
index 75991ce..ab0f748 100644
--- a/apps/ssi-abstraction/src/common/constants.ts
+++ b/apps/ssi-abstraction/src/common/constants.ts
@@ -1,7 +1,3 @@
 export enum NATSServices {
   SERVICE_NAME = 'SSI_ABSTRACTION_SERVICE',
 }
-
-export default {
-  NATSServices,
-};
diff --git a/apps/ssi-abstraction/src/config/config.ts b/apps/ssi-abstraction/src/config/config.ts
index c827fbe..92cc6dd 100644
--- a/apps/ssi-abstraction/src/config/config.ts
+++ b/apps/ssi-abstraction/src/config/config.ts
@@ -25,7 +25,7 @@ interface Config {
   };
 }
 
-const config = (): Config => ({
+export const config = (): Config => ({
   agentHost: process.env.AGENT_HOST || '',
   port: Number(process.env.PORT),
   jwtSecret: process.env.JWT_SECRET || '',
@@ -49,5 +49,3 @@ const config = (): Config => ({
     idUnionKey: process.env.AGENT_ID_UNION_KEY || '',
   },
 });
-
-export default config;
diff --git a/apps/ssi-abstraction/src/config/validation.ts b/apps/ssi-abstraction/src/config/validation.ts
index eb5adf8..ae47388 100644
--- a/apps/ssi-abstraction/src/config/validation.ts
+++ b/apps/ssi-abstraction/src/config/validation.ts
@@ -1,6 +1,6 @@
 import Joi from 'joi';
 
-const validationSchema = Joi.object({
+export const validationSchema = Joi.object({
   NATS_URL: Joi.string().required(),
   PORT: Joi.number().required(),
 
@@ -15,5 +15,3 @@ const validationSchema = Joi.object({
   AGENT_AUTO_ACCEPT_CREDENTIAL: Joi.string().required(),
   AGENT_ID_UNION_KEY: Joi.string(),
 });
-
-export default validationSchema;
diff --git a/apps/ssi-abstraction/src/globalUtils/appConfig.spec.ts b/apps/ssi-abstraction/src/globalUtils/appConfig.spec.ts
deleted file mode 100644
index 13097b3..0000000
--- a/apps/ssi-abstraction/src/globalUtils/appConfig.spec.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-describe('check getConfig', () => {
-  it('should return appConfig module', async () => {
-    jest.requireActual('./appConfig');
-  });
-});
diff --git a/apps/ssi-abstraction/src/globalUtils/appConfig.ts b/apps/ssi-abstraction/src/globalUtils/appConfig.ts
deleted file mode 100644
index f3fba54..0000000
--- a/apps/ssi-abstraction/src/globalUtils/appConfig.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-import { VersioningType, INestApplication } from '@nestjs/common';
-import { ConfigService } from '@nestjs/config';
-import { Transport, MicroserviceOptions } from '@nestjs/microservices';
-import logger from './logger.js';
-
-/**
- * Microservice and versioning configuration of the service
- *
- * @param app - Nest.js internal configuration object
- * @param configService - Nest.js internal configuration object
- */
-export default async function appConf(
-  app: INestApplication,
-  configService: ConfigService,
-): Promise<void> {
-  try {
-    app.connectMicroservice<MicroserviceOptions>({
-      transport: Transport.NATS,
-      options: {
-        servers: [configService.get('nats')?.url],
-      },
-    });
-  } catch (err) {
-    await new Promise((resolve) => {
-      setTimeout(() => {
-        resolve('Trying again to connect to nats.');
-      }, 2000);
-    });
-    logger.error(err);
-    logger.info('Retrying connection to NATS.');
-    app.connectMicroservice<MicroserviceOptions>({
-      transport: Transport.NATS,
-      options: {
-        servers: [configService.get('nats')?.url],
-      },
-    });
-  }
-
-  app.enableVersioning({
-    defaultVersion: ['1'],
-    type: VersioningType.URI,
-  });
-}
diff --git a/apps/ssi-abstraction/src/globalUtils/exception.handler.ts b/apps/ssi-abstraction/src/globalUtils/exception.handler.ts
index 08fa2a6..1df4824 100644
--- a/apps/ssi-abstraction/src/globalUtils/exception.handler.ts
+++ b/apps/ssi-abstraction/src/globalUtils/exception.handler.ts
@@ -1,46 +1,10 @@
-import {
-  ExceptionFilter,
-  Catch,
-  ArgumentsHost,
-  HttpException,
-  HttpStatus,
-} from '@nestjs/common';
-import { HttpAdapterHost } from '@nestjs/core';
-import { ResponseType } from '../common/response.js';
+import { Catch, RpcExceptionFilter, ArgumentsHost } from '@nestjs/common';
+import { Observable, throwError } from 'rxjs';
+import { RpcException } from '@nestjs/microservices';
 
 @Catch()
-export class ExceptionHandler implements ExceptionFilter {
-  constructor(private readonly httpAdapterHost: HttpAdapterHost) {}
-
-  /**
-   * Custom exception handler
-   *
-   * @param exception - error
-   * @param host - the execution context for exceptions
-   */
-  catch(exception: HttpException, host: ArgumentsHost): void {
-    // In certain situations `httpAdapter` might not be available in the
-    // constructor method, thus we should resolve it here.
-    const { httpAdapter } = this.httpAdapterHost;
-
-    const ctx = host.switchToHttp();
-    const response = ctx.getResponse();
-
-    let statusCode = HttpStatus.INTERNAL_SERVER_ERROR;
-    const message = exception.message || 'Something went wrong!';
-
-    if (exception instanceof HttpException) {
-      statusCode = exception.getStatus();
-    }
-
-    const responseBody: ResponseType = {
-      statusCode,
-      message,
-      error: exception.message,
-    };
-
-    httpAdapter.reply(response, responseBody, statusCode);
+export class ExceptionHandler implements RpcExceptionFilter<RpcException> {
+  catch(exception: RpcException, host: ArgumentsHost): Observable<any> {
+    return throwError(() => exception.getError());
   }
 }
-
-export default ExceptionHandler;
diff --git a/apps/ssi-abstraction/src/health/health.controller.ts b/apps/ssi-abstraction/src/health/health.controller.ts
index 94fb4e9..6a24038 100644
--- a/apps/ssi-abstraction/src/health/health.controller.ts
+++ b/apps/ssi-abstraction/src/health/health.controller.ts
@@ -15,5 +15,3 @@ export class HealthController {
     };
   }
 }
-
-export default HealthController;
diff --git a/apps/ssi-abstraction/src/main.ts b/apps/ssi-abstraction/src/main.ts
index 98f8096..65a822c 100644
--- a/apps/ssi-abstraction/src/main.ts
+++ b/apps/ssi-abstraction/src/main.ts
@@ -1,25 +1,20 @@
 import { NestFactory } from '@nestjs/core';
-import { ConfigService } from '@nestjs/config';
-
-import AppModule from './app.module.js';
-import logger from './globalUtils/logger.js';
-import swaggerSetup from './globalUtils/swagger.js';
-import appConf from './globalUtils/appConfig.js';
+import { MicroserviceOptions, Transport } from '@nestjs/microservices';
+import { AppModule } from './app.module.js';
+import { config } from './config/config.js';
 
 async function bootstrap() {
-  const app = await NestFactory.create(AppModule);
-  const configService = app.get(ConfigService);
-
-  await appConf(app, configService);
-
-  swaggerSetup(app);
+  const app = await NestFactory.createMicroservice<MicroserviceOptions>(
+    AppModule,
+    {
+      transport: Transport.NATS,
+      options: {
+        servers: [config().nats.url],
+      },
+    },
+  );
 
-  await app.startAllMicroservices();
-
-  const servicePort = configService.get<number>('port') || 3000;
-
-  await app.listen(servicePort, () => {
-    logger.info(`Listening on Port: ${servicePort}`);
-  });
+  await app.listen();
 }
+
 bootstrap();
diff --git a/apps/ssi-abstraction/swagger.json b/apps/ssi-abstraction/swagger.json
index 929bc8c..7400aa3 100644
--- a/apps/ssi-abstraction/swagger.json
+++ b/apps/ssi-abstraction/swagger.json
@@ -52,9 +52,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "data"
-        ]
+        "required": ["data"]
       },
       "Service": {
         "properties": {
@@ -69,11 +67,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "id",
-          "serviceEndpoint",
-          "type"
-        ]
+        "required": ["id", "serviceEndpoint", "type"]
       },
       "DidCommService": {
         "properties": {
@@ -107,12 +101,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "recipientKeys",
-          "id",
-          "serviceEndpoint",
-          "type"
-        ]
+        "required": ["recipientKeys", "id", "serviceEndpoint", "type"]
       },
       "ServiceDecorator": {
         "properties": {
@@ -133,10 +122,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "recipientKeys",
-          "serviceEndpoint"
-        ]
+        "required": ["recipientKeys", "serviceEndpoint"]
       },
       "BaseMessage": {
         "properties": {
@@ -150,10 +136,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "id",
-          "type"
-        ]
+        "required": ["id", "type"]
       },
       "ThreadDecorator": {
         "properties": {
@@ -243,11 +226,7 @@
       "TransportDecorator": {
         "properties": {
           "returnRoute": {
-            "enum": [
-              "none",
-              "all",
-              "thread"
-            ],
+            "enum": ["none", "all", "thread"],
             "type": "string"
           },
           "returnRouteThread": {
@@ -272,10 +251,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "id",
-          "type"
-        ]
+        "required": ["id", "type"]
       },
       "L10nDecoratorExtension": {
         "properties": {
@@ -295,10 +271,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "id",
-          "type"
-        ]
+        "required": ["id", "type"]
       },
       "TransportDecoratorExtension": {
         "properties": {
@@ -321,10 +294,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "id",
-          "type"
-        ]
+        "required": ["id", "type"]
       },
       "TimingDecoratorExtension": {
         "properties": {
@@ -350,10 +320,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "id",
-          "type"
-        ]
+        "required": ["id", "type"]
       },
       "AckDecoratorExtension": {
         "properties": {
@@ -382,10 +349,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "id",
-          "type"
-        ]
+        "required": ["id", "type"]
       },
       "AttachmentDecoratorExtension": {
         "properties": {
@@ -421,10 +385,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "id",
-          "type"
-        ]
+        "required": ["id", "type"]
       },
       "ServiceDecoratorExtension": {
         "properties": {
@@ -463,46 +424,27 @@
           }
         },
         "type": "object",
-        "required": [
-          "id",
-          "type"
-        ]
+        "required": ["id", "type"]
       },
       "ProblemReportMessage": {
         "properties": {
           "type": {
             "type": "string",
-            "enum": [
-              "https://didcomm.org/notification/1.0/problem-report"
-            ],
+            "enum": ["https://didcomm.org/notification/1.0/problem-report"],
             "pattern": "(.*?)([a-zA-Z0-9._-]+)\\/(\\d[^/]*)\\/([a-zA-Z0-9._-]+)$"
           },
           "problemItems": {},
           "whoRetries": {
-            "enum": [
-              "YOU",
-              "ME",
-              "BOTH",
-              "NONE"
-            ],
+            "enum": ["YOU", "ME", "BOTH", "NONE"],
             "type": "string"
           },
           "fixHint": {},
           "where": {
-            "enum": [
-              "CLOUD",
-              "EDGE",
-              "WIRE",
-              "AGENCY"
-            ],
+            "enum": ["CLOUD", "EDGE", "WIRE", "AGENCY"],
             "type": "string"
           },
           "impact": {
-            "enum": [
-              "MESSAGE",
-              "THREAD",
-              "CONNECTION"
-            ],
+            "enum": ["MESSAGE", "THREAD", "CONNECTION"],
             "type": "string"
           },
           "noticedTime": {
@@ -545,10 +487,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "id"
-        ]
+        "required": ["type", "id"]
       },
       "BatchMessageMessage": {
         "properties": {
@@ -561,18 +500,13 @@
           }
         },
         "type": "object",
-        "required": [
-          "id",
-          "message"
-        ]
+        "required": ["id", "message"]
       },
       "BatchMessage": {
         "properties": {
           "type": {
             "type": "string",
-            "enum": [
-              "https://didcomm.org/messagepickup/1.0/batch"
-            ],
+            "enum": ["https://didcomm.org/messagepickup/1.0/batch"],
             "pattern": "(.*?)([a-zA-Z0-9._-]+)\\/(\\d[^/]*)\\/([a-zA-Z0-9._-]+)$"
           },
           "messages": {
@@ -613,19 +547,13 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "messages",
-          "id"
-        ]
+        "required": ["type", "messages", "id"]
       },
       "BatchPickupMessage": {
         "properties": {
           "type": {
             "type": "string",
-            "enum": [
-              "https://didcomm.org/messagepickup/1.0/batch-pickup"
-            ],
+            "enum": ["https://didcomm.org/messagepickup/1.0/batch-pickup"],
             "pattern": "(.*?)([a-zA-Z0-9._-]+)\\/(\\d[^/]*)\\/([a-zA-Z0-9._-]+)$"
           },
           "batchSize": {
@@ -662,19 +590,13 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "batchSize",
-          "id"
-        ]
+        "required": ["type", "batchSize", "id"]
       },
       "ForwardMessage": {
         "properties": {
           "type": {
             "type": "string",
-            "enum": [
-              "https://didcomm.org/routing/1.0/forward"
-            ],
+            "enum": ["https://didcomm.org/routing/1.0/forward"],
             "pattern": "(.*?)([a-zA-Z0-9._-]+)\\/(\\d[^/]*)\\/([a-zA-Z0-9._-]+)$"
           },
           "to": {
@@ -714,12 +636,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "to",
-          "message",
-          "id"
-        ]
+        "required": ["type", "to", "message", "id"]
       },
       "KeylistUpdate": {
         "properties": {
@@ -727,18 +644,12 @@
             "type": "string"
           },
           "action": {
-            "enum": [
-              "add",
-              "remove"
-            ],
+            "enum": ["add", "remove"],
             "type": "string"
           }
         },
         "type": "object",
-        "required": [
-          "recipientKey",
-          "action"
-        ]
+        "required": ["recipientKey", "action"]
       },
       "KeylistUpdateMessage": {
         "properties": {
@@ -787,11 +698,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "updates",
-          "id"
-        ]
+        "required": ["type", "updates", "id"]
       },
       "KeylistUpdated": {
         "properties": {
@@ -799,28 +706,16 @@
             "type": "string"
           },
           "action": {
-            "enum": [
-              "add",
-              "remove"
-            ],
+            "enum": ["add", "remove"],
             "type": "string"
           },
           "result": {
-            "enum": [
-              "client_error",
-              "server_error",
-              "no_change",
-              "success"
-            ],
+            "enum": ["client_error", "server_error", "no_change", "success"],
             "type": "string"
           }
         },
         "type": "object",
-        "required": [
-          "recipientKey",
-          "action",
-          "result"
-        ]
+        "required": ["recipientKey", "action", "result"]
       },
       "KeylistUpdateResponseMessage": {
         "properties": {
@@ -869,11 +764,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "updated",
-          "id"
-        ]
+        "required": ["type", "updated", "id"]
       },
       "MediationGrantMessage": {
         "properties": {
@@ -924,12 +815,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "routingKeys",
-          "endpoint",
-          "id"
-        ]
+        "required": ["type", "routingKeys", "endpoint", "id"]
       },
       "MediationDenyMessage": {
         "properties": {
@@ -971,10 +857,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "id"
-        ]
+        "required": ["type", "id"]
       },
       "MediationRequestMessage": {
         "properties": {
@@ -1028,11 +911,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "sentTime",
-          "id"
-        ]
+        "required": ["type", "sentTime", "id"]
       },
       "PublicKey": {
         "properties": {
@@ -1047,19 +926,13 @@
           }
         },
         "type": "object",
-        "required": [
-          "id",
-          "controller",
-          "type"
-        ]
+        "required": ["id", "controller", "type"]
       },
       "Ed25119Sig2018": {
         "properties": {
           "type": {
             "type": "string",
-            "enum": [
-              "Ed25519VerificationKey2018"
-            ]
+            "enum": ["Ed25519VerificationKey2018"]
           },
           "value": {
             "type": "string"
@@ -1072,20 +945,13 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "value",
-          "id",
-          "controller"
-        ]
+        "required": ["type", "value", "id", "controller"]
       },
       "EddsaSaSigSecp256k1": {
         "properties": {
           "type": {
             "type": "string",
-            "enum": [
-              "Secp256k1VerificationKey2018"
-            ]
+            "enum": ["Secp256k1VerificationKey2018"]
           },
           "value": {
             "type": "string"
@@ -1098,20 +964,13 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "value",
-          "id",
-          "controller"
-        ]
+        "required": ["type", "value", "id", "controller"]
       },
       "RsaSig2018": {
         "properties": {
           "type": {
             "type": "string",
-            "enum": [
-              "RsaVerificationKey2018"
-            ]
+            "enum": ["RsaVerificationKey2018"]
           },
           "value": {
             "type": "string"
@@ -1124,12 +983,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "value",
-          "id",
-          "controller"
-        ]
+        "required": ["type", "value", "id", "controller"]
       },
       "EmbeddedAuthentication": {
         "properties": {
@@ -1140,9 +994,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "publicKey"
-        ]
+        "required": ["publicKey"]
       },
       "ReferencedAuthentication": {
         "properties": {
@@ -1151,9 +1003,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "type"
-        ]
+        "required": ["type"]
       },
       "IndyAgentService": {
         "properties": {
@@ -1181,20 +1031,13 @@
           }
         },
         "type": "object",
-        "required": [
-          "recipientKeys",
-          "id",
-          "serviceEndpoint",
-          "type"
-        ]
+        "required": ["recipientKeys", "id", "serviceEndpoint", "type"]
       },
       "DidDoc": {
         "properties": {
           "context": {
             "type": "string",
-            "enum": [
-              "https://w3id.org/did/v1"
-            ]
+            "enum": ["https://w3id.org/did/v1"]
           },
           "id": {
             "type": "string"
@@ -1216,13 +1059,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "context",
-          "id",
-          "publicKey",
-          "service",
-          "authentication"
-        ]
+        "required": ["context", "id", "publicKey", "service", "authentication"]
       },
       "Connection": {
         "properties": {
@@ -1234,17 +1071,13 @@
           }
         },
         "type": "object",
-        "required": [
-          "did"
-        ]
+        "required": ["did"]
       },
       "ConnectionInvitationMessage": {
         "properties": {
           "type": {
             "type": "string",
-            "enum": [
-              "https://didcomm.org/connections/1.0/invitation"
-            ],
+            "enum": ["https://didcomm.org/connections/1.0/invitation"],
             "pattern": "(.*?)([a-zA-Z0-9._-]+)\\/(\\d[^/]*)\\/([a-zA-Z0-9._-]+)$"
           },
           "label": {
@@ -1304,19 +1137,13 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "label",
-          "id"
-        ]
+        "required": ["type", "label", "id"]
       },
       "ConnectionRequestMessage": {
         "properties": {
           "type": {
             "type": "string",
-            "enum": [
-              "https://didcomm.org/connections/1.0/request"
-            ],
+            "enum": ["https://didcomm.org/connections/1.0/request"],
             "pattern": "(.*?)([a-zA-Z0-9._-]+)\\/(\\d[^/]*)\\/([a-zA-Z0-9._-]+)$"
           },
           "label": {
@@ -1360,12 +1187,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "label",
-          "connection",
-          "id"
-        ]
+        "required": ["type", "label", "connection", "id"]
       },
       "SignatureDecorator": {
         "properties": {
@@ -1384,20 +1206,13 @@
           }
         },
         "type": "object",
-        "required": [
-          "signatureType",
-          "signatureData",
-          "signer",
-          "signature"
-        ]
+        "required": ["signatureType", "signatureData", "signer", "signature"]
       },
       "ConnectionResponseMessage": {
         "properties": {
           "type": {
             "type": "string",
-            "enum": [
-              "https://didcomm.org/connections/1.0/response"
-            ],
+            "enum": ["https://didcomm.org/connections/1.0/response"],
             "pattern": "(.*?)([a-zA-Z0-9._-]+)\\/(\\d[^/]*)\\/([a-zA-Z0-9._-]+)$"
           },
           "connectionSig": {
@@ -1434,19 +1249,13 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "connectionSig",
-          "id"
-        ]
+        "required": ["type", "connectionSig", "id"]
       },
       "TrustPingMessage": {
         "properties": {
           "type": {
             "type": "string",
-            "enum": [
-              "https://didcomm.org/trust_ping/1.0/ping"
-            ],
+            "enum": ["https://didcomm.org/trust_ping/1.0/ping"],
             "pattern": "(.*?)([a-zA-Z0-9._-]+)\\/(\\d[^/]*)\\/([a-zA-Z0-9._-]+)$"
           },
           "comment": {
@@ -1486,19 +1295,13 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "responseRequested",
-          "id"
-        ]
+        "required": ["type", "responseRequested", "id"]
       },
       "TrustPingResponseMessage": {
         "properties": {
           "type": {
             "type": "string",
-            "enum": [
-              "https://didcomm.org/trust_ping/1.0/ping_response"
-            ],
+            "enum": ["https://didcomm.org/trust_ping/1.0/ping_response"],
             "pattern": "(.*?)([a-zA-Z0-9._-]+)\\/(\\d[^/]*)\\/([a-zA-Z0-9._-]+)$"
           },
           "comment": {
@@ -1535,18 +1338,13 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "id"
-        ]
+        "required": ["type", "id"]
       },
       "ConnectionProblemReportMessage": {
         "properties": {
           "type": {
             "type": "string",
-            "enum": [
-              "https://didcomm.org/connection/1.0/problem-report"
-            ],
+            "enum": ["https://didcomm.org/connection/1.0/problem-report"],
             "pattern": "(.*?)([a-zA-Z0-9._-]+)\\/(\\d[^/]*)\\/([a-zA-Z0-9._-]+)$"
           },
           "id": {
@@ -1580,30 +1378,16 @@
           },
           "problemItems": {},
           "whoRetries": {
-            "enum": [
-              "YOU",
-              "ME",
-              "BOTH",
-              "NONE"
-            ],
+            "enum": ["YOU", "ME", "BOTH", "NONE"],
             "type": "string"
           },
           "fixHint": {},
           "where": {
-            "enum": [
-              "CLOUD",
-              "EDGE",
-              "WIRE",
-              "AGENCY"
-            ],
+            "enum": ["CLOUD", "EDGE", "WIRE", "AGENCY"],
             "type": "string"
           },
           "impact": {
-            "enum": [
-              "MESSAGE",
-              "THREAD",
-              "CONNECTION"
-            ],
+            "enum": ["MESSAGE", "THREAD", "CONNECTION"],
             "type": "string"
           },
           "noticedTime": {
@@ -1617,26 +1401,17 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "id"
-        ]
+        "required": ["type", "id"]
       },
       "AckMessage": {
         "properties": {
           "type": {
             "type": "string",
-            "enum": [
-              "https://didcomm.org/notification/1.0/ack"
-            ],
+            "enum": ["https://didcomm.org/notification/1.0/ack"],
             "pattern": "(.*?)([a-zA-Z0-9._-]+)\\/(\\d[^/]*)\\/([a-zA-Z0-9._-]+)$"
           },
           "status": {
-            "enum": [
-              "OK",
-              "FAIL",
-              "PENDING"
-            ],
+            "enum": ["OK", "FAIL", "PENDING"],
             "type": "string"
           },
           "id": {
@@ -1670,19 +1445,13 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "status",
-          "id"
-        ]
+        "required": ["type", "status", "id"]
       },
       "BasicMessage": {
         "properties": {
           "type": {
             "type": "string",
-            "enum": [
-              "https://didcomm.org/basicmessage/1.0/message"
-            ],
+            "enum": ["https://didcomm.org/basicmessage/1.0/message"],
             "pattern": "(.*?)([a-zA-Z0-9._-]+)\\/(\\d[^/]*)\\/([a-zA-Z0-9._-]+)$"
           },
           "sentTime": {
@@ -1731,12 +1500,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "sentTime",
-          "content",
-          "id"
-        ]
+        "required": ["type", "sentTime", "content", "id"]
       },
       "CredentialPreviewAttribute": {
         "properties": {
@@ -1751,10 +1515,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "name",
-          "value"
-        ]
+        "required": ["name", "value"]
       },
       "CredentialPreview": {
         "properties": {
@@ -1772,18 +1533,13 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "attributes"
-        ]
+        "required": ["type", "attributes"]
       },
       "CredentialAckMessage": {
         "properties": {
           "type": {
             "type": "string",
-            "enum": [
-              "https://didcomm.org/issue-credential/1.0/ack"
-            ],
+            "enum": ["https://didcomm.org/issue-credential/1.0/ack"],
             "pattern": "(.*?)([a-zA-Z0-9._-]+)\\/(\\d[^/]*)\\/([a-zA-Z0-9._-]+)$"
           },
           "id": {
@@ -1816,20 +1572,12 @@
             "$ref": "#/components/schemas/ServiceDecorator"
           },
           "status": {
-            "enum": [
-              "OK",
-              "FAIL",
-              "PENDING"
-            ],
+            "enum": ["OK", "FAIL", "PENDING"],
             "type": "string"
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "id",
-          "status"
-        ]
+        "required": ["type", "id", "status"]
       },
       "RequestCredentialMessage": {
         "properties": {
@@ -1880,11 +1628,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "requestAttachments",
-          "id"
-        ]
+        "required": ["type", "requestAttachments", "id"]
       },
       "IssueCredentialMessage": {
         "properties": {
@@ -1935,11 +1679,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "credentialAttachments",
-          "id"
-        ]
+        "required": ["type", "credentialAttachments", "id"]
       },
       "OfferCredentialMessage": {
         "properties": {
@@ -1993,12 +1733,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "credentialPreview",
-          "offerAttachments",
-          "id"
-        ]
+        "required": ["type", "credentialPreview", "offerAttachments", "id"]
       },
       "ProposeCredentialMessage": {
         "properties": {
@@ -2064,18 +1799,13 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "id"
-        ]
+        "required": ["type", "id"]
       },
       "CredentialProblemReportMessage": {
         "properties": {
           "type": {
             "type": "string",
-            "enum": [
-              "https://didcomm.org/issue-credential/1.0/problem-report"
-            ],
+            "enum": ["https://didcomm.org/issue-credential/1.0/problem-report"],
             "pattern": "(.*?)([a-zA-Z0-9._-]+)\\/(\\d[^/]*)\\/([a-zA-Z0-9._-]+)$"
           },
           "id": {
@@ -2109,30 +1839,16 @@
           },
           "problemItems": {},
           "whoRetries": {
-            "enum": [
-              "YOU",
-              "ME",
-              "BOTH",
-              "NONE"
-            ],
+            "enum": ["YOU", "ME", "BOTH", "NONE"],
             "type": "string"
           },
           "fixHint": {},
           "where": {
-            "enum": [
-              "CLOUD",
-              "EDGE",
-              "WIRE",
-              "AGENCY"
-            ],
+            "enum": ["CLOUD", "EDGE", "WIRE", "AGENCY"],
             "type": "string"
           },
           "impact": {
-            "enum": [
-              "MESSAGE",
-              "THREAD",
-              "CONNECTION"
-            ],
+            "enum": ["MESSAGE", "THREAD", "CONNECTION"],
             "type": "string"
           },
           "noticedTime": {
@@ -2146,10 +1862,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "id"
-        ]
+        "required": ["type", "id"]
       },
       "DiscloseProtocol": {
         "properties": {
@@ -2164,17 +1877,13 @@
           }
         },
         "type": "object",
-        "required": [
-          "protocolId"
-        ]
+        "required": ["protocolId"]
       },
       "DiscloseMessage": {
         "properties": {
           "type": {
             "type": "string",
-            "enum": [
-              "https://didcomm.org/discover-features/1.0/disclose"
-            ],
+            "enum": ["https://didcomm.org/discover-features/1.0/disclose"],
             "pattern": "(.*?)([a-zA-Z0-9._-]+)\\/(\\d[^/]*)\\/([a-zA-Z0-9._-]+)$"
           },
           "protocols": {
@@ -2214,19 +1923,13 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "protocols",
-          "id"
-        ]
+        "required": ["type", "protocols", "id"]
       },
       "QueryMessage": {
         "properties": {
           "type": {
             "type": "string",
-            "enum": [
-              "https://didcomm.org/discover-features/1.0/query"
-            ],
+            "enum": ["https://didcomm.org/discover-features/1.0/query"],
             "pattern": "(.*?)([a-zA-Z0-9._-]+)\\/(\\d[^/]*)\\/([a-zA-Z0-9._-]+)$"
           },
           "query": {
@@ -2266,11 +1969,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "query",
-          "id"
-        ]
+        "required": ["type", "query", "id"]
       },
       "PresentationPreviewAttribute": {
         "properties": {
@@ -2298,12 +1997,7 @@
             "type": "string"
           },
           "predicate": {
-            "enum": [
-              "<",
-              "<=",
-              ">",
-              ">="
-            ],
+            "enum": ["<", "<=", ">", ">="],
             "type": "string"
           },
           "threshold": {
@@ -2311,12 +2005,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "name",
-          "credentialDefinitionId",
-          "predicate",
-          "threshold"
-        ]
+        "required": ["name", "credentialDefinitionId", "predicate", "threshold"]
       },
       "PresentationPreview": {
         "properties": {
@@ -2340,11 +2029,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "attributes",
-          "predicates"
-        ]
+        "required": ["type", "attributes", "predicates"]
       },
       "ProposePresentationMessage": {
         "properties": {
@@ -2392,11 +2077,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "presentationProposal",
-          "id"
-        ]
+        "required": ["type", "presentationProposal", "id"]
       },
       "AttributeValue": {
         "properties": {
@@ -2408,10 +2089,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "name",
-          "value"
-        ]
+        "required": ["name", "value"]
       },
       "AttributeFilter": {
         "properties": {
@@ -2455,10 +2133,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "schemaId",
-          "credentialDefinitionId"
-        ]
+        "required": ["schemaId", "credentialDefinitionId"]
       },
       "ProofAttribute": {
         "properties": {
@@ -2473,11 +2148,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "subProofIndex",
-          "raw",
-          "encoded"
-        ]
+        "required": ["subProofIndex", "raw", "encoded"]
       },
       "RequestedProof": {
         "properties": {
@@ -2495,10 +2166,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "revealedAttributes",
-          "selfAttestedAttributes"
-        ]
+        "required": ["revealedAttributes", "selfAttestedAttributes"]
       },
       "PartialProof": {
         "properties": {
@@ -2513,10 +2181,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "identifiers",
-          "requestedProof"
-        ]
+        "required": ["identifiers", "requestedProof"]
       },
       "IndyCredentialInfo": {
         "properties": {
@@ -2571,9 +2236,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "credentialInfo"
-        ]
+        "required": ["credentialInfo"]
       },
       "ProofAttributeInfo": {
         "properties": {
@@ -2605,12 +2268,7 @@
             "type": "string"
           },
           "predicateType": {
-            "enum": [
-              "<",
-              "<=",
-              ">",
-              ">="
-            ],
+            "enum": ["<", "<=", ">", ">="],
             "type": "string"
           },
           "predicateValue": {
@@ -2627,11 +2285,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "name",
-          "predicateType",
-          "predicateValue"
-        ]
+        "required": ["name", "predicateType", "predicateValue"]
       },
       "ProofRequest": {
         "properties": {
@@ -2663,10 +2317,7 @@
           },
           "ver": {
             "type": "string",
-            "enum": [
-              "1.0",
-              "2.0"
-            ]
+            "enum": ["1.0", "2.0"]
           }
         },
         "type": "object",
@@ -2690,10 +2341,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "credentialId",
-          "revealed"
-        ]
+        "required": ["credentialId", "revealed"]
       },
       "RequestedPredicate": {
         "properties": {
@@ -2705,9 +2353,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "credentialId"
-        ]
+        "required": ["credentialId"]
       },
       "RequestedCredentials": {
         "properties": {
@@ -2725,10 +2371,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "requestedAttributes",
-          "requestedPredicates"
-        ]
+        "required": ["requestedAttributes", "requestedPredicates"]
       },
       "RequestPresentationMessage": {
         "properties": {
@@ -2779,19 +2422,13 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "requestPresentationAttachments",
-          "id"
-        ]
+        "required": ["type", "requestPresentationAttachments", "id"]
       },
       "PresentationMessage": {
         "properties": {
           "type": {
             "type": "string",
-            "enum": [
-              "https://didcomm.org/present-proof/1.0/presentation"
-            ],
+            "enum": ["https://didcomm.org/present-proof/1.0/presentation"],
             "pattern": "(.*?)([a-zA-Z0-9._-]+)\\/(\\d[^/]*)\\/([a-zA-Z0-9._-]+)$"
           },
           "comment": {
@@ -2834,19 +2471,13 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "presentationAttachments",
-          "id"
-        ]
+        "required": ["type", "presentationAttachments", "id"]
       },
       "PresentationAckMessage": {
         "properties": {
           "type": {
             "type": "string",
-            "enum": [
-              "https://didcomm.org/present-proof/1.0/ack"
-            ],
+            "enum": ["https://didcomm.org/present-proof/1.0/ack"],
             "pattern": "(.*?)([a-zA-Z0-9._-]+)\\/(\\d[^/]*)\\/([a-zA-Z0-9._-]+)$"
           },
           "id": {
@@ -2879,28 +2510,18 @@
             "$ref": "#/components/schemas/ServiceDecorator"
           },
           "status": {
-            "enum": [
-              "OK",
-              "FAIL",
-              "PENDING"
-            ],
+            "enum": ["OK", "FAIL", "PENDING"],
             "type": "string"
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "id",
-          "status"
-        ]
+        "required": ["type", "id", "status"]
       },
       "PresentationProblemReportMessage": {
         "properties": {
           "type": {
             "type": "string",
-            "enum": [
-              "https://didcomm.org/present-proof/1.0/problem-report"
-            ],
+            "enum": ["https://didcomm.org/present-proof/1.0/problem-report"],
             "pattern": "(.*?)([a-zA-Z0-9._-]+)\\/(\\d[^/]*)\\/([a-zA-Z0-9._-]+)$"
           },
           "id": {
@@ -2934,30 +2555,16 @@
           },
           "problemItems": {},
           "whoRetries": {
-            "enum": [
-              "YOU",
-              "ME",
-              "BOTH",
-              "NONE"
-            ],
+            "enum": ["YOU", "ME", "BOTH", "NONE"],
             "type": "string"
           },
           "fixHint": {},
           "where": {
-            "enum": [
-              "CLOUD",
-              "EDGE",
-              "WIRE",
-              "AGENCY"
-            ],
+            "enum": ["CLOUD", "EDGE", "WIRE", "AGENCY"],
             "type": "string"
           },
           "impact": {
-            "enum": [
-              "MESSAGE",
-              "THREAD",
-              "CONNECTION"
-            ],
+            "enum": ["MESSAGE", "THREAD", "CONNECTION"],
             "type": "string"
           },
           "noticedTime": {
@@ -2971,10 +2578,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "type",
-          "id"
-        ]
+        "required": ["type", "id"]
       },
       "BasicMessageRequest": {
         "properties": {
@@ -2983,9 +2587,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "content"
-        ]
+        "required": ["content"]
       },
       "InvitationConfigRequest": {
         "properties": {
@@ -3029,9 +2631,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "invitationUrl"
-        ]
+        "required": ["invitationUrl"]
       },
       "InvitationRequest": {
         "properties": {
@@ -3054,9 +2654,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "label"
-        ]
+        "required": ["label"]
       },
       "ReceiveInvitationRequest": {
         "properties": {
@@ -3080,9 +2678,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "invitation"
-        ]
+        "required": ["invitation"]
       },
       "AcceptCredentialProposalRequest": {
         "properties": {
@@ -3093,11 +2689,7 @@
             "type": "string"
           },
           "autoAcceptCredential": {
-            "enum": [
-              "always",
-              "contentApproved",
-              "never"
-            ],
+            "enum": ["always", "contentApproved", "never"],
             "type": "string"
           }
         },
@@ -3110,9 +2702,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "attributeName"
-        ]
+        "required": ["attributeName"]
       },
       "CredentialOfferTemp": {
         "properties": {
@@ -3127,11 +2717,7 @@
             "$ref": "#/components/schemas/CredentialPreview"
           },
           "autoAcceptCredential": {
-            "enum": [
-              "always",
-              "contentApproved",
-              "never"
-            ],
+            "enum": ["always", "contentApproved", "never"],
             "type": "string"
           },
           "attachments": {
@@ -3142,10 +2728,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "credentialDefinitionId",
-          "preview"
-        ]
+        "required": ["credentialDefinitionId", "preview"]
       },
       "CredentialOfferRequest": {
         "properties": {
@@ -3163,11 +2746,7 @@
             "$ref": "#/components/schemas/CredentialPreview"
           },
           "autoAcceptCredential": {
-            "enum": [
-              "always",
-              "contentApproved",
-              "never"
-            ],
+            "enum": ["always", "contentApproved", "never"],
             "type": "string"
           },
           "attachments": {
@@ -3178,11 +2757,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "connectionId",
-          "credentialDefinitionId",
-          "preview"
-        ]
+        "required": ["connectionId", "credentialDefinitionId", "preview"]
       },
       "CredentialProposalRequest": {
         "properties": {
@@ -3224,19 +2799,12 @@
           "attachments": {},
           "linkedAttachments": {},
           "autoAcceptCredential": {
-            "enum": [
-              "always",
-              "contentApproved",
-              "never"
-            ],
+            "enum": ["always", "contentApproved", "never"],
             "type": "string"
           }
         },
         "type": "object",
-        "required": [
-          "connectionId",
-          "credentialProposal"
-        ]
+        "required": ["connectionId", "credentialProposal"]
       },
       "CredentialDefinitionRequest": {
         "properties": {
@@ -3252,11 +2820,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "tag",
-          "supportRevocation",
-          "schemaId"
-        ]
+        "required": ["tag", "supportRevocation", "schemaId"]
       },
       "SchemaTemplate": {
         "properties": {
@@ -3273,11 +2837,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "name",
-          "version",
-          "attributes"
-        ]
+        "required": ["name", "version", "attributes"]
       },
       "AcceptProofProposalRequest": {
         "properties": {
@@ -3308,18 +2868,12 @@
             "type": "string"
           },
           "autoAcceptProof": {
-            "enum": [
-              "always",
-              "contentApproved",
-              "never"
-            ],
+            "enum": ["always", "contentApproved", "never"],
             "type": "string"
           }
         },
         "type": "object",
-        "required": [
-          "proofRequest"
-        ]
+        "required": ["proofRequest"]
       },
       "ProofPresentationRequest": {
         "properties": {
@@ -3333,19 +2887,12 @@
             "type": "string"
           },
           "autoAcceptProof": {
-            "enum": [
-              "always",
-              "contentApproved",
-              "never"
-            ],
+            "enum": ["always", "contentApproved", "never"],
             "type": "string"
           }
         },
         "type": "object",
-        "required": [
-          "connectionId",
-          "proofRequest"
-        ]
+        "required": ["connectionId", "proofRequest"]
       },
       "ProofProposalRequest": {
         "properties": {
@@ -3365,11 +2912,7 @@
             "type": "array"
           },
           "autoAcceptProof": {
-            "enum": [
-              "always",
-              "contentApproved",
-              "never"
-            ],
+            "enum": ["always", "contentApproved", "never"],
             "type": "string"
           },
           "comment": {
@@ -3377,11 +2920,7 @@
           }
         },
         "type": "object",
-        "required": [
-          "connectionId",
-          "attributes",
-          "predicates"
-        ]
+        "required": ["connectionId", "attributes", "predicates"]
       }
     }
   },
@@ -3404,9 +2943,7 @@
           }
         },
         "summary": "Get agent info",
-        "tags": [
-          "Agent"
-        ]
+        "tags": ["Agent"]
       }
     },
     "/basic-messages/{connectionId}": {
@@ -3431,9 +2968,7 @@
           }
         },
         "summary": "Get basic messages",
-        "tags": [
-          "Basic Message"
-        ]
+        "tags": ["Basic Message"]
       },
       "post": {
         "operationId": "BasicMessageController.sendMessage",
@@ -3467,9 +3002,7 @@
           }
         },
         "summary": "Send message",
-        "tags": [
-          "Basic Message"
-        ]
+        "tags": ["Basic Message"]
       }
     },
     "/connections/{connectionId}": {
@@ -3494,9 +3027,7 @@
           }
         },
         "summary": "Get connection by id",
-        "tags": [
-          "Connection"
-        ]
+        "tags": ["Connection"]
       },
       "delete": {
         "operationId": "ConnectionController.deleteConnection",
@@ -3519,9 +3050,7 @@
           }
         },
         "summary": "Delete connection",
-        "tags": [
-          "Connection"
-        ]
+        "tags": ["Connection"]
       }
     },
     "/connections/": {
@@ -3536,9 +3065,7 @@
           }
         },
         "summary": "Get all connections",
-        "tags": [
-          "Connection"
-        ]
+        "tags": ["Connection"]
       }
     },
     "/connections/create-invitation": {
@@ -3564,9 +3091,7 @@
           }
         },
         "summary": "Create invitation",
-        "tags": [
-          "Connection"
-        ]
+        "tags": ["Connection"]
       }
     },
     "/connections/receive-invitation": {
@@ -3592,9 +3117,7 @@
           }
         },
         "summary": "Receive invitation",
-        "tags": [
-          "Connection"
-        ]
+        "tags": ["Connection"]
       }
     },
     "/connections/receive-invitation-url": {
@@ -3620,9 +3143,7 @@
           }
         },
         "summary": "Receive invitation by url",
-        "tags": [
-          "Connection"
-        ]
+        "tags": ["Connection"]
       }
     },
     "/connections/{connectionId}/accept-invitation": {
@@ -3647,9 +3168,7 @@
           }
         },
         "summary": "Accept invitation",
-        "tags": [
-          "Connection"
-        ]
+        "tags": ["Connection"]
       }
     },
     "/connections/{connectionId}/accept-request": {
@@ -3674,9 +3193,7 @@
           }
         },
         "summary": "Accept request",
-        "tags": [
-          "Connection"
-        ]
+        "tags": ["Connection"]
       }
     },
     "/connections/{connectionId}/accept-response": {
@@ -3701,9 +3218,7 @@
           }
         },
         "summary": "Accept response",
-        "tags": [
-          "Connection"
-        ]
+        "tags": ["Connection"]
       }
     },
     "/credentials/{credentialId}": {
@@ -3728,9 +3243,7 @@
           }
         },
         "summary": "Get credential by id",
-        "tags": [
-          "Credential"
-        ]
+        "tags": ["Credential"]
       },
       "delete": {
         "operationId": "CredentialController.deleteCredential",
@@ -3753,9 +3266,7 @@
           }
         },
         "summary": "Delete credential",
-        "tags": [
-          "Credential"
-        ]
+        "tags": ["Credential"]
       }
     },
     "/credentials/": {
@@ -3770,9 +3281,7 @@
           }
         },
         "summary": "Get all credentials",
-        "tags": [
-          "Credential"
-        ]
+        "tags": ["Credential"]
       }
     },
     "/credentials/propose-credential": {
@@ -3798,9 +3307,7 @@
           }
         },
         "summary": "Propose credential",
-        "tags": [
-          "Credential"
-        ]
+        "tags": ["Credential"]
       }
     },
     "/credentials/{credentialId}/accept-proposal": {
@@ -3836,9 +3343,7 @@
           }
         },
         "summary": "Accept proposal",
-        "tags": [
-          "Credential"
-        ]
+        "tags": ["Credential"]
       }
     },
     "/credentials/offer-outofband-credential": {
@@ -3864,9 +3369,7 @@
           }
         },
         "summary": "Offer credential out of band",
-        "tags": [
-          "Credential"
-        ]
+        "tags": ["Credential"]
       }
     },
     "/credentials/offer-credential": {
@@ -3892,9 +3395,7 @@
           }
         },
         "summary": "Offer credential",
-        "tags": [
-          "Credential"
-        ]
+        "tags": ["Credential"]
       }
     },
     "/credentials/{credentialId}/accept-offer": {
@@ -3919,9 +3420,7 @@
           }
         },
         "summary": "Accept offer",
-        "tags": [
-          "Credential"
-        ]
+        "tags": ["Credential"]
       }
     },
     "/credentials/{credentialId}/accept-request": {
@@ -3946,9 +3445,7 @@
           }
         },
         "summary": "Accept request",
-        "tags": [
-          "Credential"
-        ]
+        "tags": ["Credential"]
       }
     },
     "/credentials/{credentialId}/accept-credential": {
@@ -3973,9 +3470,7 @@
           }
         },
         "summary": "Accept credential",
-        "tags": [
-          "Credential"
-        ]
+        "tags": ["Credential"]
       }
     },
     "/credential-definitions/{credentialDefinitionId}": {
@@ -4000,9 +3495,7 @@
           }
         },
         "summary": "Get credential definition by id",
-        "tags": [
-          "Credential Definition"
-        ]
+        "tags": ["Credential Definition"]
       }
     },
     "/credential-definitions/": {
@@ -4028,9 +3521,7 @@
           }
         },
         "summary": "Create credential definition",
-        "tags": [
-          "Credential Definition"
-        ]
+        "tags": ["Credential Definition"]
       }
     },
     "/schemas/{schemaId}": {
@@ -4055,9 +3546,7 @@
           }
         },
         "summary": "Get schema by id",
-        "tags": [
-          "Schema"
-        ]
+        "tags": ["Schema"]
       }
     },
     "/schemas/": {
@@ -4083,9 +3572,7 @@
           }
         },
         "summary": "Create schema",
-        "tags": [
-          "Schema"
-        ]
+        "tags": ["Schema"]
       }
     },
     "/proofs/{proofRecordId}": {
@@ -4110,9 +3597,7 @@
           }
         },
         "summary": "Get proof by id",
-        "tags": [
-          "Proof"
-        ]
+        "tags": ["Proof"]
       },
       "delete": {
         "operationId": "ProofController.deleteProof",
@@ -4135,9 +3620,7 @@
           }
         },
         "summary": "Delete proof",
-        "tags": [
-          "Proof"
-        ]
+        "tags": ["Proof"]
       }
     },
     "/proofs/": {
@@ -4162,9 +3645,7 @@
           }
         },
         "summary": "Get all proofs",
-        "tags": [
-          "Proof"
-        ]
+        "tags": ["Proof"]
       }
     },
     "/proofs/propose-proof": {
@@ -4190,9 +3671,7 @@
           }
         },
         "summary": "Propose proof",
-        "tags": [
-          "Proof"
-        ]
+        "tags": ["Proof"]
       }
     },
     "/proofs/{proofRecordId}/accept-proposal": {
@@ -4228,9 +3707,7 @@
           }
         },
         "summary": "Accept proposal",
-        "tags": [
-          "Proof"
-        ]
+        "tags": ["Proof"]
       }
     },
     "/proofs/request-outofband-proof": {
@@ -4256,9 +3733,7 @@
           }
         },
         "summary": "Request proof out of band",
-        "tags": [
-          "Proof"
-        ]
+        "tags": ["Proof"]
       }
     },
     "/proofs/request-proof": {
@@ -4284,9 +3759,7 @@
           }
         },
         "summary": "Request proof",
-        "tags": [
-          "Proof"
-        ]
+        "tags": ["Proof"]
       }
     },
     "/proofs/{proofRecordId}/accept-request": {
@@ -4322,9 +3795,7 @@
           }
         },
         "summary": "Accept request",
-        "tags": [
-          "Proof"
-        ]
+        "tags": ["Proof"]
       }
     },
     "/proofs/{proofRecordId}/accept-presentation": {
@@ -4349,10 +3820,8 @@
           }
         },
         "summary": "Accept presentation",
-        "tags": [
-          "Proof"
-        ]
+        "tags": ["Proof"]
       }
     }
   }
-}
\ No newline at end of file
+}
diff --git a/apps/ssi-abstraction/test/setEnvVars.js b/apps/ssi-abstraction/test/setEnvVars.js
index 62f9981..8c0f63d 100644
--- a/apps/ssi-abstraction/test/setEnvVars.js
+++ b/apps/ssi-abstraction/test/setEnvVars.js
@@ -1,6 +1,7 @@
 process.env.PORT = 3009;
 process.env.AFJ_EXT_PORT = 3010;
-process.env.DATABASE_URL = 'postgresql://postgres:postgres@localhost:5432/postgres?schema=agent';
+process.env.DATABASE_URL =
+  'postgresql://postgres:postgres@localhost:5432/postgres?schema=agent';
 process.env.NATS_URL = 'nats://localhost:4222';
 process.env.ECSURL = 'http://localhost:9200/';
 process.env.AGENT_HOST = 'http://localhost';
@@ -12,4 +13,4 @@ process.env.AGENT_AUTO_ACCEPT_CONNECTION = true;
 process.env.AGENT_AUTO_ACCEPT_CREDENTIAL = true;
 process.env.AGENT_WALLET_KEY = 'ssi-wallet-key';
 process.env.AGENT_WALLET_ID = 'ssi-wallet-id';
-process.env.AGENT_LEDGER_ID = 'ID_UNION';
\ No newline at end of file
+process.env.AGENT_LEDGER_ID = 'ID_UNION';
diff --git a/apps/ssi-abstraction/tsconfig.build.json b/apps/ssi-abstraction/tsconfig.build.json
index 62ab6b8..64f86c6 100644
--- a/apps/ssi-abstraction/tsconfig.build.json
+++ b/apps/ssi-abstraction/tsconfig.build.json
@@ -1,4 +1,4 @@
 {
   "extends": "./tsconfig.json",
-  "exclude": ["node_modules", "test", "dist", "**/*spec.ts", "agent-spinup"]
+  "exclude": ["node_modules", "test", "dist", "**/*spec.ts"]
 }
diff --git a/package.json b/package.json
index dedb9f0..ae7358e 100644
--- a/package.json
+++ b/package.json
@@ -9,6 +9,8 @@
     "principal:build": "pnpm -F principal-manager build",
     "proof:build": "pnpm -F proof-manager build",
     "ssi:build": "pnpm -F ssi-abstraction build",
-    "lint": "pnpm -r lint"
+    "lint": "pnpm -r lint",
+    "prettier": "prettier --ignore-path .gitignore '**/*.+(js|json|ts|md|yml|yaml)'",
+    "format": "pnpm prettier --write"
   }
 }
diff --git a/tsconfig.json b/tsconfig.json
index 7ab2dfa..27bad30 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -6,7 +6,6 @@
     "module": "nodenext",
     "target": "esnext",
     "moduleResolution": "nodenext",
-
     "strict": true,
     "esModuleInterop": true,
     "allowSyntheticDefaultImports": true,
-- 
GitLab