From 8e6b463364c608e91e700cc12192593f6050362e Mon Sep 17 00:00:00 2001 From: KambleSahil3 <157386770+KambleSahil3@users.noreply.github.com> Date: Thu, 13 Mar 2025 14:19:23 +0530 Subject: [PATCH 1/8] chore: Update Dockerfile (#254) Signed-off-by: sahil.kamble@ayanworks.com Signed-off-by: KambleSahil3 Signed-off-by: Sahil Kamble --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 03459e0f..210d04ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -55,6 +55,7 @@ COPY package.json yarn.lock ./ COPY . . # Install dependencies +RUN rm -rf node_modules RUN yarn install --frozen-lockfile RUN yarn global add patch-package From 91137e797ae179db1be6e8a0fdde7c189b79376a Mon Sep 17 00:00:00 2001 From: KambleSahil3 Date: Mon, 17 Mar 2025 12:35:14 +0530 Subject: [PATCH 2/8] chore: Update Dockerfile (#256) Signed-off-by: KambleSahil3 Signed-off-by: Sahil Kamble From 57737ff6a074f1a4f2b053c1de73c91c26adf7cf Mon Sep 17 00:00:00 2001 From: Sahil Kamble Date: Thu, 27 Mar 2025 13:19:41 +0530 Subject: [PATCH 3/8] feat: push docker image (#257) * feat: added yml file to push docker images to github Signed-off-by: KambleSahil3 * feat: added yml file to push docker images to github Signed-off-by: KambleSahil3 * fix: updated cicd.yml file Signed-off-by: KambleSahil3 * fix: renamed yml file Signed-off-by: KambleSahil3 --------- Signed-off-by: KambleSahil3 Signed-off-by: Sahil Kamble --- .github/workflows/continuous-delivery.yml | 47 +++++++++++++++++++++++ Dockerfile | 47 +---------------------- 2 files changed, 48 insertions(+), 46 deletions(-) create mode 100644 .github/workflows/continuous-delivery.yml diff --git a/.github/workflows/continuous-delivery.yml b/.github/workflows/continuous-delivery.yml new file mode 100644 index 00000000..20405081 --- /dev/null +++ b/.github/workflows/continuous-delivery.yml @@ -0,0 +1,47 @@ +name: Credo-Controller + +on: + push: + tags: + - 'v*' + +env: + REGISTRY: ghcr.io + SERVICE: credo-controller + +jobs: + build-and-push: + name: Push Docker image to GitHub + runs-on: ubuntu-latest + + permissions: + contents: read + packages: write + attestations: write + id-token: write + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Extract Git Tag + id: get_tag + run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and Push Docker Image ${{ env.SERVICE }} + uses: docker/build-push-action@v6 + with: + context: . + file: Dockerfile + push: true + tags: | + ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.SERVICE }}:${{ env.TAG }} + ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.SERVICE }}:latest + \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 210d04ee..c8175271 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,48 +1,3 @@ -# FROM ubuntu:20.04 - -# ENV DEBIAN_FRONTEND noninteractive - -# RUN apt-get update -y && apt-get install -y \ -# software-properties-common \ -# apt-transport-https \ -# curl \ -# # Only needed to build indy-sdk -# build-essential - -# RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - - -# # yarn -# RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ -# echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list - -# # install depdencies -# RUN apt-get update -y && apt-get install -y --allow-unauthenticated \ -# nodejs - -# # install depdencies -# RUN apt-get update -y && apt-get install -y --allow-unauthenticated \ -# nodejs - -# # Install yarn seperately due to `no-install-recommends` to skip nodejs install -# RUN apt-get install -y --no-install-recommends yarn - -# RUN yarn global add patch-package -# # AFJ specifc setup -# WORKDIR /www - -# COPY bin ./bin -# COPY package.json ./package.json -# COPY patches ./patches - -# RUN yarn install --production - -# COPY build ./build -# # COPY libindy_vdr.so /usr/lib/ -# # COPY libindy_vdr.so /usr/local/lib/ - -# ENTRYPOINT [ "./bin/afj-rest.js", "start" ] - - # Stage 1: Builder stage FROM node:18.19.0 AS builder @@ -76,4 +31,4 @@ COPY --from=builder /app/node_modules ./node_modules COPY --from=builder /app/patches ./patches # Set entry point -ENTRYPOINT ["node", "./bin/afj-rest.js", "start"] \ No newline at end of file +ENTRYPOINT ["node", "./bin/afj-rest.js", "start"] From 9fca65e5ae464f6159fba075d5051d3d5d49dee7 Mon Sep 17 00:00:00 2001 From: Sahil Kamble Date: Thu, 27 Mar 2025 15:28:42 +0530 Subject: [PATCH 4/8] feat/push-docker-image (#258) * feat: added yml file to push docker images to github Signed-off-by: KambleSahil3 * feat: added yml file to push docker images to github Signed-off-by: KambleSahil3 * fix: updated cicd.yml file Signed-off-by: KambleSahil3 * fix: renamed yml file Signed-off-by: KambleSahil3 * chore: removed id-token and attestations Signed-off-by: KambleSahil3 * chore: removed id-token and attestations Signed-off-by: KambleSahil3 --------- Signed-off-by: KambleSahil3 Signed-off-by: Sahil Kamble --- .github/workflows/continuous-delivery.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/continuous-delivery.yml b/.github/workflows/continuous-delivery.yml index 20405081..f8e6623b 100644 --- a/.github/workflows/continuous-delivery.yml +++ b/.github/workflows/continuous-delivery.yml @@ -1,4 +1,4 @@ -name: Credo-Controller +name: Continous Delivery on: push: @@ -17,8 +17,6 @@ jobs: permissions: contents: read packages: write - attestations: write - id-token: write steps: - name: Checkout Repository From e03573d3722c3444510b3ed8f63668f808a02a1b Mon Sep 17 00:00:00 2001 From: Tipu_Singh Date: Mon, 31 Mar 2025 09:48:33 +0530 Subject: [PATCH 5/8] feat:w3c-revocation Signed-off-by: Tipu_Singh Signed-off-by: Sahil Kamble --- package.json | 8 +- src/constants.ts | 1 + .../credentials/CredentialController.ts | 145 +++++++++ .../multi-tenancy/MultiTenancyController.ts | 157 ++++++++- src/enums/enum.ts | 20 ++ src/routes/routes.ts | 187 ++++++++++- src/routes/swagger.json | 301 +++++++++++++++--- yarn.lock | 24 +- 8 files changed, 786 insertions(+), 57 deletions(-) create mode 100644 src/constants.ts diff --git a/package.json b/package.json index 4c32c3e2..a0422ddf 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,7 @@ "@types/node-fetch": "^2.6.4", "@types/ref-struct-di": "^1.1.9", "@types/ws": "^8.5.4", + "@types/uuid": "^8.3.3", "axios": "^1.4.0", "body-parser": "^1.20.0", "cors": "^2.8.5", @@ -64,6 +65,7 @@ "joi": "^17.12.3", "jsonwebtoken": "^9.0.2", "node-fetch": "^2.6.7", + "pako": "^2.1.0", "patch-package": "^8.0.0", "postinstall-postinstall": "^2.1.0", "reflect-metadata": "^0.1.13", @@ -71,7 +73,9 @@ "tslog": "^3.3.3", "tsoa": "^6.0.1", "tsyringe": "^4.8.0", - "yargs": "^17.3.1" + "uuidv4": "^6.2.13", + "yargs": "^17.3.1", + "zlib": "^1.0.5" }, "devDependencies": { "@types/body-parser": "^1.19.2", @@ -82,11 +86,11 @@ "@types/jsonwebtoken": "^9.0.5", "@types/multer": "^1.4.7", "@types/node": "^18.18.8", + "@types/pako": "^2.0.3", "@types/ref-array-di": "^1.2.8", "@types/ref-struct-di": "^1.1.9", "@types/supertest": "^2.0.12", "@types/swagger-ui-express": "^4.1.3", - "@types/uuid": "^8.3.4", "@typescript-eslint/eslint-plugin": "^6.19.1", "@typescript-eslint/parser": "^6.19.1", "eslint": "^7.32.0", diff --git a/src/constants.ts b/src/constants.ts new file mode 100644 index 00000000..e7b4b011 --- /dev/null +++ b/src/constants.ts @@ -0,0 +1 @@ +export const initialBitsEncoded = `uH4sIAAAAAAAAA-3BMQEAAADCoPVPbQwfoAAAAAAAAAAAAAAAAAAAAIC3AYbSVKsAQAAA` diff --git a/src/controllers/credentials/CredentialController.ts b/src/controllers/credentials/CredentialController.ts index 41fb3c1d..f21bb484 100644 --- a/src/controllers/credentials/CredentialController.ts +++ b/src/controllers/credentials/CredentialController.ts @@ -13,8 +13,11 @@ import { CredentialRole, createPeerDidDocumentFromServices, PeerDidNumAlgo, + ClaimFormat, } from '@credo-ts/core' +import axios from 'axios' import { injectable } from 'tsyringe' +import { v4 as uuidv4 } from 'uuid' import ErrorHandlingService from '../../errorHandlingService' import { CredentialExchangeRecordExample, RecordId } from '../examples' @@ -30,6 +33,15 @@ import { ThreadId, } from '../types' +import { initialBitsEncoded } from 'src/constants' +import { + CredentialContext, + CredentialStatusListType, + CredentialType, + RevocationListType, + SignatureType, +} from 'src/enums/enum' +import { BadRequestError, InternalServerError } from 'src/errors' import { Body, Controller, Get, Path, Post, Route, Tags, Example, Query, Security } from 'tsoa' @Tags('Credentials') @@ -314,4 +326,137 @@ export class CredentialController extends Controller { throw ErrorHandlingService.handle(error) } } + + /** + * Create bitstring status list credential + * + * @param tenantId Id of the tenant + * @param request BSLC required details + */ + @Security('apiKey') + @Post('/create-bslc') + public async createBitstringStatusListCredential( + @Path('tenantId') tenantId: string, + @Body() request: { issuerDID: string; statusPurpose: string; verificationMethod: string } + ) { + try { + const { issuerDID, statusPurpose, verificationMethod } = request + const bslcId = uuidv4() + const credentialpayload = { + '@context': [`${CredentialContext.V1}`, `${CredentialContext.V2}`], + id: `${process.env.BSLC_SERVER_URL}/bitstring/${bslcId}`, + type: [`${CredentialType.VerifiableCredential}`, `${CredentialType.BitstringStatusListCredential}`], + issuer: { + id: issuerDID as string, + }, + issuanceDate: new Date().toISOString(), + credentialSubject: { + id: `${process.env.BSLC_SERVER_URL}/bitstring/${bslcId}`, + type: `${RevocationListType.Bitstring}`, + statusPurpose: statusPurpose, + encodedList: initialBitsEncoded, + }, + credentialStatus: { + id: `${process.env.BSLC_SERVER_URL}/bitstring/${bslcId}`, + type: CredentialStatusListType.CredentialStatusList2017, + }, + } + + let signedCredential + // Step 2: Sign the payload + try { + //TODO: Add correct type here + signedCredential = await this.agent.w3cCredentials.signCredential({ + credential: credentialpayload, + format: ClaimFormat.LdpVc, + proofType: SignatureType.Ed25519Signature2018, + verificationMethod, + }) + } catch (signingError) { + throw new InternalServerError(`Failed to sign the BitstringStatusListCredential: ${signingError}`) + } + // Step 3: Upload the signed payload to the server + const serverUrl = process.env.BSLC_SERVER_URL + if (!serverUrl) { + throw new Error('BSLC_SERVER_URL is not defined in the environment variables') + } + + const token = process.env.BSLC_SERVER_TOKEN + if (!token) { + throw new Error('BSLC_SERVER_TOKEN is not defined in the environment variables') + } + const url = `${serverUrl}/bitstring` + const bslcPayload = { + id: bslcId, + bslcObject: signedCredential, + } + try { + const response = await axios.post(url, bslcPayload, { + headers: { + Accept: '*/*', + Authorization: `Bearer ${token}`, + 'Content-Type': 'application/json', + }, + }) + + if (response.status !== 200) { + throw new Error('Failed to upload the signed BitstringStatusListCredential') + } + } catch (error) { + throw new InternalServerError(`Error uploading the BitstringStatusListCredential: ${error}`) + } + return signedCredential + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } + + @Security('apiKey') + @Post('/get-empty-index/:BSLCUrl') + public async getEmptyIndexForBSLC(@Path('BSLCUrl') BSLCUrl: string) { + try { + if (!BSLCUrl) { + throw new BadRequestError('BSLCUrl is required') + } + + const response = await axios.get(BSLCUrl) + if (response.status !== 200) { + throw new Error('Failed to fetch the BitstringStatusListCredential') + } + + const credential = response.data + const encodedList = credential?.credentialSubject?.claims.encodedList + if (!encodedList) { + throw new Error('Encoded list not found in the credential') + } + + let bitstring + try { + const compressedData = Buffer.from(encodedList, 'base64').toString('binary') + bitstring = Array.from(compressedData) + .map((byte) => byte.padStart(8, '0')) + .join('') + } catch (error) { + throw new Error('Failed to decompress and process the encoded list') + } + + const unusedIndexes = [] + for (let i = 0; i < bitstring.length; i++) { + if (bitstring[i] === '0') { + unusedIndexes.push(i) + } + } + //TODO: add logic to filter from used indexs, for now returning random index with bit status as 0. + if (unusedIndexes.length === 0) { + throw new Error('No unused index found in the BitstringStatusList') + } + + const randomIndex = unusedIndexes[Math.floor(Math.random() * unusedIndexes.length)] + return { + index: randomIndex, + } + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } } diff --git a/src/controllers/multi-tenancy/MultiTenancyController.ts b/src/controllers/multi-tenancy/MultiTenancyController.ts index a885fb96..ef40de97 100644 --- a/src/controllers/multi-tenancy/MultiTenancyController.ts +++ b/src/controllers/multi-tenancy/MultiTenancyController.ts @@ -1,3 +1,4 @@ +/* eslint-disable prettier/prettier */ import type { RestAgentModules, RestMultiTenantAgentModules } from '../../cliAgent' import type { Version } from '../examples' import type { RecipientKeyOption, SchemaMetadata } from '../types' @@ -44,12 +45,30 @@ import { injectable, createPeerDidDocumentFromServices, PeerDidNumAlgo, + ClaimFormat, } from '@credo-ts/core' import { QuestionAnswerRole, QuestionAnswerState } from '@credo-ts/question-answer' import axios from 'axios' import * as fs from 'fs' +import { v4 as uuidv4 } from 'uuid' +// import * as zlib from 'zlib' +// import { inflate } from 'pako' -import { CredentialEnum, DidMethod, EndorserMode, Network, NetworkTypes, Role, SchemaError } from '../../enums/enum' +import { initialBitsEncoded } from '../../constants' +import { + CredentialContext, + CredentialEnum, + CredentialStatusListType, + CredentialType, + DidMethod, + EndorserMode, + Network, + NetworkTypes, + RevocationListType, + Role, + SchemaError, + SignatureType, +} from '../../enums/enum' import ErrorHandlingService from '../../errorHandlingService' import { ENDORSER_DID_NOT_PRESENT } from '../../errorMessages' import { @@ -1904,4 +1923,140 @@ export class MultiTenancyController extends Controller { throw ErrorHandlingService.handle(error) } } + + /** + * Create bitstring status list credential + * + * @param tenantId Id of the tenant + * @param request BSLC required details + */ + @Security('apiKey') + @Post('/create-bslc/:tenantId') + public async createBitstringStatusListCredential( + @Path('tenantId') tenantId: string, + @Body() request: { issuerDID: string; statusPurpose: string, verificationMethod:string } + ) { + try { + const { issuerDID, statusPurpose, verificationMethod } = request + const bslcId = uuidv4() + const credentialpayload = { + '@context': [`${CredentialContext.V1}`, `${CredentialContext.V2}`], + id: `${process.env.BSLC_SERVER_URL}/bitstring/${bslcId}`, + type: [`${CredentialType.VerifiableCredential}`, `${CredentialType.BitstringStatusListCredential}`], + issuer: { + id: issuerDID as string, + }, + issuanceDate: new Date().toISOString(), + credentialSubject: { + id: `${process.env.BSLC_SERVER_URL}/bitstring/${bslcId}`, + type: `${RevocationListType.Bitstring}`, + statusPurpose: statusPurpose, + encodedList: initialBitsEncoded, + }, + credentialStatus: { + id: `${process.env.BSLC_SERVER_URL}/bitstring/${bslcId}`, + type: CredentialStatusListType.CredentialStatusList2017, + }, + } + + let signedCredential + + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + // Step 2: Sign the payload + try { + //TODO: Add correct type here + signedCredential = await tenantAgent.w3cCredentials.signCredential({ + credential: credentialpayload, + format: ClaimFormat.LdpVc, + proofType: SignatureType.Ed25519Signature2018, + verificationMethod, + }) + } catch (signingError) { + throw new InternalServerError(`Failed to sign the BitstringStatusListCredential: ${signingError}`) + } + }) + // Step 3: Upload the signed payload to the server + const serverUrl = process.env.BSLC_SERVER_URL + if (!serverUrl) { + throw new Error('BSLC_SERVER_URL is not defined in the environment variables') + } + + const token = process.env.BSLC_SERVER_TOKEN + if (!token) { + throw new Error('BSLC_SERVER_TOKEN is not defined in the environment variables') + } + const url = `${serverUrl}/bitstring` + const bslcPayload = { + id: bslcId, + bslcObject: signedCredential, + } + try { + const response = await axios.post(url, bslcPayload, { + headers: { + Accept: '*/*', + Authorization: `Bearer ${token}`, + 'Content-Type': 'application/json', + }, + }) + + if (response.status !== 200) { + throw new Error('Failed to upload the signed BitstringStatusListCredential') + } + } catch (error) { + throw new InternalServerError(`Error uploading the BitstringStatusListCredential: ${error}`) + } + return signedCredential + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } + + @Security('apiKey') + @Post('/get-empty-index/:BSLCUrl') + public async getEmptyIndexForBSLC(@Path('BSLCUrl') BSLCUrl: string) { + try { + if (!BSLCUrl) { + throw new BadRequestError('BSLCUrl is required') + } + + const response = await axios.get(BSLCUrl) + if (response.status !== 200) { + throw new Error('Failed to fetch the BitstringStatusListCredential') + } + + const credential = response.data + const encodedList = credential?.credentialSubject?.claims.encodedList + if (!encodedList) { + throw new Error('Encoded list not found in the credential') + } + + let bitstring + try { + const compressedData = Buffer.from(encodedList, 'base64').toString('binary') + bitstring = Array.from(compressedData) + .map((byte) => byte.padStart(8, '0')) + .join('') + } catch (error) { + throw new Error('Failed to decompress and process the encoded list') + } + + const unusedIndexes = [] + for (let i = 0; i < bitstring.length; i++) { + if (bitstring[i] === '0') { + unusedIndexes.push(i) + } + } + //TODO: add logic to filter from used indexs, for now returning random index with bit status as 0. + if (unusedIndexes.length === 0) { + throw new Error('No unused index found in the BitstringStatusList') + } + + const randomIndex = unusedIndexes[Math.floor(Math.random() * unusedIndexes.length)] + return { + index: randomIndex, + } + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } } diff --git a/src/enums/enum.ts b/src/enums/enum.ts index 6468e3af..4d1f8f18 100644 --- a/src/enums/enum.ts +++ b/src/enums/enum.ts @@ -71,3 +71,23 @@ export declare enum CustomHandshakeProtocol { DidExchange = 'https://didcomm.org/didexchange/1.1', Connections = 'https://didcomm.org/connections/1.0', } + +export enum CredentialContext { + V1 = 'https://www.w3.org/2018/credentials/v1', + V2 = 'https://www.w3.org/ns/credentials/v2', +} + +export enum CredentialType { + VerifiableCredential = 'VerifiableCredential', + BitstringStatusListCredential = 'BitstringStatusListCredential', +} +export enum RevocationListType { + Bitstring = 'BitstringStatusList', +} + +export enum CredentialStatusListType { + CredentialStatusList2017 = 'CredentialStatusList2017', +} +export enum SignatureType { + Ed25519Signature2018 = 'Ed25519Signature2018', +} diff --git a/src/routes/routes.ts b/src/routes/routes.ts index 0ffd1f1c..75c49301 100644 --- a/src/routes/routes.ts +++ b/src/routes/routes.ts @@ -418,7 +418,7 @@ const models: TsoaRoute.Models = { "DidCreate": { "dataType": "refObject", "properties": { - "keyType": {"ref":"KeyType","required":true}, + "keyType": {"ref":"KeyType"}, "seed": {"dataType":"string"}, "domain": {"dataType":"string"}, "method": {"dataType":"string","required":true}, @@ -585,6 +585,7 @@ const models: TsoaRoute.Models = { "issuanceDate": {"dataType":"string","required":true}, "expirationDate": {"dataType":"string"}, "credentialSubject": {"ref":"SingleOrArray_JsonObject_","required":true}, + "prettyVc": {"dataType":"any"}, }, "additionalProperties": {"dataType":"any"}, }, @@ -1128,6 +1129,31 @@ const models: TsoaRoute.Models = { "additionalProperties": false, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array.proposal_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array.offer_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array.request_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array.credential_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "GetCredentialFormatDataReturn__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"credential":{"ref":"CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array.credential_"},"request":{"ref":"CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array.request_"},"offerAttributes":{"dataType":"array","array":{"dataType":"refObject","ref":"CredentialPreviewAttributeOptions"}},"offer":{"ref":"CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array.offer_"},"proposal":{"ref":"CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array.proposal_"},"proposalAttributes":{"dataType":"array","array":{"dataType":"refObject","ref":"CredentialPreviewAttributeOptions"}}},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "BasicMessageRecord": { "dataType": "refAlias", "type": {"ref":"Record_string.unknown_","validators":{}}, @@ -1149,11 +1175,18 @@ const templateService = new ExpressTemplateService(models, {"noImplicitAdditiona // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + + export function RegisterRoutes(app: Router) { + // ########################################################################################################### // NOTE: If you do not see routes for all of your controllers in this file, then you might not have informed tsoa of where to look // Please look into the "controllerPathGlobs" config option described in the readme: https://github.com/lukeautry/tsoa // ########################################################################################################### + + + app.get('/proofs', authenticateMiddleware([{"apiKey":[]}]), ...(fetchMiddlewares(ProofController)), @@ -2468,7 +2501,7 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/multi-tenancy/polygon-wc3/schema/:tenantId', + app.post('/multi-tenancy/polygon-w3c/schema/:tenantId', authenticateMiddleware([{"apiKey":[]}]), ...(fetchMiddlewares(MultiTenancyController)), ...(fetchMiddlewares(MultiTenancyController.prototype.createPolygonW3CSchema)), @@ -2505,7 +2538,7 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/multi-tenancy/polygon-wc3/schema/:did/:schemaId/:tenantId', + app.get('/multi-tenancy/polygon-w3c/schema/:did/:schemaId/:tenantId', authenticateMiddleware([{"apiKey":[]}]), ...(fetchMiddlewares(MultiTenancyController)), ...(fetchMiddlewares(MultiTenancyController.prototype.getPolygonW3CSchemaById)), @@ -2878,6 +2911,43 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/multi-tenancy/credentials/form-data/:tenantId/:credentialRecordId', + authenticateMiddleware([{"apiKey":[]}]), + ...(fetchMiddlewares(MultiTenancyController)), + ...(fetchMiddlewares(MultiTenancyController.prototype.credentialFormData)), + + async function MultiTenancyController_credentialFormData(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, + credentialRecordId: {"in":"path","name":"credentialRecordId","required":true,"dataType":"string"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; + + const controller: any = await container.get(MultiTenancyController); + if (typeof controller['setStatus'] === 'function') { + controller.setStatus(undefined); + } + + await templateService.apiHandler({ + methodName: 'credentialFormData', + controller, + response, + next, + validatedArgs, + successStatus: undefined, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa app.get('/multi-tenancy/proofs/:tenantId', authenticateMiddleware([{"apiKey":[]}]), ...(fetchMiddlewares(MultiTenancyController)), @@ -3476,6 +3546,79 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/multi-tenancy/create-bslc/:tenantId', + authenticateMiddleware([{"apiKey":[]}]), + ...(fetchMiddlewares(MultiTenancyController)), + ...(fetchMiddlewares(MultiTenancyController.prototype.createBitstringStatusListCredential)), + + async function MultiTenancyController_createBitstringStatusListCredential(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, + request: {"in":"body","name":"request","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"verificationMethod":{"dataType":"string","required":true},"statusPurpose":{"dataType":"string","required":true},"issuerDID":{"dataType":"string","required":true}}}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; + + const controller: any = await container.get(MultiTenancyController); + if (typeof controller['setStatus'] === 'function') { + controller.setStatus(undefined); + } + + await templateService.apiHandler({ + methodName: 'createBitstringStatusListCredential', + controller, + response, + next, + validatedArgs, + successStatus: undefined, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/multi-tenancy/get-empty-index/:BSLCUrl', + authenticateMiddleware([{"apiKey":[]}]), + ...(fetchMiddlewares(MultiTenancyController)), + ...(fetchMiddlewares(MultiTenancyController.prototype.getEmptyIndexForBSLC)), + + async function MultiTenancyController_getEmptyIndexForBSLC(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + BSLCUrl: {"in":"path","name":"BSLCUrl","required":true,"dataType":"string"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; + + const controller: any = await container.get(MultiTenancyController); + if (typeof controller['setStatus'] === 'function') { + controller.setStatus(undefined); + } + + await templateService.apiHandler({ + methodName: 'getEmptyIndexForBSLC', + controller, + response, + next, + validatedArgs, + successStatus: undefined, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa app.post('/transactions/endorse', authenticateMiddleware([{"apiKey":[]}]), ...(fetchMiddlewares(EndorserTransactionController)), @@ -4234,6 +4377,42 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/credentials/:credentialRecordId/form-data', + authenticateMiddleware([{"apiKey":[]}]), + ...(fetchMiddlewares(CredentialController)), + ...(fetchMiddlewares(CredentialController.prototype.credentialFormData)), + + async function CredentialController_credentialFormData(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + credentialRecordId: {"in":"path","name":"credentialRecordId","required":true,"dataType":"string"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; + + const controller: any = await container.get(CredentialController); + if (typeof controller['setStatus'] === 'function') { + controller.setStatus(undefined); + } + + await templateService.apiHandler({ + methodName: 'credentialFormData', + controller, + response, + next, + validatedArgs, + successStatus: undefined, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa app.get('/connections', authenticateMiddleware([{"apiKey":[]}]), ...(fetchMiddlewares(ConnectionController)), @@ -4822,4 +5001,4 @@ export function RegisterRoutes(app: Router) { // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa } -// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa \ No newline at end of file +// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa diff --git a/src/routes/swagger.json b/src/routes/swagger.json index b2137d50..d4d005e5 100644 --- a/src/routes/swagger.json +++ b/src/routes/swagger.json @@ -941,7 +941,6 @@ } }, "required": [ - "keyType", "method" ], "type": "object", @@ -1379,7 +1378,8 @@ }, "credentialSubject": { "$ref": "#/components/schemas/SingleOrArray_JsonObject_" - } + }, + "prettyVc": {} }, "required": [ "@context", @@ -2585,6 +2585,56 @@ "type": "object", "additionalProperties": false }, + "CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array.proposal_": { + "properties": {}, + "type": "object", + "description": "Get the format data payload for a specific message from a list of CredentialFormat interfaces and a message\n\nFor an indy offer, this resolves to the cred abstract format as defined here:\nhttps://github.com/hyperledger/aries-rfcs/tree/b3a3942ef052039e73cd23d847f42947f8287da2/features/0592-indy-attachments#cred-abstract-format" + }, + "CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array.offer_": { + "properties": {}, + "type": "object", + "description": "Get the format data payload for a specific message from a list of CredentialFormat interfaces and a message\n\nFor an indy offer, this resolves to the cred abstract format as defined here:\nhttps://github.com/hyperledger/aries-rfcs/tree/b3a3942ef052039e73cd23d847f42947f8287da2/features/0592-indy-attachments#cred-abstract-format" + }, + "CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array.request_": { + "properties": {}, + "type": "object", + "description": "Get the format data payload for a specific message from a list of CredentialFormat interfaces and a message\n\nFor an indy offer, this resolves to the cred abstract format as defined here:\nhttps://github.com/hyperledger/aries-rfcs/tree/b3a3942ef052039e73cd23d847f42947f8287da2/features/0592-indy-attachments#cred-abstract-format" + }, + "CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array.credential_": { + "properties": {}, + "type": "object", + "description": "Get the format data payload for a specific message from a list of CredentialFormat interfaces and a message\n\nFor an indy offer, this resolves to the cred abstract format as defined here:\nhttps://github.com/hyperledger/aries-rfcs/tree/b3a3942ef052039e73cd23d847f42947f8287da2/features/0592-indy-attachments#cred-abstract-format" + }, + "GetCredentialFormatDataReturn__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array_": { + "properties": { + "credential": { + "$ref": "#/components/schemas/CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array.credential_" + }, + "request": { + "$ref": "#/components/schemas/CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array.request_" + }, + "offerAttributes": { + "items": { + "$ref": "#/components/schemas/CredentialPreviewAttributeOptions" + }, + "type": "array" + }, + "offer": { + "$ref": "#/components/schemas/CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array.offer_" + }, + "proposal": { + "$ref": "#/components/schemas/CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array.proposal_" + }, + "proposalAttributes": { + "items": { + "$ref": "#/components/schemas/CredentialPreviewAttributeOptions" + }, + "type": "array" + } + }, + "type": "object", + "description": "Get format data return value. Each key holds a mapping of credential format key to format data." + }, "BasicMessageRecord": { "$ref": "#/components/schemas/Record_string.unknown_" }, @@ -2624,7 +2674,7 @@ }, "info": { "title": "credo-controller", - "version": "0.9.4", + "version": "2.0.0", "description": "Rest endpoint wrapper for using your agent over HTTP", "license": { "name": "Apache-2.0" @@ -2890,26 +2940,11 @@ "application/json": { "schema": { "properties": { - "recipientKey": { - "anyOf": [ - { - "properties": { - "recipientKey": {} - }, - "type": "object" - }, - { - "properties": { - "recipientKey": { - "type": "string" - } - }, - "required": [ - "recipientKey" - ], - "type": "object" - } - ] + "proofRecordThId": { + "type": "string" + }, + "invitationDid": { + "type": "string" }, "outOfBandRecord": { "$ref": "#/components/schemas/Record_string.unknown_" @@ -2922,7 +2957,8 @@ } }, "required": [ - "recipientKey", + "proofRecordThId", + "invitationDid", "outOfBandRecord", "invitation", "invitationUrl" @@ -4860,7 +4896,7 @@ } } }, - "/multi-tenancy/polygon-wc3/schema/{tenantId}": { + "/multi-tenancy/polygon-w3c/schema/{tenantId}": { "post": { "operationId": "CreatePolygonW3CSchema", "responses": { @@ -4923,7 +4959,7 @@ } } }, - "/multi-tenancy/polygon-wc3/schema/{did}/{schemaId}/{tenantId}": { + "/multi-tenancy/polygon-w3c/schema/{did}/{schemaId}/{tenantId}": { "get": { "operationId": "GetPolygonW3CSchemaById", "responses": { @@ -5392,6 +5428,47 @@ ] } }, + "/multi-tenancy/credentials/form-data/{tenantId}/{credentialRecordId}": { + "get": { + "operationId": "CredentialFormData", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": {} + } + } + } + }, + "tags": [ + "MultiTenancy" + ], + "security": [ + { + "apiKey": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "credentialRecordId", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, "/multi-tenancy/proofs/{tenantId}": { "get": { "operationId": "GetAllProofs", @@ -6259,6 +6336,110 @@ } } }, + "/multi-tenancy/create-bslc/{tenantId}": { + "post": { + "operationId": "CreateBitstringStatusListCredential", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": {} + } + } + } + }, + "description": "Create bitstring status list credential", + "tags": [ + "MultiTenancy" + ], + "security": [ + { + "apiKey": [] + } + ], + "parameters": [ + { + "description": "Id of the tenant", + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "BSLC required details", + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "verificationMethod": { + "type": "string" + }, + "statusPurpose": { + "type": "string" + }, + "issuerDID": { + "type": "string" + } + }, + "required": [ + "verificationMethod", + "statusPurpose", + "issuerDID" + ], + "type": "object", + "description": "BSLC required details" + } + } + } + } + } + }, + "/multi-tenancy/get-empty-index/{BSLCUrl}": { + "post": { + "operationId": "GetEmptyIndexForBSLC", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "properties": { + "index": {} + }, + "required": [ + "index" + ], + "type": "object" + } + } + } + } + }, + "tags": [ + "MultiTenancy" + ], + "security": [ + { + "apiKey": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "BSLCUrl", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, "/transactions/endorse": { "post": { "operationId": "EndorserTransaction", @@ -7261,26 +7442,14 @@ "application/json": { "schema": { "properties": { - "recipientKey": { - "anyOf": [ - { - "properties": { - "recipientKey": {} - }, - "type": "object" - }, - { - "properties": { - "recipientKey": { - "type": "string" - } - }, - "required": [ - "recipientKey" - ], - "type": "object" - } - ] + "invitationDid": { + "type": "string" + }, + "credentialRequestThId": { + "type": "string" + }, + "outOfBandRecordId": { + "type": "string" }, "outOfBandRecord": { "$ref": "#/components/schemas/Record_string.unknown_" @@ -7293,7 +7462,9 @@ } }, "required": [ - "recipientKey", + "invitationDid", + "credentialRequestThId", + "outOfBandRecordId", "outOfBandRecord", "invitation", "invitationUrl" @@ -7508,6 +7679,42 @@ } } }, + "/credentials/{credentialRecordId}/form-data": { + "get": { + "operationId": "CredentialFormData", + "responses": { + "200": { + "description": "credentialRecord", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetCredentialFormatDataReturn__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array_" + } + } + } + } + }, + "description": "Return credentialRecord", + "tags": [ + "Credentials" + ], + "security": [ + { + "apiKey": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "credentialRecordId", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, "/connections": { "get": { "operationId": "GetAllConnections", diff --git a/yarn.lock b/yarn.lock index c7958edd..ecea63bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2259,6 +2259,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.66.tgz#dd035d409df322acc83dff62a602f12a5783bbb3" integrity sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw== +"@types/pako@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@types/pako/-/pako-2.0.3.tgz#b6993334f3af27c158f3fe0dfeeba987c578afb1" + integrity sha512-bq0hMV9opAcrmE0Byyo0fY3Ew4tgOevJmQ9grUhpXQhYfyLJ1Kqg3P33JT5fdbT2AjeAjR51zqqVjAL/HMkx7Q== + "@types/qs@*": version "6.9.15" resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.15.tgz#adde8a060ec9c305a82de1babc1056e73bd64dce" @@ -2359,7 +2364,7 @@ "@types/express" "*" "@types/serve-static" "*" -"@types/uuid@^8.3.4": +"@types/uuid@8.3.4", "@types/uuid@^8.3.4": version "8.3.4" resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.4.tgz#bd86a43617df0594787d38b735f55c805becf1bc" integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw== @@ -6410,7 +6415,7 @@ package-json-from-dist@^1.0.0: resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz#e501cd3094b278495eb4258d4c9f6d5ac3019f00" integrity sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw== -pako@^2.0.4: +pako@^2.0.4, pako@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/pako/-/pako-2.1.0.tgz#266cc37f98c7d883545d11335c00fbd4062c9a86" integrity sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug== @@ -7653,7 +7658,7 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== -"uuid@^7.0.0 || ^8.0.0": +uuid@8.3.2, "uuid@^7.0.0 || ^8.0.0": version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== @@ -7663,6 +7668,14 @@ uuid@^9.0.0, uuid@^9.0.1: resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== +uuidv4@^6.2.13: + version "6.2.13" + resolved "https://registry.yarnpkg.com/uuidv4/-/uuidv4-6.2.13.tgz#8f95ec5ef22d1f92c8e5d4c70b735d1c89572cb7" + integrity sha512-AXyzMjazYB3ovL3q051VLH06Ixj//Knx7QnUSi1T//Ie3io6CpsPu9nVMOx5MoLWh6xV0B9J0hIaxungxXUbPQ== + dependencies: + "@types/uuid" "8.3.4" + uuid "8.3.2" + v8-compile-cache-lib@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" @@ -7912,3 +7925,8 @@ yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== + +zlib@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/zlib/-/zlib-1.0.5.tgz#6e7c972fc371c645a6afb03ab14769def114fcc0" + integrity sha512-40fpE2II+Cd3k8HWTWONfeKE2jL+P42iWJ1zzps5W51qcTsOUKM5Q5m2PFb0CLxlmFAaUuUdJGc3OfZy947v0w== From 7b978c9be2db86caecce6ae4ce056566aa4f4a10 Mon Sep 17 00:00:00 2001 From: Tipu_Singh Date: Mon, 31 Mar 2025 13:09:31 +0530 Subject: [PATCH 6/8] refactor: removed revocation code Signed-off-by: Tipu_Singh Signed-off-by: Sahil Kamble --- .../credentials/CredentialController.ts | 145 ----------------- .../multi-tenancy/MultiTenancyController.ts | 146 ------------------ src/routes/routes.ts | 73 --------- src/routes/swagger.json | 104 ------------- 4 files changed, 468 deletions(-) diff --git a/src/controllers/credentials/CredentialController.ts b/src/controllers/credentials/CredentialController.ts index f21bb484..41fb3c1d 100644 --- a/src/controllers/credentials/CredentialController.ts +++ b/src/controllers/credentials/CredentialController.ts @@ -13,11 +13,8 @@ import { CredentialRole, createPeerDidDocumentFromServices, PeerDidNumAlgo, - ClaimFormat, } from '@credo-ts/core' -import axios from 'axios' import { injectable } from 'tsyringe' -import { v4 as uuidv4 } from 'uuid' import ErrorHandlingService from '../../errorHandlingService' import { CredentialExchangeRecordExample, RecordId } from '../examples' @@ -33,15 +30,6 @@ import { ThreadId, } from '../types' -import { initialBitsEncoded } from 'src/constants' -import { - CredentialContext, - CredentialStatusListType, - CredentialType, - RevocationListType, - SignatureType, -} from 'src/enums/enum' -import { BadRequestError, InternalServerError } from 'src/errors' import { Body, Controller, Get, Path, Post, Route, Tags, Example, Query, Security } from 'tsoa' @Tags('Credentials') @@ -326,137 +314,4 @@ export class CredentialController extends Controller { throw ErrorHandlingService.handle(error) } } - - /** - * Create bitstring status list credential - * - * @param tenantId Id of the tenant - * @param request BSLC required details - */ - @Security('apiKey') - @Post('/create-bslc') - public async createBitstringStatusListCredential( - @Path('tenantId') tenantId: string, - @Body() request: { issuerDID: string; statusPurpose: string; verificationMethod: string } - ) { - try { - const { issuerDID, statusPurpose, verificationMethod } = request - const bslcId = uuidv4() - const credentialpayload = { - '@context': [`${CredentialContext.V1}`, `${CredentialContext.V2}`], - id: `${process.env.BSLC_SERVER_URL}/bitstring/${bslcId}`, - type: [`${CredentialType.VerifiableCredential}`, `${CredentialType.BitstringStatusListCredential}`], - issuer: { - id: issuerDID as string, - }, - issuanceDate: new Date().toISOString(), - credentialSubject: { - id: `${process.env.BSLC_SERVER_URL}/bitstring/${bslcId}`, - type: `${RevocationListType.Bitstring}`, - statusPurpose: statusPurpose, - encodedList: initialBitsEncoded, - }, - credentialStatus: { - id: `${process.env.BSLC_SERVER_URL}/bitstring/${bslcId}`, - type: CredentialStatusListType.CredentialStatusList2017, - }, - } - - let signedCredential - // Step 2: Sign the payload - try { - //TODO: Add correct type here - signedCredential = await this.agent.w3cCredentials.signCredential({ - credential: credentialpayload, - format: ClaimFormat.LdpVc, - proofType: SignatureType.Ed25519Signature2018, - verificationMethod, - }) - } catch (signingError) { - throw new InternalServerError(`Failed to sign the BitstringStatusListCredential: ${signingError}`) - } - // Step 3: Upload the signed payload to the server - const serverUrl = process.env.BSLC_SERVER_URL - if (!serverUrl) { - throw new Error('BSLC_SERVER_URL is not defined in the environment variables') - } - - const token = process.env.BSLC_SERVER_TOKEN - if (!token) { - throw new Error('BSLC_SERVER_TOKEN is not defined in the environment variables') - } - const url = `${serverUrl}/bitstring` - const bslcPayload = { - id: bslcId, - bslcObject: signedCredential, - } - try { - const response = await axios.post(url, bslcPayload, { - headers: { - Accept: '*/*', - Authorization: `Bearer ${token}`, - 'Content-Type': 'application/json', - }, - }) - - if (response.status !== 200) { - throw new Error('Failed to upload the signed BitstringStatusListCredential') - } - } catch (error) { - throw new InternalServerError(`Error uploading the BitstringStatusListCredential: ${error}`) - } - return signedCredential - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } - - @Security('apiKey') - @Post('/get-empty-index/:BSLCUrl') - public async getEmptyIndexForBSLC(@Path('BSLCUrl') BSLCUrl: string) { - try { - if (!BSLCUrl) { - throw new BadRequestError('BSLCUrl is required') - } - - const response = await axios.get(BSLCUrl) - if (response.status !== 200) { - throw new Error('Failed to fetch the BitstringStatusListCredential') - } - - const credential = response.data - const encodedList = credential?.credentialSubject?.claims.encodedList - if (!encodedList) { - throw new Error('Encoded list not found in the credential') - } - - let bitstring - try { - const compressedData = Buffer.from(encodedList, 'base64').toString('binary') - bitstring = Array.from(compressedData) - .map((byte) => byte.padStart(8, '0')) - .join('') - } catch (error) { - throw new Error('Failed to decompress and process the encoded list') - } - - const unusedIndexes = [] - for (let i = 0; i < bitstring.length; i++) { - if (bitstring[i] === '0') { - unusedIndexes.push(i) - } - } - //TODO: add logic to filter from used indexs, for now returning random index with bit status as 0. - if (unusedIndexes.length === 0) { - throw new Error('No unused index found in the BitstringStatusList') - } - - const randomIndex = unusedIndexes[Math.floor(Math.random() * unusedIndexes.length)] - return { - index: randomIndex, - } - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } } diff --git a/src/controllers/multi-tenancy/MultiTenancyController.ts b/src/controllers/multi-tenancy/MultiTenancyController.ts index ef40de97..739463d8 100644 --- a/src/controllers/multi-tenancy/MultiTenancyController.ts +++ b/src/controllers/multi-tenancy/MultiTenancyController.ts @@ -45,29 +45,19 @@ import { injectable, createPeerDidDocumentFromServices, PeerDidNumAlgo, - ClaimFormat, } from '@credo-ts/core' import { QuestionAnswerRole, QuestionAnswerState } from '@credo-ts/question-answer' import axios from 'axios' import * as fs from 'fs' -import { v4 as uuidv4 } from 'uuid' -// import * as zlib from 'zlib' -// import { inflate } from 'pako' -import { initialBitsEncoded } from '../../constants' import { - CredentialContext, CredentialEnum, - CredentialStatusListType, - CredentialType, DidMethod, EndorserMode, Network, NetworkTypes, - RevocationListType, Role, SchemaError, - SignatureType, } from '../../enums/enum' import ErrorHandlingService from '../../errorHandlingService' import { ENDORSER_DID_NOT_PRESENT } from '../../errorMessages' @@ -1923,140 +1913,4 @@ export class MultiTenancyController extends Controller { throw ErrorHandlingService.handle(error) } } - - /** - * Create bitstring status list credential - * - * @param tenantId Id of the tenant - * @param request BSLC required details - */ - @Security('apiKey') - @Post('/create-bslc/:tenantId') - public async createBitstringStatusListCredential( - @Path('tenantId') tenantId: string, - @Body() request: { issuerDID: string; statusPurpose: string, verificationMethod:string } - ) { - try { - const { issuerDID, statusPurpose, verificationMethod } = request - const bslcId = uuidv4() - const credentialpayload = { - '@context': [`${CredentialContext.V1}`, `${CredentialContext.V2}`], - id: `${process.env.BSLC_SERVER_URL}/bitstring/${bslcId}`, - type: [`${CredentialType.VerifiableCredential}`, `${CredentialType.BitstringStatusListCredential}`], - issuer: { - id: issuerDID as string, - }, - issuanceDate: new Date().toISOString(), - credentialSubject: { - id: `${process.env.BSLC_SERVER_URL}/bitstring/${bslcId}`, - type: `${RevocationListType.Bitstring}`, - statusPurpose: statusPurpose, - encodedList: initialBitsEncoded, - }, - credentialStatus: { - id: `${process.env.BSLC_SERVER_URL}/bitstring/${bslcId}`, - type: CredentialStatusListType.CredentialStatusList2017, - }, - } - - let signedCredential - - await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { - // Step 2: Sign the payload - try { - //TODO: Add correct type here - signedCredential = await tenantAgent.w3cCredentials.signCredential({ - credential: credentialpayload, - format: ClaimFormat.LdpVc, - proofType: SignatureType.Ed25519Signature2018, - verificationMethod, - }) - } catch (signingError) { - throw new InternalServerError(`Failed to sign the BitstringStatusListCredential: ${signingError}`) - } - }) - // Step 3: Upload the signed payload to the server - const serverUrl = process.env.BSLC_SERVER_URL - if (!serverUrl) { - throw new Error('BSLC_SERVER_URL is not defined in the environment variables') - } - - const token = process.env.BSLC_SERVER_TOKEN - if (!token) { - throw new Error('BSLC_SERVER_TOKEN is not defined in the environment variables') - } - const url = `${serverUrl}/bitstring` - const bslcPayload = { - id: bslcId, - bslcObject: signedCredential, - } - try { - const response = await axios.post(url, bslcPayload, { - headers: { - Accept: '*/*', - Authorization: `Bearer ${token}`, - 'Content-Type': 'application/json', - }, - }) - - if (response.status !== 200) { - throw new Error('Failed to upload the signed BitstringStatusListCredential') - } - } catch (error) { - throw new InternalServerError(`Error uploading the BitstringStatusListCredential: ${error}`) - } - return signedCredential - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } - - @Security('apiKey') - @Post('/get-empty-index/:BSLCUrl') - public async getEmptyIndexForBSLC(@Path('BSLCUrl') BSLCUrl: string) { - try { - if (!BSLCUrl) { - throw new BadRequestError('BSLCUrl is required') - } - - const response = await axios.get(BSLCUrl) - if (response.status !== 200) { - throw new Error('Failed to fetch the BitstringStatusListCredential') - } - - const credential = response.data - const encodedList = credential?.credentialSubject?.claims.encodedList - if (!encodedList) { - throw new Error('Encoded list not found in the credential') - } - - let bitstring - try { - const compressedData = Buffer.from(encodedList, 'base64').toString('binary') - bitstring = Array.from(compressedData) - .map((byte) => byte.padStart(8, '0')) - .join('') - } catch (error) { - throw new Error('Failed to decompress and process the encoded list') - } - - const unusedIndexes = [] - for (let i = 0; i < bitstring.length; i++) { - if (bitstring[i] === '0') { - unusedIndexes.push(i) - } - } - //TODO: add logic to filter from used indexs, for now returning random index with bit status as 0. - if (unusedIndexes.length === 0) { - throw new Error('No unused index found in the BitstringStatusList') - } - - const randomIndex = unusedIndexes[Math.floor(Math.random() * unusedIndexes.length)] - return { - index: randomIndex, - } - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } } diff --git a/src/routes/routes.ts b/src/routes/routes.ts index 75c49301..4566e855 100644 --- a/src/routes/routes.ts +++ b/src/routes/routes.ts @@ -3546,79 +3546,6 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/multi-tenancy/create-bslc/:tenantId', - authenticateMiddleware([{"apiKey":[]}]), - ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.createBitstringStatusListCredential)), - - async function MultiTenancyController_createBitstringStatusListCredential(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - request: {"in":"body","name":"request","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"verificationMethod":{"dataType":"string","required":true},"statusPurpose":{"dataType":"string","required":true},"issuerDID":{"dataType":"string","required":true}}}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(MultiTenancyController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'createBitstringStatusListCredential', - controller, - response, - next, - validatedArgs, - successStatus: undefined, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/multi-tenancy/get-empty-index/:BSLCUrl', - authenticateMiddleware([{"apiKey":[]}]), - ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.getEmptyIndexForBSLC)), - - async function MultiTenancyController_getEmptyIndexForBSLC(request: ExRequest, response: ExResponse, next: any) { - const args: Record = { - BSLCUrl: {"in":"path","name":"BSLCUrl","required":true,"dataType":"string"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(MultiTenancyController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getEmptyIndexForBSLC', - controller, - response, - next, - validatedArgs, - successStatus: undefined, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa app.post('/transactions/endorse', authenticateMiddleware([{"apiKey":[]}]), ...(fetchMiddlewares(EndorserTransactionController)), diff --git a/src/routes/swagger.json b/src/routes/swagger.json index d4d005e5..8eea6fe5 100644 --- a/src/routes/swagger.json +++ b/src/routes/swagger.json @@ -6336,110 +6336,6 @@ } } }, - "/multi-tenancy/create-bslc/{tenantId}": { - "post": { - "operationId": "CreateBitstringStatusListCredential", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "description": "Create bitstring status list credential", - "tags": [ - "MultiTenancy" - ], - "security": [ - { - "apiKey": [] - } - ], - "parameters": [ - { - "description": "Id of the tenant", - "in": "path", - "name": "tenantId", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "BSLC required details", - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "verificationMethod": { - "type": "string" - }, - "statusPurpose": { - "type": "string" - }, - "issuerDID": { - "type": "string" - } - }, - "required": [ - "verificationMethod", - "statusPurpose", - "issuerDID" - ], - "type": "object", - "description": "BSLC required details" - } - } - } - } - } - }, - "/multi-tenancy/get-empty-index/{BSLCUrl}": { - "post": { - "operationId": "GetEmptyIndexForBSLC", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "properties": { - "index": {} - }, - "required": [ - "index" - ], - "type": "object" - } - } - } - } - }, - "tags": [ - "MultiTenancy" - ], - "security": [ - { - "apiKey": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "BSLCUrl", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, "/transactions/endorse": { "post": { "operationId": "EndorserTransaction", From 30e66677f17212f542fff42772755c3704ed5c2c Mon Sep 17 00:00:00 2001 From: Tipu_Singh Date: Mon, 31 Mar 2025 13:31:27 +0530 Subject: [PATCH 7/8] refactore: removed constant and enum Signed-off-by: Tipu_Singh Signed-off-by: Sahil Kamble --- src/constants.ts | 1 - src/enums/enum.ts | 22 +--------------------- 2 files changed, 1 insertion(+), 22 deletions(-) delete mode 100644 src/constants.ts diff --git a/src/constants.ts b/src/constants.ts deleted file mode 100644 index e7b4b011..00000000 --- a/src/constants.ts +++ /dev/null @@ -1 +0,0 @@ -export const initialBitsEncoded = `uH4sIAAAAAAAAA-3BMQEAAADCoPVPbQwfoAAAAAAAAAAAAAAAAAAAAIC3AYbSVKsAQAAA` diff --git a/src/enums/enum.ts b/src/enums/enum.ts index 4d1f8f18..49f9e74f 100644 --- a/src/enums/enum.ts +++ b/src/enums/enum.ts @@ -70,24 +70,4 @@ export enum HttpStatusCode { export declare enum CustomHandshakeProtocol { DidExchange = 'https://didcomm.org/didexchange/1.1', Connections = 'https://didcomm.org/connections/1.0', -} - -export enum CredentialContext { - V1 = 'https://www.w3.org/2018/credentials/v1', - V2 = 'https://www.w3.org/ns/credentials/v2', -} - -export enum CredentialType { - VerifiableCredential = 'VerifiableCredential', - BitstringStatusListCredential = 'BitstringStatusListCredential', -} -export enum RevocationListType { - Bitstring = 'BitstringStatusList', -} - -export enum CredentialStatusListType { - CredentialStatusList2017 = 'CredentialStatusList2017', -} -export enum SignatureType { - Ed25519Signature2018 = 'Ed25519Signature2018', -} +} \ No newline at end of file From 5556b5bb4d97dcb4ab32378a0b4527245ab49f14 Mon Sep 17 00:00:00 2001 From: bhavanakarwade Date: Fri, 25 Apr 2025 17:04:40 +0530 Subject: [PATCH 8/8] chore: Update Dockerfile (#256) (#266) feat: push docker image (#257) * feat: added yml file to push docker images to github * feat: added yml file to push docker images to github * fix: updated cicd.yml file * fix: renamed yml file --------- feat:w3c-revocation refactor: removed revocation code refactore: removed constant and enum chore: remove unnecessary package chore: remove unwanted files chore: remove unwanted files chore: remove unwanted files Signed-off-by: bhavanakarwade Co-authored-by: KambleSahil3 --- package.json | 4 +--- src/enums/enum.ts | 2 +- yarn.lock | 9 ++------- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index a0422ddf..ed4f9a66 100644 --- a/package.json +++ b/package.json @@ -54,8 +54,8 @@ "@tsoa/runtime": "^6.0.0", "@types/node-fetch": "^2.6.4", "@types/ref-struct-di": "^1.1.9", - "@types/ws": "^8.5.4", "@types/uuid": "^8.3.3", + "@types/ws": "^8.5.4", "axios": "^1.4.0", "body-parser": "^1.20.0", "cors": "^2.8.5", @@ -65,7 +65,6 @@ "joi": "^17.12.3", "jsonwebtoken": "^9.0.2", "node-fetch": "^2.6.7", - "pako": "^2.1.0", "patch-package": "^8.0.0", "postinstall-postinstall": "^2.1.0", "reflect-metadata": "^0.1.13", @@ -86,7 +85,6 @@ "@types/jsonwebtoken": "^9.0.5", "@types/multer": "^1.4.7", "@types/node": "^18.18.8", - "@types/pako": "^2.0.3", "@types/ref-array-di": "^1.2.8", "@types/ref-struct-di": "^1.1.9", "@types/supertest": "^2.0.12", diff --git a/src/enums/enum.ts b/src/enums/enum.ts index 49f9e74f..6468e3af 100644 --- a/src/enums/enum.ts +++ b/src/enums/enum.ts @@ -70,4 +70,4 @@ export enum HttpStatusCode { export declare enum CustomHandshakeProtocol { DidExchange = 'https://didcomm.org/didexchange/1.1', Connections = 'https://didcomm.org/connections/1.0', -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index ecea63bd..17787e3e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2259,11 +2259,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.66.tgz#dd035d409df322acc83dff62a602f12a5783bbb3" integrity sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw== -"@types/pako@^2.0.3": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@types/pako/-/pako-2.0.3.tgz#b6993334f3af27c158f3fe0dfeeba987c578afb1" - integrity sha512-bq0hMV9opAcrmE0Byyo0fY3Ew4tgOevJmQ9grUhpXQhYfyLJ1Kqg3P33JT5fdbT2AjeAjR51zqqVjAL/HMkx7Q== - "@types/qs@*": version "6.9.15" resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.15.tgz#adde8a060ec9c305a82de1babc1056e73bd64dce" @@ -2364,7 +2359,7 @@ "@types/express" "*" "@types/serve-static" "*" -"@types/uuid@8.3.4", "@types/uuid@^8.3.4": +"@types/uuid@8.3.4", "@types/uuid@^8.3.3": version "8.3.4" resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.4.tgz#bd86a43617df0594787d38b735f55c805becf1bc" integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw== @@ -6415,7 +6410,7 @@ package-json-from-dist@^1.0.0: resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz#e501cd3094b278495eb4258d4c9f6d5ac3019f00" integrity sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw== -pako@^2.0.4, pako@^2.1.0: +pako@^2.0.4: version "2.1.0" resolved "https://registry.yarnpkg.com/pako/-/pako-2.1.0.tgz#266cc37f98c7d883545d11335c00fbd4062c9a86" integrity sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==