From 303c9cfb32c5f357ab7cbeee1d0a876385f67b04 Mon Sep 17 00:00:00 2001 From: Krishna Waske Date: Thu, 4 Dec 2025 15:41:14 +0530 Subject: [PATCH 01/38] fix: changes for types Signed-off-by: Krishna Waske --- src/controllers/types.ts | 87 +++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 45 deletions(-) diff --git a/src/controllers/types.ts b/src/controllers/types.ts index 074afd93..32005d73 100644 --- a/src/controllers/types.ts +++ b/src/controllers/types.ts @@ -1,6 +1,6 @@ import type { RecordId } from './examples' import type { CustomHandshakeProtocol } from '../enums' -import type { AnonCredsCredentialFormat, LegacyIndyCredentialFormat } from '@credo-ts/anoncreds' +import type { AnonCredsCredentialDefinitionRecord, AnonCredsDidCommCredentialFormat, LegacyIndyCredentialFormat } from '@credo-ts/anoncreds' import type { DidResolutionMetadata, DidDocumentMetadata, @@ -8,9 +8,7 @@ import type { DidDocument, DidRegistrationSecretOptions, InitConfig, - WalletConfig, DidResolutionOptions, - KeyType, JsonObject, W3cJsonLdVerifyCredentialOptions, DataIntegrityProofOptions, @@ -19,31 +17,30 @@ import type { W3cCredentialSubject, X509CertificateIssuerAndSubjectOptions, X509CreateCertificateOptions, + SingleOrArray, } from '@credo-ts/core' import type { - AutoAcceptCredential, - AutoAcceptProof, - JsonLdCredentialFormat, JsonCredential, - AgentMessage, - Routing, - Attachment, - CredentialExchangeRecord, - ProofExchangeRecord, - ProofFormat, - CredentialFormatPayload, - HandshakeProtocol, ReceiveOutOfBandInvitationConfig, OutOfBandDidCommService, + DidCommCredentialFormatPayload, + DidCommAutoAcceptCredential, + DidCommProofExchangeRecord, + DidCommJsonLdCredentialFormat, + DidCommCredentialExchangeRecord, + DidCommAutoAcceptProof, + DidCommHandshakeProtocol, + DidCommMessage, + DidCommRouting, + DidCommAttachment, } from '@credo-ts/didcomm' -import type { LinkedDataProofOptions } from '@credo-ts/core/build/modules/vc/data-integrity/models/LinkedDataProof' -import type { SingleOrArray } from '@credo-ts/core/build/utils' import type { DIDDocument } from 'did-resolver' +import { KeyType } from '@credo-ts/core/build/crypto/webcrypto/types.mjs' +import { LinkedDataProofOptions } from '@credo-ts/core/build/modules/vc/data-integrity/models/LinkedDataProof.mjs' -export type CustomTenantConfig = Pick & { +export type CustomTenantConfig = {label: string} & { connectionImageUrl?: string - walletConfig: Pick } export interface AgentInfo { @@ -71,11 +68,11 @@ export interface DidResolutionResultProps { export interface ProofRequestMessageResponse { message: string - proofRecord: ProofExchangeRecord + proofRecord: DidCommProofExchangeRecord } // type CredentialFormats = [CredentialFormat] -type CredentialFormats = [LegacyIndyCredentialFormat, AnonCredsCredentialFormat, JsonLdCredentialFormat] +type CredentialFormats = [LegacyIndyCredentialFormat, AnonCredsDidCommCredentialFormat, DidCommJsonLdCredentialFormat] enum ProtocolVersion { v1 = 'v1', @@ -83,8 +80,8 @@ enum ProtocolVersion { } export interface ProposeCredentialOptions { protocolVersion: ProtocolVersion - credentialFormats: CredentialFormatPayload - autoAcceptCredential?: AutoAcceptCredential + credentialFormats: DidCommCredentialFormatPayload + autoAcceptCredential?: DidCommAutoAcceptCredential comment?: string connectionId: RecordId } @@ -92,32 +89,32 @@ export interface ProposeCredentialOptions { // export interface ProposeCredentialOptions extends BaseOptions { // connectionId: string // protocolVersion: CredentialProtocolVersionType -// credentialFormats: CredentialFormatPayload, 'createProposal'> +// credentialFormats: DidCommCredentialFormatPayload, 'createProposal'> // } export interface AcceptCredentialProposalOptions { credentialRecordId: string - credentialFormats?: CredentialFormatPayload - autoAcceptCredential?: AutoAcceptCredential + credentialFormats?: DidCommCredentialFormatPayload + autoAcceptCredential?: DidCommAutoAcceptCredential comment?: string } export interface CreateOfferOptions { protocolVersion: ProtocolVersion connectionId: RecordId - credentialFormats: CredentialFormatPayload - autoAcceptCredential?: AutoAcceptCredential + credentialFormats: DidCommCredentialFormatPayload + autoAcceptCredential?: DidCommAutoAcceptCredential comment?: string goalCode?: string goal?: string } -type CredentialFormatType = LegacyIndyCredentialFormat | JsonLdCredentialFormat | AnonCredsCredentialFormat +type CredentialFormatType = LegacyIndyCredentialFormat | DidCommJsonLdCredentialFormat | AnonCredsDidCommCredentialFormat export interface CreateOfferOobOptions { protocolVersion: string - credentialFormats: CredentialFormatPayload - autoAcceptCredential?: AutoAcceptCredential + credentialFormats: DidCommCredentialFormatPayload + autoAcceptCredential?: DidCommAutoAcceptCredential comment?: string goalCode?: string parentThreadId?: string @@ -128,7 +125,7 @@ export interface CreateOfferOobOptions { invitationDid?: string } export interface CredentialCreateOfferOptions { - credentialRecord: CredentialExchangeRecord + credentialRecord: DidCommCredentialExchangeRecord credentialFormats: JsonCredential options: any attachmentId?: string @@ -140,7 +137,7 @@ export interface CreateProofRequestOobOptions { goalCode?: string parentThreadId?: string willConfirm?: boolean - autoAcceptProof?: AutoAcceptProof + autoAcceptProof?: DidCommAutoAcceptProof comment?: string label?: string imageUrl?: string @@ -158,7 +155,7 @@ export interface OfferCredentialOptions { }[] } } - autoAcceptCredential?: AutoAcceptCredential + autoAcceptCredential?: DidCommAutoAcceptCredential comment?: string connectionId: string } @@ -184,15 +181,15 @@ export interface AcceptCredential { export interface CredentialOfferOptions { credentialRecordId: RecordId - credentialFormats?: CredentialFormatPayload - autoAcceptCredential?: AutoAcceptCredential + credentialFormats?: DidCommCredentialFormatPayload + autoAcceptCredential?: DidCommAutoAcceptCredential comment?: string } export interface AcceptCredentialRequestOptions { credentialRecordId: RecordId - credentialFormats?: CredentialFormatPayload - autoAcceptCredential?: AutoAcceptCredential + credentialFormats?: DidCommCredentialFormatPayload + autoAcceptCredential?: DidCommAutoAcceptCredential comment?: string } @@ -245,7 +242,7 @@ export interface ConnectionInvitationSchema { // // TODO: added indy proof formate // proofFormats: ProofFormatPayload<[IndyProofFormat], 'createRequest'> // comment: string -// autoAcceptProof?: AutoAcceptProof +// autoAcceptProof?: DidCommAutoAcceptProof // parentThreadId?: string // } @@ -254,7 +251,7 @@ export interface RequestProofOptions { protocolVersion: string proofFormats: any comment: string - autoAcceptProof: AutoAcceptProof + autoAcceptProof: DidCommAutoAcceptProof goalCode?: string parentThreadId?: string willConfirm?: boolean @@ -266,7 +263,7 @@ export interface RequestProofProposalOptions { proofFormats: any goalCode?: string parentThreadId?: string - autoAcceptProof?: AutoAcceptProof + autoAcceptProof?: DidCommAutoAcceptProof comment?: string } @@ -274,7 +271,7 @@ export interface AcceptProofProposal { proofRecordId: string proofFormats: any comment?: string - autoAcceptProof?: AutoAcceptProof + autoAcceptProof?: DidCommAutoAcceptProof goalCode?: string willConfirm?: boolean } @@ -337,12 +334,12 @@ export interface CreateInvitationOptions { goalCode?: string goal?: string handshake?: boolean - handshakeProtocols?: HandshakeProtocol[] - messages?: AgentMessage[] + handshakeProtocols?: DidCommHandshakeProtocol[] + messages?: DidCommMessage[] multiUseInvitation?: boolean autoAcceptConnection?: boolean - routing?: Routing - appendedAttachments?: Attachment[] + routing?: DidCommRouting + appendedAttachments?: DidCommAttachment[] invitationDid?: string } From 534d7ea9738051387d078519b40f7a52d3ff1c80 Mon Sep 17 00:00:00 2001 From: Krishna Waske Date: Mon, 8 Dec 2025 16:08:49 +0530 Subject: [PATCH 02/38] fix: version update and types update Signed-off-by: Krishna Waske --- package.json | 23 ++++---- src/authentication.ts | 4 +- src/controllers/examples.ts | 58 +++++++++---------- src/events/BasicMessageEvents.ts | 4 +- src/events/ConnectionEvents.ts | 4 +- src/events/CredentialEvents.ts | 6 +- src/events/ProofEvents.ts | 4 +- src/events/ReuseConnectionEvents.ts | 4 +- src/events/openId4VcIssuanceSessionEvents.ts | 2 - .../openId4VcVerificationSessionEvents.ts | 2 - src/server.ts | 2 +- src/types/request.d.ts | 2 +- src/utils/helpers.ts | 3 +- 13 files changed, 57 insertions(+), 61 deletions(-) diff --git a/package.json b/package.json index c9ddf7b9..d7c92fff 100644 --- a/package.json +++ b/package.json @@ -40,17 +40,16 @@ }, "dependencies": { "@ayanworks/credo-polygon-w3c-module": "1.0.1-alpha.1", - "@credo-ts/anoncreds": "0.6.0-alpha-20250325224513", - "@credo-ts/askar": "0.6.0-alpha-20250325224513", - "@credo-ts/core": "0.6.0-alpha-20250325224513", - "@credo-ts/indy-vdr": "0.6.0-alpha-20250325224513", - "@credo-ts/node": "^0.6.0-alpha-20250325224513", - "@credo-ts/openid4vc": "0.6.0-alpha-20250325224513", + "@credo-ts/anoncreds": "0.6.0", + "@credo-ts/askar": "0.6.0", + "@credo-ts/core": "0.6.0", + "@credo-ts/indy-vdr": "0.6.0", + "@credo-ts/node": "^0.6.0", + "@credo-ts/openid4vc": "0.6.0", "@credo-ts/push-notifications": "^0.7.1", - "@credo-ts/question-answer": "0.6.0-alpha-20250325224513", - "@credo-ts/tenants": "0.6.0-alpha-20250325224513", + "@credo-ts/question-answer": "0.6.0", + "@credo-ts/tenants": "0.6.0", "@hyperledger/anoncreds-nodejs": "0.3.1", - "@openwallet-foundation/askar-nodejs": "^0.3.2", "@hyperledger/indy-vdr-nodejs": "0.2.2", "@opentelemetry/api": "^1.9.0", "@opentelemetry/exporter-logs-otlp-http": "^0.202.0", @@ -62,6 +61,7 @@ "@opentelemetry/sdk-logs": "^0.202.0", "@opentelemetry/sdk-node": "^0.202.0", "@opentelemetry/semantic-conventions": "^1.34.0", + "@openwallet-foundation/askar-nodejs": "^0.3.2", "@tsoa/runtime": "^6.6.0", "@types/node-fetch": "^2.6.4", "@types/ref-struct-di": "^1.1.12", @@ -82,6 +82,7 @@ "tslog": "^3.3.3", "tsoa": "^6.0.1", "tsyringe": "^4.8.0", + "uuid": "^13.0.0", "ws": "^8.18.2", "yargs": "^17.7.2" }, @@ -116,7 +117,7 @@ "typescript": "^5.8.3" }, "resolutions": { - "@credo-ts/core": "0.6.0-alpha-20250325224513", - "@credo-ts/askar": "0.6.0-alpha-20250325224513" + "@credo-ts/core": "0.6.0", + "@credo-ts/askar": "0.6.0" } } diff --git a/src/authentication.ts b/src/authentication.ts index e41e49bf..29a7e939 100644 --- a/src/authentication.ts +++ b/src/authentication.ts @@ -1,15 +1,15 @@ import type { RestAgentModules, RestMultiTenantAgentModules } from './cliAgent' -import type { TenantAgent } from '@credo-ts/tenants/build/TenantAgent' import type { Request } from 'express' import { Agent, LogLevel } from '@credo-ts/core' -import { uuid } from '@credo-ts/core/build/utils/uuid' import jwt, { decode } from 'jsonwebtoken' import { container } from 'tsyringe' import { AgentRole, ErrorMessages, SCOPES } from './enums' import { StatusException } from './errors' import { TsLogger } from './utils/logger' +import { TenantAgent } from '@credo-ts/tenants' +import { randomUUID as uuid } from 'node:crypto' // export type AgentType = Agent | Agent | TenantAgent diff --git a/src/controllers/examples.ts b/src/controllers/examples.ts index d7094905..b6027fcf 100644 --- a/src/controllers/examples.ts +++ b/src/controllers/examples.ts @@ -1,17 +1,17 @@ import type { - ProofRole, - AutoAcceptProof, - BasicMessageRole, - CredentialState, - DidExchangeRole, - DidExchangeState, - OutOfBandInvitationOptions, - OutOfBandRecordProps, - ProofExchangeRecordProps, - ProofState, - OutOfBandRole, - OutOfBandState, - CredentialRole, + DidCommProofRole, + DidCommBasicMessageRole, + DidCommCredentialState, + DidCommDidExchangeRole, + DidCommDidExchangeState, + DidCommOutOfBandInvitationOptions, + DidCommOutOfBandRecordProps, + DidCommProofExchangeRecordProps, + DidCommProofState, + DidCommOutOfBandRole, + DidCommOutOfBandState, + DidCommCredentialRole, + DidCommAutoAcceptProof, } from '@credo-ts/didcomm' /** @@ -50,7 +50,7 @@ export const BasicMessageRecordExample = { content: 'string', sentTime: '2022-08-18T08:38:40.216Z', connectionId: '2aecf74c-3073-4f98-9acb-92415d096834', - role: 'sender' as BasicMessageRole, + role: 'sender' as DidCommBasicMessageRole, } export const ConnectionRecordExample = { @@ -58,18 +58,18 @@ export const ConnectionRecordExample = { invitationDid: 'did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119', did: 'did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv', - state: 'invitation-sent' as DidExchangeState, + state: 'invitation-sent' as DidCommDidExchangeState, invitationKey: '9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz', outOfBandId: 'edbc89fe-785f-4774-a288-46012486881d', verkey: '9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz', - role: 'responder' as DidExchangeRole, + role: 'responder' as DidCommDidExchangeRole, }, metadata: {}, id: '821f9b26-ad04-4f56-89b6-e2ef9c72b36e', createdAt: new Date('2022-01-01T00:00:00.000Z'), did: 'did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv', - state: 'invitation-sent' as DidExchangeState, - role: 'responder' as DidExchangeRole, + state: 'invitation-sent' as DidCommDidExchangeState, + role: 'responder' as DidCommDidExchangeRole, invitationDid: 'did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119', outOfBandId: 'edbc89fe-785f-4774-a288-46012486881d', @@ -121,9 +121,9 @@ export const DidRecordExample = { }, } -type OutOfBandRecordProperties = Omit +type OutOfBandRecordProperties = Omit export type OutOfBandInvitationProps = Omit< - OutOfBandInvitationOptions, + DidCommOutOfBandInvitationOptions, 'handshakeProtocols' | 'services' | 'appendedAttachments' > @@ -159,8 +159,8 @@ export const outOfBandRecordExample = { metadata: {}, id: '42a95528-0e30-4f86-a462-0efb02178b53', createdAt: new Date('2022-01-01T00:00:00.000Z'), - role: 'sender' as OutOfBandRole, - state: 'await-response' as OutOfBandState, + role: 'sender' as DidCommOutOfBandRole, + state: 'await-response' as DidCommOutOfBandState, reusable: false, } @@ -208,29 +208,29 @@ export const CredentialExchangeRecordExample = { credentials: [], id: '821f9b26-ad04-4f56-89b6-e2ef9c72b36e', createdAt: new Date('2022-01-01T00:00:00.000Z'), - state: 'offer-sent' as CredentialState, + state: 'offer-sent' as DidCommCredentialState, connectionId: 'ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b', threadId: '82701488-b43c-4d7b-9244-4bb204a7ae26', credentialAttributes: [], protocolVersion: 'v1', - role: 'issuer' as CredentialRole.Issuer, + role: 'issuer' as DidCommCredentialRole.Issuer, } export const ProofRecordExample = { _tags: { - state: 'proposal-sent' as ProofState, + state: 'proposal-sent' as DidCommProofState, threadId: '0019d466-5eea-4269-8c40-031b4896c5b7', connectionId: '2aecf74c-3073-4f98-9acb-92415d096834', - } as ProofExchangeRecordProps, + } as DidCommProofExchangeRecordProps, metadata: {}, id: '821f9b26-ad04-4f56-89b6-e2ef9c72b36e', createdAt: new Date('2022-01-01T00:00:00.000Z'), - state: 'proposal-sent' as ProofState, + state: 'proposal-sent' as DidCommProofState, connectionId: '2aecf74c-3073-4f98-9acb-92415d096834', threadId: '0019d466-5eea-4269-8c40-031b4896c5b7', - autoAcceptProof: 'always' as AutoAcceptProof, + autoAcceptProof: 'always' as DidCommAutoAcceptProof, protocolVersion: 'v1', - role: 'verifier' as ProofRole.Verifier, + role: 'verifier' as DidCommProofRole.Verifier, } export const SchemaExample = { diff --git a/src/events/BasicMessageEvents.ts b/src/events/BasicMessageEvents.ts index 73d3cb2a..93470d64 100644 --- a/src/events/BasicMessageEvents.ts +++ b/src/events/BasicMessageEvents.ts @@ -1,12 +1,12 @@ import type { ServerConfig } from '../utils/ServerConfig' import type { Agent } from '@credo-ts/core' -import { BasicMessageEventTypes,BasicMessageStateChangedEvent } from '@credo-ts/didcomm' +import { DidCommBasicMessageEventTypes,DidCommBasicMessageStateChangedEvent } from '@credo-ts/didcomm' import { sendWebSocketEvent } from './WebSocketEvents' import { sendWebhookEvent } from './WebhookEvent' export const basicMessageEvents = async (agent: Agent, config: ServerConfig) => { - agent.events.on(BasicMessageEventTypes.BasicMessageStateChanged, async (event: BasicMessageStateChangedEvent) => { + agent.events.on(DidCommBasicMessageEventTypes.DidCommBasicMessageStateChanged, async (event: DidCommBasicMessageStateChangedEvent) => { const record = event.payload.basicMessageRecord const body = record.toJSON() diff --git a/src/events/ConnectionEvents.ts b/src/events/ConnectionEvents.ts index 28451f06..ae8cda39 100644 --- a/src/events/ConnectionEvents.ts +++ b/src/events/ConnectionEvents.ts @@ -1,13 +1,13 @@ import type { ServerConfig } from '../utils/ServerConfig' import type { Agent } from '@credo-ts/core' -import { ConnectionEventTypes, ConnectionStateChangedEvent } from '@credo-ts/didcomm' +import { DidCommConnectionEventTypes, DidCommConnectionStateChangedEvent } from '@credo-ts/didcomm' import { sendWebSocketEvent } from './WebSocketEvents' import { sendWebhookEvent } from './WebhookEvent' export const connectionEvents = async (agent: Agent, config: ServerConfig) => { - agent.events.on(ConnectionEventTypes.ConnectionStateChanged, async (event: ConnectionStateChangedEvent) => { + agent.events.on(DidCommConnectionEventTypes.DidCommConnectionStateChanged, async (event: DidCommConnectionStateChangedEvent) => { const record = event.payload.connectionRecord const body = { ...record.toJSON(), ...event.metadata } diff --git a/src/events/CredentialEvents.ts b/src/events/CredentialEvents.ts index 41530e7e..d9b8cf14 100644 --- a/src/events/CredentialEvents.ts +++ b/src/events/CredentialEvents.ts @@ -2,14 +2,14 @@ import type { RestMultiTenantAgentModules } from '../cliAgent' import type { ServerConfig } from '../utils/ServerConfig' import type { Agent } from '@credo-ts/core' -import { CredentialEventTypes, CredentialStateChangedEvent } from '@credo-ts/didcomm' +import { DidCommCredentialEventTypes, DidCommCredentialStateChangedEvent } from '@credo-ts/didcomm' import { sendWebSocketEvent } from './WebSocketEvents' import { sendWebhookEvent } from './WebhookEvent' export const credentialEvents = async (agent: Agent, config: ServerConfig) => { - agent.events.on(CredentialEventTypes.CredentialStateChanged, async (event: CredentialStateChangedEvent) => { - const record = event.payload.credentialRecord + agent.events.on(DidCommCredentialEventTypes.DidCommCredentialStateChanged, async (event: DidCommCredentialStateChangedEvent) => { + const record = event.payload.credentialExchangeRecord const body: Record = { ...record.toJSON(), diff --git a/src/events/ProofEvents.ts b/src/events/ProofEvents.ts index 65ac477f..ad961675 100644 --- a/src/events/ProofEvents.ts +++ b/src/events/ProofEvents.ts @@ -1,12 +1,12 @@ import type { ServerConfig } from '../utils/ServerConfig' import type { Agent, } from '@credo-ts/core' -import { ProofStateChangedEvent, ProofEventTypes } from '@credo-ts/didcomm' +import { DidCommProofStateChangedEvent, DidCommProofEventTypes } from '@credo-ts/didcomm' import { sendWebSocketEvent } from './WebSocketEvents' import { sendWebhookEvent } from './WebhookEvent' export const proofEvents = async (agent: Agent, config: ServerConfig) => { - agent.events.on(ProofEventTypes.ProofStateChanged, async (event: ProofStateChangedEvent) => { + agent.events.on(DidCommProofEventTypes.ProofStateChanged, async (event: DidCommProofStateChangedEvent) => { const record = event.payload.proofRecord const body = { ...record.toJSON(), ...event.metadata } as { proofData?: any } if (event.metadata.contextCorrelationId !== 'default') { diff --git a/src/events/ReuseConnectionEvents.ts b/src/events/ReuseConnectionEvents.ts index 8865dd32..5ad47afc 100644 --- a/src/events/ReuseConnectionEvents.ts +++ b/src/events/ReuseConnectionEvents.ts @@ -1,13 +1,13 @@ import type { ServerConfig } from '../utils/ServerConfig' import type { Agent } from '@credo-ts/core' -import { OutOfBandEventTypes, HandshakeReusedEvent } from '@credo-ts/didcomm' +import { DidCommOutOfBandEventTypes, DidCommHandshakeReusedEvent } from '@credo-ts/didcomm' import { sendWebSocketEvent } from './WebSocketEvents' import { sendWebhookEvent } from './WebhookEvent' export const reuseConnectionEvents = async (agent: Agent, config: ServerConfig) => { - agent.events.on(OutOfBandEventTypes.HandshakeReused, async (event: HandshakeReusedEvent) => { + agent.events.on(DidCommOutOfBandEventTypes.HandshakeReused, async (event: DidCommHandshakeReusedEvent) => { const body = { ...event.payload.connectionRecord.toJSON(), outOfBandRecord: event.payload.outOfBandRecord.toJSON(), diff --git a/src/events/openId4VcIssuanceSessionEvents.ts b/src/events/openId4VcIssuanceSessionEvents.ts index 5e639ffb..291331a0 100644 --- a/src/events/openId4VcIssuanceSessionEvents.ts +++ b/src/events/openId4VcIssuanceSessionEvents.ts @@ -1,8 +1,6 @@ import type { ServerConfig } from '../utils/ServerConfig' import type { Agent } from '@credo-ts/core' -import { CredentialEventTypes, CredentialStateChangedEvent } from '@credo-ts/didcomm' - import { sendWebSocketEvent } from './WebSocketEvents' import { sendWebhookEvent } from './WebhookEvent' import { OpenId4VcIssuerEvents } from '@credo-ts/openid4vc' diff --git a/src/events/openId4VcVerificationSessionEvents.ts b/src/events/openId4VcVerificationSessionEvents.ts index 617ab0cb..4643b44d 100644 --- a/src/events/openId4VcVerificationSessionEvents.ts +++ b/src/events/openId4VcVerificationSessionEvents.ts @@ -1,8 +1,6 @@ import type { ServerConfig } from '../utils/ServerConfig' import type { Agent } from '@credo-ts/core' -import { CredentialEventTypes, CredentialStateChangedEvent } from '@credo-ts/didcomm' - import { sendWebSocketEvent } from './WebSocketEvents' import { sendWebhookEvent } from './WebhookEvent' import { OpenId4VcVerificationSessionStateChangedEvent, OpenId4VcVerifierEvents } from '@credo-ts/openid4vc' diff --git a/src/server.ts b/src/server.ts index 39ab1928..f94c23c6 100644 --- a/src/server.ts +++ b/src/server.ts @@ -7,7 +7,6 @@ import type { ServerConfig } from './utils/ServerConfig' import type { Response as ExResponse, Request as ExRequest, NextFunction, ErrorRequestHandler } from 'express' import { Agent } from '@credo-ts/core' -import { TenantAgent } from '@credo-ts/tenants/build/TenantAgent' import bodyParser from 'body-parser' import cors from 'cors' import dotenv from 'dotenv' @@ -31,6 +30,7 @@ import { RegisterRoutes } from './routes/routes' import { SecurityMiddleware } from './securityMiddleware' import { openId4VcIssuanceSessionEvents } from './events/openId4VcIssuanceSessionEvents' import { openId4VcVerificationSessionEvents } from './events/openId4VcVerificationSessionEvents' +import { TenantAgent } from '@credo-ts/tenants' dotenv.config() diff --git a/src/types/request.d.ts b/src/types/request.d.ts index 89841327..91ef0e3a 100644 --- a/src/types/request.d.ts +++ b/src/types/request.d.ts @@ -1,6 +1,6 @@ import type { RestAgentModules, RestMultiTenantAgentModules } from '../cliAgent' import type { Agent } from '@credo-ts/core' -import type { TenantAgent } from '@credo-ts/tenants/build/TenantAgent' +import type { TenantAgent } from '@credo-ts/tenants' // declare global { // namespace Express { diff --git a/src/utils/helpers.ts b/src/utils/helpers.ts index 89fbce33..fdee31ae 100644 --- a/src/utils/helpers.ts +++ b/src/utils/helpers.ts @@ -1,5 +1,4 @@ -import { JsonTransformer } from '@credo-ts/core' -import { JsonEncoder } from '@credo-ts/core/build/utils/JsonEncoder' +import { JsonEncoder, JsonTransformer } from '@credo-ts/core' import { randomBytes } from 'crypto' export function objectToJson(result: T) { From d36b26a7df49847f9bdbee7a0854bb625634463a Mon Sep 17 00:00:00 2001 From: Krishna Waske Date: Mon, 8 Dec 2025 18:06:45 +0530 Subject: [PATCH 03/38] fix: for now we'll delete all the patch and apply as required Signed-off-by: Krishna Waske --- ... model conflict in AnonCreds and DID.patch | 272 -- ...+001+fix: change version string type.patch | 21 + ...13+001+fix: message type for message.patch | 12 - ...+002+fix: change version string type.patch | 13 - ...0250325224513+003+sdjwt-presentation.patch | 14 - ...13+001+fix: message type for message.patch | 31 - ...prettyVc-in-JsonCredential-interface.patch | 12 - ...resentation to avoid abandoned issue.patch | 14 - yarn.lock | 2621 +++++++---------- 9 files changed, 1081 insertions(+), 1929 deletions(-) delete mode 100644 patches/@credo-ts+anoncreds+0.6.0-alpha-20250325224513+001+fix: extensible model conflict in AnonCreds and DID.patch create mode 100644 patches/@credo-ts+core+0.6.0+001+fix: change version string type.patch delete mode 100644 patches/@credo-ts+core+0.6.0-alpha-20250325224513+001+fix: message type for message.patch delete mode 100644 patches/@credo-ts+core+0.6.0-alpha-20250325224513+002+fix: change version string type.patch delete mode 100644 patches/@credo-ts+core+0.6.0-alpha-20250325224513+003+sdjwt-presentation.patch delete mode 100644 patches/@credo-ts+didcomm+0.6.0-alpha-20250325224513+001+fix: message type for message.patch delete mode 100644 patches/@credo-ts+didcomm+0.6.0-alpha-20250325224513+002+fix: added-prettyVc-in-JsonCredential-interface.patch delete mode 100644 patches/@credo-ts+didcomm+0.6.0-alpha-20250325224513+003+fix: commenting validationPresentation to avoid abandoned issue.patch diff --git a/patches/@credo-ts+anoncreds+0.6.0-alpha-20250325224513+001+fix: extensible model conflict in AnonCreds and DID.patch b/patches/@credo-ts+anoncreds+0.6.0-alpha-20250325224513+001+fix: extensible model conflict in AnonCreds and DID.patch deleted file mode 100644 index 1f00b40b..00000000 --- a/patches/@credo-ts+anoncreds+0.6.0-alpha-20250325224513+001+fix: extensible model conflict in AnonCreds and DID.patch +++ /dev/null @@ -1,272 +0,0 @@ -diff --git a/node_modules/@credo-ts/anoncreds/build/AnonCredsApi.d.ts b/node_modules/@credo-ts/anoncreds/build/AnonCredsApi.d.ts -index 9cbc1d8..ac26d6b 100644 ---- a/node_modules/@credo-ts/anoncreds/build/AnonCredsApi.d.ts -+++ b/node_modules/@credo-ts/anoncreds/build/AnonCredsApi.d.ts -@@ -2,7 +2,7 @@ import type { SimpleQuery } from '@credo-ts/core'; - import type { AnonCredsCreateLinkSecretOptions, AnonCredsRegisterCredentialDefinitionOptions, AnonCredsRegisterRevocationRegistryDefinitionOptions, AnonCredsRegisterRevocationStatusListOptions, AnonCredsUpdateRevocationStatusListOptions } from './AnonCredsApiOptions'; - import type { AnonCredsSchema } from './models'; - import type { GetCredentialDefinitionReturn, GetCredentialsOptions, GetRevocationRegistryDefinitionReturn, GetRevocationStatusListReturn, GetSchemaReturn, RegisterCredentialDefinitionReturn, RegisterRevocationRegistryDefinitionReturn, RegisterRevocationStatusListReturn, RegisterSchemaReturn } from './services'; --import type { Extensible } from './services/registry/base'; -+import type { CredoExtensible } from './services/registry/base'; - import { AgentContext } from '@credo-ts/core'; - import { AnonCredsModuleConfig } from './AnonCredsModuleConfig'; - import { AnonCredsCredentialDefinitionPrivateRepository, AnonCredsKeyCorrectnessProofRepository, AnonCredsLinkSecretRepository, AnonCredsRevocationRegistryDefinitionPrivateRepository, AnonCredsRevocationRegistryDefinitionRepository } from './repository'; -@@ -41,28 +41,28 @@ export declare class AnonCredsApi { - * with the {@link schemaId} - */ - getSchema(schemaId: string): Promise; -- registerSchema(options: AnonCredsRegisterSchema): Promise; -+ registerSchema(options: AnonCredsRegisterSchema): Promise; - getCreatedSchemas(query: SimpleQuery): Promise; - /** - * Retrieve a {@link GetCredentialDefinitionReturn} from the registry associated - * with the {@link credentialDefinitionId} - */ - getCredentialDefinition(credentialDefinitionId: string): Promise; -- registerCredentialDefinition(options: AnonCredsRegisterCredentialDefinition): Promise; -+ registerCredentialDefinition(options: AnonCredsRegisterCredentialDefinition): Promise; - getCreatedCredentialDefinitions(query: SimpleQuery): Promise; - /** - * Retrieve a {@link AnonCredsRevocationRegistryDefinition} from the registry associated - * with the {@link revocationRegistryDefinitionId} - */ - getRevocationRegistryDefinition(revocationRegistryDefinitionId: string): Promise; -- registerRevocationRegistryDefinition(options: AnonCredsRegisterRevocationRegistryDefinition): Promise; -+ registerRevocationRegistryDefinition(options: AnonCredsRegisterRevocationRegistryDefinition): Promise; - /** - * Retrieve the {@link AnonCredsRevocationStatusList} for the given {@link timestamp} from the registry associated - * with the {@link revocationRegistryDefinitionId} - */ - getRevocationStatusList(revocationRegistryDefinitionId: string, timestamp: number): Promise; -- registerRevocationStatusList(options: AnonCredsRegisterRevocationStatusList): Promise; -- updateRevocationStatusList(options: AnonCredsUpdateRevocationStatusList): Promise; -+ registerRevocationStatusList(options: AnonCredsRegisterRevocationStatusList): Promise; -+ updateRevocationStatusList(options: AnonCredsUpdateRevocationStatusList): Promise; - getCredential(id: string): Promise; - getCredentials(options: GetCredentialsOptions): Promise; - private storeRevocationRegistryDefinitionRecord; -@@ -74,23 +74,23 @@ export declare class AnonCredsApi { - export interface AnonCredsRegisterCredentialDefinitionApiOptions { - supportRevocation: boolean; - } --interface AnonCredsRegisterCredentialDefinition { -+interface AnonCredsRegisterCredentialDefinition { - credentialDefinition: AnonCredsRegisterCredentialDefinitionOptions; - options: T & AnonCredsRegisterCredentialDefinitionApiOptions; - } --interface AnonCredsRegisterSchema { -+interface AnonCredsRegisterSchema { - schema: AnonCredsSchema; - options: T; - } --interface AnonCredsRegisterRevocationRegistryDefinition { -+interface AnonCredsRegisterRevocationRegistryDefinition { - revocationRegistryDefinition: AnonCredsRegisterRevocationRegistryDefinitionOptions; - options: T; - } --interface AnonCredsRegisterRevocationStatusList { -+interface AnonCredsRegisterRevocationStatusList { - revocationStatusList: AnonCredsRegisterRevocationStatusListOptions; - options: T; - } --interface AnonCredsUpdateRevocationStatusList { -+interface AnonCredsUpdateRevocationStatusList { - revocationStatusList: AnonCredsUpdateRevocationStatusListOptions; - options: T; - } -diff --git a/node_modules/@credo-ts/anoncreds/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.d.ts b/node_modules/@credo-ts/anoncreds/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.d.ts -index 2980520..0304d87 100644 ---- a/node_modules/@credo-ts/anoncreds/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.d.ts -+++ b/node_modules/@credo-ts/anoncreds/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.d.ts -@@ -1,9 +1,9 @@ --import type { Extensible } from '../services/registry/base'; -+import type { CredoExtensible } from '../services/registry/base'; - export declare enum AnonCredsCredentialDefinitionRecordMetadataKeys { - CredentialDefinitionRegistrationMetadata = "_internal/anonCredsCredentialDefinitionRegistrationMetadata", - CredentialDefinitionMetadata = "_internal/anonCredsCredentialDefinitionMetadata" - } - export type AnonCredsCredentialDefinitionRecordMetadata = { -- [AnonCredsCredentialDefinitionRecordMetadataKeys.CredentialDefinitionRegistrationMetadata]: Extensible; -- [AnonCredsCredentialDefinitionRecordMetadataKeys.CredentialDefinitionMetadata]: Extensible; -+ [AnonCredsCredentialDefinitionRecordMetadataKeys.CredentialDefinitionRegistrationMetadata]: CredoExtensible; -+ [AnonCredsCredentialDefinitionRecordMetadataKeys.CredentialDefinitionMetadata]: CredoExtensible; - }; -diff --git a/node_modules/@credo-ts/anoncreds/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.d.ts b/node_modules/@credo-ts/anoncreds/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.d.ts -index 25aea87..1b0c4aa 100644 ---- a/node_modules/@credo-ts/anoncreds/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.d.ts -+++ b/node_modules/@credo-ts/anoncreds/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.d.ts -@@ -1,9 +1,9 @@ --import type { Extensible } from '../services/registry/base'; -+import type { CredoExtensible } from '../services/registry/base'; - export declare enum AnonCredsRevocationRegistryDefinitionRecordMetadataKeys { - RevocationRegistryDefinitionRegistrationMetadata = "_internal/anonCredsRevocationRegistryDefinitionRegistrationMetadata", - RevocationRegistryDefinitionMetadata = "_internal/anonCredsRevocationRegistryDefinitionMetadata" - } - export type AnonCredsRevocationRegistryDefinitionRecordMetadata = { -- [AnonCredsRevocationRegistryDefinitionRecordMetadataKeys.RevocationRegistryDefinitionRegistrationMetadata]: Extensible; -- [AnonCredsRevocationRegistryDefinitionRecordMetadataKeys.RevocationRegistryDefinitionMetadata]: Extensible; -+ [AnonCredsRevocationRegistryDefinitionRecordMetadataKeys.RevocationRegistryDefinitionRegistrationMetadata]: CredoExtensible; -+ [AnonCredsRevocationRegistryDefinitionRecordMetadataKeys.RevocationRegistryDefinitionMetadata]: CredoExtensible; - }; -diff --git a/node_modules/@credo-ts/anoncreds/build/repository/anonCredsSchemaRecordMetadataTypes.d.ts b/node_modules/@credo-ts/anoncreds/build/repository/anonCredsSchemaRecordMetadataTypes.d.ts -index 452ec04..f66058d 100644 ---- a/node_modules/@credo-ts/anoncreds/build/repository/anonCredsSchemaRecordMetadataTypes.d.ts -+++ b/node_modules/@credo-ts/anoncreds/build/repository/anonCredsSchemaRecordMetadataTypes.d.ts -@@ -1,9 +1,9 @@ --import type { Extensible } from '../services/registry/base'; -+import type { CredoExtensible } from '../services/registry/base'; - export declare enum AnonCredsSchemaRecordMetadataKeys { - SchemaRegistrationMetadata = "_internal/anonCredsSchemaRegistrationMetadata", - SchemaMetadata = "_internal/anonCredsSchemaMetadata" - } - export type AnonCredsSchemaRecordMetadata = { -- [AnonCredsSchemaRecordMetadataKeys.SchemaRegistrationMetadata]: Extensible; -- [AnonCredsSchemaRecordMetadataKeys.SchemaMetadata]: Extensible; -+ [AnonCredsSchemaRecordMetadataKeys.SchemaRegistrationMetadata]: CredoExtensible; -+ [AnonCredsSchemaRecordMetadataKeys.SchemaMetadata]: CredoExtensible; - }; -diff --git a/node_modules/@credo-ts/anoncreds/build/services/registry/CredentialDefinitionOptions.d.ts b/node_modules/@credo-ts/anoncreds/build/services/registry/CredentialDefinitionOptions.d.ts -index 0cedde3..169337b 100644 ---- a/node_modules/@credo-ts/anoncreds/build/services/registry/CredentialDefinitionOptions.d.ts -+++ b/node_modules/@credo-ts/anoncreds/build/services/registry/CredentialDefinitionOptions.d.ts -@@ -1,14 +1,14 @@ - import type { AnonCredsCredentialDefinition } from '../../models/registry'; --import type { AnonCredsOperationStateAction, AnonCredsOperationStateFailed, AnonCredsOperationStateFinished, AnonCredsOperationStateWait, AnonCredsResolutionMetadata, Extensible } from './base'; -+import type { AnonCredsOperationStateAction, AnonCredsOperationStateFailed, AnonCredsOperationStateFinished, AnonCredsOperationStateWait, AnonCredsResolutionMetadata, CredoExtensible } from './base'; - export interface GetCredentialDefinitionReturn { - credentialDefinition?: AnonCredsCredentialDefinition; - credentialDefinitionId: string; - resolutionMetadata: AnonCredsResolutionMetadata; -- credentialDefinitionMetadata: Extensible; -+ credentialDefinitionMetadata: CredoExtensible; - } - export interface RegisterCredentialDefinitionOptions { - credentialDefinition: AnonCredsCredentialDefinition; -- options: Extensible; -+ options: CredoExtensible; - } - export interface RegisterCredentialDefinitionReturnStateFailed extends AnonCredsOperationStateFailed { - credentialDefinition?: AnonCredsCredentialDefinition; -@@ -29,6 +29,6 @@ export interface RegisterCredentialDefinitionReturnStateAction extends AnonCreds - export interface RegisterCredentialDefinitionReturn { - jobId?: string; - credentialDefinitionState: RegisterCredentialDefinitionReturnStateWait | RegisterCredentialDefinitionReturnStateAction | RegisterCredentialDefinitionReturnStateFinished | RegisterCredentialDefinitionReturnStateFailed; -- credentialDefinitionMetadata: Extensible; -- registrationMetadata: Extensible; -+ credentialDefinitionMetadata: CredoExtensible; -+ registrationMetadata: CredoExtensible; - } -diff --git a/node_modules/@credo-ts/anoncreds/build/services/registry/RevocationRegistryDefinitionOptions.d.ts b/node_modules/@credo-ts/anoncreds/build/services/registry/RevocationRegistryDefinitionOptions.d.ts -index 7b9ffde..a3c9a53 100644 ---- a/node_modules/@credo-ts/anoncreds/build/services/registry/RevocationRegistryDefinitionOptions.d.ts -+++ b/node_modules/@credo-ts/anoncreds/build/services/registry/RevocationRegistryDefinitionOptions.d.ts -@@ -1,14 +1,14 @@ - import type { AnonCredsRevocationRegistryDefinition } from '../../models/registry'; --import type { AnonCredsOperationStateAction, AnonCredsOperationStateFailed, AnonCredsOperationStateFinished, AnonCredsOperationStateWait, AnonCredsResolutionMetadata, Extensible } from './base'; -+import type { AnonCredsOperationStateAction, AnonCredsOperationStateFailed, AnonCredsOperationStateFinished, AnonCredsOperationStateWait, AnonCredsResolutionMetadata, CredoExtensible } from './base'; - export interface GetRevocationRegistryDefinitionReturn { - revocationRegistryDefinition?: AnonCredsRevocationRegistryDefinition; - revocationRegistryDefinitionId: string; - resolutionMetadata: AnonCredsResolutionMetadata; -- revocationRegistryDefinitionMetadata: Extensible; -+ revocationRegistryDefinitionMetadata: CredoExtensible; - } - export interface RegisterRevocationRegistryDefinitionOptions { - revocationRegistryDefinition: AnonCredsRevocationRegistryDefinition; -- options: Extensible; -+ options: CredoExtensible; - } - export interface RegisterRevocationRegistryDefinitionReturnStateAction extends AnonCredsOperationStateAction { - revocationRegistryDefinition: AnonCredsRevocationRegistryDefinition; -@@ -29,6 +29,6 @@ export interface RegisterRevocationRegistryDefinitionReturnStateFinished extends - export interface RegisterRevocationRegistryDefinitionReturn { - jobId?: string; - revocationRegistryDefinitionState: RegisterRevocationRegistryDefinitionReturnStateWait | RegisterRevocationRegistryDefinitionReturnStateAction | RegisterRevocationRegistryDefinitionReturnStateFailed | RegisterRevocationRegistryDefinitionReturnStateFinished; -- revocationRegistryDefinitionMetadata: Extensible; -- registrationMetadata: Extensible; -+ revocationRegistryDefinitionMetadata: CredoExtensible; -+ registrationMetadata: CredoExtensible; - } -diff --git a/node_modules/@credo-ts/anoncreds/build/services/registry/RevocationStatusListOptions.d.ts b/node_modules/@credo-ts/anoncreds/build/services/registry/RevocationStatusListOptions.d.ts -index c28d20c..eca15ca 100644 ---- a/node_modules/@credo-ts/anoncreds/build/services/registry/RevocationStatusListOptions.d.ts -+++ b/node_modules/@credo-ts/anoncreds/build/services/registry/RevocationStatusListOptions.d.ts -@@ -1,16 +1,16 @@ - import type { Optional } from '@credo-ts/core'; - import type { AnonCredsRevocationStatusList } from '../../models/registry'; --import type { AnonCredsOperationStateAction, AnonCredsOperationStateFailed, AnonCredsOperationStateFinished, AnonCredsOperationStateWait, AnonCredsResolutionMetadata, Extensible } from './base'; -+import type { AnonCredsOperationStateAction, AnonCredsOperationStateFailed, AnonCredsOperationStateFinished, AnonCredsOperationStateWait, AnonCredsResolutionMetadata, CredoExtensible } from './base'; - export interface GetRevocationStatusListReturn { - revocationStatusList?: AnonCredsRevocationStatusList; - resolutionMetadata: AnonCredsResolutionMetadata; -- revocationStatusListMetadata: Extensible; -+ revocationStatusListMetadata: CredoExtensible; - } - export type AnonCredsRevocationStatusListWithoutTimestamp = Omit; - export type AnonCredsRevocationStatusListWithOptionalTimestamp = Optional; - export interface RegisterRevocationStatusListOptions { - revocationStatusList: AnonCredsRevocationStatusListWithoutTimestamp; -- options: Extensible; -+ options: CredoExtensible; - } - export interface RegisterRevocationStatusListReturnStateAction extends AnonCredsOperationStateAction { - revocationStatusList: AnonCredsRevocationStatusListWithOptionalTimestamp; -@@ -27,6 +27,6 @@ export interface RegisterRevocationStatusListReturnStateFinished extends AnonCre - export interface RegisterRevocationStatusListReturn { - jobId?: string; - revocationStatusListState: RegisterRevocationStatusListReturnStateWait | RegisterRevocationStatusListReturnStateAction | RegisterRevocationStatusListReturnStateFailed | RegisterRevocationStatusListReturnStateFinished; -- revocationStatusListMetadata: Extensible; -- registrationMetadata: Extensible; -+ revocationStatusListMetadata: CredoExtensible; -+ registrationMetadata: CredoExtensible; - } -diff --git a/node_modules/@credo-ts/anoncreds/build/services/registry/SchemaOptions.d.ts b/node_modules/@credo-ts/anoncreds/build/services/registry/SchemaOptions.d.ts -index fcafaa3..c894be4 100644 ---- a/node_modules/@credo-ts/anoncreds/build/services/registry/SchemaOptions.d.ts -+++ b/node_modules/@credo-ts/anoncreds/build/services/registry/SchemaOptions.d.ts -@@ -1,14 +1,14 @@ - import type { AnonCredsSchema } from '../../models/registry'; --import type { AnonCredsOperationStateAction, AnonCredsOperationStateFailed, AnonCredsOperationStateFinished, AnonCredsOperationStateWait, AnonCredsResolutionMetadata, Extensible } from './base'; -+import type { AnonCredsOperationStateAction, AnonCredsOperationStateFailed, AnonCredsOperationStateFinished, AnonCredsOperationStateWait, AnonCredsResolutionMetadata, CredoExtensible } from './base'; - export interface GetSchemaReturn { - schema?: AnonCredsSchema; - schemaId: string; - resolutionMetadata: AnonCredsResolutionMetadata; -- schemaMetadata: Extensible; -+ schemaMetadata: CredoExtensible; - } - export interface RegisterSchemaOptions { - schema: AnonCredsSchema; -- options: Extensible; -+ options: CredoExtensible; - } - export interface RegisterSchemaReturnStateFailed extends AnonCredsOperationStateFailed { - schema?: AnonCredsSchema; -@@ -29,6 +29,6 @@ export interface RegisterSchemaReturnStateWait extends AnonCredsOperationStateWa - export interface RegisterSchemaReturn { - jobId?: string; - schemaState: RegisterSchemaReturnStateWait | RegisterSchemaReturnStateAction | RegisterSchemaReturnStateFinished | RegisterSchemaReturnStateFailed; -- schemaMetadata: Extensible; -- registrationMetadata: Extensible; -+ schemaMetadata: CredoExtensible; -+ registrationMetadata: CredoExtensible; - } -diff --git a/node_modules/@credo-ts/anoncreds/build/services/registry/base.d.ts b/node_modules/@credo-ts/anoncreds/build/services/registry/base.d.ts -index 3b37667..931bcc6 100644 ---- a/node_modules/@credo-ts/anoncreds/build/services/registry/base.d.ts -+++ b/node_modules/@credo-ts/anoncreds/build/services/registry/base.d.ts -@@ -1,4 +1,4 @@ --export type Extensible = Record; -+export type CredoExtensible = Record; - export interface AnonCredsOperationStateWait { - state: 'wait'; - } -@@ -13,7 +13,7 @@ export interface AnonCredsOperationStateFailed { - state: 'failed'; - reason: string; - } --export interface AnonCredsResolutionMetadata extends Extensible { -+export interface AnonCredsResolutionMetadata extends CredoExtensible { - error?: 'invalid' | 'notFound' | 'unsupportedAnonCredsMethod' | string; - message?: string; - } diff --git a/patches/@credo-ts+core+0.6.0+001+fix: change version string type.patch b/patches/@credo-ts+core+0.6.0+001+fix: change version string type.patch new file mode 100644 index 00000000..d0791805 --- /dev/null +++ b/patches/@credo-ts+core+0.6.0+001+fix: change version string type.patch @@ -0,0 +1,21 @@ +diff --git a/node_modules/@credo-ts/core/build/utils/version.d.mts b/node_modules/@credo-ts/core/build/utils/version.d.mts +index a71659d..8ed88e2 100644 +--- a/node_modules/@credo-ts/core/build/utils/version.d.mts ++++ b/node_modules/@credo-ts/core/build/utils/version.d.mts +@@ -1,5 +1,5 @@ + //#region src/utils/version.d.ts +-type VersionString = `${number}.${number}` | `${number}.${number}.${number}`; ++type VersionString = string; + //#endregion + export { VersionString }; + //# sourceMappingURL=version.d.mts.map +\ No newline at end of file +diff --git a/node_modules/@credo-ts/core/build/utils/version.mjs.map b/node_modules/@credo-ts/core/build/utils/version.mjs.map +index 19457ed..5fb595f 100644 +--- a/node_modules/@credo-ts/core/build/utils/version.mjs.map ++++ b/node_modules/@credo-ts/core/build/utils/version.mjs.map +@@ -1 +1 @@ +-{"version":3,"file":"version.mjs","names":[],"sources":["../../src/utils/version.ts"],"sourcesContent":["export function parseVersionString(version: VersionString): Version {\n const [major, minor, patch] = version.split('.')\n\n return [Number(major), Number(minor), Number(patch ?? '0')]\n}\n\nexport function isFirstVersionHigherThanSecond(first: Version, second: Version) {\n return (\n first[0] > second[0] ||\n (first[0] === second[0] && first[1] > second[1]) ||\n (first[0] === second[0] && first[1] === second[1] && first[2] > second[2])\n )\n}\n\nexport function isFirstVersionEqualToSecond(first: Version, second: Version) {\n return first[0] === second[0] && first[1] === second[1] && first[2] === second[2]\n}\n\nexport type VersionString = `${number}.${number}` | `${number}.${number}.${number}`\nexport type MajorVersion = number\nexport type MinorVersion = number\nexport type PatchVersion = number\nexport type Version = [MajorVersion, MinorVersion, PatchVersion]\n"],"mappings":";;;AAAA,SAAgB,mBAAmB,SAAiC;CAClE,MAAM,CAAC,OAAO,OAAO,SAAS,QAAQ,MAAM,IAAI;AAEhD,QAAO;EAAC,OAAO,MAAM;EAAE,OAAO,MAAM;EAAE,OAAO,SAAS,IAAI;EAAC;;AAG7D,SAAgB,+BAA+B,OAAgB,QAAiB;AAC9E,QACE,MAAM,KAAK,OAAO,MACjB,MAAM,OAAO,OAAO,MAAM,MAAM,KAAK,OAAO,MAC5C,MAAM,OAAO,OAAO,MAAM,MAAM,OAAO,OAAO,MAAM,MAAM,KAAK,OAAO;;AAI3E,SAAgB,4BAA4B,OAAgB,QAAiB;AAC3E,QAAO,MAAM,OAAO,OAAO,MAAM,MAAM,OAAO,OAAO,MAAM,MAAM,OAAO,OAAO"} +\ No newline at end of file ++{"version":3,"file":"version.mjs","names":[],"sources":["../../src/utils/version.ts"],"sourcesContent":["export function parseVersionString(version: VersionString): Version {\n const [major, minor, patch] = version.split('.')\n\n return [Number(major), Number(minor), Number(patch ?? '0')]\n}\n\nexport function isFirstVersionHigherThanSecond(first: Version, second: Version) {\n return (\n first[0] > second[0] ||\n (first[0] === second[0] && first[1] > second[1]) ||\n (first[0] === second[0] && first[1] === second[1] && first[2] > second[2])\n )\n}\n\nexport function isFirstVersionEqualToSecond(first: Version, second: Version) {\n return first[0] === second[0] && first[1] === second[1] && first[2] === second[2]\n}\n\nexport type VersionString = string\nexport type MajorVersion = number\nexport type MinorVersion = number\nexport type PatchVersion = number\nexport type Version = [MajorVersion, MinorVersion, PatchVersion]\n"],"mappings":";;;AAAA,SAAgB,mBAAmB,SAAiC;CAClE,MAAM,CAAC,OAAO,OAAO,SAAS,QAAQ,MAAM,IAAI;AAEhD,QAAO;EAAC,OAAO,MAAM;EAAE,OAAO,MAAM;EAAE,OAAO,SAAS,IAAI;EAAC;;AAG7D,SAAgB,+BAA+B,OAAgB,QAAiB;AAC9E,QACE,MAAM,KAAK,OAAO,MACjB,MAAM,OAAO,OAAO,MAAM,MAAM,KAAK,OAAO,MAC5C,MAAM,OAAO,OAAO,MAAM,MAAM,OAAO,OAAO,MAAM,MAAM,KAAK,OAAO;;AAI3E,SAAgB,4BAA4B,OAAgB,QAAiB;AAC3E,QAAO,MAAM,OAAO,OAAO,MAAM,MAAM,OAAO,OAAO,MAAM,MAAM,OAAO,OAAO"} +\ No newline at end of file diff --git a/patches/@credo-ts+core+0.6.0-alpha-20250325224513+001+fix: message type for message.patch b/patches/@credo-ts+core+0.6.0-alpha-20250325224513+001+fix: message type for message.patch deleted file mode 100644 index ce9e2a5e..00000000 --- a/patches/@credo-ts+core+0.6.0-alpha-20250325224513+001+fix: message type for message.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/node_modules/@credo-ts/core/build/types.d.ts b/node_modules/@credo-ts/core/build/types.d.ts -index 964f309..4447f64 100644 ---- a/node_modules/@credo-ts/core/build/types.d.ts -+++ b/node_modules/@credo-ts/core/build/types.d.ts -@@ -88,6 +88,7 @@ export interface PlaintextMessage { - thid?: string; - pthid?: string; - }; -+ messageType?: string; - [key: string]: unknown; - } - export type EncryptedMessage = { diff --git a/patches/@credo-ts+core+0.6.0-alpha-20250325224513+002+fix: change version string type.patch b/patches/@credo-ts+core+0.6.0-alpha-20250325224513+002+fix: change version string type.patch deleted file mode 100644 index 02a2d309..00000000 --- a/patches/@credo-ts+core+0.6.0-alpha-20250325224513+002+fix: change version string type.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/node_modules/@credo-ts/core/build/utils/version.d.ts b/node_modules/@credo-ts/core/build/utils/version.d.ts -index 0ad7e14..e0588dc 100644 ---- a/node_modules/@credo-ts/core/build/utils/version.d.ts -+++ b/node_modules/@credo-ts/core/build/utils/version.d.ts -@@ -1,7 +1,7 @@ - export declare function parseVersionString(version: VersionString): Version; - export declare function isFirstVersionHigherThanSecond(first: Version, second: Version): boolean; - export declare function isFirstVersionEqualToSecond(first: Version, second: Version): boolean; --export type VersionString = `${number}.${number}` | `${number}.${number}.${number}`; -+export type VersionString = string; - export type MajorVersion = number; - export type MinorVersion = number; - export type PatchVersion = number; diff --git a/patches/@credo-ts+core+0.6.0-alpha-20250325224513+003+sdjwt-presentation.patch b/patches/@credo-ts+core+0.6.0-alpha-20250325224513+003+sdjwt-presentation.patch deleted file mode 100644 index b47305cd..00000000 --- a/patches/@credo-ts+core+0.6.0-alpha-20250325224513+003+sdjwt-presentation.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/node_modules/@credo-ts/core/build/modules/sd-jwt-vc/SdJwtVcService.js b/node_modules/@credo-ts/core/build/modules/sd-jwt-vc/SdJwtVcService.js -index 20073a3..9df7a4a 100644 ---- a/node_modules/@credo-ts/core/build/modules/sd-jwt-vc/SdJwtVcService.js -+++ b/node_modules/@credo-ts/core/build/modules/sd-jwt-vc/SdJwtVcService.js -@@ -102,7 +102,8 @@ let SdJwtVcService = class SdJwtVcService { - value: d.value, - })), presentationFrame); - const [jwt] = compactSdJwtVc.split('~'); -- const sdJwt = `${jwt}~${requiredDisclosures.map((d) => d.encoded).join('~')}~`; -+ const disclosureString = requiredDisclosures.length > 0 ? `${requiredDisclosures.map((d) => d.encoded).join('~')}~` : ''; -+ const sdJwt = `${jwt}~${disclosureString}`; - const disclosedDecoded = (0, decodeSdJwtVc_1.decodeSdJwtVc)(sdJwt); - return disclosedDecoded; - } diff --git a/patches/@credo-ts+didcomm+0.6.0-alpha-20250325224513+001+fix: message type for message.patch b/patches/@credo-ts+didcomm+0.6.0-alpha-20250325224513+001+fix: message type for message.patch deleted file mode 100644 index 7e6d0d21..00000000 --- a/patches/@credo-ts+didcomm+0.6.0-alpha-20250325224513+001+fix: message type for message.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/node_modules/@credo-ts/didcomm/build/EnvelopeService.js b/node_modules/@credo-ts/didcomm/build/EnvelopeService.js -index c0c84d4..0752b11 100644 ---- a/node_modules/@credo-ts/didcomm/build/EnvelopeService.js -+++ b/node_modules/@credo-ts/didcomm/build/EnvelopeService.js -@@ -38,6 +38,7 @@ let EnvelopeService = class EnvelopeService { - message: encryptedMessage, - }); - recipientKeysBase58 = [routingKeyBase58]; -+ forwardMessage["messageType"] = message['@type']; - this.logger.debug('Forward message created', forwardMessage); - const forwardJson = forwardMessage.toJSON({ - useDidSovPrefixWhereAllowed: didcommConfig.useDidSovPrefixWhereAllowed, -diff --git a/node_modules/@credo-ts/didcomm/build/modules/routing/messages/ForwardMessage.d.ts b/node_modules/@credo-ts/didcomm/build/modules/routing/messages/ForwardMessage.d.ts -index 108b477..d307051 100644 ---- a/node_modules/@credo-ts/didcomm/build/modules/routing/messages/ForwardMessage.d.ts -+++ b/node_modules/@credo-ts/didcomm/build/modules/routing/messages/ForwardMessage.d.ts -@@ -3,6 +3,7 @@ import { EncryptedMessage } from '../../../types'; - export interface ForwardMessageOptions { - id?: string; - to: string; -+ messageType: string; - message: EncryptedMessage; - } - /** -@@ -19,5 +20,6 @@ export declare class ForwardMessage extends AgentMessage { - readonly type: string; - static readonly type: import("../../../util/messageType").ParsedMessageType; - to: string; -+ messageType: string; - message: EncryptedMessage; - } diff --git a/patches/@credo-ts+didcomm+0.6.0-alpha-20250325224513+002+fix: added-prettyVc-in-JsonCredential-interface.patch b/patches/@credo-ts+didcomm+0.6.0-alpha-20250325224513+002+fix: added-prettyVc-in-JsonCredential-interface.patch deleted file mode 100644 index 60057d13..00000000 --- a/patches/@credo-ts+didcomm+0.6.0-alpha-20250325224513+002+fix: added-prettyVc-in-JsonCredential-interface.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/node_modules/@credo-ts/didcomm/build/modules/credentials/formats/jsonld/JsonLdCredentialFormat.d.ts b/node_modules/@credo-ts/didcomm/build/modules/credentials/formats/jsonld/JsonLdCredentialFormat.d.ts -index c0a6140..c3d2c8b 100644 ---- a/node_modules/@credo-ts/didcomm/build/modules/credentials/formats/jsonld/JsonLdCredentialFormat.d.ts -+++ b/node_modules/@credo-ts/didcomm/build/modules/credentials/formats/jsonld/JsonLdCredentialFormat.d.ts -@@ -8,6 +8,7 @@ export interface JsonCredential { - issuanceDate: string; - expirationDate?: string; - credentialSubject: SingleOrArray; -+ prettyVc?: any; - [key: string]: unknown; - } - /** diff --git a/patches/@credo-ts+didcomm+0.6.0-alpha-20250325224513+003+fix: commenting validationPresentation to avoid abandoned issue.patch b/patches/@credo-ts+didcomm+0.6.0-alpha-20250325224513+003+fix: commenting validationPresentation to avoid abandoned issue.patch deleted file mode 100644 index 74e5d1ed..00000000 --- a/patches/@credo-ts+didcomm+0.6.0-alpha-20250325224513+003+fix: commenting validationPresentation to avoid abandoned issue.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/node_modules/@credo-ts/didcomm/build/modules/proofs/formats/dif-presentation-exchange/DifPresentationExchangeProofFormatService.js b/node_modules/@credo-ts/didcomm/build/modules/proofs/formats/dif-presentation-exchange/DifPresentationExchangeProofFormatService.js -index 202adff..1124458 100644 ---- a/node_modules/@credo-ts/didcomm/build/modules/proofs/formats/dif-presentation-exchange/DifPresentationExchangeProofFormatService.js -+++ b/node_modules/@credo-ts/didcomm/build/modules/proofs/formats/dif-presentation-exchange/DifPresentationExchangeProofFormatService.js -@@ -168,7 +168,8 @@ class DifPresentationExchangeProofFormatService { - try { - ps.validatePresentationDefinition(request.presentation_definition); - ps.validatePresentationSubmission(jsonPresentation.presentation_submission); -- ps.validatePresentation(request.presentation_definition, parsedPresentation); -+ // FIXME: Commenting validatePresentation() for now due to intermittent abandoned issue -+ // ps.validatePresentation(request.presentation_definition, parsedPresentation); - let verificationResult; - // FIXME: for some reason it won't accept the input if it doesn't know - // whether it's a JWT or JSON-LD VP even though the input is the same. diff --git a/yarn.lock b/yarn.lock index aa544109..32efea90 100644 --- a/yarn.lock +++ b/yarn.lock @@ -29,14 +29,6 @@ resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz#63430d04bd8c5e74f8d7d049338f1cd9d4f02069" integrity sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw== -"@ampproject/remapping@^2.2.0": - version "2.3.0" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.3.0.tgz#ed441b6fa600072520ce18b43d2c8cc8caecc7f4" - integrity sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw== - dependencies: - "@jridgewell/gen-mapping" "^0.3.5" - "@jridgewell/trace-mapping" "^0.3.24" - "@animo-id/mdoc@^0.5.2": version "0.5.2" resolved "https://registry.yarnpkg.com/@animo-id/mdoc/-/mdoc-0.5.2.tgz#77c4ac564925126f3dac9a989be888ad9e38afa1" @@ -44,11 +36,12 @@ dependencies: compare-versions "^6.1.1" -"@animo-id/pex@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@animo-id/pex/-/pex-5.2.0.tgz#540895b7ffb36da800d303cd2aee12daebd52850" - integrity sha512-W0nopdAS1boDOuhH1L5yUyNOo4LJwIqVc3x90ua0ypNXuOv6gDkr78nNTqIjaF0eBKakagTYegbDZrfQrlmRBQ== +"@animo-id/pex@^6.1.1": + version "6.1.1" + resolved "https://registry.yarnpkg.com/@animo-id/pex/-/pex-6.1.1.tgz#a09b12afebbb58eb35b6957c45b9c268590f2c9a" + integrity sha512-my3g9Divea1sseZRzgD2tnrv0ett9fTlyoZp1x9nSjyRwtai/BBnFQigknMFscJuG6vnwYNcaj6TFQprw+v5xw== dependencies: + "@animo-id/mdoc" "^0.5.2" "@astronautlabs/jsonpath" "^1.1.2" "@sd-jwt/decode" "^0.7.2" "@sd-jwt/present" "^0.7.2" @@ -135,38 +128,38 @@ picocolors "^1.1.1" "@babel/compat-data@^7.27.2": - version "7.28.0" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.28.0.tgz#9fc6fd58c2a6a15243cd13983224968392070790" - integrity sha512-60X7qkglvrap8mn1lh2ebxXdZYtUcpd7gsmy9kLaBJ4i/WdY8PqTSdxyA8qraikqKQK5C1KRBKXqznrVapyNaw== + version "7.28.5" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.28.5.tgz#a8a4962e1567121ac0b3b487f52107443b455c7f" + integrity sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA== -"@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.14.6", "@babel/core@^7.23.9": - version "7.28.3" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.28.3.tgz#aceddde69c5d1def69b839d09efa3e3ff59c97cb" - integrity sha512-yDBHV9kQNcr2/sUr9jghVyz9C3Y5G2zUM2H2lo+9mKv4sFgbA8s8Z9t8D1jiTkGoO/NoIfKMyKWr4s6CN23ZwQ== +"@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": + version "7.28.5" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.28.5.tgz#4c81b35e51e1b734f510c99b07dfbc7bbbb48f7e" + integrity sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw== dependencies: - "@ampproject/remapping" "^2.2.0" "@babel/code-frame" "^7.27.1" - "@babel/generator" "^7.28.3" + "@babel/generator" "^7.28.5" "@babel/helper-compilation-targets" "^7.27.2" "@babel/helper-module-transforms" "^7.28.3" - "@babel/helpers" "^7.28.3" - "@babel/parser" "^7.28.3" + "@babel/helpers" "^7.28.4" + "@babel/parser" "^7.28.5" "@babel/template" "^7.27.2" - "@babel/traverse" "^7.28.3" - "@babel/types" "^7.28.2" + "@babel/traverse" "^7.28.5" + "@babel/types" "^7.28.5" + "@jridgewell/remapping" "^2.3.5" convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.28.3", "@babel/generator@^7.7.2": - version "7.28.3" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.28.3.tgz#9626c1741c650cbac39121694a0f2d7451b8ef3e" - integrity sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw== +"@babel/generator@^7.28.5", "@babel/generator@^7.7.2": + version "7.28.5" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.28.5.tgz#712722d5e50f44d07bc7ac9fe84438742dd61298" + integrity sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ== dependencies: - "@babel/parser" "^7.28.3" - "@babel/types" "^7.28.2" + "@babel/parser" "^7.28.5" + "@babel/types" "^7.28.5" "@jridgewell/gen-mapping" "^0.3.12" "@jridgewell/trace-mapping" "^0.3.28" jsesc "^3.0.2" @@ -195,7 +188,7 @@ "@babel/traverse" "^7.27.1" "@babel/types" "^7.27.1" -"@babel/helper-module-transforms@^7.27.1", "@babel/helper-module-transforms@^7.28.3": +"@babel/helper-module-transforms@^7.28.3": version "7.28.3" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz#a2b37d3da3b2344fe085dab234426f2b9a2fa5f6" integrity sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw== @@ -204,7 +197,7 @@ "@babel/helper-validator-identifier" "^7.27.1" "@babel/traverse" "^7.28.3" -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.27.1", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.27.1", "@babel/helper-plugin-utils@^7.8.0": version "7.27.1" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz#ddb2f876534ff8013e6c2b299bf4d39b3c51d44c" integrity sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw== @@ -214,38 +207,30 @@ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687" integrity sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA== -"@babel/helper-validator-identifier@^7.27.1": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz#a7054dcc145a967dd4dc8fee845a57c1316c9df8" - integrity sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow== +"@babel/helper-validator-identifier@^7.27.1", "@babel/helper-validator-identifier@^7.28.5": + version "7.28.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz#010b6938fab7cb7df74aa2bbc06aa503b8fe5fb4" + integrity sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q== "@babel/helper-validator-option@^7.27.1": version "7.27.1" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz#fa52f5b1e7db1ab049445b421c4471303897702f" integrity sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg== -"@babel/helpers@^7.28.3": - version "7.28.3" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.28.3.tgz#b83156c0a2232c133d1b535dd5d3452119c7e441" - integrity sha512-PTNtvUQihsAsDHMOP5pfobP8C6CM4JWXmP8DrEIt46c3r2bf87Ua1zoqevsMo9g+tWDwgWrFP5EIxuBx5RudAw== +"@babel/helpers@^7.28.4": + version "7.28.4" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.28.4.tgz#fe07274742e95bdf7cf1443593eeb8926ab63827" + integrity sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w== dependencies: "@babel/template" "^7.27.2" - "@babel/types" "^7.28.2" + "@babel/types" "^7.28.4" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.27.2", "@babel/parser@^7.28.3": - version "7.28.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.28.3.tgz#d2d25b814621bca5fe9d172bc93792547e7a2a71" - integrity sha512-7+Ey1mAgYqFAx2h0RuoxcQT5+MlG3GTV0TQrgr7/ZliKsm/MNDxVVutlWaziMq7wJNAz8MTqz55XLpWvva6StA== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.27.2", "@babel/parser@^7.28.5": + version "7.28.5" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.28.5.tgz#0b0225ee90362f030efd644e8034c99468893b08" + integrity sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ== dependencies: - "@babel/types" "^7.28.2" - -"@babel/plugin-proposal-export-namespace-from@^7.14.5": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz#5f7313ab348cdb19d590145f9247540e94761203" - integrity sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - "@babel/plugin-syntax-export-namespace-from" "^7.8.3" + "@babel/types" "^7.28.5" "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -275,13 +260,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-syntax-export-namespace-from@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz#028964a9ba80dbc094c915c487ad7c4e7a66465a" - integrity sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/plugin-syntax-import-attributes@^7.24.7": version "7.27.1" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz#34c017d54496f9b11b61474e7ea3dfd5563ffe07" @@ -373,14 +351,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.27.1" -"@babel/plugin-transform-modules-commonjs@^7.14.5": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.27.1.tgz#8e44ed37c2787ecc23bdc367f49977476614e832" - integrity sha512-OJguuwlTYlN0gBZFRPqwOGNWssZjfIUdS7HMYtN8c1KmwpwHFBwTeFZrg9XZa+DFTitWOW5iTAG7tyCUPsCCyw== - dependencies: - "@babel/helper-module-transforms" "^7.27.1" - "@babel/helper-plugin-utils" "^7.27.1" - "@babel/template@^7.27.2", "@babel/template@^7.3.3": version "7.27.2" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.27.2.tgz#fa78ceed3c4e7b63ebf6cb39e5852fca45f6809d" @@ -390,162 +360,153 @@ "@babel/parser" "^7.27.2" "@babel/types" "^7.27.1" -"@babel/traverse@^7.27.1", "@babel/traverse@^7.28.3": - version "7.28.3" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.28.3.tgz#6911a10795d2cce43ec6a28cffc440cca2593434" - integrity sha512-7w4kZYHneL3A6NP2nxzHvT3HCZ7puDZZjFMqDpBPECub79sTtSO5CGXDkKrTQq8ksAwfD/XI2MRFX23njdDaIQ== +"@babel/traverse@^7.27.1", "@babel/traverse@^7.28.3", "@babel/traverse@^7.28.5": + version "7.28.5" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.28.5.tgz#450cab9135d21a7a2ca9d2d35aa05c20e68c360b" + integrity sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ== dependencies: "@babel/code-frame" "^7.27.1" - "@babel/generator" "^7.28.3" + "@babel/generator" "^7.28.5" "@babel/helper-globals" "^7.28.0" - "@babel/parser" "^7.28.3" + "@babel/parser" "^7.28.5" "@babel/template" "^7.27.2" - "@babel/types" "^7.28.2" + "@babel/types" "^7.28.5" debug "^4.3.1" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.27.1", "@babel/types@^7.28.2", "@babel/types@^7.3.3": - version "7.28.2" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.2.tgz#da9db0856a9a88e0a13b019881d7513588cf712b" - integrity sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.27.1", "@babel/types@^7.28.2", "@babel/types@^7.28.4", "@babel/types@^7.28.5", "@babel/types@^7.3.3": + version "7.28.5" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.5.tgz#10fc405f60897c35f07e85493c932c7b5ca0592b" + integrity sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA== dependencies: "@babel/helper-string-parser" "^7.27.1" - "@babel/helper-validator-identifier" "^7.27.1" + "@babel/helper-validator-identifier" "^7.28.5" "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@credo-ts/anoncreds@0.6.0-alpha-20250325224513": - version "0.6.0-alpha-20250325224513" - resolved "https://registry.yarnpkg.com/@credo-ts/anoncreds/-/anoncreds-0.6.0-alpha-20250325224513.tgz#cf9bec49a96c058a356489ee742b79c4c22eb543" - integrity sha512-l4cGks+X5tRLUGZrtNW11R6CM310z0wODuqYzVQcROmz9qf0uM2ZKn2RunDbLLfouoxU66TISqG728oqX7IG+Q== +"@credo-ts/anoncreds@0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@credo-ts/anoncreds/-/anoncreds-0.6.0.tgz#e705077236ebd63067291a3978a771452c63a9f6" + integrity sha512-oDzaPMmtIqlvCIQRan/iXleGVgtJinsQ/UQn1PChCuifo6nzZWJo/xHOqYypNuWDc9dkgADwJjkUtFoU3NhhsA== dependencies: "@astronautlabs/jsonpath" "^1.1.2" - "@credo-ts/core" "0.6.0-alpha-20250325224513" - "@credo-ts/didcomm" "0.6.0-alpha-20250325224513" + "@credo-ts/core" "0.6.0" + "@credo-ts/didcomm" "0.6.0" "@sphereon/pex-models" "^2.3.2" class-transformer "0.5.1" - class-validator "0.14.1" - reflect-metadata "^0.1.13" + class-validator "^0.14.1" + reflect-metadata "0.2.2" -"@credo-ts/askar@0.5.3", "@credo-ts/askar@0.6.0-alpha-20250325224513": - version "0.6.0-alpha-20250325224513" - resolved "https://registry.yarnpkg.com/@credo-ts/askar/-/askar-0.6.0-alpha-20250325224513.tgz#62009e8618cef60cc014eb2f104aa1c3030ba5be" - integrity sha512-zj8U2QXB3wEqGWhQyZHLMvkvrsksuX2eyYl+ewfQqdPW/dS0A/eZqPxOwBEGLuqWzzWt4Ny/lOX/ioYst2/uew== +"@credo-ts/askar@0.5.3", "@credo-ts/askar@0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@credo-ts/askar/-/askar-0.6.0.tgz#12fe485252d51abdcbebbbeb9e8bfed47ff12448" + integrity sha512-TYBgmpQ3qi49HIA7vIb64j2jiFTynCRF9aN0G67pwhwyTJR/sULvvD/o4FdqH9K7pAoEvVqw99xOvp9ojigqsg== dependencies: - "@credo-ts/core" "0.6.0-alpha-20250325224513" + "@credo-ts/core" "0.6.0" class-transformer "0.5.1" - class-validator "0.14.1" - rxjs "^7.8.0" - tsyringe "^4.8.0" + class-validator "^0.14.1" + rxjs "^7.8.2" + tsyringe "^4.10.0" -"@credo-ts/core@0.5.3", "@credo-ts/core@0.6.0-alpha-20250325224513", "@credo-ts/core@0.6.0-pr-2324-20250728121454": - version "0.6.0-alpha-20250325224513" - resolved "https://registry.yarnpkg.com/@credo-ts/core/-/core-0.6.0-alpha-20250325224513.tgz#8cede1953352b4a3899a939b26e1db61d65ab263" - integrity sha512-DJ5m3NR4zWBD1Tsi5xvZz7+fy7MlxdI2pi1SyHWGsfMFaNaprKfR12ydF/Db6S3Id23KC//8HWYTj4i+fufIQg== +"@credo-ts/core@0.5.3", "@credo-ts/core@0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@credo-ts/core/-/core-0.6.0.tgz#391c14b9cdea64f91d5b741c1b37ce51a1705d9f" + integrity sha512-gZQgaZzj27Mzm0Ei2Axw+qNDBRsqsHVeEv/Rkqu4yzd0v1QIl/XQV+fUF44krvanzf0mlVBA0JXD0ZNESharCQ== dependencies: "@animo-id/mdoc" "^0.5.2" - "@animo-id/pex" "5.2.0" + "@animo-id/pex" "^6.1.1" "@astronautlabs/jsonpath" "^1.1.2" - "@digitalcredentials/jsonld" "^6.0.0" - "@digitalcredentials/jsonld-signatures" "^9.4.0" - "@digitalcredentials/vc" "^6.0.1" + "@digitalcredentials/jsonld" "^9.0.0" + "@digitalcredentials/jsonld-signatures" "^12.0.1" + "@digitalcredentials/vc" "^10.0.2" "@multiformats/base-x" "^4.0.1" - "@noble/curves" "^1.8.1" - "@noble/hashes" "^1.7.1" - "@peculiar/asn1-ecc" "^2.3.13" - "@peculiar/asn1-schema" "^2.3.13" - "@peculiar/asn1-x509" "^2.3.13" - "@peculiar/x509" "^1.12.1" - "@sd-jwt/core" "^0.7.2" - "@sd-jwt/decode" "^0.7.2" - "@sd-jwt/jwt-status-list" "^0.7.2" - "@sd-jwt/present" "^0.7.2" - "@sd-jwt/sd-jwt-vc" "^0.7.2" - "@sd-jwt/types" "^0.7.2" - "@sd-jwt/utils" "^0.7.2" + "@noble/curves" "^2.0.1" + "@noble/hashes" "^2.0.1" + "@peculiar/asn1-ecc" "^2.6.0" + "@peculiar/asn1-rsa" "^2.6.0" + "@peculiar/asn1-schema" "^2.6.0" + "@peculiar/asn1-x509" "^2.6.0" + "@peculiar/x509" "^1.14.2" + "@sd-jwt/core" "^0.17.0" + "@sd-jwt/decode" "^0.17.0" + "@sd-jwt/jwt-status-list" "^0.17.1" + "@sd-jwt/present" "^0.17.0" + "@sd-jwt/sd-jwt-vc" "^0.17.1" + "@sd-jwt/types" "^0.17.0" + "@sd-jwt/utils" "^0.17.0" "@sphereon/pex-models" "^2.3.2" "@sphereon/ssi-types" "0.33.0" - "@stablelib/ed25519" "^1.0.2" - "@types/ws" "^8.5.4" - borc "^3.0.0" + "@stablelib/ed25519" "^2.0.2" + "@types/ws" "^8.18.1" buffer "^6.0.3" class-transformer "0.5.1" - class-validator "0.14.1" - dcql "^0.2.20" + class-validator "^0.14.1" + dcql "^3.0.0" did-resolver "^4.1.0" - ec-compression "0.0.1-alpha.11" + ec-compression "0.0.1-alpha.12" lru_map "^0.4.1" make-error "^1.3.6" - object-inspect "^1.10.3" - reflect-metadata "^0.1.13" - rxjs "^7.8.0" - tsyringe "^4.8.0" - uuid "^9.0.0" + object-inspect "^1.13.4" + reflect-metadata "0.2.2" + rxjs "^7.8.2" + tsyringe "^4.10.0" + uuid "^13.0.0" varint "^6.0.0" - web-did-resolver "^2.0.21" - webcrypto-core "^1.8.0" + web-did-resolver "^2.0.31" + webcrypto-core "^1.8.1" + zod "^4.1.12" -"@credo-ts/didcomm@0.6.0-alpha-20250325224513": - version "0.6.0-alpha-20250325224513" - resolved "https://registry.yarnpkg.com/@credo-ts/didcomm/-/didcomm-0.6.0-alpha-20250325224513.tgz#87fdac5ca23bb717a6ffc905edeff71f97cba61f" - integrity sha512-nJGCJmVPJbd/5vYRjjEBr1IPpRntEax4WsFFdmH5almCFRf7Wwr40gzPSohY469aMV68VfBoP/qX3wmQQslu0g== +"@credo-ts/didcomm@0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@credo-ts/didcomm/-/didcomm-0.6.0.tgz#2508710d2af8eb8be963d59e282223951278bde6" + integrity sha512-QPInULf6ECSWk5SZoFKiXC8jcJFUhiRUFx2ghouyWsPb7wtN+eWkUMQNFt2+l0/TqqUmcvLlpAn9xICSTWQCsQ== dependencies: - "@credo-ts/core" "0.6.0-alpha-20250325224513" + "@credo-ts/core" "0.6.0" class-transformer "0.5.1" - class-validator "0.14.1" - luxon "^3.5.0" - query-string "^7.0.1" - rxjs "^7.8.0" - -"@credo-ts/didcomm@0.6.0-pr-2324-20250728121454": - version "0.6.0-pr-2324-20250728121454" - resolved "https://registry.yarnpkg.com/@credo-ts/didcomm/-/didcomm-0.6.0-pr-2324-20250728121454.tgz#37b94da1f5eaf1a7de9e2fc39f0a149face0e475" - integrity sha512-1oT1WjCGV4Z/lHzzGgGnsvjp/KbiSZA/EmOhXAOzJmpTk2fcWHQtvDMTOla4Jp55x3p4bd45BQIG5J0cToErkw== - dependencies: - "@credo-ts/core" "0.6.0-pr-2324-20250728121454" - class-transformer "0.5.1" - class-validator "0.14.1" - luxon "^3.5.0" - query-string "^7.0.1" + class-validator "^0.14.1" + luxon "^3.7.2" + query-string "^9.3.1" rxjs "^7.8.2" -"@credo-ts/indy-vdr@0.6.0-alpha-20250325224513": - version "0.6.0-alpha-20250325224513" - resolved "https://registry.yarnpkg.com/@credo-ts/indy-vdr/-/indy-vdr-0.6.0-alpha-20250325224513.tgz#ba72ec4ef9cb81f282b91b599099872deebddbe5" - integrity sha512-dFVZtBKVkZkgNb/ai9DxQNcN9Bw/6sysLVR3sstHqbn2+DWK4k2j5CCkHjFdJFizHpeH5RBKjy5ESS+SdENk2g== +"@credo-ts/indy-vdr@0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@credo-ts/indy-vdr/-/indy-vdr-0.6.0.tgz#e1b033ba8b3b47e9146eb70d47360504b1e7a68b" + integrity sha512-ziqw0k8KXK5KikLyw6AypuTbjfShi5DBbjQAgnn0CS7/iY394xZ3H9oVeaK94BezN7Axvm9uFsr7TS0pTApHJg== dependencies: - "@credo-ts/anoncreds" "0.6.0-alpha-20250325224513" - "@credo-ts/core" "0.6.0-alpha-20250325224513" + "@credo-ts/anoncreds" "0.6.0" + "@credo-ts/core" "0.6.0" -"@credo-ts/node@^0.6.0-alpha-20250325224513": - version "0.6.0-pr-2324-20250728121454" - resolved "https://registry.yarnpkg.com/@credo-ts/node/-/node-0.6.0-pr-2324-20250728121454.tgz#c63fa27bc99a93e47e50bcf90d3fe326345d925f" - integrity sha512-Oall4TL+cfVnP5T94SiWAFcPY1tlVRWNmSi8hUT/Qqzy2zpr6uTkS9rsII7F5bspdECUwUMUrsyQ9CmM5zJV4g== +"@credo-ts/node@^0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@credo-ts/node/-/node-0.6.0.tgz#963e610d38103feab39499da24d827bea44dee27" + integrity sha512-9p/3u6lU63wRfdxlRvAy15E+WOHcMJK7S4ftQ6icj75gDL3FlfT0qfZ2/R1eIANOkkzktOV0MhxVn+MyVrxLjQ== dependencies: "@2060.io/ffi-napi" "^4.0.9" "@2060.io/ref-napi" "^3.0.6" - "@credo-ts/core" "0.6.0-pr-2324-20250728121454" - "@credo-ts/didcomm" "0.6.0-pr-2324-20250728121454" - "@types/express" "^4.17.23" - express "^4.21.2" + "@credo-ts/core" "0.6.0" + "@credo-ts/didcomm" "0.6.0" + "@types/express" "^5.0.6" + express "^5.2.0" + rxjs "^7.8.2" + ws "^8.18.3" + +"@credo-ts/openid4vc@0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@credo-ts/openid4vc/-/openid4vc-0.6.0.tgz#8fad7f9720b1c71a341ec6ff840aab7205bee205" + integrity sha512-p2+4eMFuNB6vaZn4IM9EkXZE4eqoswjI8YzD4zcOHIGO02XgbW6X0Ftj5TSO2Djc5pmYDqEp/+G/ESWsinUAXw== + dependencies: + "@credo-ts/core" "0.6.0" + "@openid4vc/oauth2" "^0.4.0" + "@openid4vc/openid4vci" "^0.4.0" + "@openid4vc/openid4vp" "^0.4.0" + "@openid4vc/utils" "^0.4.0" + "@types/express" "^5.0.6" + class-transformer "0.5.1" + express "^5.2.0" rxjs "^7.8.2" - ws "^8.18.2" - -"@credo-ts/openid4vc@0.6.0-alpha-20250325224513": - version "0.6.0-alpha-20250325224513" - resolved "https://registry.yarnpkg.com/@credo-ts/openid4vc/-/openid4vc-0.6.0-alpha-20250325224513.tgz#04aebd7f631353c406795fa520999a06e8a0e630" - integrity sha512-DRgMZ3gX3mCnocY6XNKmFllLmH7L58r6UQue/bHPKj8YcrfiLW2Pha2abg9W/7y13E4oNvpgznup64bvUn8VqQ== - dependencies: - "@credo-ts/core" "0.6.0-alpha-20250325224513" - "@openid4vc/oauth2" "0.3.0-alpha-20250322171044" - "@openid4vc/openid4vci" "0.3.0-alpha-20250322171044" - "@openid4vc/openid4vp" "0.3.0-alpha-20250322171044" - "@openid4vc/utils" "0.3.0-alpha-20250322171044" - class-transformer "^0.5.1" - rxjs "^7.8.0" - zod "^3.23.8" + zod "^4.1.12" "@credo-ts/push-notifications@^0.7.1": version "0.7.1" @@ -556,25 +517,25 @@ class-validator "0.14.1" tsyringe "^4.6.0" -"@credo-ts/question-answer@0.6.0-alpha-20250325224513": - version "0.6.0-alpha-20250325224513" - resolved "https://registry.yarnpkg.com/@credo-ts/question-answer/-/question-answer-0.6.0-alpha-20250325224513.tgz#69b528e70104eea117d297eaabe69328c1d76149" - integrity sha512-Xa/hnN5gHB61ZuiLvLlU053jGimLAXHXlClw6n77R2E5E9EVvHXAGJ9FeL+tPNWAqGjtmGsDUI16ZhsthN3MJw== +"@credo-ts/question-answer@0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@credo-ts/question-answer/-/question-answer-0.6.0.tgz#e948fa6980744e3fa5e373ddca3357459384b72f" + integrity sha512-jxkO2e3j4NNohBnD/A8LhhDwMfGh3f1Hi3QjcCNI2lpGduceQnb/YD9E4tMJM70Id0oxGaoLKUV8vGyL47m7ZQ== dependencies: - "@credo-ts/core" "0.6.0-alpha-20250325224513" - "@credo-ts/didcomm" "0.6.0-alpha-20250325224513" + "@credo-ts/core" "0.6.0" + "@credo-ts/didcomm" "0.6.0" class-transformer "0.5.1" - class-validator "0.14.1" - rxjs "^7.8.0" + class-validator "^0.14.1" + rxjs "^7.8.2" -"@credo-ts/tenants@0.6.0-alpha-20250325224513": - version "0.6.0-alpha-20250325224513" - resolved "https://registry.yarnpkg.com/@credo-ts/tenants/-/tenants-0.6.0-alpha-20250325224513.tgz#8fbee1e755ba5005076629d6f54b640c214fab07" - integrity sha512-YbYHdYCCwGYrPrZRKgJ4HvlHTp0CcPYYa+hrcQl56lLcAlhdG+/lbItcyHJwbqio7DCjD3TmwyatgLkva6qznA== +"@credo-ts/tenants@0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@credo-ts/tenants/-/tenants-0.6.0.tgz#10f74f27980e093094c247a0a1846e5e38b2b8a7" + integrity sha512-rPPQlW4uWgmVnvd0P9HbLyHqiLeJAeQ2n+9mRE1YkCXyUzD6zysBlN49jVgc9nvlSxuxb5BiFafGJpX11I8Rmw== dependencies: - "@credo-ts/core" "0.6.0-alpha-20250325224513" - "@credo-ts/didcomm" "0.6.0-alpha-20250325224513" - async-mutex "^0.4.0" + "@credo-ts/core" "0.6.0" + "@credo-ts/didcomm" "0.6.0" + async-mutex "^0.5.0" "@cspotcode/source-map-support@^0.8.0": version "0.8.1" @@ -583,237 +544,122 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" -"@digitalbazaar/bitstring@^3.0.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@digitalbazaar/bitstring/-/bitstring-3.1.0.tgz#bbbacb80eaaa53594723a801879b3a95a0401b11" - integrity sha512-Cii+Sl++qaexOvv3vchhgZFfSmtHPNIPzGegaq4ffPnflVXFu+V2qrJ17aL2+gfLxrlC/zazZFuAltyKTPq7eg== - dependencies: - base64url-universal "^2.0.0" - pako "^2.0.4" - -"@digitalbazaar/http-client@^3.4.1": - version "3.4.1" - resolved "https://registry.yarnpkg.com/@digitalbazaar/http-client/-/http-client-3.4.1.tgz#5116fc44290d647cfe4b615d1f3fad9d6005e44d" - integrity sha512-Ahk1N+s7urkgj7WvvUND5f8GiWEPfUw0D41hdElaqLgu8wZScI8gdI0q+qWw5N1d35x7GCRH2uk9mi+Uzo9M3g== - dependencies: - ky "^0.33.3" - ky-universal "^0.11.0" - undici "^5.21.2" - "@digitalbazaar/security-context@^1.0.0": version "1.0.1" resolved "https://registry.yarnpkg.com/@digitalbazaar/security-context/-/security-context-1.0.1.tgz#badc4b8da03411a32d4e7321ce7c4b355776b410" integrity sha512-0WZa6tPiTZZF8leBtQgYAfXQePFQp2z5ivpCEN/iZguYYZ0TB9qRmWtan5XH6mNFuusHtMcyIzAcReyE6rZPhA== -"@digitalbazaar/vc-status-list-context@^3.0.1": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@digitalbazaar/vc-status-list-context/-/vc-status-list-context-3.1.1.tgz#cbe570d8d6d39d7b636bf1fce3c5601e2d104696" - integrity sha512-cMVtd+EV+4KN2kUG4/vsV74JVsGE6dcpod6zRoFB/AJA2W/sZbJqR44KL3G6P262+GcAECNhtnSsKsTnQ6y8+w== - -"@digitalbazaar/vc-status-list@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@digitalbazaar/vc-status-list/-/vc-status-list-7.1.0.tgz#1d585a1766106e1586e1e2f87092dd0381b3f036" - integrity sha512-p5uxKJlX13N8TcTuv9qFDeej+6bndU+Rh1Cez2MT+bXQE6Jpn5t336FBSHmcECB4yUfZQpkmV/LOcYU4lW8Ojw== - dependencies: - "@digitalbazaar/bitstring" "^3.0.0" - "@digitalbazaar/vc" "^5.0.0" - "@digitalbazaar/vc-status-list-context" "^3.0.1" - credentials-context "^2.0.0" - -"@digitalbazaar/vc@^5.0.0": - version "5.0.0" - resolved "https://registry.yarnpkg.com/@digitalbazaar/vc/-/vc-5.0.0.tgz#20180fb492cb755eb2c6b6df9a17f7407d5e4b5a" - integrity sha512-XmLM7Ag5W+XidGnFuxFIyUFSMnHnWEMJlHei602GG94+WzFJ6Ik8txzPQL8T18egSoiTsd1VekymbIlSimhuaQ== - dependencies: - credentials-context "^2.0.0" - jsonld "^8.0.0" - jsonld-signatures "^11.0.0" - -"@digitalcredentials/base58-universal@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@digitalcredentials/base58-universal/-/base58-universal-1.0.1.tgz#41b5a16cdeaac9cf01b23f1e564c560c2599b607" - integrity sha512-1xKdJnfITMvrF/sCgwBx2C4p7qcNAARyIvrAOZGqIHmBaT/hAenpC8bf44qVY+UIMuCYP23kqpIfJQebQDThDQ== - -"@digitalcredentials/base64url-universal@^2.0.2": - version "2.0.6" - resolved "https://registry.yarnpkg.com/@digitalcredentials/base64url-universal/-/base64url-universal-2.0.6.tgz#43c59c62a33b024e7adc3c56403d18dbcb61ec61" - integrity sha512-QJyK6xS8BYNnkKLhEAgQc6Tb9DMe+GkHnBAWJKITCxVRXJAFLhJnr+FsJnCThS3x2Y0UiiDAXoWjwMqtUrp4Kg== - dependencies: - base64url "^3.0.1" - -"@digitalcredentials/bitstring@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@digitalcredentials/bitstring/-/bitstring-2.0.1.tgz#bb887f1d0999980598754e426d831c96a26a3863" - integrity sha512-9priXvsEJGI4LYHPwLqf5jv9HtQGlG0MgeuY8Q4NHN+xWz5rYMylh1TYTVThKa3XI6xF2pR2oEfKZD21eWXveQ== - dependencies: - "@digitalcredentials/base64url-universal" "^2.0.2" - pako "^2.0.4" - -"@digitalcredentials/ed25519-signature-2020@^3.0.2": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@digitalcredentials/ed25519-signature-2020/-/ed25519-signature-2020-3.0.2.tgz#2df8fb6f814a1964b40ebb3402d41630c30120da" - integrity sha512-R8IrR21Dh+75CYriQov3nVHKaOVusbxfk9gyi6eCAwLHKn6fllUt+2LQfuUrL7Ts/sGIJqQcev7YvkX9GvyYRA== - dependencies: - "@digitalcredentials/base58-universal" "^1.0.1" - "@digitalcredentials/ed25519-verification-key-2020" "^3.1.1" - "@digitalcredentials/jsonld-signatures" "^9.3.1" - ed25519-signature-2018-context "^1.1.0" - ed25519-signature-2020-context "^1.0.1" +"@digitalcredentials/credentials-v2-context@^0.0.1-beta.0": + version "0.0.1-beta.0" + resolved "https://registry.yarnpkg.com/@digitalcredentials/credentials-v2-context/-/credentials-v2-context-0.0.1-beta.0.tgz#9892f5342fb11ce47afa19e34a245dd02ea6b90d" + integrity sha512-i0AQXFnMeOqf2uKNBUcnN78mO8L9H91QKMdpDqsgDYzTIKGLnNCOOxbRbrJOimhR+soYO64xn54U8/R7Qx0nyA== -"@digitalcredentials/ed25519-verification-key-2020@^3.1.1": - version "3.2.2" - resolved "https://registry.yarnpkg.com/@digitalcredentials/ed25519-verification-key-2020/-/ed25519-verification-key-2020-3.2.2.tgz#cdf271bf4bb44dd2c417dcde6d7a0436e31d84ca" - integrity sha512-ZfxNFZlA379MZpf+gV2tUYyiZ15eGVgjtCQLWlyu3frWxsumUgv++o0OJlMnrDsWGwzFMRrsXcosd5+752rLOA== - dependencies: - "@digitalcredentials/base58-universal" "^1.0.1" - "@stablelib/ed25519" "^1.0.1" - base64url-universal "^1.1.0" - crypto-ld "^6.0.0" - -"@digitalcredentials/http-client@^1.0.0": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@digitalcredentials/http-client/-/http-client-1.2.2.tgz#8b09ab6f1e3aa8878d91d3ca51946ca8265cc92e" - integrity sha512-YOwaE+vUDSwiDhZT0BbXSWVg+bvp1HA1eg/gEc8OCwCOj9Bn9FRQdu8P9Y/fnYqyFCioDwwTRzGxgJLl50baEg== +"@digitalcredentials/http-client@^5.0.1": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@digitalcredentials/http-client/-/http-client-5.0.4.tgz#44e73ea1133d24bab720c0515f92df9126912fe7" + integrity sha512-TbbfFauhd5fUAcZ/6TDenTuYqkzqdEhxYk1Rqicxcz33B9rzvJcmT+/81KF9DrUXmu6gpoqCranT2UkZftsxZA== dependencies: - ky "^0.25.1" - ky-universal "^0.8.2" + ky "^1.0.1" + undici "^6.6.2" -"@digitalcredentials/jsonld-signatures@^9.3.1", "@digitalcredentials/jsonld-signatures@^9.3.2", "@digitalcredentials/jsonld-signatures@^9.4.0": - version "9.4.0" - resolved "https://registry.yarnpkg.com/@digitalcredentials/jsonld-signatures/-/jsonld-signatures-9.4.0.tgz#d5881122c4202449b88a7e2384f8e615ae55582c" - integrity sha512-DnR+HDTm7qpcDd0wcD1w6GdlAwfHjQSgu+ahion8REkCkkMRywF+CLunU7t8AZpFB2Gr/+N8naUtiEBNje1Oew== +"@digitalcredentials/jsonld-signatures@^12.0.1": + version "12.0.1" + resolved "https://registry.yarnpkg.com/@digitalcredentials/jsonld-signatures/-/jsonld-signatures-12.0.1.tgz#af0c0018f84721218463bab203ecbec85606f6ff" + integrity sha512-KdyE7Bex+boqKRbvxofRyuI09BD6/8hQGSC5qbrXEmHd0oSLqePqKBM2pu9UZnzjxMZrN9sB3RqHxpijYEFh/w== dependencies: "@digitalbazaar/security-context" "^1.0.0" - "@digitalcredentials/jsonld" "^6.0.0" + "@digitalcredentials/jsonld" "^9.0.0" fast-text-encoding "^1.0.3" - isomorphic-webcrypto "^2.3.8" serialize-error "^8.0.1" -"@digitalcredentials/jsonld@^5.2.1": - version "5.2.2" - resolved "https://registry.yarnpkg.com/@digitalcredentials/jsonld/-/jsonld-5.2.2.tgz#d2bdefe25788ece77e900a9491c64c2187e3344c" - integrity sha512-hz7YR3kv6+8UUdgMyTGl1o8NjVKKwnMry/Rh/rWeAvwL+NqgoUHorWzI3rM+PW+MPFyDC0ieXStClt9n9D9SGA== +"@digitalcredentials/jsonld@^9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@digitalcredentials/jsonld/-/jsonld-9.0.0.tgz#545abb40fd87caaa5ba95ec41b9ff84cb0d2696a" + integrity sha512-lWVpg65xQbi4lvXWs3BezCwPrGDAllFjHwTBUWJCoKsfGzxtxTwbRNXpfhii5psQ2vvpjPXSI+y0uyRNOzr4cw== dependencies: - "@digitalcredentials/http-client" "^1.0.0" - "@digitalcredentials/rdf-canonize" "^1.0.0" - canonicalize "^1.0.1" - lru-cache "^6.0.0" - -"@digitalcredentials/jsonld@^6.0.0": - version "6.0.0" - resolved "https://registry.yarnpkg.com/@digitalcredentials/jsonld/-/jsonld-6.0.0.tgz#05d34cb1d81c4bbdfacf61f8958bbaede33be598" - integrity sha512-5tTakj0/GsqAJi8beQFVMQ97wUJZnuxViW9xRuAATL6eOBIefGBwHkVryAgEq2I4J/xKgb/nEyw1ZXX0G8wQJQ== - dependencies: - "@digitalcredentials/http-client" "^1.0.0" - "@digitalcredentials/rdf-canonize" "^1.0.0" + "@digitalcredentials/http-client" "^5.0.1" canonicalize "^1.0.1" lru-cache "^6.0.0" + rdf-canonize "^3.4.0" "@digitalcredentials/open-badges-context@^2.1.0": version "2.1.0" resolved "https://registry.yarnpkg.com/@digitalcredentials/open-badges-context/-/open-badges-context-2.1.0.tgz#cefd29af4642adf8feeed5bb7ede663b14913c2f" integrity sha512-VK7X5u6OoBFxkyIFplNqUPVbo+8vFSAEoam8tSozpj05KPfcGw41Tp5p9fqMnY38oPfwtZR2yDNSctj/slrE0A== -"@digitalcredentials/rdf-canonize@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@digitalcredentials/rdf-canonize/-/rdf-canonize-1.0.0.tgz#6297d512072004c2be7f280246383a9c4b0877ff" - integrity sha512-z8St0Ex2doecsExCFK1uI4gJC+a5EqYYu1xpRH1pKmqSS9l/nxfuVxexNFyaeEum4dUdg1EetIC2rTwLIFhPRA== +"@digitalcredentials/vc@^10.0.2": + version "10.0.2" + resolved "https://registry.yarnpkg.com/@digitalcredentials/vc/-/vc-10.0.2.tgz#9716d161f55657cd818c2baf7dcd927729d00d0c" + integrity sha512-Mmts8WtAQmgdrSurQv+SFZNozNgvPzsruWQNIBlmfrlJ7QSyCoO7jybSnq43EuLm3UcqyqSb2mLHwAza310mhw== dependencies: - fast-text-encoding "^1.0.3" - isomorphic-webcrypto "^2.3.8" - -"@digitalcredentials/vc-status-list@^5.0.2": - version "5.0.2" - resolved "https://registry.yarnpkg.com/@digitalcredentials/vc-status-list/-/vc-status-list-5.0.2.tgz#9de8b23b6d533668a354ff464a689ecc42f24445" - integrity sha512-PI0N7SM0tXpaNLelbCNsMAi34AjOeuhUzMSYTkHdeqRPX7oT2F3ukyOssgr4koEqDxw9shHtxHu3fSJzrzcPMQ== - dependencies: - "@digitalbazaar/vc-status-list-context" "^3.0.1" - "@digitalcredentials/bitstring" "^2.0.1" - "@digitalcredentials/vc" "^4.1.1" - credentials-context "^2.0.0" - -"@digitalcredentials/vc@^4.1.1": - version "4.2.0" - resolved "https://registry.yarnpkg.com/@digitalcredentials/vc/-/vc-4.2.0.tgz#d2197b26547d670965d5969a9e49437f244b5944" - integrity sha512-8Rxpn77JghJN7noBQdcMuzm/tB8vhDwPoFepr3oGd5w+CyJxOk2RnBlgIGlAAGA+mALFWECPv1rANfXno+hdjA== - dependencies: - "@digitalcredentials/jsonld" "^5.2.1" - "@digitalcredentials/jsonld-signatures" "^9.3.1" - credentials-context "^2.0.0" - -"@digitalcredentials/vc@^6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/@digitalcredentials/vc/-/vc-6.0.1.tgz#e4bdbac37d677c5288f2ad8d9ea59c3b41e0fd78" - integrity sha512-TZgLoi00Jc9uv3b6jStH+G8+bCqpHIqFw9DYODz+fVjNh197ksvcYqSndUDHa2oi0HCcK+soI8j4ba3Sa4Pl4w== - dependencies: - "@digitalbazaar/vc-status-list" "^7.0.0" - "@digitalcredentials/ed25519-signature-2020" "^3.0.2" - "@digitalcredentials/jsonld" "^6.0.0" - "@digitalcredentials/jsonld-signatures" "^9.3.2" + "@digitalcredentials/credentials-v2-context" "^0.0.1-beta.0" + "@digitalcredentials/jsonld" "^9.0.0" + "@digitalcredentials/jsonld-signatures" "^12.0.1" "@digitalcredentials/open-badges-context" "^2.1.0" - "@digitalcredentials/vc-status-list" "^5.0.2" credentials-context "^2.0.0" - fix-esm "^1.0.1" + ed25519-signature-2018-context "^1.1.0" "@emnapi/core@^1.4.3": - version "1.4.5" - resolved "https://registry.yarnpkg.com/@emnapi/core/-/core-1.4.5.tgz#bfbb0cbbbb9f96ec4e2c4fd917b7bbe5495ceccb" - integrity sha512-XsLw1dEOpkSX/WucdqUhPWP7hDxSvZiY+fsUC14h+FtQ2Ifni4znbBt8punRX+Uj2JG/uDb8nEHVKvrVlvdZ5Q== + version "1.7.1" + resolved "https://registry.yarnpkg.com/@emnapi/core/-/core-1.7.1.tgz#3a79a02dbc84f45884a1806ebb98e5746bdfaac4" + integrity sha512-o1uhUASyo921r2XtHYOHy7gdkGLge8ghBEQHMWmyJFoXlpU58kIrhhN3w26lpQb6dspetweapMn2CSNwQ8I4wg== dependencies: - "@emnapi/wasi-threads" "1.0.4" + "@emnapi/wasi-threads" "1.1.0" tslib "^2.4.0" "@emnapi/runtime@^1.4.3": - version "1.4.5" - resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-1.4.5.tgz#c67710d0661070f38418b6474584f159de38aba9" - integrity sha512-++LApOtY0pEEz1zrd9vy1/zXVaVJJ/EbAF3u0fXIzPJEDtnITsBGbbK0EkM72amhl/R5b+5xx0Y/QhcVOpuulg== + version "1.7.1" + resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-1.7.1.tgz#a73784e23f5d57287369c808197288b52276b791" + integrity sha512-PVtJr5CmLwYAU9PZDMITZoR5iAOShYREoR45EyyLrbntV50mdePTgUn4AmOw90Ifcj+x2kRjdzr1HP3RrNiHGA== dependencies: tslib "^2.4.0" -"@emnapi/wasi-threads@1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@emnapi/wasi-threads/-/wasi-threads-1.0.4.tgz#703fc094d969e273b1b71c292523b2f792862bf4" - integrity sha512-PJR+bOmMOPH8AtcTGAyYNiuJ3/Fcoj2XN/gBEWzDIKh254XO+mM9XoXHk5GNEhodxeMznbg7BlRojVbKN+gC6g== +"@emnapi/wasi-threads@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@emnapi/wasi-threads/-/wasi-threads-1.1.0.tgz#60b2102fddc9ccb78607e4a3cf8403ea69be41bf" + integrity sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ== dependencies: tslib "^2.4.0" -"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.7.0": - version "4.7.0" - resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz#607084630c6c033992a082de6e6fbc1a8b52175a" - integrity sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw== +"@eslint-community/eslint-utils@^4.7.0", "@eslint-community/eslint-utils@^4.8.0": + version "4.9.0" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz#7308df158e064f0dd8b8fdb58aa14fa2a7f913b3" + integrity sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g== dependencies: eslint-visitor-keys "^3.4.3" "@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.12.1": - version "4.12.1" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.1.tgz#cfc6cffe39df390a3841cde2abccf92eaa7ae0e0" - integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ== + version "4.12.2" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.2.tgz#bccdf615bcf7b6e8db830ec0b8d21c9a25de597b" + integrity sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew== -"@eslint/config-array@^0.21.0": - version "0.21.0" - resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.21.0.tgz#abdbcbd16b124c638081766392a4d6b509f72636" - integrity sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ== +"@eslint/config-array@^0.21.1": + version "0.21.1" + resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.21.1.tgz#7d1b0060fea407f8301e932492ba8c18aff29713" + integrity sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA== dependencies: - "@eslint/object-schema" "^2.1.6" + "@eslint/object-schema" "^2.1.7" debug "^4.3.1" minimatch "^3.1.2" -"@eslint/config-helpers@^0.3.1": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@eslint/config-helpers/-/config-helpers-0.3.1.tgz#d316e47905bd0a1a931fa50e669b9af4104d1617" - integrity sha512-xR93k9WhrDYpXHORXpxVL5oHj3Era7wo6k/Wd8/IsQNnZUTzkGS29lyn3nAT05v6ltUuTFVCCYDEGfy2Or/sPA== +"@eslint/config-helpers@^0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@eslint/config-helpers/-/config-helpers-0.4.2.tgz#1bd006ceeb7e2e55b2b773ab318d300e1a66aeda" + integrity sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw== + dependencies: + "@eslint/core" "^0.17.0" -"@eslint/core@^0.15.2": - version "0.15.2" - resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.15.2.tgz#59386327d7862cc3603ebc7c78159d2dcc4a868f" - integrity sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg== +"@eslint/core@^0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.17.0.tgz#77225820413d9617509da9342190a2019e78761c" + integrity sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ== dependencies: "@types/json-schema" "^7.0.15" "@eslint/eslintrc@^3.3.1": - version "3.3.1" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.3.1.tgz#e55f7f1dd400600dd066dbba349c4c0bac916964" - integrity sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ== + version "3.3.3" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.3.3.tgz#26393a0806501b5e2b6a43aa588a4d8df67880ac" + integrity sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ== dependencies: ajv "^6.12.4" debug "^4.3.2" @@ -821,26 +667,26 @@ globals "^14.0.0" ignore "^5.2.0" import-fresh "^3.2.1" - js-yaml "^4.1.0" + js-yaml "^4.1.1" minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@9.33.0": - version "9.33.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.33.0.tgz#475c92fdddab59b8b8cab960e3de2564a44bf368" - integrity sha512-5K1/mKhWaMfreBGJTwval43JJmkip0RmM+3+IuqupeSKNC/Th2Kc7ucaq5ovTSra/OOKB9c58CGSz3QMVbWt0A== +"@eslint/js@9.39.1": + version "9.39.1" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.39.1.tgz#0dd59c3a9f40e3f1882975c321470969243e0164" + integrity sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw== -"@eslint/object-schema@^2.1.6": - version "2.1.6" - resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.6.tgz#58369ab5b5b3ca117880c0f6c0b0f32f6950f24f" - integrity sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA== +"@eslint/object-schema@^2.1.7": + version "2.1.7" + resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.7.tgz#6e2126a1347e86a4dedf8706ec67ff8e107ebbad" + integrity sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA== -"@eslint/plugin-kit@^0.3.5": - version "0.3.5" - resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz#fd8764f0ee79c8ddab4da65460c641cefee017c5" - integrity sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w== +"@eslint/plugin-kit@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz#9779e3fd9b7ee33571a57435cf4335a1794a6cb2" + integrity sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA== dependencies: - "@eslint/core" "^0.15.2" + "@eslint/core" "^0.17.0" levn "^0.4.1" "@ethersproject/abi@5.8.0", "@ethersproject/abi@^5.1.2", "@ethersproject/abi@^5.8.0": @@ -1191,21 +1037,21 @@ integrity sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA== "@grpc/grpc-js@^1.7.1": - version "1.13.4" - resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.13.4.tgz#922fbc496e229c5fa66802d2369bf181c1df1c5a" - integrity sha512-GsFaMXCkMqkKIvwCQjCrwH+GHbPKBjhwo/8ZuUkWHqbI73Kky9I+pQltrlT0+MWpedCoosda53lgjYfyEPgxBg== + version "1.14.2" + resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.14.2.tgz#d245069181a1a8057abd35522d6052482730cf19" + integrity sha512-QzVUtEFyu05UNx2xr0fCQmStUO17uVQhGNowtxs00IgTZT6/W2PBLfUkj30s0FKJ29VtTa3ArVNIhNP6akQhqA== dependencies: - "@grpc/proto-loader" "^0.7.13" + "@grpc/proto-loader" "^0.8.0" "@js-sdsl/ordered-map" "^4.4.2" -"@grpc/proto-loader@^0.7.13": - version "0.7.15" - resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.7.15.tgz#4cdfbf35a35461fc843abe8b9e2c0770b5095e60" - integrity sha512-tMXdRCfYVixjuFK+Hk0Q1s38gV9zDiDJfWL3h1rv4Qc39oILCu1TRTDt7+fGUI8K4G1Fj125Hx/ru3azECWTyQ== +"@grpc/proto-loader@^0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.8.0.tgz#b6c324dd909c458a0e4aa9bfd3d69cf78a4b9bd8" + integrity sha512-rc1hOQtjIWGxcxpb9aHAfLpIctjEnsDehj0DAiVfBlmT84uvR0uUtN2hEi/ecvWVjXUGf5qPF4qEgiLOx1YIMQ== dependencies: lodash.camelcase "^4.3.0" long "^5.0.0" - protobufjs "^7.2.5" + protobufjs "^7.5.3" yargs "^17.7.2" "@hapi/accept@^6.0.3": @@ -1296,9 +1142,9 @@ integrity sha512-w+lKW+yRrLhJu620jT3y+5g2mHqnKfepreykvdOcl9/6up8GrQQn+l3FRTsjHTKbkbfQFkuksHpdv2EcpKcJ4Q== "@hapi/hapi@^21.3.12": - version "21.4.3" - resolved "https://registry.yarnpkg.com/@hapi/hapi/-/hapi-21.4.3.tgz#e829eef35659d7618831f4431382229107a71d07" - integrity sha512-Q7g0ZY4gxU69wabFKH75qR0AFOdiOECj6vGqTHBSO5Lrwe6TwD8r9LkYQIbvtG8N423VDpdVsiZP8MnBwmD6Hw== + version "21.4.4" + resolved "https://registry.yarnpkg.com/@hapi/hapi/-/hapi-21.4.4.tgz#89c239135be1ff2adeb586df157dee7a49593291" + integrity sha512-vI6JPLR99WZDKI1nriD0qXDPp8sKFkZfNVGrDDZafDQ8jU+3ERMwS0vPac5aGae6yyyoGZGOBiYExw4N8ScSTQ== dependencies: "@hapi/accept" "^6.0.3" "@hapi/ammo" "^6.0.1" @@ -1313,9 +1159,9 @@ "@hapi/podium" "^5.0.2" "@hapi/shot" "^6.0.2" "@hapi/somever" "^4.1.1" - "@hapi/statehood" "^8.2.0" + "@hapi/statehood" "^8.2.1" "@hapi/subtext" "^8.1.1" - "@hapi/teamwork" "^6.0.0" + "@hapi/teamwork" "^6.0.1" "@hapi/topo" "^6.0.2" "@hapi/validate" "^2.0.1" @@ -1401,10 +1247,10 @@ "@hapi/bounce" "^3.0.1" "@hapi/hoek" "^11.0.2" -"@hapi/statehood@^8.2.0": - version "8.2.0" - resolved "https://registry.yarnpkg.com/@hapi/statehood/-/statehood-8.2.0.tgz#f9e9367ad1a02a975dc6b24dad728af19962da0f" - integrity sha512-63JlCVIrsmuunWsyc3OeuFO+gH6v56swLCl7OM1w09l/exQKPUxSUDF2Slkuw8k91nIzr0A2/aPvjLOWf9ksrg== +"@hapi/statehood@^8.2.1": + version "8.2.1" + resolved "https://registry.yarnpkg.com/@hapi/statehood/-/statehood-8.2.1.tgz#4435f11f78873f07aa7422a95386ae9802a914e1" + integrity sha512-xf72TG/QINW26jUu+uL5H+crE1o8GplIgfPWwPZhnAGJzetIVAQEQYvzq+C0aEVHg5/lMMtQ+L9UryuSa5Yjkg== dependencies: "@hapi/boom" "^10.0.1" "@hapi/bounce" "^3.0.1" @@ -1427,10 +1273,10 @@ "@hapi/pez" "^6.1.0" "@hapi/wreck" "^18.0.1" -"@hapi/teamwork@^6.0.0": - version "6.0.0" - resolved "https://registry.yarnpkg.com/@hapi/teamwork/-/teamwork-6.0.0.tgz#b3a173cf811ba59fc6ee22318a1b51f4561f06e0" - integrity sha512-05HumSy3LWfXpmJ9cr6HzwhAavrHkJ1ZRCmNE2qJMihdM5YcWreWPfyN0yKT2ZjCM92au3ZkuodjBxOibxM67A== +"@hapi/teamwork@^6.0.0", "@hapi/teamwork@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/@hapi/teamwork/-/teamwork-6.0.1.tgz#2f6496170f47abd8446930447f64e64ba1d57d3f" + integrity sha512-52OXRslUfYwXAOG8k58f2h2ngXYQGP0x5RPOo+eWA/FtyLgHjGMrE3+e9LSXP/0q2YfHAK5wj9aA9DTy1K+kyQ== "@hapi/topo@^5.1.0": version "5.1.0" @@ -1476,24 +1322,19 @@ integrity sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA== "@humanfs/node@^0.16.6": - version "0.16.6" - resolved "https://registry.yarnpkg.com/@humanfs/node/-/node-0.16.6.tgz#ee2a10eaabd1131987bf0488fd9b820174cd765e" - integrity sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw== + version "0.16.7" + resolved "https://registry.yarnpkg.com/@humanfs/node/-/node-0.16.7.tgz#822cb7b3a12c5a240a24f621b5a2413e27a45f26" + integrity sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ== dependencies: "@humanfs/core" "^0.19.1" - "@humanwhocodes/retry" "^0.3.0" + "@humanwhocodes/retry" "^0.4.0" "@humanwhocodes/module-importer@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -"@humanwhocodes/retry@^0.3.0": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.1.tgz#c72a5c76a9fbaf3488e231b13dc52c0da7bab42a" - integrity sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA== - -"@humanwhocodes/retry@^0.4.2": +"@humanwhocodes/retry@^0.4.0", "@humanwhocodes/retry@^0.4.2": version "0.4.3" resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.3.tgz#c2b9d2e374ee62c586d3adbea87199b1d7a7a6ba" integrity sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ== @@ -1768,6 +1609,14 @@ "@jridgewell/sourcemap-codec" "^1.5.0" "@jridgewell/trace-mapping" "^0.3.24" +"@jridgewell/remapping@^2.3.5": + version "2.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/remapping/-/remapping-2.3.5.tgz#375c476d1972947851ba1e15ae8f123047445aa1" + integrity sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ== + dependencies: + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.24" + "@jridgewell/resolve-uri@^3.0.3", "@jridgewell/resolve-uri@^3.1.0": version "3.1.2" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" @@ -1787,9 +1636,9 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.28": - version "0.3.30" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.30.tgz#4a76c4daeee5df09f5d3940e087442fb36ce2b99" - integrity sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q== + version "0.3.31" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz#db15d6781c931f3a251a3dac39501c98a6082fd0" + integrity sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw== dependencies: "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" @@ -1845,12 +1694,12 @@ dependencies: "@noble/hashes" "1.3.2" -"@noble/curves@^1.8.1": - version "1.9.7" - resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.9.7.tgz#79d04b4758a43e4bca2cbdc62e7771352fa6b951" - integrity sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw== +"@noble/curves@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-2.0.1.tgz#64ba8bd5e8564a02942655602515646df1cdb3ad" + integrity sha512-vs1Az2OOTBiP4q0pwjW5aF0xp9n4MxVrmkFBxc6EKZc6ddYx5gaZiAsZoq0uRRXWbi3AT/sBqn05eRPtn1JCPw== dependencies: - "@noble/hashes" "1.8.0" + "@noble/hashes" "2.0.1" "@noble/hashes@1.3.2": version "1.3.2" @@ -1862,36 +1711,20 @@ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.6.1.tgz#df6e5943edcea504bac61395926d6fd67869a0d5" integrity sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w== -"@noble/hashes@1.8.0", "@noble/hashes@^1.1.5", "@noble/hashes@^1.7.1": +"@noble/hashes@2.0.1", "@noble/hashes@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-2.0.1.tgz#fc1a928061d1232b0a52bb754393c37a5216c89e" + integrity sha512-XlOlEbQcE9fmuXxrVTXCTlG2nlRXa9Rj3rr5Ue/+tX+nmkgbX720YHh0VR3hBF9xDvwnb8D2shVGOwNx+ulArw== + +"@noble/hashes@^1.1.5": version "1.8.0" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.8.0.tgz#cee43d801fcef9644b11b8194857695acd5f815a" integrity sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A== -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - dependencies: - "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.walk@^1.2.3": - version "1.2.8" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" - integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== - dependencies: - "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" - "@nomicfoundation/hardhat-verify@^2.0.3": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.1.1.tgz#0af5fc4228df860062865fcafb4a01bc0b89f8a3" - integrity sha512-K1plXIS42xSHDJZRkrE2TZikqxp9T4y6jUMUNI/imLgN5uCcEQokmfU0DlyP9zzHncYK92HlT5IWP35UVCLrPw== + version "2.1.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.1.3.tgz#f61a192a792b39f9978cef1450047deaff3ea052" + integrity sha512-danbGjPp2WBhLkJdQy9/ARM3WQIK+7vwzE0urNem1qZJjh9f54Kf5f1xuQv8DvqewUAkuPxVt/7q4Grz5WjqSg== dependencies: "@ethersproject/abi" "^5.1.2" "@ethersproject/address" "^5.0.2" @@ -1903,39 +1736,39 @@ table "^6.8.0" undici "^5.14.0" -"@openid4vc/oauth2@0.3.0-alpha-20250322171044": - version "0.3.0-alpha-20250322171044" - resolved "https://registry.yarnpkg.com/@openid4vc/oauth2/-/oauth2-0.3.0-alpha-20250322171044.tgz#75adec0345f01504c7d9abe16ddc30c72c0132c3" - integrity sha512-NylLLsYhj2239CgQW20WyR5bHfyqm+8VpMeXKrN0b9ds+ViHaNMpwtouYCK2rGzg8lnY7ugacfdo8RmnC49T3Q== +"@openid4vc/oauth2@0.4.1", "@openid4vc/oauth2@^0.4.0": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@openid4vc/oauth2/-/oauth2-0.4.1.tgz#550c9e55770eda2a54cbdd148096c0ff88b144eb" + integrity sha512-x2y7VF0fc02LBHrJWeEtNIgfXDt9X6w0bKUhn/aJ8aKueE/E74n+aEpW5qRMMnAKlMCryCzs5MUaoBvELZ84Lw== dependencies: - "@openid4vc/utils" "0.3.0-alpha-20250322171044" - zod "^3.24.1" + "@openid4vc/utils" "0.4.1" + zod "^4.1.13" -"@openid4vc/openid4vci@0.3.0-alpha-20250322171044": - version "0.3.0-alpha-20250322171044" - resolved "https://registry.yarnpkg.com/@openid4vc/openid4vci/-/openid4vci-0.3.0-alpha-20250322171044.tgz#9ac667e56d5e20ff4e71d27cd98a5065923fbccb" - integrity sha512-mhNNuI6xinAX7VOFqnhoUGr9IFQswU/5ZCWNW++INbNAJxgjIDYLwCnpx2F4Nx0B+jbZbUpOwnHnVEIGdQAP8A== +"@openid4vc/openid4vci@^0.4.0": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@openid4vc/openid4vci/-/openid4vci-0.4.1.tgz#38d320f7c3b7e1feba4d2885a1e35f82da7ca066" + integrity sha512-abmIdog9TtjejxpKCpxKMl47qHVUEI1RO3OG3NZwsItpAxDJCnQ8CTEYuleX7dTcAtRghc0V08rNgIo+6Pf4PA== dependencies: - "@openid4vc/oauth2" "0.3.0-alpha-20250322171044" - "@openid4vc/utils" "0.3.0-alpha-20250322171044" - zod "^3.24.1" + "@openid4vc/oauth2" "0.4.1" + "@openid4vc/utils" "0.4.1" + zod "^4.1.13" -"@openid4vc/openid4vp@0.3.0-alpha-20250322171044": - version "0.3.0-alpha-20250322171044" - resolved "https://registry.yarnpkg.com/@openid4vc/openid4vp/-/openid4vp-0.3.0-alpha-20250322171044.tgz#909bd853463f9f94db29f4af36983f8098c57cf5" - integrity sha512-BkvTegk4hsULPXRf7qOJrcFRevg2fziE79DlmAUa2xOmn+9V9VVZO5PMBfpEp0wKvBNkXyCZ0C6A24U9z75TuA== +"@openid4vc/openid4vp@^0.4.0": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@openid4vc/openid4vp/-/openid4vp-0.4.1.tgz#848d632b4a2bec907c214d46a7a1d00b72c38670" + integrity sha512-6d6GpoiyIRcTa+VOqZN8F4qw/jPLLeXRaCd/znlelMTWgb7wrf64WOzCy5mS7phw3SIDYPw7SDxeGKZ0Ek+OUQ== dependencies: - "@openid4vc/oauth2" "0.3.0-alpha-20250322171044" - "@openid4vc/utils" "0.3.0-alpha-20250322171044" - zod "^3.24.1" + "@openid4vc/oauth2" "0.4.1" + "@openid4vc/utils" "0.4.1" + zod "^4.1.13" -"@openid4vc/utils@0.3.0-alpha-20250322171044": - version "0.3.0-alpha-20250322171044" - resolved "https://registry.yarnpkg.com/@openid4vc/utils/-/utils-0.3.0-alpha-20250322171044.tgz#58fa8c83fcdd73fed063cc7b4ddd62a90d1b9a30" - integrity sha512-OBYnixgHR+NA5ssQBUnfyq/9Gq7xaICaJk3OmlAFMfxxhZmkCcSbeCkR2q9DSbmwCucmu6pEqHaSI8A7WGGP9Q== +"@openid4vc/utils@0.4.1", "@openid4vc/utils@^0.4.0": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@openid4vc/utils/-/utils-0.4.1.tgz#918ebaf15bb5fd9651af5d22aa3e08dd6d991003" + integrity sha512-kxEtmnzjmq1TX+RtfFZ1myGIdOO9EgPKp7cRbnhzWus//dUa+qV5zhLzLZcK0S2r9IP9QpTEd8ilCUWh9Aia+g== dependencies: buffer "^6.0.3" - zod "^3.24.1" + zod "^4.1.13" "@opentelemetry/api-logs@0.202.0": version "0.202.0" @@ -1954,13 +1787,20 @@ resolved "https://registry.yarnpkg.com/@opentelemetry/context-async-hooks/-/context-async-hooks-2.0.1.tgz#4416bc2df780c1dda1129afb9392d55831dd861d" integrity sha512-XuY23lSI3d4PEqKA+7SLtAgwqIfc6E/E9eAQWLN1vlpC53ybO3o6jW4BsXo1xvz9lYyyWItfQDDLzezER01mCw== -"@opentelemetry/core@2.0.1", "@opentelemetry/core@^2.0.0": +"@opentelemetry/core@2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-2.0.1.tgz#44e1149d5666a4743cde943ef89841db3ce0f8bc" integrity sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw== dependencies: "@opentelemetry/semantic-conventions" "^1.29.0" +"@opentelemetry/core@2.2.0", "@opentelemetry/core@^2.0.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-2.2.0.tgz#2f857d7790ff160a97db3820889b5f4cade6eaee" + integrity sha512-FuabnnUm8LflnieVxs6eP7Z383hgQU4W1e3KJS6aOG3RxWxcHyBxH8fDMHNgu/gFx/M2jvTOW/4/PHhLz6bjWw== + dependencies: + "@opentelemetry/semantic-conventions" "^1.29.0" + "@opentelemetry/exporter-logs-otlp-grpc@0.202.0": version "0.202.0" resolved "https://registry.yarnpkg.com/@opentelemetry/exporter-logs-otlp-grpc/-/exporter-logs-otlp-grpc-0.202.0.tgz#f179be218f7acf8ae004c343c718af9958ef9a6a" @@ -2169,7 +2009,7 @@ dependencies: "@opentelemetry/core" "2.0.1" -"@opentelemetry/resources@2.0.1", "@opentelemetry/resources@^2.0.1": +"@opentelemetry/resources@2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@opentelemetry/resources/-/resources-2.0.1.tgz#0365d134291c0ed18d96444a1e21d0e6a481c840" integrity sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw== @@ -2177,6 +2017,14 @@ "@opentelemetry/core" "2.0.1" "@opentelemetry/semantic-conventions" "^1.29.0" +"@opentelemetry/resources@^2.0.1": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/resources/-/resources-2.2.0.tgz#b90a950ad98551295b76ea8a0e7efe45a179badf" + integrity sha512-1pNQf/JazQTMA0BiO5NINUzH0cbLbbl7mntLa4aJNmCCXSj0q03T5ZXXL0zw4G55TjdL9Tz32cznGClf+8zr5A== + dependencies: + "@opentelemetry/core" "2.2.0" + "@opentelemetry/semantic-conventions" "^1.29.0" + "@opentelemetry/sdk-logs@0.202.0", "@opentelemetry/sdk-logs@^0.202.0": version "0.202.0" resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-logs/-/sdk-logs-0.202.0.tgz#7caab8f764d5c95e5809a42f5df3ff1ad5ebd862" @@ -2241,9 +2089,9 @@ "@opentelemetry/sdk-trace-base" "2.0.1" "@opentelemetry/semantic-conventions@^1.27.0", "@opentelemetry/semantic-conventions@^1.29.0", "@opentelemetry/semantic-conventions@^1.30.0", "@opentelemetry/semantic-conventions@^1.34.0": - version "1.36.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.36.0.tgz#149449bd4df4d0464220915ad4164121e0d75d4d" - integrity sha512-TtxJSRD8Ohxp6bKkhrm27JRHAxPczQA7idtcTOMYI+wQRRrfgqxHv1cFbCApcSnNjtXkmzFozn6jQtFrOmbjPQ== + version "1.38.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.38.0.tgz#8b5f415395a7ddb7c8e0c7932171deb9278df1a3" + integrity sha512-kocjix+/sSggfJhwXqClZ3i9Y/MI0fp7b+g7kCRm6psy2dsf8uApTRclwG18h8Avm7C9+fnt+O36PspJ/OzoWg== "@openwallet-foundation/askar-nodejs@^0.3.2": version "0.3.2" @@ -2265,114 +2113,114 @@ tar "^7.4.3" "@paralleldrive/cuid2@^2.2.2": - version "2.2.2" - resolved "https://registry.yarnpkg.com/@paralleldrive/cuid2/-/cuid2-2.2.2.tgz#7f91364d53b89e2c9cb9e02e8dd0f129e834455f" - integrity sha512-ZOBkgDwEdoYVlSeRbYYXs0S9MejQofiVYoTbKzy/6GQa39/q5tQU2IX46+shYnUkpEl3wc+J6wRlar7r2EK2xA== + version "2.3.1" + resolved "https://registry.yarnpkg.com/@paralleldrive/cuid2/-/cuid2-2.3.1.tgz#3d62ea9e7be867d3fa94b9897fab5b0ae187d784" + integrity sha512-XO7cAxhnTZl0Yggq6jOgjiOHhbgcO4NqFqwSmQpjK3b6TEE6Uj/jfSk6wzYyemh3+I0sHirKSetjQwn5cZktFw== dependencies: "@noble/hashes" "^1.1.5" -"@peculiar/asn1-cms@^2.3.15", "@peculiar/asn1-cms@^2.4.0": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@peculiar/asn1-cms/-/asn1-cms-2.4.0.tgz#327c459460d6fa6d3e582208784543a4b7aeaa73" - integrity sha512-TJvw5Tna/txvzzwnKUlCFd6zIz4R7qysHCaU6M2oe/MUT6EkvJDOzGGNY0hdjJYpuuHoqanQbIqEBhSLSWe1Tg== +"@peculiar/asn1-cms@^2.6.0": + version "2.6.0" + resolved "https://registry.yarnpkg.com/@peculiar/asn1-cms/-/asn1-cms-2.6.0.tgz#88267055c460ca806651f916315a934c1b1ac994" + integrity sha512-2uZqP+ggSncESeUF/9Su8rWqGclEfEiz1SyU02WX5fUONFfkjzS2Z/F1Li0ofSmf4JqYXIOdCAZqIXAIBAT1OA== dependencies: - "@peculiar/asn1-schema" "^2.4.0" - "@peculiar/asn1-x509" "^2.4.0" - "@peculiar/asn1-x509-attr" "^2.4.0" + "@peculiar/asn1-schema" "^2.6.0" + "@peculiar/asn1-x509" "^2.6.0" + "@peculiar/asn1-x509-attr" "^2.6.0" asn1js "^3.0.6" tslib "^2.8.1" -"@peculiar/asn1-csr@^2.3.15": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@peculiar/asn1-csr/-/asn1-csr-2.4.0.tgz#2182dd35061b03930bdc10034b3d548c38cf1264" - integrity sha512-9yQz0hQ9ynGr/I1X1v64QQGfRMbviHXyqY07cy69UzXa8s4ayCKx/TncU6lDWcTKs7P/X/AEcuJcG7Xbw0cl1A== +"@peculiar/asn1-csr@^2.6.0": + version "2.6.0" + resolved "https://registry.yarnpkg.com/@peculiar/asn1-csr/-/asn1-csr-2.6.0.tgz#a7eff845b0020720070a12f38f26effb9fdab158" + integrity sha512-BeWIu5VpTIhfRysfEp73SGbwjjoLL/JWXhJ/9mo4vXnz3tRGm+NGm3KNcRzQ9VMVqwYS2RHlolz21svzRXIHPQ== dependencies: - "@peculiar/asn1-schema" "^2.4.0" - "@peculiar/asn1-x509" "^2.4.0" + "@peculiar/asn1-schema" "^2.6.0" + "@peculiar/asn1-x509" "^2.6.0" asn1js "^3.0.6" tslib "^2.8.1" -"@peculiar/asn1-ecc@^2.3.13", "@peculiar/asn1-ecc@^2.3.15": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@peculiar/asn1-ecc/-/asn1-ecc-2.4.0.tgz#e21f87b12a0be3e57d6a914e576b6d10aa4a35d4" - integrity sha512-fJiYUBCJBDkjh347zZe5H81BdJ0+OGIg0X9z06v8xXUoql3MFeENUX0JsjCaVaU9A0L85PefLPGYkIoGpTnXLQ== +"@peculiar/asn1-ecc@^2.6.0": + version "2.6.0" + resolved "https://registry.yarnpkg.com/@peculiar/asn1-ecc/-/asn1-ecc-2.6.0.tgz#4846d39712a1a2b4786c2d6ea27b19a6dcc05ef5" + integrity sha512-FF3LMGq6SfAOwUG2sKpPXblibn6XnEIKa+SryvUl5Pik+WR9rmRA3OCiwz8R3lVXnYnyRkSZsSLdml8H3UiOcw== dependencies: - "@peculiar/asn1-schema" "^2.4.0" - "@peculiar/asn1-x509" "^2.4.0" + "@peculiar/asn1-schema" "^2.6.0" + "@peculiar/asn1-x509" "^2.6.0" asn1js "^3.0.6" tslib "^2.8.1" -"@peculiar/asn1-pfx@^2.4.0": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@peculiar/asn1-pfx/-/asn1-pfx-2.4.0.tgz#654327b736ca24f585e5b687d8a3f661dc60d0b1" - integrity sha512-fhpeoJ6T4nCLWT5tt3Un+BbyM1lLFnGXcRC2Ioe5ra2I0yptdjw05j20rV8BlUVzPIvUYpatq6joMQKe3ibh0w== +"@peculiar/asn1-pfx@^2.6.0": + version "2.6.0" + resolved "https://registry.yarnpkg.com/@peculiar/asn1-pfx/-/asn1-pfx-2.6.0.tgz#4c8ed3050cdd5b3e63ec4192bf8f646d9e06e3f5" + integrity sha512-rtUvtf+tyKGgokHHmZzeUojRZJYPxoD/jaN1+VAB4kKR7tXrnDCA/RAWXAIhMJJC+7W27IIRGe9djvxKgsldCQ== dependencies: - "@peculiar/asn1-cms" "^2.4.0" - "@peculiar/asn1-pkcs8" "^2.4.0" - "@peculiar/asn1-rsa" "^2.4.0" - "@peculiar/asn1-schema" "^2.4.0" + "@peculiar/asn1-cms" "^2.6.0" + "@peculiar/asn1-pkcs8" "^2.6.0" + "@peculiar/asn1-rsa" "^2.6.0" + "@peculiar/asn1-schema" "^2.6.0" asn1js "^3.0.6" tslib "^2.8.1" -"@peculiar/asn1-pkcs8@^2.4.0": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@peculiar/asn1-pkcs8/-/asn1-pkcs8-2.4.0.tgz#53c3c8dd2e99a2499f4a1e1639b8b4284f0b6a46" - integrity sha512-4r2LtsAM0HWXLxetGTYKyBumky7W6C1EuiOctqhl7zFK5MHjiZ+9WOeaoeTPR1g3OEoeG7KEWIkaUOyRH4ojTw== +"@peculiar/asn1-pkcs8@^2.6.0": + version "2.6.0" + resolved "https://registry.yarnpkg.com/@peculiar/asn1-pkcs8/-/asn1-pkcs8-2.6.0.tgz#c426caf81cb49935c553b591e0273b4b44d1696f" + integrity sha512-KyQ4D8G/NrS7Fw3XCJrngxmjwO/3htnA0lL9gDICvEQ+GJ+EPFqldcJQTwPIdvx98Tua+WjkdKHSC0/Km7T+lA== dependencies: - "@peculiar/asn1-schema" "^2.4.0" - "@peculiar/asn1-x509" "^2.4.0" + "@peculiar/asn1-schema" "^2.6.0" + "@peculiar/asn1-x509" "^2.6.0" asn1js "^3.0.6" tslib "^2.8.1" -"@peculiar/asn1-pkcs9@^2.3.15": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@peculiar/asn1-pkcs9/-/asn1-pkcs9-2.4.0.tgz#6ceb3041358b31bd2b3f68545ec1aefa3ad1af43" - integrity sha512-D7paqEVpu9wuWuClMN+vR5cqJWJITNPaMoa9R+FmkJ8ywF9UaS2JFI0RYclKILNoLdLg1N4eUCoJvM+ubsIIZQ== - dependencies: - "@peculiar/asn1-cms" "^2.4.0" - "@peculiar/asn1-pfx" "^2.4.0" - "@peculiar/asn1-pkcs8" "^2.4.0" - "@peculiar/asn1-schema" "^2.4.0" - "@peculiar/asn1-x509" "^2.4.0" - "@peculiar/asn1-x509-attr" "^2.4.0" +"@peculiar/asn1-pkcs9@^2.6.0": + version "2.6.0" + resolved "https://registry.yarnpkg.com/@peculiar/asn1-pkcs9/-/asn1-pkcs9-2.6.0.tgz#96b57122228a0e2e30e81118cd3baa570c13a51d" + integrity sha512-b78OQ6OciW0aqZxdzliXGYHASeCvvw5caqidbpQRYW2mBtXIX2WhofNXTEe7NyxTb0P6J62kAAWLwn0HuMF1Fw== + dependencies: + "@peculiar/asn1-cms" "^2.6.0" + "@peculiar/asn1-pfx" "^2.6.0" + "@peculiar/asn1-pkcs8" "^2.6.0" + "@peculiar/asn1-schema" "^2.6.0" + "@peculiar/asn1-x509" "^2.6.0" + "@peculiar/asn1-x509-attr" "^2.6.0" asn1js "^3.0.6" tslib "^2.8.1" -"@peculiar/asn1-rsa@^2.3.15", "@peculiar/asn1-rsa@^2.4.0": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@peculiar/asn1-rsa/-/asn1-rsa-2.4.0.tgz#da988b4b0a8d97f7f515f1a8f583accb43a475e7" - integrity sha512-6PP75voaEnOSlWR9sD25iCQyLgFZHXbmxvUfnnDcfL6Zh5h2iHW38+bve4LfH7a60x7fkhZZNmiYqAlAff9Img== +"@peculiar/asn1-rsa@^2.6.0": + version "2.6.0" + resolved "https://registry.yarnpkg.com/@peculiar/asn1-rsa/-/asn1-rsa-2.6.0.tgz#49d905ab67ae8aa54e996734f37a391bb7958747" + integrity sha512-Nu4C19tsrTsCp9fDrH+sdcOKoVfdfoQQ7S3VqjJU6vedR7tY3RLkQ5oguOIB3zFW33USDUuYZnPEQYySlgha4w== dependencies: - "@peculiar/asn1-schema" "^2.4.0" - "@peculiar/asn1-x509" "^2.4.0" + "@peculiar/asn1-schema" "^2.6.0" + "@peculiar/asn1-x509" "^2.6.0" asn1js "^3.0.6" tslib "^2.8.1" -"@peculiar/asn1-schema@^2.3.13", "@peculiar/asn1-schema@^2.3.15", "@peculiar/asn1-schema@^2.3.8", "@peculiar/asn1-schema@^2.4.0": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@peculiar/asn1-schema/-/asn1-schema-2.4.0.tgz#e3aa7917d433b4c3fcfa1fcb57eac233b1c38787" - integrity sha512-umbembjIWOrPSOzEGG5vxFLkeM8kzIhLkgigtsOrfLKnuzxWxejAcUX+q/SoZCdemlODOcr5WiYa7+dIEzBXZQ== +"@peculiar/asn1-schema@^2.3.13", "@peculiar/asn1-schema@^2.6.0": + version "2.6.0" + resolved "https://registry.yarnpkg.com/@peculiar/asn1-schema/-/asn1-schema-2.6.0.tgz#0dca1601d5b0fed2a72fed7a5f1d0d7dbe3a6f82" + integrity sha512-xNLYLBFTBKkCzEZIw842BxytQQATQv+lDTCEMZ8C196iJcJJMBUZxrhSTxLaohMyKK8QlzRNTRkUmanucnDSqg== dependencies: asn1js "^3.0.6" pvtsutils "^1.3.6" tslib "^2.8.1" -"@peculiar/asn1-x509-attr@^2.4.0": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@peculiar/asn1-x509-attr/-/asn1-x509-attr-2.4.0.tgz#f68346bf24ee2691682e5e58b5116e81cb91e280" - integrity sha512-Tr5Zi+wcE2sfR0gKRvsPwXoA1U8CuDnwiFbxCS+5Z1Nck9zlHj86+4/EZhwucjKXwPEHk1ekhqb3iwISY/+E/w== +"@peculiar/asn1-x509-attr@^2.6.0": + version "2.6.0" + resolved "https://registry.yarnpkg.com/@peculiar/asn1-x509-attr/-/asn1-x509-attr-2.6.0.tgz#057cb0c3c600a259c9f40582ee5fd7f0114c5be6" + integrity sha512-MuIAXFX3/dc8gmoZBkwJWxUWOSvG4MMDntXhrOZpJVMkYX+MYc/rUAU2uJOved9iJEoiUx7//3D8oG83a78UJA== dependencies: - "@peculiar/asn1-schema" "^2.4.0" - "@peculiar/asn1-x509" "^2.4.0" + "@peculiar/asn1-schema" "^2.6.0" + "@peculiar/asn1-x509" "^2.6.0" asn1js "^3.0.6" tslib "^2.8.1" -"@peculiar/asn1-x509@^2.3.13", "@peculiar/asn1-x509@^2.3.15", "@peculiar/asn1-x509@^2.4.0": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@peculiar/asn1-x509/-/asn1-x509-2.4.0.tgz#ca8ec0d409678e1a47bc324c3dc739085186123f" - integrity sha512-F7mIZY2Eao2TaoVqigGMLv+NDdpwuBKU1fucHPONfzaBS4JXXCNCmfO0Z3dsy7JzKGqtDcYC1mr9JjaZQZNiuw== +"@peculiar/asn1-x509@^2.6.0": + version "2.6.0" + resolved "https://registry.yarnpkg.com/@peculiar/asn1-x509/-/asn1-x509-2.6.0.tgz#9aa0784b455ca34095fdc91a5cc52869e21528dd" + integrity sha512-uzYbPEpoQiBoTq0/+jZtpM6Gq6zADBx+JNFP3yqRgziWBxQ/Dt/HcuvRfm9zJTPdRcBqPNdaRHTVwpyiq6iNMA== dependencies: - "@peculiar/asn1-schema" "^2.4.0" + "@peculiar/asn1-schema" "^2.6.0" asn1js "^3.0.6" pvtsutils "^1.3.6" tslib "^2.8.1" @@ -2384,29 +2232,18 @@ dependencies: tslib "^2.0.0" -"@peculiar/webcrypto@^1.0.22": - version "1.5.0" - resolved "https://registry.yarnpkg.com/@peculiar/webcrypto/-/webcrypto-1.5.0.tgz#9e57174c02c1291051c553600347e12b81469e10" - integrity sha512-BRs5XUAwiyCDQMsVA9IDvDa7UBR9gAvPHgugOeGng3YN6vJ9JYonyDc0lNczErgtCWtucjR5N7VtaonboD/ezg== - dependencies: - "@peculiar/asn1-schema" "^2.3.8" - "@peculiar/json-schema" "^1.1.12" - pvtsutils "^1.3.5" - tslib "^2.6.2" - webcrypto-core "^1.8.0" - -"@peculiar/x509@^1.12.1": - version "1.13.0" - resolved "https://registry.yarnpkg.com/@peculiar/x509/-/x509-1.13.0.tgz#c404d075aac4dfa52320e0a1cb11268efacdb9dd" - integrity sha512-r9BOb1GZ3gx58Pog7u9x70spnHlCQPFm7u/ZNlFv+uBsU7kTDY9QkUD+l+X0awopDuCK1fkH3nEIZeMDSG/jlw== - dependencies: - "@peculiar/asn1-cms" "^2.3.15" - "@peculiar/asn1-csr" "^2.3.15" - "@peculiar/asn1-ecc" "^2.3.15" - "@peculiar/asn1-pkcs9" "^2.3.15" - "@peculiar/asn1-rsa" "^2.3.15" - "@peculiar/asn1-schema" "^2.3.15" - "@peculiar/asn1-x509" "^2.3.15" +"@peculiar/x509@^1.14.2": + version "1.14.2" + resolved "https://registry.yarnpkg.com/@peculiar/x509/-/x509-1.14.2.tgz#635078480a0e4796eab2fb765361dec142af0f3b" + integrity sha512-r2w1Hg6pODDs0zfAKHkSS5HLkOLSeburtcgwvlLLWWCixw+MmW3U6kD5ddyvc2Y2YdbGuVwCF2S2ASoU1cFAag== + dependencies: + "@peculiar/asn1-cms" "^2.6.0" + "@peculiar/asn1-csr" "^2.6.0" + "@peculiar/asn1-ecc" "^2.6.0" + "@peculiar/asn1-pkcs9" "^2.6.0" + "@peculiar/asn1-rsa" "^2.6.0" + "@peculiar/asn1-schema" "^2.6.0" + "@peculiar/asn1-x509" "^2.6.0" pvtsutils "^1.3.6" reflect-metadata "^0.2.2" tslib "^2.8.1" @@ -2485,15 +2322,23 @@ resolved "https://registry.yarnpkg.com/@scarf/scarf/-/scarf-1.4.0.tgz#3bbb984085dbd6d982494538b523be1ce6562972" integrity sha512-xxeapPiUXdZAE3che6f3xogoJPeZgig6omHEy1rIY5WVsB3H2BHNnZH+gHG6x91SCWyQCzWGsuL2Hh3ClO5/qQ== -"@sd-jwt/core@0.7.2", "@sd-jwt/core@^0.7.2": - version "0.7.2" - resolved "https://registry.yarnpkg.com/@sd-jwt/core/-/core-0.7.2.tgz#cfbcd853d507e2c31bf66ea5b2c1748291924ec3" - integrity sha512-vix1GplUFc1A9H42r/yXkg7cKYthggyqZEwlFdsBbn4xdZNE+AHVF4N7kPa1pPxipwN3UIHd4XnQ5MJV15mhsQ== +"@sd-jwt/core@0.17.0", "@sd-jwt/core@^0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@sd-jwt/core/-/core-0.17.0.tgz#dec5dacb4f2ec8baabb2651323b0ad265540a712" + integrity sha512-8NM2kZFjBxNT7JE+UukhcXDEiTq/6LSltVx2R2BlL2NlbYaT29Eln+vKyULNDI8FaRbh4lierLguPJGba4E5uA== dependencies: - "@sd-jwt/decode" "0.7.2" - "@sd-jwt/present" "0.7.2" - "@sd-jwt/types" "0.7.2" - "@sd-jwt/utils" "0.7.2" + "@sd-jwt/decode" "0.17.0" + "@sd-jwt/present" "0.17.0" + "@sd-jwt/types" "0.17.0" + "@sd-jwt/utils" "0.17.0" + +"@sd-jwt/decode@0.17.0", "@sd-jwt/decode@^0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@sd-jwt/decode/-/decode-0.17.0.tgz#769bb5f16834959865ec5be22941b02cc439d90d" + integrity sha512-1qBA0nfsYdAPb/s+n+uWfeaYRVaiDYBg/cL7iDpPcSS8Zq8rtHFwR86KhQfRk8WR5V4cKO7p+njK/8LweqlHxg== + dependencies: + "@sd-jwt/types" "0.17.0" + "@sd-jwt/utils" "0.17.0" "@sd-jwt/decode@0.7.2", "@sd-jwt/decode@^0.7.2": version "0.7.2" @@ -2511,16 +2356,25 @@ "@sd-jwt/types" "0.9.2" "@sd-jwt/utils" "0.9.2" -"@sd-jwt/jwt-status-list@0.7.2", "@sd-jwt/jwt-status-list@^0.7.2": - version "0.7.2" - resolved "https://registry.yarnpkg.com/@sd-jwt/jwt-status-list/-/jwt-status-list-0.7.2.tgz#13cd1b4abbcb08217a44efb59f0fd2a134fe398a" - integrity sha512-o/Mg/Zg21poFsPXuxtPD9sdXq2b/0L+rb9gxU2k1rp1aT+DWmqD0k8v0Ttr2tlMc8l1xXQNA8FLXbL1AdLRmbQ== +"@sd-jwt/jwt-status-list@0.17.1", "@sd-jwt/jwt-status-list@^0.17.1": + version "0.17.1" + resolved "https://registry.yarnpkg.com/@sd-jwt/jwt-status-list/-/jwt-status-list-0.17.1.tgz#8d108429e48c97378e4ff7cda4941954c69cbe97" + integrity sha512-5vcOQsEmWwCkh7uEU7iwSaZ9aDH7nSNLnt48dTc6X5UrF9qWNFkVf8r/juBfuzSy2JlxRZQitVYGhyactiXxHA== dependencies: - "@sd-jwt/types" "0.7.2" - base64url "^3.0.1" + "@sd-jwt/types" "0.17.0" + "@sd-jwt/utils" "0.17.0" pako "^2.1.0" -"@sd-jwt/present@0.7.2", "@sd-jwt/present@^0.7.2": +"@sd-jwt/present@0.17.0", "@sd-jwt/present@^0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@sd-jwt/present/-/present-0.17.0.tgz#23ba9ffbf064f4c25234bdf57fabfe0fe9754155" + integrity sha512-qh226z4H76uMVfFfqvltV9d0oz2N9S2REURy2HcVFKhsa1fSYZXdKkhg4S102iwp9fEELEPyCnLkW26+qwWLcg== + dependencies: + "@sd-jwt/decode" "0.17.0" + "@sd-jwt/types" "0.17.0" + "@sd-jwt/utils" "0.17.0" + +"@sd-jwt/present@^0.7.2": version "0.7.2" resolved "https://registry.yarnpkg.com/@sd-jwt/present/-/present-0.7.2.tgz#23e521cda6adf6ce9f73fcda64502ea7c45f61c3" integrity sha512-mQV85u2+mLLy2VZ9Wx2zpaB6yTDnbhCfWkP7eeCrzJQHBKAAHko8GrylEFmLKewFIcajS/r4lT/zHOsCkp5pZw== @@ -2529,14 +2383,19 @@ "@sd-jwt/types" "0.7.2" "@sd-jwt/utils" "0.7.2" -"@sd-jwt/sd-jwt-vc@^0.7.2": - version "0.7.2" - resolved "https://registry.yarnpkg.com/@sd-jwt/sd-jwt-vc/-/sd-jwt-vc-0.7.2.tgz#565a4fcebfe97915a995fd26b0e3cb1fdd56ff6a" - integrity sha512-rryYmnoJHRSNqHcrs0Atta+bfJzU2yT7mYumR2D4lTfxJKWZd0OHHFq57uZSEm/wXPI6uytUJXYbEboCqLUAtw== +"@sd-jwt/sd-jwt-vc@^0.17.1": + version "0.17.1" + resolved "https://registry.yarnpkg.com/@sd-jwt/sd-jwt-vc/-/sd-jwt-vc-0.17.1.tgz#e77422051342efdc628d440f375b6779951232fd" + integrity sha512-rkbkAfZSJM6gLyOn+eKqzFRrsztfpo+k8odKkXv+psmmZURnOleVvECJHdn2v3ggn6HSqa5uiiH7WkjNiHmGMA== dependencies: - "@sd-jwt/core" "0.7.2" - "@sd-jwt/jwt-status-list" "0.7.2" - "@sd-jwt/utils" "0.7.2" + "@sd-jwt/core" "0.17.0" + "@sd-jwt/jwt-status-list" "0.17.1" + "@sd-jwt/utils" "0.17.0" + +"@sd-jwt/types@0.17.0", "@sd-jwt/types@^0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@sd-jwt/types/-/types-0.17.0.tgz#3dde7136de12a56e6b3bbd234593b3cc8488f0a0" + integrity sha512-XMZprAzSst+ze6JXoMttV3zrUNTL9VFAzHWChENTlFuh9tM6gy+/hJjFyTO0RVO0SRRNl2c7eMeYu7byLMj6Jg== "@sd-jwt/types@0.7.2", "@sd-jwt/types@^0.7.2": version "0.7.2" @@ -2548,7 +2407,15 @@ resolved "https://registry.yarnpkg.com/@sd-jwt/types/-/types-0.9.2.tgz#17a9d62e36d9863b2c20a127be22a3e77005a6a8" integrity sha512-eV/MY80ekeTrqaohzPpkrgwPki6Igx69D6RniduV1Ehv6o/zaJQ2F0hY/RqBAkJhQtBQoOzouwKYHme40k1Dlw== -"@sd-jwt/utils@0.7.2", "@sd-jwt/utils@^0.7.2": +"@sd-jwt/utils@0.17.0", "@sd-jwt/utils@^0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@sd-jwt/utils/-/utils-0.17.0.tgz#9e3176c53389f26783a27910401c7926903da086" + integrity sha512-Xe6GgO3tzjQrKbwVgtrE4LkB8Prcl0zCX+LDFC0QCzsvrks1jEFSPpcpP5Ge/ESBK6LrNG/srBKOQlFM/RuGsg== + dependencies: + "@sd-jwt/types" "0.17.0" + js-base64 "^3.7.8" + +"@sd-jwt/utils@0.7.2": version "0.7.2" resolved "https://registry.yarnpkg.com/@sd-jwt/utils/-/utils-0.7.2.tgz#4309fa2f5ebe214947de4fb07a1e06a70c29710b" integrity sha512-aMPY7uHRMgyI5PlDvEiIc+eBFGC1EM8OCQRiEjJ8HGN0pajWMYj0qwSw7pS90A49/DsYU1a5Zpvb7nyjgGH0Yg== @@ -2605,11 +2472,6 @@ dependencies: "@sinonjs/commons" "^3.0.0" -"@sovpro/delimited-stream@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@sovpro/delimited-stream/-/delimited-stream-1.1.0.tgz#4334bba7ee241036e580fdd99c019377630d26b4" - integrity sha512-kQpk267uxB19X3X2T1mvNMjyvIEonpNSHrMlK5ZaBU6aZxw7wPbpgKJOjHN3+/GPVpXgAV9soVT2oyHpLkLtyw== - "@sphereon/kmp-mdoc-core@0.2.0-SNAPSHOT.26": version "0.2.0-SNAPSHOT.26" resolved "https://registry.yarnpkg.com/@sphereon/kmp-mdoc-core/-/kmp-mdoc-core-0.2.0-SNAPSHOT.26.tgz#fb5372a6b76cccad1d641bbdca72fbeae268a7a2" @@ -2637,53 +2499,53 @@ jwt-decode "^4.0.0" uint8arrays "3.1.1" -"@stablelib/binary@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/binary/-/binary-1.0.1.tgz#c5900b94368baf00f811da5bdb1610963dfddf7f" - integrity sha512-ClJWvmL6UBM/wjkvv/7m5VP3GMr9t0osr4yVgLZsLCOz4hGN9gIAFEqnJ0TsSMAN+n840nf2cHZnA5/KFqHC7Q== +"@stablelib/binary@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/binary/-/binary-2.0.1.tgz#65c36a24e2c65f375e4c5c4cb340b9112d9badb6" + integrity sha512-U9iAO8lXgEDONsA0zPPSgcf3HUBNAqHiJmSHgZz62OvC3Hi2Bhc5kTnQ3S1/L+sthDTHtCMhcEiklmIly6uQ3w== dependencies: - "@stablelib/int" "^1.0.1" + "@stablelib/int" "^2.0.1" -"@stablelib/ed25519@^1.0.1", "@stablelib/ed25519@^1.0.2": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@stablelib/ed25519/-/ed25519-1.0.3.tgz#f8fdeb6f77114897c887bb6a3138d659d3f35996" - integrity sha512-puIMWaX9QlRsbhxfDc5i+mNPMY+0TmQEskunY1rZEBPi1acBCVQAhnsk/1Hk50DGPtVsZtAWQg4NHGlVaO9Hqg== +"@stablelib/ed25519@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@stablelib/ed25519/-/ed25519-2.0.2.tgz#f6fed271a53fff607043f2a20ae67ec1dd39e275" + integrity sha512-d/lJ5sgzhtmpMIbKFWfev+i6WebBdIzzBpMzXtZdvUijoksjXosYFNqytoMj7cRshNj+/XTLYnnVMdZfd+penw== dependencies: - "@stablelib/random" "^1.0.2" - "@stablelib/sha512" "^1.0.1" - "@stablelib/wipe" "^1.0.1" + "@stablelib/random" "^2.0.1" + "@stablelib/sha512" "^2.0.1" + "@stablelib/wipe" "^2.0.1" -"@stablelib/hash@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/hash/-/hash-1.0.1.tgz#3c944403ff2239fad8ebb9015e33e98444058bc5" - integrity sha512-eTPJc/stDkdtOcrNMZ6mcMK1e6yBbqRBaNW55XA1jU8w/7QdnCF0CmMmOD1m7VSkBR44PWrMHU2l6r8YEQHMgg== +"@stablelib/hash@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@stablelib/hash/-/hash-2.0.0.tgz#7b74c372dc07187e273844e970a475f1338e92cf" + integrity sha512-u3WPSqGido8lwJuMcrBgM5K54LrPGhkWAdtsyccf7dGsLixAZUds77zOAbu7bvKPwQlmoByH0txBi5rTmEKuHg== -"@stablelib/int@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/int/-/int-1.0.1.tgz#75928cc25d59d73d75ae361f02128588c15fd008" - integrity sha512-byr69X/sDtDiIjIV6m4roLVWnNNlRGzsvxw+agj8CIEazqWGOQp2dTYgQhtyVXV9wpO6WyXRQUzLV/JRNumT2w== +"@stablelib/int@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/int/-/int-2.0.1.tgz#daf262843b158e6bb99ec029a14378ecdda2230f" + integrity sha512-Ht63fQp3wz/F8U4AlXEPb7hfJOIILs8Lq55jgtD7KueWtyjhVuzcsGLSTAWtZs3XJDZYdF1WcSKn+kBtbzupww== -"@stablelib/random@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@stablelib/random/-/random-1.0.2.tgz#2dece393636489bf7e19c51229dd7900eddf742c" - integrity sha512-rIsE83Xpb7clHPVRlBj8qNe5L8ISQOzjghYQm/dZ7VaM2KHYwMW5adjQjrzTZCchFnNCNhkwtnOBa9HTMJCI8w== +"@stablelib/random@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/random/-/random-2.0.1.tgz#b082eee976684a970d5f28ffbdea074a83ad2475" + integrity sha512-W6GAtXEEs7r+dSbuBsvoFmlyL3gLxle41tQkjKu17dDWtDdjhVUbtRfRCQcCUeczwkgjQxMPopgwYEvxXtHXGw== dependencies: - "@stablelib/binary" "^1.0.1" - "@stablelib/wipe" "^1.0.1" + "@stablelib/binary" "^2.0.1" + "@stablelib/wipe" "^2.0.1" -"@stablelib/sha512@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/sha512/-/sha512-1.0.1.tgz#6da700c901c2c0ceacbd3ae122a38ac57c72145f" - integrity sha512-13gl/iawHV9zvDKciLo1fQ8Bgn2Pvf7OV6amaRVKiq3pjQ3UmEpXxWiAfV8tYjUpeZroBxtyrwtdooQT/i3hzw== +"@stablelib/sha512@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/sha512/-/sha512-2.0.1.tgz#a9411c9db9a7a88ec42b91da9e604e8d7f7967eb" + integrity sha512-DUNe5cbnoH3sSIN+MG04RvTCLXtkbyy/SnQxiNO+GgF/KSXkkUSlF6mUVvCUdZBZ2X3NgogR+tAvaRSn8wxnLw== dependencies: - "@stablelib/binary" "^1.0.1" - "@stablelib/hash" "^1.0.1" - "@stablelib/wipe" "^1.0.1" + "@stablelib/binary" "^2.0.1" + "@stablelib/hash" "^2.0.0" + "@stablelib/wipe" "^2.0.1" -"@stablelib/wipe@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/wipe/-/wipe-1.0.1.tgz#d21401f1d59ade56a62e139462a97f104ed19a36" - integrity sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg== +"@stablelib/wipe@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@stablelib/wipe/-/wipe-2.0.1.tgz#9bc1d20519aa4fc513fe1992cf8061bab33c3049" + integrity sha512-1eU2K9EgOcV4qc9jcP6G72xxZxEm5PfeI5H55l08W95b4oRJaqhmlWRc4xZAm6IVSKhVNxMi66V67hCzzuMTAg== "@szmarczak/http-timer@^4.0.5": version "4.0.6" @@ -2693,9 +2555,9 @@ defer-to-connect "^2.0.0" "@tsconfig/node10@^1.0.7": - version "1.0.11" - resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2" - integrity sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw== + version "1.0.12" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.12.tgz#be57ceac1e4692b41be9de6be8c32a106636dba4" + integrity sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ== "@tsconfig/node12@^1.0.7": version "1.0.11" @@ -2744,9 +2606,9 @@ validator "^13.12.0" "@tybys/wasm-util@^0.10.0": - version "0.10.0" - resolved "https://registry.yarnpkg.com/@tybys/wasm-util/-/wasm-util-0.10.0.tgz#2fd3cd754b94b378734ce17058d0507c45c88369" - integrity sha512-VyyPYFlOMNylG45GoAe0xDoLwWuowvf92F9kySqzYh8vmYm7D2u4iUJKa1tOUpS70Ku13ASrOkS4ScXFsTaCNQ== + version "0.10.1" + resolved "https://registry.yarnpkg.com/@tybys/wasm-util/-/wasm-util-0.10.1.tgz#ecddd3205cf1e2d5274649ff0eedd2991ed7f414" + integrity sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg== dependencies: tslib "^2.4.0" @@ -2826,9 +2688,9 @@ integrity sha512-he+DHOWReW0nghN24E1WUqM0efK4kI9oTqDm6XmK8ZPe2djZ90BSNdGnIyCLzCPw7/pogPlGbzI2wHGGmi4O/Q== "@types/cookies@*": - version "0.9.1" - resolved "https://registry.yarnpkg.com/@types/cookies/-/cookies-0.9.1.tgz#083924ca1266e34ff240ca4d4fd6732ee5b81886" - integrity sha512-E/DPgzifH4sM1UMadJMWd6mO2jOd4g1Ejwzx8/uRCDpJis1IrlyQEcGAYEomtAqRYmD5ORbNXMeI9U0RiVGZbg== + version "0.9.2" + resolved "https://registry.yarnpkg.com/@types/cookies/-/cookies-0.9.2.tgz#ccdf86d782f2dea34531dd32733a25be48177cd4" + integrity sha512-1AvkDdZM2dbyFybL4fxpuNCaWyv//0AwsuUk2DWeXyM1/5ZKm6W3z6mQi24RZ4l2ucY+bkSHzbDVpySqPGuV8A== dependencies: "@types/connect" "*" "@types/express" "*" @@ -2855,44 +2717,24 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.8.tgz#958b91c991b1867ced318bedea0e215ee050726e" integrity sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w== -"@types/express-serve-static-core@^4.17.33": - version "4.19.6" - resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.19.6.tgz#e01324c2a024ff367d92c66f48553ced0ab50267" - integrity sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A== - dependencies: - "@types/node" "*" - "@types/qs" "*" - "@types/range-parser" "*" - "@types/send" "*" - "@types/express-serve-static-core@^5.0.0", "@types/express-serve-static-core@^5.0.6": - version "5.0.7" - resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-5.0.7.tgz#2fa94879c9d46b11a5df4c74ac75befd6b283de6" - integrity sha512-R+33OsgWw7rOhD1emjU7dzCDHucJrgJXMA5PYCzJxVil0dsyx5iBEPHqpPfiKNJQb7lZ1vxwoLR4Z87bBUpeGQ== + version "5.1.0" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-5.1.0.tgz#74f47555b3d804b54cb7030e6f9aa0c7485cfc5b" + integrity sha512-jnHMsrd0Mwa9Cf4IdOzbz543y4XJepXrbia2T4b6+spXC2We3t1y6K44D3mR8XMFSXMCf3/l7rCgddfx7UNVBA== dependencies: "@types/node" "*" "@types/qs" "*" "@types/range-parser" "*" "@types/send" "*" -"@types/express@*", "@types/express@^5.0.2": - version "5.0.3" - resolved "https://registry.yarnpkg.com/@types/express/-/express-5.0.3.tgz#6c4bc6acddc2e2a587142e1d8be0bce20757e956" - integrity sha512-wGA0NX93b19/dZC1J18tKWVIYWyyF2ZjT9vin/NRu0qzzvfVzWjs04iq2rQ3H65vCTQYlRqs3YHfY7zjdV+9Kw== +"@types/express@*", "@types/express@^5.0.2", "@types/express@^5.0.6": + version "5.0.6" + resolved "https://registry.yarnpkg.com/@types/express/-/express-5.0.6.tgz#2d724b2c990dcb8c8444063f3580a903f6d500cc" + integrity sha512-sKYVuV7Sv9fbPIt/442koC7+IIwK5olP1KWeD88e/idgoJqDm3JV/YUiPwkoKK92ylff2MGxSz1CSjsXelx0YA== dependencies: "@types/body-parser" "*" "@types/express-serve-static-core" "^5.0.0" - "@types/serve-static" "*" - -"@types/express@^4.17.23": - version "4.17.23" - resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.23.tgz#35af3193c640bfd4d7fe77191cd0ed411a433bef" - integrity sha512-Crp6WY9aTYP3qPi2wGDo9iUe/rceX01UMhnF1jmwDcKCFM6cx7YhGP/Mpr3y9AASpfHixIG0E6azCcL5OcDHsQ== - dependencies: - "@types/body-parser" "*" - "@types/express-serve-static-core" "^4.17.33" - "@types/qs" "*" - "@types/serve-static" "*" + "@types/serve-static" "^2" "@types/graceful-fs@^4.1.3": version "4.1.9" @@ -2974,16 +2816,16 @@ "@types/node" "*" "@types/koa-compose@*": - version "3.2.8" - resolved "https://registry.yarnpkg.com/@types/koa-compose/-/koa-compose-3.2.8.tgz#dec48de1f6b3d87f87320097686a915f1e954b57" - integrity sha512-4Olc63RY+MKvxMwVknCUDhRQX1pFQoBZ/lXcRLP69PQkEpze/0cr8LNqJQe5NFb/b19DWi2a5bTi2VAlQzhJuA== + version "3.2.9" + resolved "https://registry.yarnpkg.com/@types/koa-compose/-/koa-compose-3.2.9.tgz#6efb945ee5573be0f4eddb728a2f6826f7a3f395" + integrity sha512-BroAZ9FTvPiCy0Pi8tjD1OfJ7bgU1gQf0eR6e1Vm+JJATy9eKOG3hQMFtMciMawiSOVnLMdmUOC46s7HBhSTsA== dependencies: "@types/koa" "*" "@types/koa@*": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/koa/-/koa-3.0.0.tgz#5df2b3b30da902f01b6ec78ef56403e6eb62fa6e" - integrity sha512-MOcVYdVYmkSutVHZZPh8j3+dAjLyR5Tl59CN0eKgpkE1h/LBSmPAsQQuWs+bKu7WtGNn+hKfJH9Gzml+PulmDg== + version "3.0.1" + resolved "https://registry.yarnpkg.com/@types/koa/-/koa-3.0.1.tgz#2c9ace20ecb33d0cf84d63492af231185eb2aefa" + integrity sha512-VkB6WJUQSe0zBpR+Q7/YIUESGp5wPHcaXr0xueU5W0EOUWtlSbblsl+Kl31lyRQ63nIILh0e/7gXjQ09JXJIHw== dependencies: "@types/accepts" "*" "@types/content-disposition" "*" @@ -3013,11 +2855,6 @@ resolved "https://registry.yarnpkg.com/@types/methods/-/methods-1.1.4.tgz#d3b7ac30ac47c91054ea951ce9eed07b1051e547" integrity sha512-ymXWVrDiCxTBE3+RIrrP533E70eA+9qu7zdWoHuOmGujkYtzf4HQF96b8nwHLqhuf4ykX61IGRIB38CC6/sImQ== -"@types/mime@^1": - version "1.3.5" - resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.5.tgz#1ef302e01cf7d2b5a0fa526790c9123bf1d06690" - integrity sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w== - "@types/ms@*": version "2.1.0" resolved "https://registry.yarnpkg.com/@types/ms/-/ms-2.1.0.tgz#052aa67a48eccc4309d7f0191b7e41434b90bb78" @@ -3039,11 +2876,11 @@ form-data "^4.0.4" "@types/node@*", "@types/node@>=13.7.0": - version "24.3.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-24.3.0.tgz#89b09f45cb9a8ee69466f18ee5864e4c3eb84dec" - integrity sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow== + version "24.10.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-24.10.1.tgz#91e92182c93db8bd6224fca031e2370cef9a8f01" + integrity sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ== dependencies: - undici-types "~7.10.0" + undici-types "~7.16.0" "@types/node@22.7.5": version "22.7.5" @@ -3053,9 +2890,9 @@ undici-types "~6.19.2" "@types/node@^20.17.0": - version "20.19.11" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.19.11.tgz#728cab53092bd5f143beed7fbba7ba99de3c16c4" - integrity sha512-uug3FEEGv0r+jrecvUUpbY8lLisvIjg6AAic6a2bSP5OEOLeJsDSnvhCDov7ipFFMXS3orMpzlmi0ZcuGkBbow== + version "20.19.25" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.19.25.tgz#467da94a2fd966b57cc39c357247d68047611190" + integrity sha512-ZsJzA5thDQMSQO788d7IocwwQbI8B5OPzmqNvpf3NY/+MHDAS759Wo0gd2WQeXYt5AAAQjzcrTVC6SKCuYgoCQ== dependencies: undici-types "~6.21.0" @@ -3103,21 +2940,19 @@ "@types/node" "*" "@types/send@*": - version "0.17.5" - resolved "https://registry.yarnpkg.com/@types/send/-/send-0.17.5.tgz#d991d4f2b16f2b1ef497131f00a9114290791e74" - integrity sha512-z6F2D3cOStZvuk2SaP6YrwkNO65iTZcwA2ZkSABegdkAh/lf+Aa/YQndZVfmEXT5vgAp6zv06VQ3ejSVjAny4w== + version "1.2.1" + resolved "https://registry.yarnpkg.com/@types/send/-/send-1.2.1.tgz#6a784e45543c18c774c049bff6d3dbaf045c9c74" + integrity sha512-arsCikDvlU99zl1g69TcAB3mzZPpxgw0UQnaHeC1Nwb015xp8bknZv5rIfri9xTOcMuaVgvabfIRA7PSZVuZIQ== dependencies: - "@types/mime" "^1" "@types/node" "*" -"@types/serve-static@*": - version "1.15.8" - resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.15.8.tgz#8180c3fbe4a70e8f00b9f70b9ba7f08f35987877" - integrity sha512-roei0UY3LhpOJvjbIP6ZZFngyLKl5dskOtDhxY5THRSpO+ZI+nzJ+m5yUMzGrp89YRa7lvknKkMYjqQFGwA7Sg== +"@types/serve-static@*", "@types/serve-static@^2": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-2.2.0.tgz#d4a447503ead0d1671132d1ab6bd58b805d8de6a" + integrity sha512-8mam4H1NHLtu7nmtalF7eyBH14QyOASmcxHhSfEoRyr0nP/YdoesEtU+uSRvMe96TW/HPTtkoKqQLl53N7UXMQ== dependencies: "@types/http-errors" "*" "@types/node" "*" - "@types/send" "*" "@types/stack-utils@^2.0.0": version "2.0.3" @@ -3165,12 +3000,12 @@ resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-10.0.0.tgz#e9c07fe50da0f53dc24970cca94d619ff03f6f6d" integrity sha512-7gqG38EyHgyP1S+7+xomFtL+ZNHcKv6DwNaCZmJmo1vgMugyF3TCnXVg4t1uk89mLNwnLtnY3TpOpCOyp1/xHQ== -"@types/validator@^13.11.8": - version "13.15.2" - resolved "https://registry.yarnpkg.com/@types/validator/-/validator-13.15.2.tgz#ee533a20ab977df36917a454754c7e0df4aa6f8f" - integrity sha512-y7pa/oEJJ4iGYBxOpfAKn5b9+xuihvzDVnC/OSvlVnGxVg0pOqmjiMafiJ1KVNQEaPZf9HsEp5icEwGg8uIe5Q== +"@types/validator@^13.11.8", "@types/validator@^13.15.3": + version "13.15.10" + resolved "https://registry.yarnpkg.com/@types/validator/-/validator-13.15.10.tgz#742b77ec34d58554b94a76a14cef30d59e3c16b9" + integrity sha512-T8L6i7wCuyoK8A/ZeLYt1+q0ty3Zb9+qbSSvrIVitzT3YjZqkTZ40IbRsPanlB4h1QB3JVL1SYCdR6ngtFYcuA== -"@types/ws@^8.18.1", "@types/ws@^8.5.4": +"@types/ws@^8.18.1": version "8.18.1" resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.18.1.tgz#48464e4bf2ddfd17db13d845467f6070ffea4aa9" integrity sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg== @@ -3183,9 +3018,9 @@ integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ== "@types/yargs@^17.0.33", "@types/yargs@^17.0.8": - version "17.0.33" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.33.tgz#8c32303da83eec050a84b3c7ae7b9f922d13e32d" - integrity sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA== + version "17.0.35" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.35.tgz#07013e46aa4d7d7d50a49e15604c1c5340d4eb24" + integrity sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg== dependencies: "@types/yargs-parser" "*" @@ -3197,118 +3032,102 @@ "@types/node" "*" "@typescript-eslint/eslint-plugin@^8.32.1": - version "8.40.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.40.0.tgz#19f959f273b32f5082c891903645e6a85328db4e" - integrity sha512-w/EboPlBwnmOBtRbiOvzjD+wdiZdgFeo17lkltrtn7X37vagKKWJABvyfsJXTlHe6XBzugmYgd4A4nW+k8Mixw== + version "8.48.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.48.1.tgz#c772d1dbdd97cfddf85f5a161a97783233643631" + integrity sha512-X63hI1bxl5ohelzr0LY5coufyl0LJNthld+abwxpCoo6Gq+hSqhKwci7MUWkXo67mzgUK6YFByhmaHmUcuBJmA== dependencies: "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "8.40.0" - "@typescript-eslint/type-utils" "8.40.0" - "@typescript-eslint/utils" "8.40.0" - "@typescript-eslint/visitor-keys" "8.40.0" + "@typescript-eslint/scope-manager" "8.48.1" + "@typescript-eslint/type-utils" "8.48.1" + "@typescript-eslint/utils" "8.48.1" + "@typescript-eslint/visitor-keys" "8.48.1" graphemer "^1.4.0" ignore "^7.0.0" natural-compare "^1.4.0" ts-api-utils "^2.1.0" "@typescript-eslint/parser@^8.26.0": - version "8.40.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.40.0.tgz#1bc9f3701ced29540eb76ff2d95ce0d52ddc7e69" - integrity sha512-jCNyAuXx8dr5KJMkecGmZ8KI61KBUhkCob+SD+C+I5+Y1FWI2Y3QmY4/cxMCC5WAsZqoEtEETVhUiUMIGCf6Bw== - dependencies: - "@typescript-eslint/scope-manager" "8.40.0" - "@typescript-eslint/types" "8.40.0" - "@typescript-eslint/typescript-estree" "8.40.0" - "@typescript-eslint/visitor-keys" "8.40.0" + version "8.48.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.48.1.tgz#4e3c66d9ec20683ec142417fafeadab61c479c3f" + integrity sha512-PC0PDZfJg8sP7cmKe6L3QIL8GZwU5aRvUFedqSIpw3B+QjRSUZeeITC2M5XKeMXEzL6wccN196iy3JLwKNvDVA== + dependencies: + "@typescript-eslint/scope-manager" "8.48.1" + "@typescript-eslint/types" "8.48.1" + "@typescript-eslint/typescript-estree" "8.48.1" + "@typescript-eslint/visitor-keys" "8.48.1" debug "^4.3.4" -"@typescript-eslint/project-service@8.40.0": - version "8.40.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/project-service/-/project-service-8.40.0.tgz#1b7ba6079ff580c3215882fe75a43e5d3ed166b9" - integrity sha512-/A89vz7Wf5DEXsGVvcGdYKbVM9F7DyFXj52lNYUDS1L9yJfqjW/fIp5PgMuEJL/KeqVTe2QSbXAGUZljDUpArw== +"@typescript-eslint/project-service@8.48.1": + version "8.48.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/project-service/-/project-service-8.48.1.tgz#cfe1741613b9112d85ae766de9e09b27a7d3f2f1" + integrity sha512-HQWSicah4s9z2/HifRPQ6b6R7G+SBx64JlFQpgSSHWPKdvCZX57XCbszg/bapbRsOEv42q5tayTYcEFpACcX1w== dependencies: - "@typescript-eslint/tsconfig-utils" "^8.40.0" - "@typescript-eslint/types" "^8.40.0" + "@typescript-eslint/tsconfig-utils" "^8.48.1" + "@typescript-eslint/types" "^8.48.1" debug "^4.3.4" -"@typescript-eslint/scope-manager@8.40.0": - version "8.40.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.40.0.tgz#2fbfcc8643340d8cd692267e61548b946190be8a" - integrity sha512-y9ObStCcdCiZKzwqsE8CcpyuVMwRouJbbSrNuThDpv16dFAj429IkM6LNb1dZ2m7hK5fHyzNcErZf7CEeKXR4w== +"@typescript-eslint/scope-manager@8.48.1": + version "8.48.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.48.1.tgz#8bc70643e7cca57864b1ff95dd350fc27756bec0" + integrity sha512-rj4vWQsytQbLxC5Bf4XwZ0/CKd362DkWMUkviT7DCS057SK64D5lH74sSGzhI6PDD2HCEq02xAP9cX68dYyg1w== dependencies: - "@typescript-eslint/types" "8.40.0" - "@typescript-eslint/visitor-keys" "8.40.0" + "@typescript-eslint/types" "8.48.1" + "@typescript-eslint/visitor-keys" "8.48.1" -"@typescript-eslint/tsconfig-utils@8.40.0", "@typescript-eslint/tsconfig-utils@^8.40.0": - version "8.40.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.40.0.tgz#8e8fdb9b988854aedd04abdde3239c4bdd2d26e4" - integrity sha512-jtMytmUaG9d/9kqSl/W3E3xaWESo4hFDxAIHGVW/WKKtQhesnRIJSAJO6XckluuJ6KDB5woD1EiqknriCtAmcw== +"@typescript-eslint/tsconfig-utils@8.48.1", "@typescript-eslint/tsconfig-utils@^8.48.1": + version "8.48.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.48.1.tgz#68139ce2d258f984e2b33a95389158f1212af646" + integrity sha512-k0Jhs4CpEffIBm6wPaCXBAD7jxBtrHjrSgtfCjUvPp9AZ78lXKdTR8fxyZO5y4vWNlOvYXRtngSZNSn+H53Jkw== -"@typescript-eslint/type-utils@8.40.0": - version "8.40.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.40.0.tgz#a7e4a1f0815dd0ba3e4eef945cc87193ca32c422" - integrity sha512-eE60cK4KzAc6ZrzlJnflXdrMqOBaugeukWICO2rB0KNvwdIMaEaYiywwHMzA1qFpTxrLhN9Lp4E/00EgWcD3Ow== +"@typescript-eslint/type-utils@8.48.1": + version "8.48.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.48.1.tgz#955bd3ddd648450f0a627925ff12ade63fb7516d" + integrity sha512-1jEop81a3LrJQLTf/1VfPQdhIY4PlGDBc/i67EVWObrtvcziysbLN3oReexHOM6N3jyXgCrkBsZpqwH0hiDOQg== dependencies: - "@typescript-eslint/types" "8.40.0" - "@typescript-eslint/typescript-estree" "8.40.0" - "@typescript-eslint/utils" "8.40.0" + "@typescript-eslint/types" "8.48.1" + "@typescript-eslint/typescript-estree" "8.48.1" + "@typescript-eslint/utils" "8.48.1" debug "^4.3.4" ts-api-utils "^2.1.0" -"@typescript-eslint/types@8.40.0", "@typescript-eslint/types@^8.40.0": - version "8.40.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.40.0.tgz#0b580fdf643737aa5c01285314b5c6e9543846a9" - integrity sha512-ETdbFlgbAmXHyFPwqUIYrfc12ArvpBhEVgGAxVYSwli26dn8Ko+lIo4Su9vI9ykTZdJn+vJprs/0eZU0YMAEQg== +"@typescript-eslint/types@8.48.1", "@typescript-eslint/types@^8.48.1": + version "8.48.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.48.1.tgz#a9ff808f5f798f28767d5c0b015a88fa7ce46bd7" + integrity sha512-+fZ3LZNeiELGmimrujsDCT4CRIbq5oXdHe7chLiW8qzqyPMnn1puNstCrMNVAqwcl2FdIxkuJ4tOs/RFDBVc/Q== -"@typescript-eslint/typescript-estree@8.40.0": - version "8.40.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.40.0.tgz#295149440ce7da81c790a4e14e327599a3a1e5c9" - integrity sha512-k1z9+GJReVVOkc1WfVKs1vBrR5MIKKbdAjDTPvIK3L8De6KbFfPFt6BKpdkdk7rZS2GtC/m6yI5MYX+UsuvVYQ== +"@typescript-eslint/typescript-estree@8.48.1": + version "8.48.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.48.1.tgz#0d0e31fc47c5796c6463ab50cde19e1718d465b1" + integrity sha512-/9wQ4PqaefTK6POVTjJaYS0bynCgzh6ClJHGSBj06XEHjkfylzB+A3qvyaXnErEZSaxhIo4YdyBgq6j4RysxDg== dependencies: - "@typescript-eslint/project-service" "8.40.0" - "@typescript-eslint/tsconfig-utils" "8.40.0" - "@typescript-eslint/types" "8.40.0" - "@typescript-eslint/visitor-keys" "8.40.0" + "@typescript-eslint/project-service" "8.48.1" + "@typescript-eslint/tsconfig-utils" "8.48.1" + "@typescript-eslint/types" "8.48.1" + "@typescript-eslint/visitor-keys" "8.48.1" debug "^4.3.4" - fast-glob "^3.3.2" - is-glob "^4.0.3" minimatch "^9.0.4" semver "^7.6.0" + tinyglobby "^0.2.15" ts-api-utils "^2.1.0" -"@typescript-eslint/utils@8.40.0": - version "8.40.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.40.0.tgz#8d0c6430ed2f5dc350784bb0d8be514da1e54054" - integrity sha512-Cgzi2MXSZyAUOY+BFwGs17s7ad/7L+gKt6Y8rAVVWS+7o6wrjeFN4nVfTpbE25MNcxyJ+iYUXflbs2xR9h4UBg== +"@typescript-eslint/utils@8.48.1": + version "8.48.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.48.1.tgz#6cf7b99e0943b33a983ef687b9a86b65578b5c32" + integrity sha512-fAnhLrDjiVfey5wwFRwrweyRlCmdz5ZxXz2G/4cLn0YDLjTapmN4gcCsTBR1N2rWnZSDeWpYtgLDsJt+FpmcwA== dependencies: "@eslint-community/eslint-utils" "^4.7.0" - "@typescript-eslint/scope-manager" "8.40.0" - "@typescript-eslint/types" "8.40.0" - "@typescript-eslint/typescript-estree" "8.40.0" + "@typescript-eslint/scope-manager" "8.48.1" + "@typescript-eslint/types" "8.48.1" + "@typescript-eslint/typescript-estree" "8.48.1" -"@typescript-eslint/visitor-keys@8.40.0": - version "8.40.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.40.0.tgz#c1b45196981311fed7256863be4bfb2d3eda332a" - integrity sha512-8CZ47QwalyRjsypfwnbI3hKy5gJDPmrkLjkgMxhi0+DZZ2QNx2naS6/hWoVYUHU7LU2zleF68V9miaVZvhFfTA== +"@typescript-eslint/visitor-keys@8.48.1": + version "8.48.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.48.1.tgz#247d4fe6dcc044f45b7f1c15110bf95e5d73b334" + integrity sha512-BmxxndzEWhE4TIEEMBs8lP3MBWN3jFPs/p6gPm/wkv02o41hI6cq9AuSmGAaTTHPtA1FTi2jBre4A9rm5ZmX+Q== dependencies: - "@typescript-eslint/types" "8.40.0" + "@typescript-eslint/types" "8.48.1" eslint-visitor-keys "^4.2.1" -"@unimodules/core@*": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@unimodules/core/-/core-7.1.2.tgz#5181b99586476a5d87afd0958f26a04714c47fa1" - integrity sha512-lY+e2TAFuebD3vshHMIRqru3X4+k7Xkba4Wa7QsDBd+ex4c4N2dHAO61E2SrGD9+TRBD8w/o7mzK6ljbqRnbyg== - dependencies: - compare-versions "^3.4.0" - -"@unimodules/react-native-adapter@*": - version "6.3.9" - resolved "https://registry.yarnpkg.com/@unimodules/react-native-adapter/-/react-native-adapter-6.3.9.tgz#2f4bef6b7532dce5bf9f236e69f96403d0243c30" - integrity sha512-i9/9Si4AQ8awls+YGAKkByFbeAsOPgUNeLoYeh2SQ3ddjxJ5ZJDtq/I74clDnpDcn8zS9pYlcDJ9fgVJa39Glw== - dependencies: - expo-modules-autolinking "^0.0.3" - invariant "^2.2.4" - "@unrs/resolver-binding-android-arm-eabi@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.11.1.tgz#9f5b04503088e6a354295e8ea8fe3cb99e43af81" @@ -3416,13 +3235,6 @@ abbrev@1: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== -abort-controller@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" - integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== - dependencies: - event-target-shim "^5.0.0" - accepts@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/accepts/-/accepts-2.0.0.tgz#bbcf4ba5075467f3f2131eab3cffc73c2f5d7895" @@ -3518,9 +3330,9 @@ ansi-regex@^5.0.1: integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== ansi-regex@^6.0.1: - version "6.2.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.2.0.tgz#2f302e7550431b1b7762705fffb52cf1ffa20447" - integrity sha512-TKY5pyBkHyADOPYlRT9Lx6F544mPl0vS5Ew7BJ45hA08Q+t3GjbueLliBWN3sMICk6+y7HdyxSzC4bWS8baBdg== + version "6.2.2" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.2.2.tgz#60216eea464d864597ce2832000738a0589650c1" + integrity sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg== ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" @@ -3535,9 +3347,9 @@ ansi-styles@^5.0.0: integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== ansi-styles@^6.1.0: - version "6.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" - integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== + version "6.2.3" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.3.tgz#c044d5dcc521a076413472597a1acb1f103c4041" + integrity sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg== anymatch@^3.0.3, anymatch@~3.1.2: version "3.1.3" @@ -3663,11 +3475,6 @@ asap@^2.0.0: resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA== -asmcrypto.js@^0.22.0: - version "0.22.0" - resolved "https://registry.yarnpkg.com/asmcrypto.js/-/asmcrypto.js-0.22.0.tgz#38fc1440884d802c7bd37d1d23c2b26a5cd5d2d2" - integrity sha512-usgMoyXjMbx/ZPdzTSXExhMPur2FTdz/Vo5PVx2gIaBcdAAJNOFlsdgqveM8Cff7W0v+xrf9BwjOV26JSAF9qA== - asn1js@^3.0.5, asn1js@^3.0.6: version "3.0.6" resolved "https://registry.yarnpkg.com/asn1js/-/asn1js-3.0.6.tgz#53e002ebe00c5f7fd77c1c047c3557d7c04dce25" @@ -3687,10 +3494,10 @@ async-function@^1.0.0: resolved "https://registry.yarnpkg.com/async-function/-/async-function-1.0.0.tgz#509c9fca60eaf85034c6829838188e4e4c8ffb2b" integrity sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA== -async-mutex@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/async-mutex/-/async-mutex-0.4.1.tgz#bccf55b96f2baf8df90ed798cb5544a1f6ee4c2c" - integrity sha512-WfoBo4E/TbCX1G95XTjbWTE3X2XLG0m1Xbv2cwOtuPdyH9CZvnaA5nCt1ucjaKEgW2A5IF71hxrRhr83Je5xjA== +async-mutex@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/async-mutex/-/async-mutex-0.5.0.tgz#353c69a0b9e75250971a64ac203b0ebfddd75482" + integrity sha512-1A94B18jkJ3DYq284ohPxoXbfTA5HsQ7/Mf4DEhcyLx3Bz27Rh59iScbB6EPiP+B+joue6YCxcMXSbFC1tZKwA== dependencies: tslib "^2.4.0" @@ -3699,11 +3506,6 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== -at-least-node@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" - integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== - available-typed-arrays@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" @@ -3712,28 +3514,14 @@ available-typed-arrays@^1.0.7: possible-typed-array-names "^1.0.0" axios@^1.6.3, axios@^1.9.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.11.0.tgz#c2ec219e35e414c025b2095e8b8280278478fdb6" - integrity sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA== + version "1.13.2" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.13.2.tgz#9ada120b7b5ab24509553ec3e40123521117f687" + integrity sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA== dependencies: follow-redirects "^1.15.6" form-data "^4.0.4" proxy-from-env "^1.1.0" -b64-lite@^1.3.1, b64-lite@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/b64-lite/-/b64-lite-1.4.0.tgz#e62442de11f1f21c60e38b74f111ac0242283d3d" - integrity sha512-aHe97M7DXt+dkpa8fHlCcm1CnskAHrJqEfMI0KN7dwqlzml/aUe1AGt6lk51HzrSfVD67xOso84sOpr+0wIe2w== - dependencies: - base-64 "^0.1.0" - -b64u-lite@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/b64u-lite/-/b64u-lite-1.1.0.tgz#a581b7df94cbd4bed7cbb19feae816654f0b1bf0" - integrity sha512-929qWGDVCRph7gQVTC6koHqQIpF4vtVaSbwLltFQo44B1bYUquALswZdBKFfrJCPEnsCOvWkJsPdQYZ/Ukhw8A== - dependencies: - b64-lite "^1.4.0" - babel-jest@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5" @@ -3802,45 +3590,21 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base-64@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/base-64/-/base-64-0.1.0.tgz#780a99c84e7d600260361511c4877613bf24f6bb" - integrity sha512-Y5gU45svrR5tI2Vt/X9GPd3L0HNIKzGu202EjxrXMpuc2V2CiKgemAbUUsqYmZJvPtCXoUKjNZwBJzsNScUbXA== - -base64-js@*, base64-js@^1.3.0, base64-js@^1.3.1: +base64-js@^1.3.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== -base64url-universal@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/base64url-universal/-/base64url-universal-1.1.0.tgz#94da6356c1d43ead55b1d91c045c0a5b09ec8181" - integrity sha512-WyftvZqye29YQ10ZnuiBeEj0lk8SN8xHU9hOznkLc85wS1cLTp6RpzlMrHxMPD9nH7S55gsBqMqgGyz93rqmkA== - dependencies: - base64url "^3.0.0" - -base64url-universal@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/base64url-universal/-/base64url-universal-2.0.0.tgz#6023785c0e349a90de1cf396e8a4519750a4e67b" - integrity sha512-6Hpg7EBf3t148C3+fMzjf+CHnADVDafWzlJUXAqqqbm4MKNXbsoPdOkWeRTjNlkYG7TpyjIpRO1Gk0SnsFD1rw== - dependencies: - base64url "^3.0.1" - -base64url@^3.0.0, base64url@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/base64url/-/base64url-3.0.1.tgz#6399d572e2bc3f90a9a8b22d5dbb0a32d33f788d" - integrity sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A== +baseline-browser-mapping@^2.9.0: + version "2.9.4" + resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.9.4.tgz#a010e50ea6da48fba78179aef9b6e771d00fff42" + integrity sha512-ZCQ9GEWl73BVm8bu5Fts8nt7MHdbt5vY9bP6WGnUh+r3l8M7CgfyTlwsgCbMC66BNxPr6Xoce3j66Ms5YUQTNA== bech32@1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== -bignumber.js@^9.0.0: - version "9.3.1" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.3.1.tgz#759c5aaddf2ffdc4f154f7b493e1c8770f88c4d7" - integrity sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ== - binary-extensions@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522" @@ -3856,51 +3620,38 @@ bn.js@^5.2.0, bn.js@^5.2.1: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.2.tgz#82c09f9ebbb17107cd72cb7fd39bd1f9d0aaa566" integrity sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw== -body-parser@1.20.3: - version "1.20.3" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.3.tgz#1953431221c6fb5cd63c4b36d53fab0928e548c6" - integrity sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g== - dependencies: - bytes "3.1.2" - content-type "~1.0.5" - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - http-errors "2.0.0" - iconv-lite "0.4.24" - on-finished "2.4.1" - qs "6.13.0" - raw-body "2.5.2" - type-is "~1.6.18" - unpipe "1.0.0" - -body-parser@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-2.2.0.tgz#f7a9656de305249a715b549b7b8fd1ab9dfddcfa" - integrity sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg== +body-parser@^2.2.0, body-parser@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-2.2.1.tgz#6df606b0eb0a6e3f783dde91dde182c24c82438c" + integrity sha512-nfDwkulwiZYQIGwxdy0RUmowMhKcFVcYXUU7m4QlKYim1rUtg83xm2yjZ40QjDuc291AJjjeSc9b++AWHSgSHw== dependencies: bytes "^3.1.2" content-type "^1.0.5" - debug "^4.4.0" + debug "^4.4.3" http-errors "^2.0.0" - iconv-lite "^0.6.3" + iconv-lite "^0.7.0" on-finished "^2.4.1" qs "^6.14.0" - raw-body "^3.0.0" - type-is "^2.0.0" + raw-body "^3.0.1" + type-is "^2.0.1" -borc@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/borc/-/borc-3.0.0.tgz#49ada1be84de86f57bb1bb89789f34c186dfa4fe" - integrity sha512-ec4JmVC46kE0+layfnwM3l15O70MlFiEbmQHY/vpqIKiUtPVntv4BY4NVnz3N4vb21edV3mY97XVckFvYHWF9g== +body-parser@~1.20.3: + version "1.20.4" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.4.tgz#f8e20f4d06ca8a50a71ed329c15dccad1cdc547f" + integrity sha512-ZTgYYLMOXY9qKU/57FAo8F+HA2dGX7bqGc71txDRC1rS4frdFI5R7NhluHxH6M0YItAP0sHB4uqAOcYKxO6uGA== dependencies: - bignumber.js "^9.0.0" - buffer "^6.0.3" - commander "^2.15.0" - ieee754 "^1.1.13" - iso-url "^1.1.5" - json-text-sequence "~0.3.0" - readable-stream "^3.6.0" + bytes "~3.1.2" + content-type "~1.0.5" + debug "2.6.9" + depd "2.0.0" + destroy "~1.2.0" + http-errors "~2.0.1" + iconv-lite "~0.4.24" + on-finished "~2.4.1" + qs "~6.14.0" + raw-body "~2.5.3" + type-is "~1.6.18" + unpipe "~1.0.0" brace-expansion@^1.1.7: version "1.1.12" @@ -3930,14 +3681,15 @@ brorand@^1.1.0: integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== browserslist@^4.24.0: - version "4.25.3" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.25.3.tgz#9167c9cbb40473f15f75f85189290678b99b16c5" - integrity sha512-cDGv1kkDI4/0e5yON9yM5G/0A5u8sf5TnmdX5C9qHzI9PPu++sQ9zjm1k9NiOrf3riY4OkK0zSGqfvJyJsgCBQ== + version "4.28.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.28.1.tgz#7f534594628c53c63101079e27e40de490456a95" + integrity sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA== dependencies: - caniuse-lite "^1.0.30001735" - electron-to-chromium "^1.5.204" - node-releases "^2.0.19" - update-browserslist-db "^1.1.3" + baseline-browser-mapping "^2.9.0" + caniuse-lite "^1.0.30001759" + electron-to-chromium "^1.5.263" + node-releases "^2.0.27" + update-browserslist-db "^1.2.0" bs-logger@^0.2.6: version "0.2.6" @@ -3976,7 +3728,7 @@ buffer@^6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" -bytes@3.1.2, bytes@^3.1.2: +bytes@^3.1.2, bytes@~3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== @@ -4040,10 +3792,10 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001735: - version "1.0.30001735" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001735.tgz#ba658fd3fd24a4106fd68d5ce472a2c251494dbe" - integrity sha512-EV/laoX7Wq2J9TQlyIXRxTJqIw4sxfXS4OYgudGxBYRuTv0q7AM6yMEpU/Vo1I94thg9U6EZ2NfZx9GJq83u7w== +caniuse-lite@^1.0.30001759: + version "1.0.30001759" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001759.tgz#d569e7b010372c6b0ca3946e30dada0a2e9d5006" + integrity sha512-Pzfx9fOKoKvevQf8oCXoyNRQ5QyxJj+3O0Rqx2V5oxT61KGx8+n6hV/IUyJeifUci2clnmmKVpvtiqRzgiWjSw== canonicalize@^1.0.1: version "1.0.8" @@ -4057,7 +3809,7 @@ cbor@^8.1.0: dependencies: nofilter "^3.1.0" -chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2: +chalk@^4.0.0, chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -4105,7 +3857,7 @@ cjs-module-lexer@^1.0.0, cjs-module-lexer@^1.2.2: resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz#0f79731eb8cfe1ec72acd4066efac9d61991b00d" integrity sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q== -class-transformer@0.5.1, class-transformer@^0.5.1: +class-transformer@0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/class-transformer/-/class-transformer-0.5.1.tgz#24147d5dffd2a6cea930a3250a677addf96ab336" integrity sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw== @@ -4119,6 +3871,15 @@ class-validator@0.14.1: libphonenumber-js "^1.10.53" validator "^13.9.0" +class-validator@^0.14.1: + version "0.14.3" + resolved "https://registry.yarnpkg.com/class-validator/-/class-validator-0.14.3.tgz#834a4caafa8359aed73d7708badb4cf271be50fe" + integrity sha512-rXXekcjofVN1LTOSw+u4u9WXVEUvNBVjORW154q/IdmYWy1nMbOU9aNtZB0t8m+FJQ9q91jlr2f9CwwUFdFMRA== + dependencies: + "@types/validator" "^13.15.3" + libphonenumber-js "^1.11.1" + validator "^13.15.20" + cliui@^8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" @@ -4141,9 +3902,9 @@ co@^4.6.0: integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== collect-v8-coverage@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz#c0b29bcd33bcd0779a1344c2136051e6afd3d9e9" - integrity sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q== + version "1.0.3" + resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz#cc1f01eb8d02298cbc9a437c74c70ab4e5210b80" + integrity sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw== color-convert@^2.0.1: version "2.0.1" @@ -4169,21 +3930,6 @@ combined-stream@^1.0.8: dependencies: delayed-stream "~1.0.0" -commander@^2.15.0: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -commander@^7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" - integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== - -compare-versions@^3.4.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.6.0.tgz#1a5689913685e5a87637b8d3ffca75514ec41d62" - integrity sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA== - compare-versions@^6.1.1: version "6.1.1" resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-6.1.1.tgz#7af3cc1099ba37d244b3145a9af5201b629148a9" @@ -4204,20 +3950,18 @@ console-control-strings@^1.0.0, console-control-strings@^1.1.0: resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ== -content-disposition@0.5.4: +content-disposition@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-1.0.1.tgz#a8b7bbeb2904befdfb6787e5c0c086959f605f9b" + integrity sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q== + +content-disposition@~0.5.4: version "0.5.4" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== dependencies: safe-buffer "5.2.1" -content-disposition@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-1.0.0.tgz#844426cb398f934caefcbb172200126bc7ceace2" - integrity sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg== - dependencies: - safe-buffer "5.2.1" - content-type@^1.0.5, content-type@~1.0.4, content-type@~1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" @@ -4228,22 +3972,17 @@ convert-source-map@^2.0.0: resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== - cookie-signature@^1.2.1: version "1.2.2" resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.2.2.tgz#57c7fc3cc293acab9fec54d73e15690ebe4a1793" integrity sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg== -cookie@0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.7.1.tgz#2f73c42142d5d5cf71310a74fc4ae61670e5dbc9" - integrity sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w== +cookie-signature@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.7.tgz#ab5dd7ab757c54e60f37ef6550f481c426d10454" + integrity sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA== -cookie@^0.7.1: +cookie@^0.7.1, cookie@~0.7.1: version "0.7.2" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.7.2.tgz#556369c472a2ba910f2979891b526b3436237ed7" integrity sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w== @@ -4300,11 +4039,6 @@ cross-spawn@^7.0.3, cross-spawn@^7.0.6: shebang-command "^2.0.0" which "^2.0.1" -crypto-ld@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/crypto-ld/-/crypto-ld-6.0.0.tgz#cf8dcf566cb3020bdb27f0279e6cc9b46d031cd7" - integrity sha512-XWL1LslqggNoaCI/m3I7HcvaSt9b2tYzdrXO+jHLUj9G1BvRfvV7ZTFDVY5nifYuIGAPdAGu7unPxLRustw3VA== - d@1, d@^1.0.1, d@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/d/-/d-1.0.2.tgz#2aefd554b81981e7dccf72d6842ae725cb17e5de" @@ -4313,16 +4047,6 @@ d@1, d@^1.0.1, d@^1.0.2: es5-ext "^0.10.64" type "^2.7.2" -data-uri-to-buffer@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz#594b8973938c5bc2c33046535785341abc4f3636" - integrity sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og== - -data-uri-to-buffer@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e" - integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== - data-view-buffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.2.tgz#211a03ba95ecaf7798a8c7198d79536211f88570" @@ -4350,12 +4074,12 @@ data-view-byte-offset@^1.0.1: es-errors "^1.3.0" is-data-view "^1.0.1" -dcql@^0.2.20: - version "0.2.22" - resolved "https://registry.yarnpkg.com/dcql/-/dcql-0.2.22.tgz#aeae2f7f47b8bce5fe2c4a8857df8406feb91230" - integrity sha512-4CfuUoJ1/dfj4aOMwCGF3HEHsPpRUyALbst5Dx3qcNkIXNFpVqebKVYd58X9/ZlKN/wWJxPS34S7uQ0fcbzS5A== +dcql@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/dcql/-/dcql-3.0.0.tgz#08d89345f4916bd85ac886cf0a74db54653c4b4a" + integrity sha512-Z1Iq+tDQqPCqWzQVevUVOaYa+NfoplwrwSPvV0JINZpniiN5jq32C4CXsrmELAgSa5Ja7hBKiuYkpZjQFkeHyw== dependencies: - valibot "1.0.0-beta.8" + valibot "1.2.0" debug@2.6.9, debug@^2.2.0: version "2.6.9" @@ -4364,10 +4088,10 @@ debug@2.6.9, debug@^2.2.0: dependencies: ms "2.0.0" -debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.5, debug@^4.3.7, debug@^4.4.0, debug@^4.4.1: - version "4.4.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.1.tgz#e5a8bc6cbc4c6cd3e64308b0693a3d4fa550189b" - integrity sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ== +debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.5, debug@^4.3.7, debug@^4.4.0, debug@^4.4.1, debug@^4.4.3: + version "4.4.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" + integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== dependencies: ms "^2.1.3" @@ -4378,10 +4102,10 @@ debug@^3.1.0, debug@^3.2.7: dependencies: ms "^2.1.1" -decode-uri-component@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" - integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== +decode-uri-component@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.4.1.tgz#2ac4859663c704be22bf7db760a1494a49ab2cc5" + integrity sha512-+8VxcR21HhTy8nOt6jf20w0c9CADrw1O8d+VZ/YzzCt4bJ3uBjw+D1q2osAB8RnpwwaeYBxy0HyKQxD5JBMuuQ== decompress-response@^6.0.0: version "6.0.0" @@ -4391,9 +4115,9 @@ decompress-response@^6.0.0: mimic-response "^3.1.0" dedent@^1.0.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.6.0.tgz#79d52d6389b1ffa67d2bcef59ba51847a9d503b2" - integrity sha512-F1Z+5UCFpmQUzJa11agbyPVMbpgT/qA3/SKyJ1jyBgm7dUcUEa8v9JwDkerSQXfakBwFljIxhOJqGkjUwZ9FSA== + version "1.7.0" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.7.0.tgz#c1f9445335f0175a96587be245a282ff451446ca" + integrity sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ== deep-is@^0.1.3, deep-is@~0.1.3: version "0.1.4" @@ -4438,20 +4162,20 @@ delegates@^1.0.0: resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== -depd@2.0.0, depd@^2.0.0: +depd@2.0.0, depd@^2.0.0, depd@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== -destroy@1.2.0: +destroy@1.2.0, destroy@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== detect-libc@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.4.tgz#f04715b8ba815e53b4d8109655b6508a6865a7e8" - integrity sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA== + version "2.1.2" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.1.2.tgz#689c5dcdc1900ef5583a4cb9f6d7b473742074ad" + integrity sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ== detect-newline@^3.0.0: version "3.1.0" @@ -4514,10 +4238,10 @@ eastasianwidth@^0.2.0: resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== -ec-compression@0.0.1-alpha.11: - version "0.0.1-alpha.11" - resolved "https://registry.yarnpkg.com/ec-compression/-/ec-compression-0.0.1-alpha.11.tgz#1dddcebd664c786c5b3459e012d382abded81b63" - integrity sha512-ppznPCx1m/TrjlThndIOZdJPSI9/PGqU1+RTDSHQGaMS66ZWdLM8bTQw8QbdBcseDS+5UV7ZZz8GwqpQhjsZYw== +ec-compression@0.0.1-alpha.12: + version "0.0.1-alpha.12" + resolved "https://registry.yarnpkg.com/ec-compression/-/ec-compression-0.0.1-alpha.12.tgz#f5c496d1775186e3aef5751f9ec003fd44f729f8" + integrity sha512-rfsgHPnS/q8SiiJyaJ5w+qpkLtvtvEFOXoh40VmjH+Xs1pjzCCKwhd9Un3BQV+1+Qg0es5VQnzwZVJ7fjzfN+A== ecdsa-sig-formatter@1.0.11: version "1.0.11" @@ -4531,20 +4255,15 @@ ed25519-signature-2018-context@^1.1.0: resolved "https://registry.yarnpkg.com/ed25519-signature-2018-context/-/ed25519-signature-2018-context-1.1.0.tgz#68002ea7497c32e8170667cfd67468dedf7d220e" integrity sha512-ppDWYMNwwp9bploq0fS4l048vHIq41nWsAbPq6H4mNVx9G/GxW3fwg4Ln0mqctP13MoEpREK7Biz8TbVVdYXqA== -ed25519-signature-2020-context@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/ed25519-signature-2020-context/-/ed25519-signature-2020-context-1.1.0.tgz#b2f724f07db154ddf0fd6605410d88736e56fd07" - integrity sha512-dBGSmoUIK6h2vadDctrDnhhTO01PR2hJk0mRNEfrRDPCjaIwrfy4J+eziEQ9Q1m8By4f/CSRgKM1h53ydKfdNg== - ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== -electron-to-chromium@^1.5.204: - version "1.5.205" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.205.tgz#02b538ce3d0e6ef2016458b49309fd1f5be2a2a7" - integrity sha512-gBtbT7IgOHu7CwdtIiXwbNRD1l6oG6GAyanmwMCLVqaoGy92Jfe1dSHLiSj8xUEZNxOTIVlXuaAalMMD+S4y0w== +electron-to-chromium@^1.5.263: + version "1.5.266" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.266.tgz#41ed029b3cf641c4ee071de42954b36dca8f5f4e" + integrity sha512-kgWEglXvkEfMH7rxP5OSZZwnaDWT7J9EoZCujhnpLbfi0bbNtRkgdX2E3gt0Uer11c61qCYktB3hwkAS325sJg== elliptic@6.6.1: version "6.6.1" @@ -4592,9 +4311,9 @@ end-of-stream@^1.1.0: once "^1.4.0" error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + version "1.3.4" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.4.tgz#b3a8d8bb6f92eecc1629e3e27d3c8607a8a32414" + integrity sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ== dependencies: is-arrayish "^0.2.1" @@ -4854,23 +4573,22 @@ eslint-visitor-keys@^4.2.1: integrity sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ== eslint@^9.27.0: - version "9.33.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.33.0.tgz#cc186b3d9eb0e914539953d6a178a5b413997b73" - integrity sha512-TS9bTNIryDzStCpJN93aC5VRSW3uTx9sClUn4B87pwiCaJh220otoI0X8mJKr+VcPtniMdN8GKjlwgWGUv5ZKA== + version "9.39.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.39.1.tgz#be8bf7c6de77dcc4252b5a8dcb31c2efff74a6e5" + integrity sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g== dependencies: - "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/eslint-utils" "^4.8.0" "@eslint-community/regexpp" "^4.12.1" - "@eslint/config-array" "^0.21.0" - "@eslint/config-helpers" "^0.3.1" - "@eslint/core" "^0.15.2" + "@eslint/config-array" "^0.21.1" + "@eslint/config-helpers" "^0.4.2" + "@eslint/core" "^0.17.0" "@eslint/eslintrc" "^3.3.1" - "@eslint/js" "9.33.0" - "@eslint/plugin-kit" "^0.3.5" + "@eslint/js" "9.39.1" + "@eslint/plugin-kit" "^0.4.1" "@humanfs/node" "^0.16.6" "@humanwhocodes/module-importer" "^1.0.1" "@humanwhocodes/retry" "^0.4.2" "@types/estree" "^1.0.6" - "@types/json-schema" "^7.0.15" ajv "^6.12.4" chalk "^4.0.0" cross-spawn "^7.0.6" @@ -4989,9 +4707,9 @@ ethers@^5.1.0: "@ethersproject/wordlists" "5.8.0" ethers@^6.9.0: - version "6.15.0" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.15.0.tgz#2980f2a3baf0509749b7e21f8692fa8a8349c0e3" - integrity sha512-Kf/3ZW54L4UT0pZtsY/rf+EkBU7Qi5nnhonjUb8yTXcxH3cdcWrV2cRyk0Xk/4jK6OoHhxxZHriyhje20If2hQ== + version "6.16.0" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.16.0.tgz#fff9b4f05d7a359c774ad6e91085a800f7fccf65" + integrity sha512-U1wulmetNymijEhpSEQ7Ct/P/Jw9/e7R1j5XIbPRydgV2DjLVMsULDlNksq3RQnFgKoLlZf88ijYtWEXcPa07A== dependencies: "@adraffy/ens-normalize" "1.10.1" "@noble/curves" "1.2.0" @@ -5009,11 +4727,6 @@ event-emitter@^0.3.5: d "1" es5-ext "~0.10.14" -event-target-shim@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" - integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== - events@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" @@ -5050,78 +4763,61 @@ expect@^29.0.0, expect@^29.7.0: jest-message-util "^29.7.0" jest-util "^29.7.0" -expo-modules-autolinking@^0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/expo-modules-autolinking/-/expo-modules-autolinking-0.0.3.tgz#45ba8cb1798f9339347ae35e96e9cc70eafb3727" - integrity sha512-azkCRYj/DxbK4udDuDxA9beYzQTwpJ5a9QA0bBgha2jHtWdFGF4ZZWSY+zNA5mtU3KqzYt8jWHfoqgSvKyu1Aw== - dependencies: - chalk "^4.1.0" - commander "^7.2.0" - fast-glob "^3.2.5" - find-up "~5.0.0" - fs-extra "^9.1.0" - -expo-random@*: - version "14.0.1" - resolved "https://registry.yarnpkg.com/expo-random/-/expo-random-14.0.1.tgz#aedc6a3b6ff86c74a85989d77d20e0f1762ed669" - integrity sha512-gX2mtR9o+WelX21YizXUCD/y+a4ZL+RDthDmFkHxaYbdzjSYTn8u/igoje/l3WEO+/RYspmqUFa8w/ckNbt6Vg== - dependencies: - base64-js "^1.3.0" - express-rate-limit@^7.5.0: version "7.5.1" resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-7.5.1.tgz#8c3a42f69209a3a1c969890070ece9e20a879dec" integrity sha512-7iN8iPMDzOMHPUYllBEsQdWVB6fPDMPqwjBaFrgr4Jgr/+okjvzAy+UHlYYL/Vs0OsOrMkwS6PJDkFlJwoxUnw== express@^4.21.2: - version "4.21.2" - resolved "https://registry.yarnpkg.com/express/-/express-4.21.2.tgz#cf250e48362174ead6cea4a566abef0162c1ec32" - integrity sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA== + version "4.22.1" + resolved "https://registry.yarnpkg.com/express/-/express-4.22.1.tgz#1de23a09745a4fffdb39247b344bb5eaff382069" + integrity sha512-F2X8g9P1X7uCPZMA3MVf9wcTqlyNp7IhH5qPCI0izhaOIYXaW9L535tGA3qmjRzpH+bZczqq7hVKxTR4NWnu+g== dependencies: accepts "~1.3.8" array-flatten "1.1.1" - body-parser "1.20.3" - content-disposition "0.5.4" + body-parser "~1.20.3" + content-disposition "~0.5.4" content-type "~1.0.4" - cookie "0.7.1" - cookie-signature "1.0.6" + cookie "~0.7.1" + cookie-signature "~1.0.6" debug "2.6.9" depd "2.0.0" encodeurl "~2.0.0" escape-html "~1.0.3" etag "~1.8.1" - finalhandler "1.3.1" - fresh "0.5.2" - http-errors "2.0.0" + finalhandler "~1.3.1" + fresh "~0.5.2" + http-errors "~2.0.0" merge-descriptors "1.0.3" methods "~1.1.2" - on-finished "2.4.1" + on-finished "~2.4.1" parseurl "~1.3.3" - path-to-regexp "0.1.12" + path-to-regexp "~0.1.12" proxy-addr "~2.0.7" - qs "6.13.0" + qs "~6.14.0" range-parser "~1.2.1" safe-buffer "5.2.1" - send "0.19.0" - serve-static "1.16.2" + send "~0.19.0" + serve-static "~1.16.2" setprototypeof "1.2.0" - statuses "2.0.1" + statuses "~2.0.1" type-is "~1.6.18" utils-merge "1.0.1" vary "~1.1.2" -express@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/express/-/express-5.1.0.tgz#d31beaf715a0016f0d53f47d3b4d7acf28c75cc9" - integrity sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA== +express@^5.1.0, express@^5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/express/-/express-5.2.1.tgz#8f21d15b6d327f92b4794ecf8cb08a72f956ac04" + integrity sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw== dependencies: accepts "^2.0.0" - body-parser "^2.2.0" + body-parser "^2.2.1" content-disposition "^1.0.0" content-type "^1.0.5" cookie "^0.7.1" cookie-signature "^1.2.1" debug "^4.4.0" + depd "^2.0.0" encodeurl "^2.0.0" escape-html "^1.0.3" etag "^1.8.1" @@ -5171,17 +4867,6 @@ fast-diff@^1.1.2: resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== -fast-glob@^3.2.5, fast-glob@^3.3.2: - version "3.3.3" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.3.tgz#d06d585ce8dba90a16b0505c543c3ccfb3aeb818" - integrity sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.2" - merge2 "^1.3.0" - micromatch "^4.0.8" - fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" @@ -5203,16 +4888,9 @@ fast-text-encoding@^1.0.3: integrity sha512-VhXlQgj9ioXCqGstD37E/HBeqEGV/qOD/kmbVG8h5xKBYvM1L3lR1Zn4555cQ8GkYbJa8aJSipLPndE1k6zK2w== fast-uri@^3.0.1: - version "3.0.6" - resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.6.tgz#88f130b77cfaea2378d56bf970dea21257a68748" - integrity sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw== - -fastq@^1.6.0: - version "1.19.1" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.19.1.tgz#d50eaba803c8846a883c16492821ebcd2cda55f5" - integrity sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ== - dependencies: - reusify "^1.0.4" + version "3.1.0" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.1.0.tgz#66eecff6c764c0df9b762e62ca7edcfb53b4edfa" + integrity sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA== fb-watchman@^2.0.0: version "2.0.2" @@ -5228,24 +4906,11 @@ fd-slicer@~1.1.0: dependencies: pend "~1.2.0" -fdir@^6.4.4: +fdir@^6.5.0: version "6.5.0" resolved "https://registry.yarnpkg.com/fdir/-/fdir-6.5.0.tgz#ed2ab967a331ade62f18d077dae192684d50d350" integrity sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg== -fetch-blob@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-2.1.2.tgz#a7805db1361bd44c1ef62bb57fb5fe8ea173ef3c" - integrity sha512-YKqtUDwqLyfyMnmbw8XD6Q8j9i/HggKtPEI+pZ1+8bvheBu78biSmNaXWusx1TauGqtUUGx/cBb1mKdq2rLYow== - -fetch-blob@^3.1.2, fetch-blob@^3.1.4: - version "3.2.0" - resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9" - integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ== - dependencies: - node-domexception "^1.0.0" - web-streams-polyfill "^3.0.3" - file-entry-cache@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f" @@ -5260,28 +4925,15 @@ fill-range@^7.1.1: dependencies: to-regex-range "^5.0.1" -filter-obj@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b" - integrity sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ== - -finalhandler@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.3.1.tgz#0c575f1d1d324ddd1da35ad7ece3df7d19088019" - integrity sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ== - dependencies: - debug "2.6.9" - encodeurl "~2.0.0" - escape-html "~1.0.3" - on-finished "2.4.1" - parseurl "~1.3.3" - statuses "2.0.1" - unpipe "~1.0.0" +filter-obj@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-5.1.0.tgz#5bd89676000a713d7db2e197f660274428e524ed" + integrity sha512-qWeTREPoT7I0bifpPUXtxkZJ1XJzxWtfoWWkdVGqa+eCr3SHW/Ocp89o8vLvbUuQnadybJpjOKu4V+RwO6sGng== finalhandler@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-2.1.0.tgz#72306373aa89d05a8242ed569ed86a1bff7c561f" - integrity sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q== + version "2.1.1" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-2.1.1.tgz#a2c517a6559852bcdb06d1f8bd7f51b68fad8099" + integrity sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA== dependencies: debug "^4.4.0" encodeurl "^2.0.0" @@ -5290,6 +4942,19 @@ finalhandler@^2.1.0: parseurl "^1.3.3" statuses "^2.0.1" +finalhandler@~1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.3.2.tgz#1ebc2228fc7673aac4a472c310cc05b77d852b88" + integrity sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg== + dependencies: + debug "2.6.9" + encodeurl "~2.0.0" + escape-html "~1.0.3" + on-finished "~2.4.1" + parseurl "~1.3.3" + statuses "~2.0.2" + unpipe "~1.0.0" + find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -5298,7 +4963,7 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" -find-up@^5.0.0, find-up@~5.0.0: +find-up@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== @@ -5313,15 +4978,6 @@ find-yarn-workspace-root@^2.0.0: dependencies: micromatch "^4.0.2" -fix-esm@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/fix-esm/-/fix-esm-1.0.1.tgz#e0e2199d841e43ff7db9b5f5ba7496bc45130ebb" - integrity sha512-EZtb7wPXZS54GaGxaWxMlhd1DUDCnAg5srlYdu/1ZVeW+7wwR3Tp59nu52dXByFs3MBRq+SByx1wDOJpRvLEXw== - dependencies: - "@babel/core" "^7.14.6" - "@babel/plugin-proposal-export-namespace-from" "^7.14.5" - "@babel/plugin-transform-modules-commonjs" "^7.14.5" - flat-cache@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-4.0.1.tgz#0ece39fcb14ee012f4b0410bd33dd9c1f011127c" @@ -5356,9 +5012,9 @@ foreground-child@^3.1.0: signal-exit "^4.0.1" form-data@^4.0.0, form-data@^4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.4.tgz#784cdcce0669a9d68e94d11ac4eea98088edd2c4" - integrity sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow== + version "4.0.5" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.5.tgz#b49e48858045ff4cbf6b03e1805cebcad3679053" + integrity sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w== dependencies: asynckit "^0.4.0" combined-stream "^1.0.8" @@ -5371,13 +5027,6 @@ format-util@^1.0.5: resolved "https://registry.yarnpkg.com/format-util/-/format-util-1.0.5.tgz#1ffb450c8a03e7bccffe40643180918cc297d271" integrity sha512-varLbTj0e0yVyRpqQhuWV+8hlePAgaoFRhNFj50BNjEIrw1/DphHSObtqwskVCPWNgzwPoQrZAbfa/SBiicNeg== -formdata-polyfill@^4.0.10: - version "4.0.10" - resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423" - integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g== - dependencies: - fetch-blob "^3.1.2" - formidable@^3.5.4: version "3.5.4" resolved "https://registry.yarnpkg.com/formidable/-/formidable-3.5.4.tgz#ac9a593b951e829b3298f21aa9a2243932f32ed9" @@ -5397,7 +5046,7 @@ forwarded@0.2.0: resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== -fresh@0.5.2: +fresh@0.5.2, fresh@~0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== @@ -5407,21 +5056,20 @@ fresh@^2.0.0: resolved "https://registry.yarnpkg.com/fresh/-/fresh-2.0.0.tgz#8dd7df6a1b3a1b3a5cf186c05a5dd267622635a4" integrity sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A== -fs-extra@^11.2.0: - version "11.3.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.3.1.tgz#ba7a1f97a85f94c6db2e52ff69570db3671d5a74" - integrity sha512-eXvGGwZ5CL17ZSwHWd3bbgk7UUpF6IFHtP57NYYakPvHOs8GDgDe5KJI36jIJzDkJ6eJjuzRA8eBQb6SkKue0g== +fs-extra@^10.0.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" + integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== dependencies: graceful-fs "^4.2.0" jsonfile "^6.0.1" universalify "^2.0.0" -fs-extra@^9.0.0, fs-extra@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" - integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== +fs-extra@^11.2.0: + version "11.3.2" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.3.2.tgz#c838aeddc6f4a8c74dd15f85e11fe5511bfe02a4" + integrity sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A== dependencies: - at-least-node "^1.0.0" graceful-fs "^4.2.0" jsonfile "^6.0.1" universalify "^2.0.0" @@ -5480,6 +5128,11 @@ gauge@^3.0.0: strip-ansi "^6.0.1" wide-align "^1.1.2" +generator-function@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/generator-function/-/generator-function-2.0.1.tgz#0e75dd410d1243687a0ba2e951b94eedb8f737a2" + integrity sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g== + gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" @@ -5511,7 +5164,7 @@ get-package-type@^0.1.0: resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== -get-proto@^1.0.0, get-proto@^1.0.1: +get-proto@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1" integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g== @@ -5546,9 +5199,9 @@ get-symbol-from-current-process-h@^1.0.1, get-symbol-from-current-process-h@^1.0 integrity sha512-syloC6fsCt62ELLrr1VKBM1ggOpMdetX9hTrdW77UQdcApPHLmf7CI7OKcN1c9kYuNxKcDe4iJ4FY9sX3aw2xw== get-tsconfig@^4.10.1: - version "4.10.1" - resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.10.1.tgz#d34c1c01f47d65a606c37aa7a177bc3e56ab4b2e" - integrity sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ== + version "4.13.0" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.13.0.tgz#fcdd991e6d22ab9a600f00e91c318707a5d9a0d7" + integrity sha512-1VKTZJCwBrvbd+Wn3AOgQP/2Av+TfTCOlE4AcRJE72W1ksZXbAx8PPBR9RzgTeSPzlPMHrbANMH3LbltH73wxQ== dependencies: resolve-pkg-maps "^1.0.0" @@ -5559,13 +5212,6 @@ get-uv-event-loop-napi-h@^1.0.5: dependencies: get-symbol-from-current-process-h "^1.0.1" -glob-parent@^5.1.2, glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - glob-parent@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" @@ -5573,10 +5219,17 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" +glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + glob@^10.3.10: - version "10.4.5" - resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.5.tgz#f4d9f0b90ffdbab09c9d77f5f29b4262517b0956" - integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== + version "10.5.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.5.0.tgz#8ec0355919cd3338c28428a23d4f24ecc5fe738c" + integrity sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg== dependencies: foreground-child "^3.1.0" jackspeak "^3.1.2" @@ -5734,7 +5387,7 @@ http-cache-semantics@^4.0.0: resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz#205f4db64f8562b76a4ff9235aa5279839a09dd5" integrity sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ== -http-errors@2.0.0, http-errors@^2.0.0: +http-errors@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== @@ -5745,6 +5398,17 @@ http-errors@2.0.0, http-errors@^2.0.0: statuses "2.0.1" toidentifier "1.0.1" +http-errors@^2.0.0, http-errors@~2.0.0, http-errors@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.1.tgz#36d2f65bc909c8790018dd36fb4d93da6caae06b" + integrity sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ== + dependencies: + depd "~2.0.0" + inherits "~2.0.4" + setprototypeof "~1.2.0" + statuses "~2.0.2" + toidentifier "~1.0.1" + http2-wrapper@^1.0.0-beta.5.2: version "1.0.3" resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-1.0.3.tgz#b8f55e0c1f25d4ebd08b3b0c2c079f9590800b3d" @@ -5766,21 +5430,21 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== -iconv-lite@0.4.24: +iconv-lite@^0.7.0, iconv-lite@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.7.0.tgz#c50cd80e6746ca8115eb98743afa81aa0e147a3e" + integrity sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + +iconv-lite@~0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== dependencies: safer-buffer ">= 2.1.2 < 3" -iconv-lite@0.6.3, iconv-lite@^0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" - integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== - dependencies: - safer-buffer ">= 2.1.2 < 3.0.0" - -ieee754@^1.1.13, ieee754@^1.2.1: +ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -5804,9 +5468,9 @@ import-fresh@^3.2.1: resolve-from "^4.0.0" import-in-the-middle@^1.8.1: - version "1.14.2" - resolved "https://registry.yarnpkg.com/import-in-the-middle/-/import-in-the-middle-1.14.2.tgz#283661625a88ff7c0462bd2984f77715c3bc967c" - integrity sha512-5tCuY9BV8ujfOpwtAGgsTx9CGUapcFMEEyByLv1B+v2+6DhAcw+Zr0nhQT7uwaZ7DiourxFEscghOR8e1aPLQw== + version "1.15.0" + resolved "https://registry.yarnpkg.com/import-in-the-middle/-/import-in-the-middle-1.15.0.tgz#9e20827a322bbadaeb5e3bac49ea8f6d4685fdd8" + integrity sha512-bpQy+CrsRmYmoPMAE/0G33iwRqwW4ouqdRg8jgbH3aKuCtOc8lxgmYXg2dMM92CRiGP660EtBcymH/eVUpCSaA== dependencies: acorn "^8.14.0" acorn-import-attributes "^1.9.5" @@ -5834,7 +5498,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@^2.0.4: +inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -5848,13 +5512,6 @@ internal-slot@^1.1.0: hasown "^2.0.2" side-channel "^1.1.0" -invariant@^2.2.4: - version "2.2.4" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" - integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== - dependencies: - loose-envify "^1.0.0" - ipaddr.js@1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" @@ -5919,7 +5576,7 @@ is-callable@^1.2.7: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== -is-core-module@^2.13.0, is-core-module@^2.16.0, is-core-module@^2.16.1: +is-core-module@^2.13.0, is-core-module@^2.16.1: version "2.16.1" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.16.1.tgz#2a98801a849f43e2add644fbb6bc6229b19a4ef4" integrity sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w== @@ -5971,12 +5628,13 @@ is-generator-fn@^2.0.0: integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== is-generator-function@^1.0.10: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.1.0.tgz#bf3eeda931201394f57b5dba2800f91a238309ca" - integrity sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ== + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.1.2.tgz#ae3b61e3d5ea4e4839b90bad22b02335051a17d5" + integrity sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA== dependencies: - call-bound "^1.0.3" - get-proto "^1.0.0" + call-bound "^1.0.4" + generator-function "^2.0.0" + get-proto "^1.0.1" has-tostringtag "^1.0.2" safe-regex-test "^1.1.0" @@ -6108,29 +5766,6 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== -iso-url@^1.1.5: - version "1.2.1" - resolved "https://registry.yarnpkg.com/iso-url/-/iso-url-1.2.1.tgz#db96a49d8d9a64a1c889fc07cc525d093afb1811" - integrity sha512-9JPDgCN4B7QPkLtYAAOrEuAWvP9rWvR5offAr0/SeF046wIkglqH3VXgYYP6NcsKslH80UIVgmPqNe3j7tG2ng== - -isomorphic-webcrypto@^2.3.8: - version "2.3.8" - resolved "https://registry.yarnpkg.com/isomorphic-webcrypto/-/isomorphic-webcrypto-2.3.8.tgz#4a7493b486ef072b9f11b6f8fd66adde856e3eec" - integrity sha512-XddQSI0WYlSCjxtm1AI8kWQOulf7hAN3k3DclF1sxDJZqOe0pcsOt675zvWW91cZH9hYs3nlA3Ev8QK5i80SxQ== - dependencies: - "@peculiar/webcrypto" "^1.0.22" - asmcrypto.js "^0.22.0" - b64-lite "^1.3.1" - b64u-lite "^1.0.1" - msrcrypto "^1.5.6" - str2buf "^1.3.0" - webcrypto-shim "^0.1.4" - optionalDependencies: - "@unimodules/core" "*" - "@unimodules/react-native-adapter" "*" - expo-random "*" - react-native-securerandom "^0.1.1" - istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" @@ -6562,7 +6197,7 @@ joi@^17.13.3: "@sideway/formula" "^3.0.1" "@sideway/pinpoint" "^2.0.0" -js-base64@^3.7.6: +js-base64@^3.7.6, js-base64@^3.7.8: version "3.7.8" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-3.7.8.tgz#af44496bc09fa178ed9c4adf67eb2b46f5c6d2a4" integrity sha512-hNngCeKxIUQiEUN3GPJOkz4wF/YvdUdbNL9hsBcMQTkKzboD7T/q3OYOuuPZLUE6dBxSGpwhk5mwuDud7JVAow== @@ -6572,23 +6207,23 @@ js-sha3@0.8.0: resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== -"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: +js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== js-yaml@^3.13.1: - version "3.14.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + version "3.14.2" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.2.tgz#77485ce1dd7f33c061fd1b16ecea23b55fcb04b0" + integrity sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg== dependencies: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== +js-yaml@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.1.tgz#854c292467705b699476e1a2decc0c8a3458806b" + integrity sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA== dependencies: argparse "^2.0.1" @@ -6633,13 +6268,6 @@ json-stable-stringify@^1.0.2: jsonify "^0.0.1" object-keys "^1.1.1" -json-text-sequence@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/json-text-sequence/-/json-text-sequence-0.3.0.tgz#6603e0ee45da41f949669fd18744b97fb209e6ce" - integrity sha512-7khKIYPKwXQem4lWXfpIN/FEnhztCeRPSxH4qm3fVlqulwujrRDD54xAwDDn/qVKpFtV550+QAkcWJcufzqQuA== - dependencies: - "@sovpro/delimited-stream" "^1.1.0" - json5@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" @@ -6666,32 +6294,12 @@ jsonify@^0.0.1: resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.1.tgz#2aa3111dae3d34a0f151c63f3a45d995d9420978" integrity sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg== -jsonld-signatures@^11.0.0: - version "11.5.0" - resolved "https://registry.yarnpkg.com/jsonld-signatures/-/jsonld-signatures-11.5.0.tgz#020ad488bd1977c5169de3d2a4cc28a76dec2663" - integrity sha512-Kdto+e8uvY/5u3HYkmAbpy52bplWX9uqS8fmqdCv6oxnCFwCTM0hMt6r4rWqlhw5/aHoCHJIRxwYb4QKGC69Jw== - dependencies: - "@digitalbazaar/security-context" "^1.0.0" - jsonld "^8.0.0" - rdf-canonize "^4.0.1" - serialize-error "^8.1.0" - -jsonld@^8.0.0: - version "8.3.3" - resolved "https://registry.yarnpkg.com/jsonld/-/jsonld-8.3.3.tgz#08cc927833c8684e42319d4697cc8199c0908ffc" - integrity sha512-9YcilrF+dLfg9NTEof/mJLMtbdX1RJ8dbWtJgE00cMOIohb1lIyJl710vFiTaiHTl6ZYODJuBd32xFvUhmv3kg== - dependencies: - "@digitalbazaar/http-client" "^3.4.1" - canonicalize "^1.0.1" - lru-cache "^6.0.0" - rdf-canonize "^3.4.0" - jsonwebtoken@^9.0.2: - version "9.0.2" - resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz#65ff91f4abef1784697d40952bb1998c504caaf3" - integrity sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ== + version "9.0.3" + resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-9.0.3.tgz#6cd57ab01e9b0ac07cb847d53d3c9b6ee31f7ae2" + integrity sha512-MT/xP0CrubFRNLNKvxJ2BYfy53Zkm++5bX9dtuPbqAeQpTVe0MQTFhao8+Cp//EmJp244xt6Drw/GVEGCUj40g== dependencies: - jws "^3.2.2" + jws "^4.0.1" lodash.includes "^4.3.0" lodash.isboolean "^3.0.3" lodash.isinteger "^4.0.4" @@ -6702,21 +6310,21 @@ jsonwebtoken@^9.0.2: ms "^2.1.1" semver "^7.5.4" -jwa@^1.4.1: - version "1.4.2" - resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.2.tgz#16011ac6db48de7b102777e57897901520eec7b9" - integrity sha512-eeH5JO+21J78qMvTIDdBXidBd6nG2kZjg5Ohz/1fpa28Z4CcsWUzJ1ZZyFq/3z3N17aZy+ZuBoHljASbL1WfOw== +jwa@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/jwa/-/jwa-2.0.1.tgz#bf8176d1ad0cd72e0f3f58338595a13e110bc804" + integrity sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg== dependencies: buffer-equal-constant-time "^1.0.1" ecdsa-sig-formatter "1.0.11" safe-buffer "^5.0.1" -jws@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" - integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== +jws@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/jws/-/jws-4.0.1.tgz#07edc1be8fac20e677b283ece261498bd38f0690" + integrity sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA== dependencies: - jwa "^1.4.1" + jwa "^2.0.1" safe-buffer "^5.0.1" jwt-decode@^3.1.2: @@ -6766,31 +6374,10 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== -ky-universal@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/ky-universal/-/ky-universal-0.11.0.tgz#f5edf857865aaaea416a1968222148ad7d9e4017" - integrity sha512-65KyweaWvk+uKKkCrfAf+xqN2/epw1IJDtlyCPxYffFCMR8u1sp2U65NtWpnozYfZxQ6IUzIlvUcw+hQ82U2Xw== - dependencies: - abort-controller "^3.0.0" - node-fetch "^3.2.10" - -ky-universal@^0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/ky-universal/-/ky-universal-0.8.2.tgz#edc398d54cf495d7d6830aa1ab69559a3cc7f824" - integrity sha512-xe0JaOH9QeYxdyGLnzUOVGK4Z6FGvDVzcXFTdrYA1f33MZdEa45sUDaMBy98xQMcsd2XIBrTXRrRYnegcSdgVQ== - dependencies: - abort-controller "^3.0.0" - node-fetch "3.0.0-beta.9" - -ky@^0.25.1: - version "0.25.1" - resolved "https://registry.yarnpkg.com/ky/-/ky-0.25.1.tgz#0df0bd872a9cc57e31acd5dbc1443547c881bfbc" - integrity sha512-PjpCEWlIU7VpiMVrTwssahkYXX1by6NCT0fhTUX34F3DTinARlgMpriuroolugFPcMgpPWrOW4mTb984Qm1RXA== - -ky@^0.33.3: - version "0.33.3" - resolved "https://registry.yarnpkg.com/ky/-/ky-0.33.3.tgz#bf1ad322a3f2c3428c13cfa4b3af95e6c4a2f543" - integrity sha512-CasD9OCEQSFIam2U8efFK81Yeg8vNMTBUqtMOHlrcWQHqUX3HeCl9Dr31u4toV7emlH8Mymk5+9p0lL6mKb/Xw== +ky@^1.0.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/ky/-/ky-1.14.1.tgz#16f20b3bf3939abcc04e2a9613f47360fe5f64c9" + integrity sha512-hYje4L9JCmpEQBtudo+v52X5X8tgWXUYyPcxKSuxQNboqufecl9VMWjGiucAFH060AwPXHZuH+WB2rrqfkmafw== leven@^3.1.0: version "3.1.0" @@ -6813,10 +6400,10 @@ levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" -libphonenumber-js@^1.10.53: - version "1.12.12" - resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.12.12.tgz#4715488620178fc81b7082b074a640f95fdc5693" - integrity sha512-aWVR6xXYYRvnK0v/uIwkf5Lthq9Jpn0N8TISW/oDTWlYB2sOimuiLn9Q26aUw4KxkJoiT8ACdiw44Y8VwKFIfQ== +libphonenumber-js@^1.10.53, libphonenumber-js@^1.11.1: + version "1.12.31" + resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.12.31.tgz#3cdb45641c6b77228dd1238f3d810c3bb5d91199" + integrity sha512-Z3IhgVgrqO1S5xPYM3K5XwbkDasU67/Vys4heW+lfSBALcUZjeIIzI8zCLifY+OCzSq+fpDdywMDa7z+4srJPQ== lines-and-columns@^1.1.6: version "1.2.4" @@ -6902,13 +6489,6 @@ long@^5.0.0: resolved "https://registry.yarnpkg.com/long/-/long-5.3.2.tgz#1d84463095999262d7d7b7f8bfd4a8cc55167f83" integrity sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA== -loose-envify@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" - integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== - dependencies: - js-tokens "^3.0.0 || ^4.0.0" - lowercase-keys@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" @@ -6938,10 +6518,10 @@ lru_map@^0.4.1: resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.4.1.tgz#f7b4046283c79fb7370c36f8fca6aee4324b0a98" integrity sha512-I+lBvqMMFfqaV8CJCISjI3wbjmwVu/VyOoU7+qtu9d7ioW5klMgsTTiUOUp+DJvfTTzKXoPbyC6YfgkNcyPSOg== -luxon@^3.5.0: - version "3.7.1" - resolved "https://registry.yarnpkg.com/luxon/-/luxon-3.7.1.tgz#9bd09aa84a56afb00c57ea78a8ec5bd16eb24ec0" - integrity sha512-RkRWjA926cTvz5rAb1BqyWkKbbjzCGchDUIKMCUvNi17j6f6j8uHGDV82Aqcqtzd+icoYpELmG3ksgGiFNNcNg== +luxon@^3.7.2: + version "3.7.2" + resolved "https://registry.yarnpkg.com/luxon/-/luxon-3.7.2.tgz#d697e48f478553cca187a0f8436aff468e3ba0ba" + integrity sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew== make-dir@^3.1.0: version "3.1.0" @@ -7006,17 +6586,12 @@ merge-stream@^2.0.0: resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== -merge2@^1.3.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" - integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== - methods@^1.1.2, methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== -micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.8: +micromatch@^4.0.2, micromatch@^4.0.4: version "4.0.8" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== @@ -7042,9 +6617,9 @@ mime-types@^2.1.12, mime-types@~2.1.24, mime-types@~2.1.34: mime-db "1.52.0" mime-types@^3.0.0, mime-types@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-3.0.1.tgz#b1d94d6997a9b32fd69ebaed0db73de8acb519ce" - integrity sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA== + version "3.0.2" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-3.0.2.tgz#39002d4182575d5af036ffa118100f2524b2e2ab" + integrity sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A== dependencies: mime-db "^1.54.0" @@ -7127,10 +6702,10 @@ minizlib@^2.1.1: minipass "^3.0.0" yallist "^4.0.0" -minizlib@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-3.0.2.tgz#f33d638eb279f664439aa38dc5f91607468cb574" - integrity sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA== +minizlib@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-3.1.0.tgz#6ad76c3a8f10227c9b51d1c9ac8e30b27f5a251c" + integrity sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw== dependencies: minipass "^7.1.2" @@ -7139,11 +6714,6 @@ mkdirp@^1.0.3, mkdirp@^1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -mkdirp@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-3.0.1.tgz#e44e4c5607fb279c168241713cc6e0fea9adcb50" - integrity sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg== - module-details-from-path@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/module-details-from-path/-/module-details-from-path-1.0.4.tgz#b662fdcd93f6c83d3f25289da0ce81c8d9685b94" @@ -7159,11 +6729,6 @@ ms@2.1.3, ms@^2.1.1, ms@^2.1.3: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -msrcrypto@^1.5.6: - version "1.5.8" - resolved "https://registry.yarnpkg.com/msrcrypto/-/msrcrypto-1.5.8.tgz#be419be4945bf134d8af52e9d43be7fa261f4a1c" - integrity sha512-ujZ0TRuozHKKm6eGbKHfXef7f+esIhEckmThVnz7RNyiOJd7a6MXj2JGBoL9cnPDW+JMG16MoTUh5X+XXjI66Q== - multiformats@^9.4.2: version "9.9.0" resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-9.9.0.tgz#c68354e7d21037a8f1f8833c8ccd68618e8f1d37" @@ -7175,9 +6740,9 @@ nanoid@^3.3.7: integrity sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w== napi-postinstall@^0.3.0: - version "0.3.3" - resolved "https://registry.yarnpkg.com/napi-postinstall/-/napi-postinstall-0.3.3.tgz#93d045c6b576803ead126711d3093995198c6eb9" - integrity sha512-uTp172LLXSxuSYHv/kou+f6KW3SMppU9ivthaVTXian9sOt3XM/zHYHpRZiLgQoxeWfYUnslNWQHF1+G71xcow== + version "0.3.4" + resolved "https://registry.yarnpkg.com/napi-postinstall/-/napi-postinstall-0.3.4.tgz#7af256d6588b5f8e952b9190965d6b019653bbb9" + integrity sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ== natural-compare@^1.4.0: version "1.4.0" @@ -7228,11 +6793,6 @@ node-addon-api@^3.0.0: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161" integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A== -node-domexception@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" - integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== - node-fetch@2, node-fetch@^2.6.7, node-fetch@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" @@ -7240,23 +6800,6 @@ node-fetch@2, node-fetch@^2.6.7, node-fetch@^2.7.0: dependencies: whatwg-url "^5.0.0" -node-fetch@3.0.0-beta.9: - version "3.0.0-beta.9" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.0.0-beta.9.tgz#0a7554cfb824380dd6812864389923c783c80d9b" - integrity sha512-RdbZCEynH2tH46+tj0ua9caUHVWrd/RHnRfvly2EVdqGmI3ndS1Vn/xjm5KuGejDt2RNDQsVRLPNd2QPwcewVg== - dependencies: - data-uri-to-buffer "^3.0.1" - fetch-blob "^2.1.1" - -node-fetch@^3.2.10: - version "3.3.2" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.2.tgz#d1e889bacdf733b4ff3b2b243eb7a12866a0b78b" - integrity sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA== - dependencies: - data-uri-to-buffer "^4.0.0" - fetch-blob "^3.1.4" - formdata-polyfill "^4.0.10" - node-gyp-build@^4.2.0, node-gyp-build@^4.2.1: version "4.8.4" resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.4.tgz#8a70ee85464ae52327772a90d66c6077a900cfc8" @@ -7267,10 +6810,10 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== -node-releases@^2.0.19: - version "2.0.19" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.19.tgz#9e445a52950951ec4d177d843af370b411caf314" - integrity sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw== +node-releases@^2.0.27: + version "2.0.27" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.27.tgz#eedca519205cf20f650f61d56b070db111231e4e" + integrity sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA== nofilter@^3.1.0: version "3.1.0" @@ -7316,7 +6859,7 @@ object-assign@^4, object-assign@^4.1.1: resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== -object-inspect@^1.10.3, object-inspect@^1.13.3, object-inspect@^1.13.4: +object-inspect@^1.13.3, object-inspect@^1.13.4: version "1.13.4" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.4.tgz#8375265e21bc20d0fa582c22e1b13485d6e00213" integrity sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew== @@ -7367,7 +6910,7 @@ object.values@^1.2.1: define-properties "^1.2.1" es-object-atoms "^1.0.0" -on-finished@2.4.1, on-finished@^2.4.1: +on-finished@2.4.1, on-finished@^2.4.1, on-finished@~2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== @@ -7420,11 +6963,6 @@ optionator@^0.9.3: type-check "^0.4.0" word-wrap "^1.2.5" -os-tmpdir@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== - own-keys@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/own-keys/-/own-keys-1.0.1.tgz#e4006910a2bf913585289676eebd6f390cf51358" @@ -7477,7 +7015,7 @@ package-json-from-dist@^1.0.0: resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz#4f1471a010827a86f94cfd9b0727e36d267de505" integrity sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw== -pako@^2.0.4, pako@^2.1.0: +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== @@ -7505,24 +7043,23 @@ parseurl@^1.3.3, parseurl@~1.3.3: integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== patch-package@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-8.0.0.tgz#d191e2f1b6e06a4624a0116bcb88edd6714ede61" - integrity sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA== + version "8.0.1" + resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-8.0.1.tgz#79d02f953f711e06d1f8949c8a13e5d3d7ba1a60" + integrity sha512-VsKRIA8f5uqHQ7NGhwIna6Bx6D9s/1iXlA1hthBVBEbkq+t4kXD0HHt+rJhf/Z+Ci0F/HCB2hvn0qLdLG+Qxlw== dependencies: "@yarnpkg/lockfile" "^1.1.0" chalk "^4.1.2" ci-info "^3.7.0" cross-spawn "^7.0.3" find-yarn-workspace-root "^2.0.0" - fs-extra "^9.0.0" + fs-extra "^10.0.0" json-stable-stringify "^1.0.2" klaw-sync "^6.0.0" minimist "^1.2.6" open "^7.4.2" - rimraf "^2.6.3" semver "^7.5.3" slash "^2.0.0" - tmp "^0.0.33" + tmp "^0.2.4" yaml "^2.2.2" path-exists@^4.0.0: @@ -7553,16 +7090,16 @@ path-scurry@^1.11.1: lru-cache "^10.2.0" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" -path-to-regexp@0.1.12: +path-to-regexp@^8.0.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-8.3.0.tgz#aa818a6981f99321003a08987d3cec9c3474cd1f" + integrity sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA== + +path-to-regexp@~0.1.12: version "0.1.12" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.12.tgz#d5e1a12e478a976d432ef3c58d534b9923164bb7" integrity sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ== -path-to-regexp@^8.0.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-8.2.0.tgz#73990cc29e57a3ff2a0d914095156df5db79e8b4" - integrity sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ== - pend@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" @@ -7578,7 +7115,7 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -picomatch@^4.0.2: +picomatch@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.3.tgz#796c76136d1eead715db1e7bad785dedd695a042" integrity sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q== @@ -7618,9 +7155,9 @@ prettier-linter-helpers@^1.0.0: fast-diff "^1.1.2" prettier@^3.5.3: - version "3.6.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.6.2.tgz#ccda02a1003ebbb2bfda6f83a074978f608b9393" - integrity sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ== + version "3.7.4" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.7.4.tgz#d2f8335d4b1cec47e1c8098645411b0c9dff9c0f" + integrity sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA== pretty-format@^29.0.0, pretty-format@^29.7.0: version "29.7.0" @@ -7639,7 +7176,7 @@ prompts@^2.0.1: kleur "^3.0.3" sisteransi "^1.0.5" -protobufjs@^7.2.5, protobufjs@^7.3.0: +protobufjs@^7.3.0, protobufjs@^7.5.3: version "7.5.4" resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.5.4.tgz#885d31fe9c4b37f25d1bb600da30b1c5b37d286a" integrity sha512-CvexbZtbov6jW2eXAvLukXjXUW1TzFaivC46BpWc/3BpcCysb5Vffu+B3XHMm8lVEuy2Mm4XGex8hBSg1yapPg== @@ -7696,38 +7233,25 @@ pvtsutils@^1.3.5, pvtsutils@^1.3.6: tslib "^2.8.1" pvutils@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/pvutils/-/pvutils-1.1.3.tgz#f35fc1d27e7cd3dfbd39c0826d173e806a03f5a3" - integrity sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ== - -qs@6.13.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906" - integrity sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg== - dependencies: - side-channel "^1.0.6" + version "1.1.5" + resolved "https://registry.yarnpkg.com/pvutils/-/pvutils-1.1.5.tgz#84b0dea4a5d670249aa9800511804ee0b7c2809c" + integrity sha512-KTqnxsgGiQ6ZAzZCVlJH5eOjSnvlyEgx1m8bkRJfOhmGRqfo5KLvmAlACQkrjEtOQ4B7wF9TdSLIs9O90MX9xA== -qs@^6.11.2, qs@^6.14.0: +qs@^6.11.2, qs@^6.14.0, qs@~6.14.0: version "6.14.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.14.0.tgz#c63fa40680d2c5c941412a0e899c89af60c0a930" integrity sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w== dependencies: side-channel "^1.1.0" -query-string@^7.0.1: - version "7.1.3" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-7.1.3.tgz#a1cf90e994abb113a325804a972d98276fe02328" - integrity sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg== +query-string@^9.3.1: + version "9.3.1" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-9.3.1.tgz#d0c93e6c7fb7c17bdf04aa09e382114580ede270" + integrity sha512-5fBfMOcDi5SA9qj5jZhWAcTtDfKF5WFdd2uD9nVNlbxVv1baq65aALy6qofpNEGELHvisjjasxQp7BlM9gvMzw== dependencies: - decode-uri-component "^0.2.2" - filter-obj "^1.1.0" - split-on-first "^1.0.0" - strict-uri-encode "^2.0.0" - -queue-microtask@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + decode-uri-component "^0.4.1" + filter-obj "^5.1.0" + split-on-first "^3.0.0" quick-lru@^5.1.1: version "5.1.1" @@ -7739,25 +7263,25 @@ range-parser@^1.2.1, range-parser@~1.2.1: resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== -raw-body@2.5.2: - version "2.5.2" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" - integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== +raw-body@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-3.0.2.tgz#3e3ada5ae5568f9095d84376fd3a49b8fb000a51" + integrity sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA== dependencies: - bytes "3.1.2" - http-errors "2.0.0" - iconv-lite "0.4.24" - unpipe "1.0.0" + bytes "~3.1.2" + http-errors "~2.0.1" + iconv-lite "~0.7.0" + unpipe "~1.0.0" -raw-body@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-3.0.0.tgz#25b3476f07a51600619dae3fe82ddc28a36e5e0f" - integrity sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g== +raw-body@~2.5.3: + version "2.5.3" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.3.tgz#11c6650ee770a7de1b494f197927de0c923822e2" + integrity sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA== dependencies: - bytes "3.1.2" - http-errors "2.0.0" - iconv-lite "0.6.3" - unpipe "1.0.0" + bytes "~3.1.2" + http-errors "~2.0.1" + iconv-lite "~0.4.24" + unpipe "~1.0.0" rdf-canonize@^3.4.0: version "3.4.0" @@ -7766,25 +7290,11 @@ rdf-canonize@^3.4.0: dependencies: setimmediate "^1.0.5" -rdf-canonize@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/rdf-canonize/-/rdf-canonize-4.0.1.tgz#2b5a37f147d35b484b40ff2140245fc5985a9595" - integrity sha512-B5ynHt4sasbUafzrvYI2GFARgeFcD8Sx9yXPbg7gEyT2EH76rlCv84kyO6tnxzVbxUN/uJDbK1S/MXh+DsnuTA== - dependencies: - setimmediate "^1.0.5" - react-is@^18.0.0: version "18.3.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e" integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== -react-native-securerandom@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/react-native-securerandom/-/react-native-securerandom-0.1.1.tgz#f130623a412c338b0afadedbc204c5cbb8bf2070" - integrity sha512-CozcCx0lpBLevxiXEb86kwLRalBCHNjiGPlw3P7Fi27U6ZLdfjOCNRHD1LtBKcvPvI3TvkBXB3GOtLvqaYJLGw== - dependencies: - base64-js "*" - readable-stream@^3.6.0: version "3.6.2" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" @@ -7816,12 +7326,7 @@ ref-struct-di@1.1.1, ref-struct-di@^1.1.0, ref-struct-di@^1.1.1: dependencies: debug "^3.1.0" -reflect-metadata@^0.1.13: - version "0.1.14" - resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.14.tgz#24cf721fe60677146bb77eeb0e1f9dece3d65859" - integrity sha512-ZhYeb6nRaXCfhnndflDK8qI6ZQ/YcWZCISRAWICW9XYqMUwjZM9Z0DveWX/ABN01oxSHwVxKQmxeYZSsm0jh5A== - -reflect-metadata@^0.2.2: +reflect-metadata@0.2.2, reflect-metadata@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.2.2.tgz#400c845b6cba87a21f2c65c4aeb158f4fa4d9c5b" integrity sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q== @@ -7904,11 +7409,11 @@ resolve.exports@^2.0.0: integrity sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A== resolve@^1.0.0, resolve@^1.20.0, resolve@^1.22.4, resolve@^1.22.8: - version "1.22.10" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.10.tgz#b663e83ffb09bbf2386944736baae803029b8b39" - integrity sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w== + version "1.22.11" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.11.tgz#aad857ce1ffb8bfa9b0b1ac29f1156383f68c262" + integrity sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ== dependencies: - is-core-module "^2.16.0" + is-core-module "^2.16.1" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" @@ -7919,12 +7424,7 @@ responselike@^2.0.0: dependencies: lowercase-keys "^2.0.0" -reusify@^1.0.4: - version "1.1.0" - resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.1.0.tgz#0fe13b9522e1473f51b558ee796e08f11f9b489f" - integrity sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw== - -rimraf@^2.6.1, rimraf@^2.6.3: +rimraf@^2.6.1: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -7949,14 +7449,7 @@ router@^2.2.0: parseurl "^1.3.3" path-to-regexp "^8.0.0" -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -rxjs@^7.8.0, rxjs@^7.8.2: +rxjs@^7.8.2: version "7.8.2" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.2.tgz#955bc473ed8af11a002a2be52071bf475638607b" integrity sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA== @@ -8011,10 +7504,10 @@ semver@^6.0.0, semver@^6.3.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.5, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.7.1, semver@^7.7.2: - version "7.7.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.2.tgz#67d99fdcd35cec21e6f8b87a7fd515a33f982b58" - integrity sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA== +semver@^7.3.5, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.7.1, semver@^7.7.3: + version "7.7.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.3.tgz#4b5f4143d007633a8dc671cd0a6ef9147b8bb946" + integrity sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q== send@0.19.0: version "0.19.0" @@ -8052,23 +7545,32 @@ send@^1.1.0, send@^1.2.0: range-parser "^1.2.1" statuses "^2.0.1" -serialize-error@^8.0.1, serialize-error@^8.1.0: +send@~0.19.0: + version "0.19.1" + resolved "https://registry.yarnpkg.com/send/-/send-0.19.1.tgz#1c2563b2ee4fe510b806b21ec46f355005a369f9" + integrity sha512-p4rRk4f23ynFEfcD9LA0xRYngj+IyGiEYyqqOak8kaN0TvNmuxC2dcVeBn62GpCeR2CpWqyHCNScTP91QbAVFg== + dependencies: + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + encodeurl "~2.0.0" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "2.0.0" + mime "1.6.0" + ms "2.1.3" + on-finished "2.4.1" + range-parser "~1.2.1" + statuses "2.0.1" + +serialize-error@^8.0.1: version "8.1.0" resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-8.1.0.tgz#3a069970c712f78634942ddd50fbbc0eaebe2f67" integrity sha512-3NnuWfM6vBYoy5gZFvHiYsVbafvI9vZv/+jlIigFn4oP4zjNPK3LhcY0xSCgeb1a5L8jO71Mit9LlNoi2UfDDQ== dependencies: type-fest "^0.20.2" -serve-static@1.16.2: - version "1.16.2" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.2.tgz#b6a5343da47f6bdd2673848bf45754941e803296" - integrity sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw== - dependencies: - encodeurl "~2.0.0" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.19.0" - serve-static@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-2.2.0.tgz#9c02564ee259bdd2251b82d659a2e7e1938d66f9" @@ -8079,6 +7581,16 @@ serve-static@^2.2.0: parseurl "^1.3.3" send "^1.2.0" +serve-static@~1.16.2: + version "1.16.2" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.2.tgz#b6a5343da47f6bdd2673848bf45754941e803296" + integrity sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw== + dependencies: + encodeurl "~2.0.0" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.19.0" + set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -8120,7 +7632,7 @@ setimmediate@^1.0.5: resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== -setprototypeof@1.2.0: +setprototypeof@1.2.0, setprototypeof@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== @@ -8166,7 +7678,7 @@ side-channel-weakmap@^1.0.2: object-inspect "^1.13.3" side-channel-map "^1.0.1" -side-channel@^1.0.6, side-channel@^1.1.0: +side-channel@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.1.0.tgz#c3fcff9c4da932784873335ec9765fa94ff66bc9" integrity sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw== @@ -8232,10 +7744,10 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -split-on-first@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" - integrity sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw== +split-on-first@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-3.0.0.tgz#f04959c9ea8101b9b0bbf35a61b9ebea784a23e7" + integrity sha512-qxQJTx2ryR0Dw0ITYyekNQWpz6f8dGd7vffGNflQQ3Iqj9NJ6qiZ7ELpZsJ/QBhIVAiDfXdag3+Gp8RvWa62AA== sprintf-js@~1.0.2: version "1.0.3" @@ -8266,7 +7778,7 @@ statuses@2.0.1: resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== -statuses@^2.0.1: +statuses@^2.0.1, statuses@~2.0.1, statuses@~2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.2.tgz#8f75eecef765b5e1cfcdc080da59409ed424e382" integrity sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw== @@ -8279,16 +7791,6 @@ stop-iteration-iterator@^1.1.0: es-errors "^1.3.0" internal-slot "^1.1.0" -str2buf@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/str2buf/-/str2buf-1.3.0.tgz#a4172afff4310e67235178e738a2dbb573abead0" - integrity sha512-xIBmHIUHYZDP4HyoXGHYNVmxlXLXDrtFHYT0eV6IOdEj3VO9ccaF1Ejl9Oq8iFjITllpT8FhaXb4KsNmw+3EuA== - -strict-uri-encode@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" - integrity sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ== - string-length@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" @@ -8378,9 +7880,9 @@ strip-ansi@^6.0.0, strip-ansi@^6.0.1: ansi-regex "^5.0.1" strip-ansi@^7.0.1: - version "7.1.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" - integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== + version "7.1.2" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.2.tgz#132875abde678c7ea8d691533f2e7e22bb744dba" + integrity sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA== dependencies: ansi-regex "^6.0.1" @@ -8452,9 +7954,9 @@ supports-preserve-symlinks-flag@^1.0.0: integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== swagger-ui-dist@>=4.11.0: - version "5.27.1" - resolved "https://registry.yarnpkg.com/swagger-ui-dist/-/swagger-ui-dist-5.27.1.tgz#556e77c659752e99621ac61ad5ef6cb0832279e7" - integrity sha512-oGtpYO3lnoaqyGtlJalvryl7TwzgRuxpOVWqEHx8af0YXI+Kt+4jMpLdgMtMcmWmuQ0QTCHLKExwrBFMSxvAUA== + version "5.30.3" + resolved "https://registry.yarnpkg.com/swagger-ui-dist/-/swagger-ui-dist-5.30.3.tgz#b65d1b689193ded72e6f12692c63e87d7d657b21" + integrity sha512-giQl7/ToPxCqnUAx2wpnSnDNGZtGzw1LyUw6ZitIpTmdrvpxKFY/94v1hihm0zYNpgp1/VY0jTDk//R0BBgnRQ== dependencies: "@scarf/scarf" "=1.4.0" @@ -8496,15 +7998,14 @@ tar@^6.1.11: yallist "^4.0.0" tar@^7.4.3: - version "7.4.3" - resolved "https://registry.yarnpkg.com/tar/-/tar-7.4.3.tgz#88bbe9286a3fcd900e94592cda7a22b192e80571" - integrity sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw== + version "7.5.2" + resolved "https://registry.yarnpkg.com/tar/-/tar-7.5.2.tgz#115c061495ec51ff3c6745ff8f6d0871c5b1dedc" + integrity sha512-7NyxrTE4Anh8km8iEy7o0QYPs+0JKBTj5ZaqHg6B39erLg0qYXN3BijtShwbsNSvQ+LN75+KV+C4QR/f6Gwnpg== dependencies: "@isaacs/fs-minipass" "^4.0.0" chownr "^3.0.0" minipass "^7.1.2" - minizlib "^3.0.1" - mkdirp "^3.0.1" + minizlib "^3.1.0" yallist "^5.0.0" test-exclude@^6.0.0: @@ -8516,20 +8017,18 @@ test-exclude@^6.0.0: glob "^7.1.4" minimatch "^3.0.4" -tinyglobby@^0.2.14: - version "0.2.14" - resolved "https://registry.yarnpkg.com/tinyglobby/-/tinyglobby-0.2.14.tgz#5280b0cf3f972b050e74ae88406c0a6a58f4079d" - integrity sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ== +tinyglobby@^0.2.14, tinyglobby@^0.2.15: + version "0.2.15" + resolved "https://registry.yarnpkg.com/tinyglobby/-/tinyglobby-0.2.15.tgz#e228dd1e638cea993d2fdb4fcd2d4602a79951c2" + integrity sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ== dependencies: - fdir "^6.4.4" - picomatch "^4.0.2" + fdir "^6.5.0" + picomatch "^4.0.3" -tmp@^0.0.33: - version "0.0.33" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" - integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== - dependencies: - os-tmpdir "~1.0.2" +tmp@^0.2.4: + version "0.2.5" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.5.tgz#b06bcd23f0f3c8357b426891726d16015abfd8f8" + integrity sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow== tmpl@1.0.5: version "1.0.5" @@ -8543,7 +8042,7 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -toidentifier@1.0.1: +toidentifier@1.0.1, toidentifier@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== @@ -8569,9 +8068,9 @@ ts-deepmerge@^7.0.2: integrity sha512-Du/ZW2RfwV/D4cmA5rXafYjBQVuvu4qGiEEla4EmEHVHgRdx68Gftx7i66jn2bzHPwSVZY36Ae6OuDn9el4ZKA== ts-jest@^29.3.4: - version "29.4.1" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.4.1.tgz#42d33beb74657751d315efb9a871fe99e3b9b519" - integrity sha512-SaeUtjfpg9Uqu8IbeDKtdaS0g8lS6FT6OzM3ezrDfErPJPHNDo/Ey+VFGP1bQIDfagYDLyRpd7O15XpG1Es2Uw== + version "29.4.6" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.4.6.tgz#51cb7c133f227396818b71297ad7409bb77106e9" + integrity sha512-fSpWtOO/1AjSNQguk43hb/JCo16oJDnMJf3CdEGNkqsEX3t0KX96xvyX1D7PfLCpVoKu4MfVrqUkFyblYoY4lA== dependencies: bs-logger "^0.2.6" fast-json-stable-stringify "^2.1.0" @@ -8579,7 +8078,7 @@ ts-jest@^29.3.4: json5 "^2.2.3" lodash.memoize "^4.1.2" make-error "^1.3.6" - semver "^7.7.2" + semver "^7.7.3" type-fest "^4.41.0" yargs-parser "^21.1.1" @@ -8648,7 +8147,7 @@ tslib@^1.9.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.0, tslib@^2.1.0, tslib@^2.4.0, tslib@^2.6.2, tslib@^2.7.0, tslib@^2.8.1: +tslib@^2.0.0, tslib@^2.1.0, tslib@^2.4.0, tslib@^2.7.0, tslib@^2.8.1: version "2.8.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== @@ -8709,7 +8208,7 @@ type-fest@^4.41.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.41.0.tgz#6ae1c8e5731273c2bf1f58ad39cbae2c91a46c58" integrity sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA== -type-is@^2.0.0, type-is@^2.0.1: +type-is@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/type-is/-/type-is-2.0.1.tgz#64f6cf03f92fce4015c2b224793f6bdd4b068c97" integrity sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw== @@ -8777,9 +8276,9 @@ typed-array-length@^1.0.7: reflect.getprototypeof "^1.0.6" typescript@^5.7.2, typescript@^5.8.3: - version "5.9.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.2.tgz#d93450cddec5154a2d5cabe3b8102b83316fb2a6" - integrity sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A== + version "5.9.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f" + integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw== uglify-js@^3.1.4: version "3.19.3" @@ -8813,24 +8312,29 @@ undici-types@~6.21.0: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb" integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ== -undici-types@~7.10.0: - version "7.10.0" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.10.0.tgz#4ac2e058ce56b462b056e629cc6a02393d3ff350" - integrity sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag== +undici-types@~7.16.0: + version "7.16.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.16.0.tgz#ffccdff36aea4884cbfce9a750a0580224f58a46" + integrity sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw== -undici@^5.14.0, undici@^5.21.2: +undici@^5.14.0: version "5.29.0" resolved "https://registry.yarnpkg.com/undici/-/undici-5.29.0.tgz#419595449ae3f2cdcba3580a2e8903399bd1f5a3" integrity sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg== dependencies: "@fastify/busboy" "^2.0.0" +undici@^6.6.2: + version "6.22.0" + resolved "https://registry.yarnpkg.com/undici/-/undici-6.22.0.tgz#281adbc157af41da8e75393c9d75a1b788811bc3" + integrity sha512-hU/10obOIu62MGYjdskASR3CUAiYaFTtC9Pa6vHyf//mAipSvSQg6od2CnJswq7fvzNS3zJhxoRkgNVaHurWKw== + universalify@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== -unpipe@1.0.0, unpipe@~1.0.0: +unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== @@ -8862,10 +8366,10 @@ unrs-resolver@^1.7.11: "@unrs/resolver-binding-win32-ia32-msvc" "1.11.1" "@unrs/resolver-binding-win32-x64-msvc" "1.11.1" -update-browserslist-db@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz#348377dd245216f9e7060ff50b15a1b740b75420" - integrity sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw== +update-browserslist-db@^1.2.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.2.2.tgz#cfb4358afa08b3d5731a2ecd95eebf4ddef8033e" + integrity sha512-E85pfNzMQ9jpKkA7+TJAi4TJN+tBCuWh5rUcS/sv6cFi+1q9LYDwDI5dpUL0u/73EElyQ8d3TEaeW4sPedBqYA== dependencies: escalade "^3.2.0" picocolors "^1.1.1" @@ -8887,12 +8391,17 @@ 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@^13.0.0: + version "13.0.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-13.0.0.tgz#263dc341b19b4d755eb8fe36b78d95a6b65707e8" + integrity sha512-XQegIaBTVUjSHliKqcnFqYypAd4S+WCYt5NIeRs6w/UAry7z8Y9j5ZwRRL4kzq9U3sD6v+85er9FvkEaBpji2w== + "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== -uuid@^9.0.0, uuid@^9.0.1: +uuid@^9.0.1: version "9.0.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== @@ -8911,15 +8420,15 @@ v8-to-istanbul@^9.0.1: "@types/istanbul-lib-coverage" "^2.0.1" convert-source-map "^2.0.0" -valibot@1.0.0-beta.8: - version "1.0.0-beta.8" - resolved "https://registry.yarnpkg.com/valibot/-/valibot-1.0.0-beta.8.tgz#670bbdef4affd58bb71a5e5bd2fe4d1ea535770f" - integrity sha512-OPAwJZtowb0j91b+bd77+ny7D1VVzsCzD7Jl9waLUlMprTsfI9Y3HHbW3hAQD7wKDKHsmGEesuiYWaYvcZL2wg== +valibot@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/valibot/-/valibot-1.2.0.tgz#8fc720d9e4082ba16e30a914064a39619b2f1d6f" + integrity sha512-mm1rxUsmOxzrwnX5arGS+U4T25RdvpPjPN4yR0u9pUBov9+zGVtO84tif1eY4r6zWxVxu3KzIyknJy3rxfRZZg== -validator@^13.12.0, validator@^13.9.0: - version "13.15.15" - resolved "https://registry.yarnpkg.com/validator/-/validator-13.15.15.tgz#246594be5671dc09daa35caec5689fcd18c6e7e4" - integrity sha512-BgWVbCI72aIQy937xbawcs+hrVaN/CZ2UwutgaJ36hGqRrLNM+f5LUT/YPRbo8IV/ASeFzXszezV+y2+rq3l8A== +validator@^13.12.0, validator@^13.15.20, validator@^13.9.0: + version "13.15.23" + resolved "https://registry.yarnpkg.com/validator/-/validator-13.15.23.tgz#59a874f84e4594588e3409ab1edbe64e96d0c62d" + integrity sha512-4yoz1kEWqUjzi5zsPbAS/903QXSYp0UOtHsPpp7p9rHAw/W+dkInskAE386Fat3oKRROwO98d9ZB0G4cObgUyw== varint@^6.0.0: version "6.0.0" @@ -8938,20 +8447,15 @@ walker@^1.0.8: dependencies: makeerror "1.0.12" -web-did-resolver@^2.0.21: - version "2.0.30" - resolved "https://registry.yarnpkg.com/web-did-resolver/-/web-did-resolver-2.0.30.tgz#5556d9c495b4705055c737dcdff0c9256aebfb51" - integrity sha512-lsv0T+y/zD1bEVkcNfcppk4hQXBlqqoXfYcRG4183Yv53FkY29HNPGErwkNI/AG+lxxsUIR77JqS6pn9uHw/Vw== +web-did-resolver@^2.0.31: + version "2.0.32" + resolved "https://registry.yarnpkg.com/web-did-resolver/-/web-did-resolver-2.0.32.tgz#6c86c1797cd651620aa311a94660e0a51131b334" + integrity sha512-L91/ApTmDjgzS0UDstTKn3kN/1hlQBnVcUN8K29e3xhVBpPktHYC6uvVAQ8ohbIg9D6wrrbaBQvfRArDxgJG2g== dependencies: cross-fetch "^4.1.0" did-resolver "^4.1.0" -web-streams-polyfill@^3.0.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz#2073b91a2fdb1fbfbd401e7de0ac9f8214cecb4b" - integrity sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw== - -webcrypto-core@^1.8.0: +webcrypto-core@^1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/webcrypto-core/-/webcrypto-core-1.8.1.tgz#09d5bd8a9c48e9fbcaf412e06b1ff1a57514ce86" integrity sha512-P+x1MvlNCXlKbLSOY4cYrdreqPG5hbzkmawbcXLKN/mf6DZW0SdNNkZ+sjwsqVkI4A4Ko2sPZmkZtCKY58w83A== @@ -8962,11 +8466,6 @@ webcrypto-core@^1.8.0: pvtsutils "^1.3.5" tslib "^2.7.0" -webcrypto-shim@^0.1.4: - version "0.1.7" - resolved "https://registry.yarnpkg.com/webcrypto-shim/-/webcrypto-shim-0.1.7.tgz#da8be23061a0451cf23b424d4a9b61c10f091c12" - integrity sha512-JAvAQR5mRNRxZW2jKigWMjCMkjSdmP5cColRP1U/pTg69VgHXEi1orv5vVpJ55Zc5MIaPc1aaurzd9pjv2bveg== - webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" @@ -9107,7 +8606,7 @@ ws@8.18.0: resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== -ws@^8.18.2: +ws@^8.18.2, ws@^8.18.3: version "8.18.3" resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.3.tgz#b56b88abffde62791c639170400c93dcb0c95472" integrity sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg== @@ -9143,9 +8642,9 @@ yaml@^1.10.0: integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== yaml@^2.2.2, yaml@^2.6.1: - version "2.8.1" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.8.1.tgz#1870aa02b631f7e8328b93f8bc574fac5d6c4d79" - integrity sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw== + version "2.8.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.8.2.tgz#5694f25eca0ce9c3e7a9d9e00ce0ddabbd9e35c5" + integrity sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A== yargs-parser@^21.1.1: version "21.1.1" @@ -9183,7 +8682,7 @@ yocto-queue@^0.1.0: resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== -zod@^3.23.8, zod@^3.24.1: - version "3.25.76" - resolved "https://registry.yarnpkg.com/zod/-/zod-3.25.76.tgz#26841c3f6fd22a6a2760e7ccb719179768471e34" - integrity sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ== +zod@^4.1.12, zod@^4.1.13: + version "4.1.13" + resolved "https://registry.yarnpkg.com/zod/-/zod-4.1.13.tgz#93699a8afe937ba96badbb0ce8be6033c0a4b6b1" + integrity sha512-AvvthqfqrAhNH9dnfmrfKzX5upOdjUVJYFqNSlkmGf64gRaTzlPwz99IHYnVs28qYAybvAlBV+H7pn0saFY4Ig== From d42dae42f162b4cb4f86e23620fe39ea5b48fa50 Mon Sep 17 00:00:00 2001 From: Krishna Waske Date: Thu, 11 Dec 2025 12:20:30 +0530 Subject: [PATCH 04/38] fix!: controller types (credo version updates) (#335) * fix: controller for oob, connection and QnA Signed-off-by: Krishna Waske * fix: update to version 0.6.1 Signed-off-by: Krishna Waske * fix: remove unwanted var Signed-off-by: Krishna Waske * fix: static types Signed-off-by: Krishna Waske * fix: remove legacy connection invitation Signed-off-by: Krishna Waske --------- Signed-off-by: Krishna Waske --- package.json | 20 +-- .../connections/ConnectionController.ts | 26 ++-- .../didcomm/outofband/OutOfBandController.ts | 123 ++++++------------ .../QuestionAnswerController.ts | 2 +- src/utils/constant.ts | 2 +- 5 files changed, 62 insertions(+), 111 deletions(-) diff --git a/package.json b/package.json index d7c92fff..e4da3178 100644 --- a/package.json +++ b/package.json @@ -40,15 +40,15 @@ }, "dependencies": { "@ayanworks/credo-polygon-w3c-module": "1.0.1-alpha.1", - "@credo-ts/anoncreds": "0.6.0", - "@credo-ts/askar": "0.6.0", - "@credo-ts/core": "0.6.0", - "@credo-ts/indy-vdr": "0.6.0", - "@credo-ts/node": "^0.6.0", - "@credo-ts/openid4vc": "0.6.0", + "@credo-ts/anoncreds": "0.6.1", + "@credo-ts/askar": "0.6.1", + "@credo-ts/core": "0.6.1", + "@credo-ts/indy-vdr": "0.6.1", + "@credo-ts/node": "0.6.1", + "@credo-ts/openid4vc": "0.6.1", "@credo-ts/push-notifications": "^0.7.1", - "@credo-ts/question-answer": "0.6.0", - "@credo-ts/tenants": "0.6.0", + "@credo-ts/question-answer": "0.6.1", + "@credo-ts/tenants": "0.6.1", "@hyperledger/anoncreds-nodejs": "0.3.1", "@hyperledger/indy-vdr-nodejs": "0.2.2", "@opentelemetry/api": "^1.9.0", @@ -117,7 +117,7 @@ "typescript": "^5.8.3" }, "resolutions": { - "@credo-ts/core": "0.6.0", - "@credo-ts/askar": "0.6.0" + "@credo-ts/core": "0.6.1", + "@credo-ts/askar": "0.6.1" } } diff --git a/src/controllers/didcomm/connections/ConnectionController.ts b/src/controllers/didcomm/connections/ConnectionController.ts index ce6c0ac9..7c6fa5c2 100644 --- a/src/controllers/didcomm/connections/ConnectionController.ts +++ b/src/controllers/didcomm/connections/ConnectionController.ts @@ -1,6 +1,6 @@ -import type { ConnectionRecordProps } from '@credo-ts/didcomm' +import type { DidCommConnectionRecordProps } from '@credo-ts/didcomm' -import { DidExchangeState } from '@credo-ts/didcomm' +import { DidCommDidExchangeState } from '@credo-ts/didcomm' import { Request as Req } from 'express' import { Controller, Delete, Example, Get, Path, Post, Query, Route, Tags, Security, Request } from 'tsoa' import { injectable } from 'tsyringe' @@ -23,20 +23,20 @@ export class ConnectionController extends Controller { * @param theirLabel Their label * @returns ConnectionRecord[] */ - @Example([ConnectionRecordExample]) + @Example([ConnectionRecordExample]) @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) @Get('/didcomm/connections') public async getAllConnections( @Request() request: Req, @Query('outOfBandId') outOfBandId?: string, @Query('alias') alias?: string, - @Query('state') state?: DidExchangeState, + @Query('state') state?: DidCommDidExchangeState, @Query('myDid') myDid?: string, @Query('theirDid') theirDid?: string, @Query('theirLabel') theirLabel?: string, ) { try { - const connections = await request.agent.modules.connections.findAllByQuery({ + const connections = await request.agent.modules.didcomm.connections.findAllByQuery({ outOfBandId, alias, myDid, @@ -56,12 +56,12 @@ export class ConnectionController extends Controller { * @param connectionId Connection identifier * @returns ConnectionRecord */ - @Example(ConnectionRecordExample) + @Example(ConnectionRecordExample) @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) @Get('/didcomm/connections/:connectionId') public async getConnectionById(@Request() request: Req, @Path('connectionId') connectionId: RecordId) { try { - const connection = await request.agent.modules.connections.findById(connectionId) + const connection = await request.agent.modules.didcomm.connections.findById(connectionId) if (!connection) throw new NotFoundError(`Connection with connection id "${connectionId}" not found.`) @@ -81,7 +81,7 @@ export class ConnectionController extends Controller { public async deleteConnection(@Request() request: Req, @Path('connectionId') connectionId: RecordId) { try { this.setStatus(204) - await request.agent.modules.connections.deleteById(connectionId) + await request.agent.modules.didcomm.connections.deleteById(connectionId) } catch (error) { throw ErrorHandlingService.handle(error) } @@ -96,12 +96,12 @@ export class ConnectionController extends Controller { * @param connectionId Connection identifier * @returns ConnectionRecord */ - @Example(ConnectionRecordExample) + @Example(ConnectionRecordExample) @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) @Post('/didcomm/connections/:connectionId/accept-request') public async acceptRequest(@Request() request: Req, @Path('connectionId') connectionId: RecordId) { try { - const connection = await request.agent.modules.connections.acceptRequest(connectionId) + const connection = await request.agent.modules.didcomm.connections.acceptRequest(connectionId) return connection.toJSON() } catch (error) { throw ErrorHandlingService.handle(error) @@ -117,12 +117,12 @@ export class ConnectionController extends Controller { * @param connectionId Connection identifier * @returns ConnectionRecord */ - @Example(ConnectionRecordExample) + @Example(ConnectionRecordExample) @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) @Post('/didcomm/connections/:connectionId/accept-response') public async acceptResponse(@Request() request: Req, @Path('connectionId') connectionId: RecordId) { try { - const connection = await request.agent.modules.connections.acceptResponse(connectionId) + const connection = await request.agent.modules.didcomm.connections.acceptResponse(connectionId) return connection.toJSON() } catch (error) { throw ErrorHandlingService.handle(error) @@ -132,7 +132,7 @@ export class ConnectionController extends Controller { @Get('/didcomm/url/:invitationId') public async getInvitation(@Request() request: Req, @Path('invitationId') invitationId: string) { try { - const outOfBandRecord = await request.agent.modules.connections.findByInvitationDid(invitationId) + const outOfBandRecord = await request.agent.modules.didcomm.connections.findByInvitationDid(invitationId) if (!outOfBandRecord) throw new NotFoundError(`connection with invitationId "${invitationId}" not found.`) diff --git a/src/controllers/didcomm/outofband/OutOfBandController.ts b/src/controllers/didcomm/outofband/OutOfBandController.ts index 8af9eea9..22aab3d6 100644 --- a/src/controllers/didcomm/outofband/OutOfBandController.ts +++ b/src/controllers/didcomm/outofband/OutOfBandController.ts @@ -1,28 +1,23 @@ import type { OutOfBandInvitationProps, OutOfBandRecordWithInvitationProps } from '../../examples' -import type { AgentMessageType, RecipientKeyOption, CreateInvitationOptions } from '../../types' +import type { RecipientKeyOption, CreateInvitationOptions, AgentMessageType } from '../../types' import type { PeerDidNumAlgo2CreateOptions, } from '@credo-ts/core' import { - JsonTransformer, - Key, - KeyType, createPeerDidDocumentFromServices, + JsonTransformer, PeerDidNumAlgo, } from '@credo-ts/core' import { - ConnectionRecordProps, - CreateLegacyInvitationConfig, - Routing, - OutOfBandInvitation, - AgentMessage -} from '@credo-ts/didcomm' + DidCommConnectionRecordProps, + DidCommRouting, + DidCommOutOfBandInvitation, + DidCommMessage} from '@credo-ts/didcomm' import { Request as Req } from 'express' import { Body, Controller, Delete, Example, Get, Path, Post, Query, Route, Tags, Security, Request } from 'tsoa' import { injectable } from 'tsyringe' - import { SCOPES } from '../../../enums' import ErrorHandlingService from '../../../errorHandlingService' import { InternalServerError, NotFoundError } from '../../../errors' @@ -48,9 +43,9 @@ export class OutOfBandController extends Controller { invitationId: invitationId, } : {} - const outOfBandRecords = await request.agent.modules.oob.findAllByQuery(query) + const outOfBandRecords = await request.agent.modules.didcomm.oob.findAllByQuery(query) - return outOfBandRecords.map((c) => c.toJSON()) + return outOfBandRecords.map((c: { toJSON: () => any }) => c.toJSON()) } catch (error) { throw ErrorHandlingService.handle(error) } @@ -65,7 +60,7 @@ export class OutOfBandController extends Controller { @Get('/:outOfBandId') public async getOutOfBandRecordById(@Request() request: Req, @Path('outOfBandId') outOfBandId: RecordId) { try { - const outOfBandRecord = await request.agent.modules.oob.findById(outOfBandId) + const outOfBandRecord = await request.agent.modules.didcomm.oob.findById(outOfBandId) if (!outOfBandRecord) throw new NotFoundError(`Out of band record with id "${outOfBandId}" not found.`) @@ -99,21 +94,26 @@ export class OutOfBandController extends Controller { let invitationDid: string | undefined if (config?.invitationDid) { invitationDid = config?.invitationDid - } else { - const didRouting = await request.agent.modules.mediationRecipient.getRouting({}) - const didDocument = createPeerDidDocumentFromServices([ - { - id: 'didcomm', - recipientKeys: [didRouting.recipientKey], - routingKeys: didRouting.routingKeys, - serviceEndpoint: didRouting.endpoints[0], - }, - ]) + } + else { + const didRouting = await request.agent.modules.didcomm.mediationRecipient.getRouting({}) + const { didDocument, keys } = createPeerDidDocumentFromServices( + [ + { + id: 'didcomm', + recipientKeys: [didRouting.recipientKey], + routingKeys: didRouting.routingKeys, + serviceEndpoint: didRouting.endpoints[0], + }, + ], + true, + ) const did = await request.agent.dids.create({ didDocument, method: 'peer', options: { numAlgo: PeerDidNumAlgo.MultipleInceptionKeyWithoutDoc, + keys }, }) @@ -124,7 +124,7 @@ export class OutOfBandController extends Controller { } } - const outOfBandRecord = await request.agent.modules.oob.createInvitation({ ...config, invitationDid }) + const outOfBandRecord = await request.agent.modules.didcomm.oob.createInvitation({ ...config, invitationDid }) return { invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ domain: request.agent.modules.didcomm.config.endpoints[0], @@ -140,55 +140,6 @@ export class OutOfBandController extends Controller { } } - /** - * Creates an outbound out-of-band record in the same way how `createInvitation` method does it, - * but it also converts out-of-band invitation message to an "legacy" invitation message defined - * in RFC 0160: Connection Protocol and returns it together with out-of-band record. - * - * @param config configuration of how a invitation should be created - * @returns out-of-band record and invitation - */ - @Example<{ invitation: OutOfBandInvitationProps; outOfBandRecord: OutOfBandRecordWithInvitationProps }>({ - invitation: outOfBandInvitationExample, - outOfBandRecord: outOfBandRecordExample, - }) - @Post('/create-legacy-invitation') - public async createLegacyInvitation( - @Request() request: Req, - @Body() config?: Omit & RecipientKeyOption, - ) { - try { - let routing: Routing - if (config?.recipientKey) { - routing = { - endpoints: request.agent.modules.didcomm.config.endpoints, - routingKeys: [], - recipientKey: Key.fromPublicKeyBase58(config.recipientKey, KeyType.Ed25519), - mediatorId: undefined, - } - } else { - routing = await request.agent.modules.mediationRecipient.getRouting({}) - } - const { outOfBandRecord, invitation } = await request.agent.modules.oob.createLegacyInvitation({ - ...config, - routing, - }) - return { - invitationUrl: invitation.toUrl({ - domain: request.agent.modules.didcomm.config.endpoints[0], - useDidSovPrefixWhereAllowed: request.agent.modules.didcomm.config.useDidSovPrefixWhereAllowed, - }), - invitation: invitation.toJSON({ - useDidSovPrefixWhereAllowed: request.agent.modules.didcomm.config.useDidSovPrefixWhereAllowed, - }), - outOfBandRecord: outOfBandRecord.toJSON(), - ...(config?.recipientKey ? {} : { recipientKey: routing.recipientKey.publicKeyBase58 }), - } - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } - /** * Creates a new connectionless legacy invitation. * @@ -210,13 +161,13 @@ export class OutOfBandController extends Controller { recordId: string message: Record; domain: string, - routing?: Routing; + routing?: DidCommRouting; }, ) { try { - const agentMessage = JsonTransformer.fromJSON(config.message, AgentMessage) as AgentMessage + const agentMessage = JsonTransformer.fromJSON(config.message, DidCommMessage) as DidCommMessage - return await request.agent.modules.oob.createLegacyConnectionlessInvitation({ + return await request.agent.modules.didcomm.oob.createLegacyConnectionlessInvitation({ ...config, message: agentMessage, }) @@ -229,11 +180,11 @@ export class OutOfBandController extends Controller { * Creates inbound out-of-band record and assigns out-of-band invitation message to it if the * message is valid. * - * @param invitation either OutOfBandInvitation or ConnectionInvitationMessage + * @param invitation either DidCommOutOfBandInvitation or ConnectionInvitationMessage * @param config config for handling of invitation * @returns out-of-band record and connection record if one has been created. */ - @Example<{ outOfBandRecord: OutOfBandRecordWithInvitationProps; connectionRecord: ConnectionRecordProps }>({ + @Example<{ outOfBandRecord: OutOfBandRecordWithInvitationProps; connectionRecord: DidCommConnectionRecordProps }>({ outOfBandRecord: outOfBandRecordExample, connectionRecord: ConnectionRecordExample, }) @@ -242,8 +193,8 @@ export class OutOfBandController extends Controller { const { invitation, ...config } = invitationRequest try { - const invite = new OutOfBandInvitation({ ...invitation, handshakeProtocols: invitation.handshake_protocols }) - const { outOfBandRecord, connectionRecord } = await request.agent.modules.oob.receiveInvitation(invite, config) + const invite = new DidCommOutOfBandInvitation({ ...invitation, handshakeProtocols: invitation.handshake_protocols }) + const { outOfBandRecord, connectionRecord } = await request.agent.modules.didcomm.oob.receiveInvitation(invite, config) return { outOfBandRecord: outOfBandRecord.toJSON(), @@ -262,7 +213,7 @@ export class OutOfBandController extends Controller { * @param config config for handling of invitation * @returns out-of-band record and connection record if one has been created. */ - @Example<{ outOfBandRecord: OutOfBandRecordWithInvitationProps; connectionRecord: ConnectionRecordProps }>({ + @Example<{ outOfBandRecord: OutOfBandRecordWithInvitationProps; connectionRecord: DidCommConnectionRecordProps }>({ outOfBandRecord: outOfBandRecordExample, connectionRecord: ConnectionRecordExample, }) @@ -278,7 +229,7 @@ export class OutOfBandController extends Controller { // if (linkSecretIds.length === 0) { // await request.agent.modules.anoncreds.createLinkSecret() // } - const { outOfBandRecord, connectionRecord } = await request.agent.modules.oob.receiveInvitationFromUrl( + const { outOfBandRecord, connectionRecord } = await request.agent.modules.didcomm.oob.receiveInvitationFromUrl( invitationUrl, config, ) @@ -295,7 +246,7 @@ export class OutOfBandController extends Controller { * Accept a connection invitation as invitee (by sending a connection request message) for the connection with the specified connection id. * This is not needed when auto accepting of connections is enabled. */ - @Example<{ outOfBandRecord: OutOfBandRecordWithInvitationProps; connectionRecord: ConnectionRecordProps }>({ + @Example<{ outOfBandRecord: OutOfBandRecordWithInvitationProps; connectionRecord: DidCommConnectionRecordProps }>({ outOfBandRecord: outOfBandRecordExample, connectionRecord: ConnectionRecordExample, }) @@ -306,7 +257,7 @@ export class OutOfBandController extends Controller { @Body() acceptInvitationConfig: AcceptInvitationConfig, ) { try { - const { outOfBandRecord, connectionRecord } = await request.agent.modules.oob.acceptInvitation( + const { outOfBandRecord, connectionRecord } = await request.agent.modules.didcomm.oob.acceptInvitation( outOfBandId, acceptInvitationConfig, ) @@ -329,7 +280,7 @@ export class OutOfBandController extends Controller { public async deleteOutOfBandRecord(@Request() request: Req, @Path('outOfBandId') outOfBandId: RecordId) { try { this.setStatus(204) - await request.agent.modules.oob.deleteById(outOfBandId) + await request.agent.modules.didcomm.oob.deleteById(outOfBandId) } catch (error) { throw ErrorHandlingService.handle(error) } diff --git a/src/controllers/didcomm/question-answer/QuestionAnswerController.ts b/src/controllers/didcomm/question-answer/QuestionAnswerController.ts index 5f812efe..845f8d98 100644 --- a/src/controllers/didcomm/question-answer/QuestionAnswerController.ts +++ b/src/controllers/didcomm/question-answer/QuestionAnswerController.ts @@ -39,7 +39,7 @@ export class QuestionAnswerController extends Controller { state, threadId, }) - return questionAnswerRecords.map((record) => record.toJSON()) + return questionAnswerRecords.map((record: { toJSON: () => any }) => record.toJSON()) } catch (error) { throw ErrorHandlingService.handle(error) } diff --git a/src/utils/constant.ts b/src/utils/constant.ts index 643be69a..03741d0a 100644 --- a/src/utils/constant.ts +++ b/src/utils/constant.ts @@ -1 +1 @@ -export const X509_CERTIFICATE_RECORD = 'X509_CERTIFICATE' \ No newline at end of file +export const X509_CERTIFICATE_RECORD = 'X509_CERTIFICATE' From 18c8ad17bb5d6ea6e768cda35f7c6288fd2a4815 Mon Sep 17 00:00:00 2001 From: Krishna Waske Date: Thu, 11 Dec 2025 17:57:03 +0530 Subject: [PATCH 05/38] fix: agent initialization Signed-off-by: Krishna Waske --- src/cli.ts | 2 +- src/cliAgent.ts | 225 ++++++++++++++++------------------ src/events/WebSocketEvents.ts | 4 +- src/index.ts | 4 +- src/utils/agent.ts | 136 ++++++++++---------- 5 files changed, 179 insertions(+), 192 deletions(-) diff --git a/src/cli.ts b/src/cli.ts index 8c7efa63..533cd9e4 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -176,7 +176,7 @@ export async function runCliServer() { walletConfig: { id: parsed['wallet-id'], key: parsed['wallet-key'], - storage: { + database: { type: parsed['wallet-type'], config: { host: parsed['wallet-url'], diff --git a/src/cliAgent.ts b/src/cliAgent.ts index 1d638027..40c1c4a0 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -1,18 +1,17 @@ import type { InitConfig } from '@credo-ts/core' -import type { WalletConfig } from '@credo-ts/core/build/types' import type { IndyVdrPoolConfig } from '@credo-ts/indy-vdr' -import { PolygonDidRegistrar, PolygonDidResolver, PolygonModule } from '@ayanworks/credo-polygon-w3c-module' +// import { PolygonDidRegistrar, PolygonDidResolver, PolygonModule } from '@ayanworks/credo-polygon-w3c-module' import { - AnonCredsCredentialFormatService, + AnonCredsDidCommCredentialFormatService, AnonCredsModule, - AnonCredsProofFormatService, - LegacyIndyCredentialFormatService, - LegacyIndyProofFormatService, - V1CredentialProtocol, - V1ProofProtocol, + AnonCredsDidCommProofFormatService, + LegacyIndyDidCommCredentialFormatService, + LegacyIndyDidCommProofFormatService, + DidCommCredentialV1Protocol, + DidCommProofV1Protocol, } from '@credo-ts/anoncreds' -import { AskarModule, AskarMultiWalletDatabaseScheme } from '@credo-ts/askar' +import { AskarModule, AskarModuleConfigStoreOptions, AskarMultiWalletDatabaseScheme } from '@credo-ts/askar' import { DidsModule, W3cCredentialsModule, @@ -26,23 +25,16 @@ import { X509Module, } from '@credo-ts/core' import { - HttpOutboundTransport, - WsOutboundTransport, - JsonLdCredentialFormatService, - DifPresentationExchangeProofFormatService, - ConnectionsModule, - ProofsModule, - AutoAcceptCredential, - AutoAcceptProof, - V2ProofProtocol, - CredentialsModule, - V2CredentialProtocol, + DidCommHttpOutboundTransport, + DidCommWsOutboundTransport, + DidCommJsonLdCredentialFormatService, + DidCommDifPresentationExchangeProofFormatService, + DidCommAutoAcceptCredential, + DidCommAutoAcceptProof, + DidCommProofV2Protocol, + DidCommCredentialV2Protocol, DidCommModule, - OutOfBandModule, - MediationRecipientModule, - BasicMessagesModule, - MessagePickupModule, - DiscoverFeaturesModule, + DidCommDiscoverFeaturesModule, } from '@credo-ts/didcomm' import { IndyVdrAnonCredsRegistry, @@ -50,7 +42,7 @@ import { IndyVdrModule, IndyVdrIndyDidRegistrar, } from '@credo-ts/indy-vdr' -import { agentDependencies, HttpInboundTransport, WsInboundTransport } from '@credo-ts/node' +import { agentDependencies, DidCommHttpInboundTransport, DidCommWsInboundTransport } from '@credo-ts/node' import { QuestionAnswerModule } from '@credo-ts/question-answer' import { TenantsModule } from '@credo-ts/tenants' import { anoncreds } from '@hyperledger/anoncreds-nodejs' @@ -64,16 +56,16 @@ import { setupServer } from './server' import { generateSecretKey } from './utils/helpers' import { TsLogger } from './utils/logger' import { OpenId4VcHolderModule, OpenId4VcIssuerModule, OpenId4VcVerifierModule } from '@credo-ts/openid4vc' -import { Router } from 'express' import { getCredentialRequestToCredentialMapper, - getMixedCredentialRequestToCredentialMapper, getTrustedCerts, } from './utils/oid4vc-agent' import bodyParser from 'body-parser' -const openId4VciRouter = Router() -const openId4VpRouter = Router() +import express from 'express' + +const openId4VpApp = express() +const openId4VcApp = express() export type Transports = 'ws' | 'http' export type InboundTransport = { @@ -82,13 +74,13 @@ export type InboundTransport = { } const inboundTransportMapping = { - http: HttpInboundTransport, - ws: WsInboundTransport, + http: DidCommHttpInboundTransport, + ws: DidCommWsInboundTransport, } as const const outboundTransportMapping = { - http: HttpOutboundTransport, - ws: WsOutboundTransport, + http: DidCommHttpOutboundTransport, + ws: DidCommWsOutboundTransport, } as const interface indyLedger { @@ -97,14 +89,14 @@ interface indyLedger { } export interface AriesRestConfig { label: string - walletConfig: WalletConfig + walletConfig: AskarModuleConfigStoreOptions indyLedger: indyLedger[] adminPort: number publicDidSeed?: string endpoints?: string[] autoAcceptConnections?: boolean - autoAcceptCredentials?: AutoAcceptCredential - autoAcceptProofs?: AutoAcceptProof + autoAcceptCredentials?: DidCommAutoAcceptCredential + autoAcceptProofs?: DidCommAutoAcceptProof logLevel?: LogLevel inboundTransports?: InboundTransport[] outboundTransports?: Transports[] @@ -143,20 +135,25 @@ const getModules = ( rpcUrl: string, schemaManagerContractAddress: string, autoAcceptConnections: boolean, - autoAcceptCredentials: AutoAcceptCredential, - autoAcceptProofs: AutoAcceptProof, + autoAcceptCredentials: DidCommAutoAcceptCredential, + autoAcceptProofs: DidCommAutoAcceptProof, walletScheme: AskarMultiWalletDatabaseScheme, + storeOptions: AskarModuleConfigStoreOptions ) => { - const legacyIndyCredentialFormat = new LegacyIndyCredentialFormatService() - const legacyIndyProofFormat = new LegacyIndyProofFormatService() - const jsonLdCredentialFormatService = new JsonLdCredentialFormatService() - const anonCredsCredentialFormatService = new AnonCredsCredentialFormatService() - const anonCredsProofFormatService = new AnonCredsProofFormatService() - const presentationExchangeProofFormatService = new DifPresentationExchangeProofFormatService() + const legacyIndyCredentialFormat = new LegacyIndyDidCommCredentialFormatService() + const legacyIndyProofFormat = new LegacyIndyDidCommProofFormatService() + const jsonLdCredentialFormatService = new DidCommJsonLdCredentialFormatService() + const anonCredsCredentialFormatService = new AnonCredsDidCommCredentialFormatService() + const anonCredsProofFormatService = new AnonCredsDidCommProofFormatService() + const presentationExchangeProofFormatService = new DidCommDifPresentationExchangeProofFormatService() return { askar: new AskarModule({ askar, + store: { + ...storeOptions + }, multiWalletDatabaseScheme: walletScheme || AskarMultiWalletDatabaseScheme.ProfilePerWallet, + }), indyVdr: new IndyVdrModule({ @@ -165,74 +162,77 @@ const getModules = ( }), dids: new DidsModule({ - registrars: [new IndyVdrIndyDidRegistrar(), new KeyDidRegistrar(), new PolygonDidRegistrar()], - resolvers: [new IndyVdrIndyDidResolver(), new KeyDidResolver(), new WebDidResolver(), new PolygonDidResolver()], + registrars: [new IndyVdrIndyDidRegistrar(), new KeyDidRegistrar() + // , new PolygonDidRegistrar() + ], + resolvers: [new IndyVdrIndyDidResolver(), new KeyDidResolver(), new WebDidResolver() + // , new PolygonDidResolver() + ], }), anoncreds: new AnonCredsModule({ registries: [new IndyVdrAnonCredsRegistry()], anoncreds, }), - - connections: new ConnectionsModule({ - autoAcceptConnections: autoAcceptConnections || true, - }), - proofs: new ProofsModule({ - autoAcceptProofs: autoAcceptProofs || AutoAcceptProof.ContentApproved, - proofProtocols: [ - new V1ProofProtocol({ - indyProofFormat: legacyIndyProofFormat, - }), - new V2ProofProtocol({ - proofFormats: [legacyIndyProofFormat, anonCredsProofFormatService, presentationExchangeProofFormatService], - }), - ], - }), - credentials: new CredentialsModule({ - autoAcceptCredentials: autoAcceptCredentials || AutoAcceptCredential.Always, - credentialProtocols: [ - new V1CredentialProtocol({ - indyCredentialFormat: legacyIndyCredentialFormat, - }), - new V2CredentialProtocol({ - credentialFormats: [ - legacyIndyCredentialFormat, - jsonLdCredentialFormatService, - anonCredsCredentialFormatService, - ], - }), - ], - }), w3cCredentials: new W3cCredentialsModule(), didcomm: new DidCommModule({ processDidCommMessagesConcurrently: true, + anoncreds: new AnonCredsModule({ + registries: [new IndyVdrAnonCredsRegistry()], + anoncreds, + }), + oob: true, + mediationRecipient: true, + messagePickup: true, + basicMessages: true, + connections: { + autoAcceptConnections: autoAcceptConnections || true, + }, + proofs: { + autoAcceptProofs: autoAcceptProofs || DidCommAutoAcceptProof.ContentApproved, + proofProtocols: [ + new DidCommProofV1Protocol({ + indyProofFormat: legacyIndyProofFormat, + }), + new DidCommProofV2Protocol({ + proofFormats: [legacyIndyProofFormat, anonCredsProofFormatService, presentationExchangeProofFormatService], + }), + ], + }, + credentials: { + autoAcceptCredentials: autoAcceptCredentials || DidCommAutoAcceptCredential.Always, + credentialProtocols: [ + new DidCommCredentialV1Protocol({ + indyCredentialFormat: legacyIndyCredentialFormat, + }), + new DidCommCredentialV2Protocol({ + credentialFormats: [legacyIndyCredentialFormat, jsonLdCredentialFormatService, anonCredsCredentialFormatService], + }), + ], + }, }), - oob: new OutOfBandModule(), - mediationRecipient: new MediationRecipientModule(), - discovery: new DiscoverFeaturesModule(), - messagePickup: new MessagePickupModule(), - basicMessages: new BasicMessagesModule(), + discovery: new DidCommDiscoverFeaturesModule(), cache: new CacheModule({ cache: new InMemoryLruCache({ limit: Number(process.env.INMEMORY_LRU_CACHE_LIMIT) || Infinity }), }), questionAnswer: new QuestionAnswerModule(), - polygon: new PolygonModule({ - didContractAddress: didRegistryContractAddress - ? didRegistryContractAddress - : (process.env.DID_CONTRACT_ADDRESS as string), - schemaManagerContractAddress: - schemaManagerContractAddress || (process.env.SCHEMA_MANAGER_CONTRACT_ADDRESS as string), - fileServerToken: fileServerToken ? fileServerToken : (process.env.FILE_SERVER_TOKEN as string), - rpcUrl: rpcUrl ? rpcUrl : (process.env.RPC_URL as string), - serverUrl: fileServerUrl ? fileServerUrl : (process.env.SERVER_URL as string), - }), + // polygon: new PolygonModule({ + // didContractAddress: didRegistryContractAddress + // ? didRegistryContractAddress + // : (process.env.DID_CONTRACT_ADDRESS as string), + // schemaManagerContractAddress: + // schemaManagerContractAddress || (process.env.SCHEMA_MANAGER_CONTRACT_ADDRESS as string), + // fileServerToken: fileServerToken ? fileServerToken : (process.env.FILE_SERVER_TOKEN as string), + // rpcUrl: rpcUrl ? rpcUrl : (process.env.RPC_URL as string), + // serverUrl: fileServerUrl ? fileServerUrl : (process.env.SERVER_URL as string), + // }), openId4VcVerifier: new OpenId4VcVerifierModule({ baseUrl: process.env.NODE_ENV === 'PROD' ? `https://${process.env.APP_URL}/oid4vp` : `${process.env.AGENT_HTTP_URL}/oid4vp`, - router: openId4VpRouter, + app: openId4VpApp, authorizationRequestExpirationInSeconds: Number(process.env.OID4VP_AUTH_REQUEST_PROOF_REQUEST_EXPIRY) || 3600, }), openId4VcIssuer: new OpenId4VcIssuerModule({ @@ -240,13 +240,13 @@ const getModules = ( process.env.NODE_ENV === 'PROD' ? `https://${process.env.APP_URL}/oid4vci` : `${process.env.AGENT_HTTP_URL}/oid4vci`, - router: openId4VciRouter, + app: openId4VcApp, statefulCredentialOfferExpirationInSeconds: Number(process.env.OID4VCI_CRED_OFFER_EXPIRY) || 3600, accessTokenExpiresInSeconds: Number(process.env.OID4VCI_ACCESS_TOKEN_EXPIRY) || 3600, authorizationCodeExpiresInSeconds: Number(process.env.OID4VCI_AUTH_CODE_EXPIRY) || 3600, cNonceExpiresInSeconds: Number(process.env.OID4VCI_CNONCE_EXPIRY) || 3600, dpopRequired: false, - credentialRequestToCredentialMapper: (...args) => getMixedCredentialRequestToCredentialMapper()(...args), + credentialRequestToCredentialMapper: (...args) => getCredentialRequestToCredentialMapper()(...args), }), openId4VcHolderModule: new OpenId4VcHolderModule(), x509: new X509Module({ @@ -269,9 +269,10 @@ const getWithTenantModules = ( rpcUrl: string, schemaManagerContractAddress: string, autoAcceptConnections: boolean, - autoAcceptCredentials: AutoAcceptCredential, - autoAcceptProofs: AutoAcceptProof, + autoAcceptCredentials: DidCommAutoAcceptCredential, + autoAcceptProofs: DidCommAutoAcceptProof, walletScheme: AskarMultiWalletDatabaseScheme, + walletConfig: AskarModuleConfigStoreOptions ) => { const modules = getModules( networkConfig, @@ -284,6 +285,7 @@ const getWithTenantModules = ( autoAcceptCredentials, autoAcceptProofs, walletScheme, + walletConfig ) return { tenants: new TenantsModule({ @@ -338,17 +340,12 @@ export async function runRestAgent(restConfig: AriesRestConfig) { const logger = new TsLogger(logLevel ?? LogLevel.error) const agentConfig: InitConfig = { - walletConfig: { - id: walletConfig.id, - key: walletConfig.key, - storage: walletConfig.storage, - }, ...afjConfig, logger, autoUpdateStorageOnStartup: true, // As backup is only supported for sqlite storage // we need to manually take backup of the storage before updating the storage - backupBeforeStorageUpdate: false, + // backupBeforeStorageUpdate: false, // Ideally for testing connection between tenant agent we need to set this to 'true'. Default is 'false' // TODO: triage: not sure if we want it to be 'true', as it would mean parallel requests on BW // Setting it for now //TODO: check if this is needed @@ -418,9 +415,10 @@ export async function runRestAgent(restConfig: AriesRestConfig) { rpcUrl || '', schemaManagerContractAddress || '', autoAcceptConnections || true, - autoAcceptCredentials || AutoAcceptCredential.Always, - autoAcceptProofs || AutoAcceptProof.ContentApproved, + autoAcceptCredentials || DidCommAutoAcceptCredential.Always, + autoAcceptProofs || DidCommAutoAcceptProof.ContentApproved, walletScheme || AskarMultiWalletDatabaseScheme.ProfilePerWallet, + walletConfig ) const modules = getModules( networkConfig, @@ -430,9 +428,10 @@ export async function runRestAgent(restConfig: AriesRestConfig) { rpcUrl || '', schemaManagerContractAddress || '', autoAcceptConnections || true, - autoAcceptCredentials || AutoAcceptCredential.Always, - autoAcceptProofs || AutoAcceptProof.ContentApproved, + autoAcceptCredentials || DidCommAutoAcceptCredential.Always, + autoAcceptProofs || DidCommAutoAcceptProof.ContentApproved, walletScheme || AskarMultiWalletDatabaseScheme.ProfilePerWallet, + walletConfig ) const agent = new Agent({ config: agentConfig, @@ -453,12 +452,6 @@ export async function runRestAgent(restConfig: AriesRestConfig) { agent.modules.didcomm.registerOutboundTransport(new OutboundTransport()) } - // Register inbound transports - // for (const inboundTransport of inboundTransports) { - // const InboundTransport = inboundTransportMapping[inboundTransport.transport] - // agent.modules.didcomm.registerInboundTransport(new InboundTransport({ port: inboundTransport.port })) - // } - // Register inbound transports for (const inboundTransport of inboundTransports) { const InboundTransport = inboundTransportMapping[inboundTransport.transport] @@ -466,7 +459,7 @@ export async function runRestAgent(restConfig: AriesRestConfig) { agent.modules.didcomm.registerInboundTransport(transport) // Configure the oid4vc routers on the http inbound transport - if (transport instanceof HttpInboundTransport) { + if (transport instanceof DidCommHttpInboundTransport) { transport.app.use( bodyParser.urlencoded({ extended: true, @@ -475,8 +468,8 @@ export async function runRestAgent(restConfig: AriesRestConfig) { ) transport.app.use(bodyParser.json({ limit: process.env.APP_JSON_BODY_SIZE ?? '5mb' })) - transport.app.use('/oid4vci', modules.openId4VcIssuer.config.router as any) - transport.app.use('/oid4vp', modules.openId4VcVerifier.config.router as any) + transport.app.use('/oid4vci', modules.openId4VcIssuer.config.app) + transport.app.use('/oid4vp', modules.openId4VcVerifier.config.app) } } diff --git a/src/events/WebSocketEvents.ts b/src/events/WebSocketEvents.ts index 1e968775..358ca800 100644 --- a/src/events/WebSocketEvents.ts +++ b/src/events/WebSocketEvents.ts @@ -1,6 +1,6 @@ -import WebSocket from 'ws' +import {Server} from 'ws' -export const sendWebSocketEvent = async (server: WebSocket.Server, data: unknown) => { +export const sendWebSocketEvent = async (server: Server, data: unknown) => { server.clients.forEach((client) => { if (client.readyState === WebSocket.OPEN) { typeof data === 'string' ? client.send(data) : client.send(JSON.stringify(data)) diff --git a/src/index.ts b/src/index.ts index bd27e821..1a1547d1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,12 +4,12 @@ import type { ServerConfig } from './utils/ServerConfig' import type { Agent } from '@credo-ts/core' import type { Socket } from 'net' -import { Server } from 'ws' +import { WebSocketServer } from 'ws' import { setupServer } from './server' export const startServer = async (agent: Agent, config: ServerConfig) => { - const socketServer = config.socketServer ?? new Server({ noServer: true }) + const socketServer = config.socketServer ?? new WebSocketServer({ noServer: true }) const app = await setupServer(agent, { ...config, socketServer }) const server = app.listen(config.port) diff --git a/src/utils/agent.ts b/src/utils/agent.ts index 4acfabf7..1cadedfc 100644 --- a/src/utils/agent.ts +++ b/src/utils/agent.ts @@ -1,14 +1,14 @@ import type { InitConfig } from '@credo-ts/core' -import { PolygonModule } from '@ayanworks/credo-polygon-w3c-module' +// import { PolygonModule } from '@ayanworks/credo-polygon-w3c-module' import { AnonCredsModule, - LegacyIndyCredentialFormatService, - LegacyIndyProofFormatService, - V1CredentialProtocol, - V1ProofProtocol, - AnonCredsCredentialFormatService, - AnonCredsProofFormatService, + LegacyIndyDidCommProofFormatService, + DidCommCredentialV1Protocol, + DidCommProofV1Protocol, + AnonCredsDidCommProofFormatService, + LegacyIndyDidCommCredentialFormatService, + AnonCredsDidCommCredentialFormatService, } from '@credo-ts/anoncreds' import { AskarModule } from '@credo-ts/askar' import { @@ -21,22 +21,17 @@ import { } from '@credo-ts/core' import { - HttpOutboundTransport, - JsonLdCredentialFormatService, - DifPresentationExchangeProofFormatService, - ProofsModule, - AutoAcceptCredential, - V2ProofProtocol, - CredentialsModule, - V2CredentialProtocol, + DidCommHttpOutboundTransport, + DidCommJsonLdCredentialFormatService, + DidCommDifPresentationExchangeProofFormatService, + DidCommAutoAcceptCredential, + DidCommProofV2Protocol, + DidCommCredentialV2Protocol, DidCommModule, - OutOfBandModule, - MediationRecipientModule, - BasicMessagesModule, - ConnectionInvitationMessage + DidCommConnectionInvitationMessage } from '@credo-ts/didcomm' import { IndyVdrAnonCredsRegistry, IndyVdrModule } from '@credo-ts/indy-vdr' -import { agentDependencies, HttpInboundTransport } from '@credo-ts/node' +import { agentDependencies, DidCommHttpInboundTransport } from '@credo-ts/node' import { TenantsModule } from '@credo-ts/tenants' import { anoncreds } from '@hyperledger/anoncreds-nodejs' import { askar } from '@openwallet-foundation/askar-nodejs' @@ -48,18 +43,13 @@ export const setupAgent = async ({ name, endpoints, port }: { name: string; endp const logger = new TsLogger(LogLevel.debug) const config: InitConfig = { - label: name, // endpoints: endpoints, - walletConfig: { - id: name, - key: name, - }, logger: logger, allowInsecureHttpUrls: process.env.ALLOW_INSECURE_HTTP_URLS === 'true' } - const legacyIndyCredentialFormat = new LegacyIndyCredentialFormatService() - const legacyIndyProofFormat = new LegacyIndyProofFormatService() + const legacyIndyCredentialFormat = new LegacyIndyDidCommCredentialFormatService() + const legacyIndyProofFormat = new LegacyIndyDidCommProofFormatService() const agent = new Agent({ config: config, modules: { @@ -76,6 +66,10 @@ export const setupAgent = async ({ name, endpoints, port }: { name: string; endp }), askar: new AskarModule({ askar, + store: { + id: name, + key: name + }, }), anoncreds: new AnonCredsModule({ @@ -87,68 +81,68 @@ export const setupAgent = async ({ name, endpoints, port }: { name: string; endp registrars: [new KeyDidRegistrar()], resolvers: [new KeyDidResolver(), new WebDidResolver()], }), - proofs: new ProofsModule({ - proofProtocols: [ - new V1ProofProtocol({ - indyProofFormat: legacyIndyProofFormat, - }), - new V2ProofProtocol({ - proofFormats: [ - legacyIndyProofFormat, - new AnonCredsProofFormatService(), - new DifPresentationExchangeProofFormatService(), - ], - }), - ], - }), - credentials: new CredentialsModule({ - autoAcceptCredentials: AutoAcceptCredential.ContentApproved, - credentialProtocols: [ - new V1CredentialProtocol({ - indyCredentialFormat: legacyIndyCredentialFormat, - }), - new V2CredentialProtocol({ - credentialFormats: [ - legacyIndyCredentialFormat, - new JsonLdCredentialFormatService(), - new AnonCredsCredentialFormatService(), - ], - }), - ], - }), tenants: new TenantsModule(), didcomm: new DidCommModule({ processDidCommMessagesConcurrently: true, + anoncreds: new AnonCredsModule({ + registries: [new IndyVdrAnonCredsRegistry()], + anoncreds, + }), + oob: true, + mediationRecipient: true, + messagePickup: true, + basicMessages: true, + connections: { + autoAcceptConnections: true, + }, + proofs: { + proofProtocols: [ + new DidCommProofV1Protocol({ + indyProofFormat: legacyIndyProofFormat, + }), + new DidCommProofV2Protocol({ + proofFormats: [legacyIndyProofFormat, new AnonCredsDidCommProofFormatService, new DidCommDifPresentationExchangeProofFormatService], + }), + ], + }, + credentials: { + autoAcceptCredentials: DidCommAutoAcceptCredential.Always, + credentialProtocols: [ + new DidCommCredentialV1Protocol({ + indyCredentialFormat: legacyIndyCredentialFormat, + }), + new DidCommCredentialV2Protocol({ + credentialFormats: [legacyIndyCredentialFormat, new DidCommJsonLdCredentialFormatService(), new AnonCredsDidCommCredentialFormatService()], + }), + ], + }, }), - oob: new OutOfBandModule(), - mediationRecipient: new MediationRecipientModule(), - basicMessages: new BasicMessagesModule(), - polygon: new PolygonModule({ - didContractAddress: '', - schemaManagerContractAddress: '', - fileServerToken: '', - rpcUrl: '', - serverUrl: '', - }), + // polygon: new PolygonModule({ + // didContractAddress: '', + // schemaManagerContractAddress: '', + // fileServerToken: '', + // rpcUrl: '', + // serverUrl: '', + // }), }, dependencies: agentDependencies, }) - const httpInbound = new HttpInboundTransport({ + const httpInbound = new DidCommHttpInboundTransport({ port: port, }) agent.modules.didcomm.registerInboundTransport(httpInbound) - agent.modules.didcomm.registerOutboundTransport(new HttpOutboundTransport()) + agent.modules.didcomm.registerOutboundTransport(new DidCommHttpOutboundTransport()) - httpInbound.app.get('/invitation', async (req, res) => { + httpInbound.app.get('/invitation', async (req: { query: { d_m: any; c_i: any }; url: string }, res: { send: (arg0: any) => void }) => { if (typeof req.query.d_m === 'string') { - const invitation = await ConnectionInvitationMessage.fromUrl(req.url.replace('d_m=', 'c_i=')) + const invitation = await DidCommConnectionInvitationMessage.fromUrl(req.url.replace('d_m=', 'c_i=')) res.send(invitation.toJSON()) } if (typeof req.query.c_i === 'string') { - const invitation = await ConnectionInvitationMessage.fromUrl(req.url) + const invitation = await DidCommConnectionInvitationMessage.fromUrl(req.url) res.send(invitation.toJSON()) } else { const { outOfBandInvitation } = await agent.modules.oob.createInvitation() From 148aa9cd6e62ec64659251fda203dd0f568d649e Mon Sep 17 00:00:00 2001 From: Krishna Waske Date: Thu, 11 Dec 2025 18:01:17 +0530 Subject: [PATCH 06/38] fix: remove unwanted agent backup config Signed-off-by: Krishna Waske --- src/cliAgent.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/cliAgent.ts b/src/cliAgent.ts index 40c1c4a0..edaa9248 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -343,9 +343,6 @@ export async function runRestAgent(restConfig: AriesRestConfig) { ...afjConfig, logger, autoUpdateStorageOnStartup: true, - // As backup is only supported for sqlite storage - // we need to manually take backup of the storage before updating the storage - // backupBeforeStorageUpdate: false, // Ideally for testing connection between tenant agent we need to set this to 'true'. Default is 'false' // TODO: triage: not sure if we want it to be 'true', as it would mean parallel requests on BW // Setting it for now //TODO: check if this is needed From a6d21814ea716fdec78832e18ad7931be5a3e185 Mon Sep 17 00:00:00 2001 From: Krishna Waske Date: Thu, 11 Dec 2025 18:10:22 +0530 Subject: [PATCH 07/38] fix: oob invitation Signed-off-by: Krishna Waske --- src/utils/agent.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/agent.ts b/src/utils/agent.ts index 1cadedfc..582ff80b 100644 --- a/src/utils/agent.ts +++ b/src/utils/agent.ts @@ -145,7 +145,7 @@ export const setupAgent = async ({ name, endpoints, port }: { name: string; endp const invitation = await DidCommConnectionInvitationMessage.fromUrl(req.url) res.send(invitation.toJSON()) } else { - const { outOfBandInvitation } = await agent.modules.oob.createInvitation() + const { outOfBandInvitation } = await agent.modules.didcomm.oob.createInvitation() res.send(outOfBandInvitation.toUrl({ domain: endpoints + '/invitation' })) } From 78f6065a3121dfdad7a7e44c590df44556e011ac Mon Sep 17 00:00:00 2001 From: Krishna Waske Date: Mon, 15 Dec 2025 12:14:04 +0530 Subject: [PATCH 08/38] fix: some package version update Signed-off-by: Krishna Waske --- package.json | 4 +- yarn.lock | 170 +++++++++++++++++++++++++-------------------------- 2 files changed, 86 insertions(+), 88 deletions(-) diff --git a/package.json b/package.json index e4da3178..c088b28e 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "@opentelemetry/sdk-logs": "^0.202.0", "@opentelemetry/sdk-node": "^0.202.0", "@opentelemetry/semantic-conventions": "^1.34.0", - "@openwallet-foundation/askar-nodejs": "^0.3.2", + "@openwallet-foundation/askar-nodejs": "^0.4.3", "@tsoa/runtime": "^6.6.0", "@types/node-fetch": "^2.6.4", "@types/ref-struct-di": "^1.1.12", @@ -81,7 +81,7 @@ "swagger-ui-express": "^4.4.0", "tslog": "^3.3.3", "tsoa": "^6.0.1", - "tsyringe": "^4.8.0", + "tsyringe": "^4.10.0", "uuid": "^13.0.0", "ws": "^8.18.2", "yargs": "^17.7.2" diff --git a/yarn.lock b/yarn.lock index 32efea90..f9bc587c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -386,34 +386,34 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@credo-ts/anoncreds@0.6.0": - version "0.6.0" - resolved "https://registry.yarnpkg.com/@credo-ts/anoncreds/-/anoncreds-0.6.0.tgz#e705077236ebd63067291a3978a771452c63a9f6" - integrity sha512-oDzaPMmtIqlvCIQRan/iXleGVgtJinsQ/UQn1PChCuifo6nzZWJo/xHOqYypNuWDc9dkgADwJjkUtFoU3NhhsA== +"@credo-ts/anoncreds@0.6.1": + version "0.6.1" + resolved "https://registry.yarnpkg.com/@credo-ts/anoncreds/-/anoncreds-0.6.1.tgz#604d9ec391034f85ba66132f6512f145c374b99f" + integrity sha512-woHktaf84z8ECdyUKb8nzRbk960bK6ZEMf6mavoC91bND54VoSAKRV2nkhXFydrH3AT/H8FS/NHBLN0CD4XthQ== dependencies: "@astronautlabs/jsonpath" "^1.1.2" - "@credo-ts/core" "0.6.0" - "@credo-ts/didcomm" "0.6.0" + "@credo-ts/core" "0.6.1" + "@credo-ts/didcomm" "0.6.1" "@sphereon/pex-models" "^2.3.2" class-transformer "0.5.1" class-validator "^0.14.1" reflect-metadata "0.2.2" -"@credo-ts/askar@0.5.3", "@credo-ts/askar@0.6.0": - version "0.6.0" - resolved "https://registry.yarnpkg.com/@credo-ts/askar/-/askar-0.6.0.tgz#12fe485252d51abdcbebbbeb9e8bfed47ff12448" - integrity sha512-TYBgmpQ3qi49HIA7vIb64j2jiFTynCRF9aN0G67pwhwyTJR/sULvvD/o4FdqH9K7pAoEvVqw99xOvp9ojigqsg== +"@credo-ts/askar@0.5.3", "@credo-ts/askar@0.6.1": + version "0.6.1" + resolved "https://registry.yarnpkg.com/@credo-ts/askar/-/askar-0.6.1.tgz#762c21c8cdb27444b4a9f3f9f3e420a5a20aed70" + integrity sha512-U8bgol3PNekjrsrGci5p/8PgHxBJpS4DlasX/FGKtUybFXLSMgkfmQSsZIdllqhCWYlQ2RLfMxxD5gXiPsRxgg== dependencies: - "@credo-ts/core" "0.6.0" + "@credo-ts/core" "0.6.1" class-transformer "0.5.1" class-validator "^0.14.1" rxjs "^7.8.2" tsyringe "^4.10.0" -"@credo-ts/core@0.5.3", "@credo-ts/core@0.6.0": - version "0.6.0" - resolved "https://registry.yarnpkg.com/@credo-ts/core/-/core-0.6.0.tgz#391c14b9cdea64f91d5b741c1b37ce51a1705d9f" - integrity sha512-gZQgaZzj27Mzm0Ei2Axw+qNDBRsqsHVeEv/Rkqu4yzd0v1QIl/XQV+fUF44krvanzf0mlVBA0JXD0ZNESharCQ== +"@credo-ts/core@0.5.3", "@credo-ts/core@0.6.1": + version "0.6.1" + resolved "https://registry.yarnpkg.com/@credo-ts/core/-/core-0.6.1.tgz#4fe8c484e6ad12e9700c4c9757da8205ee908278" + integrity sha512-KAl9c2tNWn8c6R3o1fJRkkalyjP0wsdKjHc/xEoxb2w3i1q+4nsqe9f0sWelDjbCtQ/lwxH82TCZPhfGfHHk3g== dependencies: "@animo-id/mdoc" "^0.5.2" "@animo-id/pex" "^6.1.1" @@ -458,50 +458,48 @@ webcrypto-core "^1.8.1" zod "^4.1.12" -"@credo-ts/didcomm@0.6.0": - version "0.6.0" - resolved "https://registry.yarnpkg.com/@credo-ts/didcomm/-/didcomm-0.6.0.tgz#2508710d2af8eb8be963d59e282223951278bde6" - integrity sha512-QPInULf6ECSWk5SZoFKiXC8jcJFUhiRUFx2ghouyWsPb7wtN+eWkUMQNFt2+l0/TqqUmcvLlpAn9xICSTWQCsQ== +"@credo-ts/didcomm@0.6.1": + version "0.6.1" + resolved "https://registry.yarnpkg.com/@credo-ts/didcomm/-/didcomm-0.6.1.tgz#994b11746998bca8fd12664c0694f271ee93c728" + integrity sha512-boDMfmzA7Pkf6CxTAjcb1zZys2APR13XHdkmCHJy4OrAxgBdZmSROfwuWsTMYK20UFfINKv7TOM4O/THpRFWGw== dependencies: - "@credo-ts/core" "0.6.0" + "@credo-ts/core" "0.6.1" class-transformer "0.5.1" class-validator "^0.14.1" luxon "^3.7.2" query-string "^9.3.1" rxjs "^7.8.2" -"@credo-ts/indy-vdr@0.6.0": - version "0.6.0" - resolved "https://registry.yarnpkg.com/@credo-ts/indy-vdr/-/indy-vdr-0.6.0.tgz#e1b033ba8b3b47e9146eb70d47360504b1e7a68b" - integrity sha512-ziqw0k8KXK5KikLyw6AypuTbjfShi5DBbjQAgnn0CS7/iY394xZ3H9oVeaK94BezN7Axvm9uFsr7TS0pTApHJg== +"@credo-ts/indy-vdr@0.6.1": + version "0.6.1" + resolved "https://registry.yarnpkg.com/@credo-ts/indy-vdr/-/indy-vdr-0.6.1.tgz#c3a1c50422c99fb818878c08a79eeaa775023e01" + integrity sha512-0p0ZwXdCpqrRgGGE9v7t5YeCIVeej1T0vxWZtVHy64wcswx9Oc/75l3FgNHhek7m83s+Z8uCbOTL1xe48bwamQ== dependencies: - "@credo-ts/anoncreds" "0.6.0" - "@credo-ts/core" "0.6.0" + "@credo-ts/anoncreds" "0.6.1" + "@credo-ts/core" "0.6.1" -"@credo-ts/node@^0.6.0": - version "0.6.0" - resolved "https://registry.yarnpkg.com/@credo-ts/node/-/node-0.6.0.tgz#963e610d38103feab39499da24d827bea44dee27" - integrity sha512-9p/3u6lU63wRfdxlRvAy15E+WOHcMJK7S4ftQ6icj75gDL3FlfT0qfZ2/R1eIANOkkzktOV0MhxVn+MyVrxLjQ== +"@credo-ts/node@0.6.1": + version "0.6.1" + resolved "https://registry.yarnpkg.com/@credo-ts/node/-/node-0.6.1.tgz#e1401f6b93c3e585f37881b69eba78a01b7e850a" + integrity sha512-vJCu4xPVA0IPeBfNcByL02jWlPv71ejcdojZ1TJNa6NH3hCdzzdTJ6DXFIAHSKKxQJVd2iOvjct8Qm5lKqUAgA== dependencies: - "@2060.io/ffi-napi" "^4.0.9" - "@2060.io/ref-napi" "^3.0.6" - "@credo-ts/core" "0.6.0" - "@credo-ts/didcomm" "0.6.0" + "@credo-ts/core" "0.6.1" + "@credo-ts/didcomm" "0.6.1" "@types/express" "^5.0.6" express "^5.2.0" rxjs "^7.8.2" ws "^8.18.3" -"@credo-ts/openid4vc@0.6.0": - version "0.6.0" - resolved "https://registry.yarnpkg.com/@credo-ts/openid4vc/-/openid4vc-0.6.0.tgz#8fad7f9720b1c71a341ec6ff840aab7205bee205" - integrity sha512-p2+4eMFuNB6vaZn4IM9EkXZE4eqoswjI8YzD4zcOHIGO02XgbW6X0Ftj5TSO2Djc5pmYDqEp/+G/ESWsinUAXw== - dependencies: - "@credo-ts/core" "0.6.0" - "@openid4vc/oauth2" "^0.4.0" - "@openid4vc/openid4vci" "^0.4.0" - "@openid4vc/openid4vp" "^0.4.0" - "@openid4vc/utils" "^0.4.0" +"@credo-ts/openid4vc@0.6.1": + version "0.6.1" + resolved "https://registry.yarnpkg.com/@credo-ts/openid4vc/-/openid4vc-0.6.1.tgz#13996edce859639b1281a2905654dcd6788bf3c8" + integrity sha512-Odl1u4wnuy90dP2bI0MHIa7W8Al6+gQbG2eR1RFDAEgYmFA/0OQcqSlBSLI/YpceFBTEuzabp/7ohr0Z9GS4wA== + dependencies: + "@credo-ts/core" "0.6.1" + "@openid4vc/oauth2" "^0.4.1" + "@openid4vc/openid4vci" "^0.4.1" + "@openid4vc/openid4vp" "^0.4.1" + "@openid4vc/utils" "^0.4.1" "@types/express" "^5.0.6" class-transformer "0.5.1" express "^5.2.0" @@ -517,24 +515,24 @@ class-validator "0.14.1" tsyringe "^4.6.0" -"@credo-ts/question-answer@0.6.0": - version "0.6.0" - resolved "https://registry.yarnpkg.com/@credo-ts/question-answer/-/question-answer-0.6.0.tgz#e948fa6980744e3fa5e373ddca3357459384b72f" - integrity sha512-jxkO2e3j4NNohBnD/A8LhhDwMfGh3f1Hi3QjcCNI2lpGduceQnb/YD9E4tMJM70Id0oxGaoLKUV8vGyL47m7ZQ== +"@credo-ts/question-answer@0.6.1": + version "0.6.1" + resolved "https://registry.yarnpkg.com/@credo-ts/question-answer/-/question-answer-0.6.1.tgz#9521216116e73b0e627681659a5d1071ff6875a0" + integrity sha512-HBwlg4FWUBrhLDAvtVUxcAjSRD7NQK0H1Lulw3OkvVIIrljwxlldc8ENYJjrhfLDbhunNrD4dxKxQX7c7+Ty9w== dependencies: - "@credo-ts/core" "0.6.0" - "@credo-ts/didcomm" "0.6.0" + "@credo-ts/core" "0.6.1" + "@credo-ts/didcomm" "0.6.1" class-transformer "0.5.1" class-validator "^0.14.1" rxjs "^7.8.2" -"@credo-ts/tenants@0.6.0": - version "0.6.0" - resolved "https://registry.yarnpkg.com/@credo-ts/tenants/-/tenants-0.6.0.tgz#10f74f27980e093094c247a0a1846e5e38b2b8a7" - integrity sha512-rPPQlW4uWgmVnvd0P9HbLyHqiLeJAeQ2n+9mRE1YkCXyUzD6zysBlN49jVgc9nvlSxuxb5BiFafGJpX11I8Rmw== +"@credo-ts/tenants@0.6.1": + version "0.6.1" + resolved "https://registry.yarnpkg.com/@credo-ts/tenants/-/tenants-0.6.1.tgz#8eccb6520657b9fc01cea73e5d50049caebd0b49" + integrity sha512-UdOGPz3GNlrx5Tfj0AGiMZU9mHrZCNgQhFXs6Yae/xwHidhBNBOtEMvpjrUTHM72WJLDwVd6/mIGGzutWnoBeg== dependencies: - "@credo-ts/core" "0.6.0" - "@credo-ts/didcomm" "0.6.0" + "@credo-ts/core" "0.6.1" + "@credo-ts/didcomm" "0.6.1" async-mutex "^0.5.0" "@cspotcode/source-map-support@^0.8.0": @@ -1736,36 +1734,36 @@ table "^6.8.0" undici "^5.14.0" -"@openid4vc/oauth2@0.4.1", "@openid4vc/oauth2@^0.4.0": - version "0.4.1" - resolved "https://registry.yarnpkg.com/@openid4vc/oauth2/-/oauth2-0.4.1.tgz#550c9e55770eda2a54cbdd148096c0ff88b144eb" - integrity sha512-x2y7VF0fc02LBHrJWeEtNIgfXDt9X6w0bKUhn/aJ8aKueE/E74n+aEpW5qRMMnAKlMCryCzs5MUaoBvELZ84Lw== +"@openid4vc/oauth2@0.4.2", "@openid4vc/oauth2@^0.4.1": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@openid4vc/oauth2/-/oauth2-0.4.2.tgz#708e50d01860f6dbb221c5c9f07455428d281cbb" + integrity sha512-SUZJaa2EXS2NOsTZEhUzd4/FanGLWimi6I6R/Tqp8NOTe74hnoMixnb6U7EOOle/5FXT/YHccOqIcxC0iSAolQ== dependencies: - "@openid4vc/utils" "0.4.1" + "@openid4vc/utils" "0.4.2" zod "^4.1.13" -"@openid4vc/openid4vci@^0.4.0": - version "0.4.1" - resolved "https://registry.yarnpkg.com/@openid4vc/openid4vci/-/openid4vci-0.4.1.tgz#38d320f7c3b7e1feba4d2885a1e35f82da7ca066" - integrity sha512-abmIdog9TtjejxpKCpxKMl47qHVUEI1RO3OG3NZwsItpAxDJCnQ8CTEYuleX7dTcAtRghc0V08rNgIo+6Pf4PA== +"@openid4vc/openid4vci@^0.4.1": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@openid4vc/openid4vci/-/openid4vci-0.4.2.tgz#60287f8c63479c08b6d14849a95c3c53a50cd7eb" + integrity sha512-TAEiImvANZQKrm048hVWE8XPEUecXhXSdmTblqG6t1rxsKTWzaQcMJa2gaePhgfDkCSlIGs3CK1y3IfLOgemxA== dependencies: - "@openid4vc/oauth2" "0.4.1" - "@openid4vc/utils" "0.4.1" + "@openid4vc/oauth2" "0.4.2" + "@openid4vc/utils" "0.4.2" zod "^4.1.13" -"@openid4vc/openid4vp@^0.4.0": - version "0.4.1" - resolved "https://registry.yarnpkg.com/@openid4vc/openid4vp/-/openid4vp-0.4.1.tgz#848d632b4a2bec907c214d46a7a1d00b72c38670" - integrity sha512-6d6GpoiyIRcTa+VOqZN8F4qw/jPLLeXRaCd/znlelMTWgb7wrf64WOzCy5mS7phw3SIDYPw7SDxeGKZ0Ek+OUQ== +"@openid4vc/openid4vp@^0.4.1": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@openid4vc/openid4vp/-/openid4vp-0.4.2.tgz#51e2be1f9353c85e7a38cea72ad3d8a6cbb3b5e2" + integrity sha512-ARJjGlWheIBgcuMKhF0rvgdvfjTH82Hq4EHJjiYY0IXPPi6Z0MIPzFYKR0KVbnx4b6AO7DDULh46VRcoMyDWow== dependencies: - "@openid4vc/oauth2" "0.4.1" - "@openid4vc/utils" "0.4.1" + "@openid4vc/oauth2" "0.4.2" + "@openid4vc/utils" "0.4.2" zod "^4.1.13" -"@openid4vc/utils@0.4.1", "@openid4vc/utils@^0.4.0": - version "0.4.1" - resolved "https://registry.yarnpkg.com/@openid4vc/utils/-/utils-0.4.1.tgz#918ebaf15bb5fd9651af5d22aa3e08dd6d991003" - integrity sha512-kxEtmnzjmq1TX+RtfFZ1myGIdOO9EgPKp7cRbnhzWus//dUa+qV5zhLzLZcK0S2r9IP9QpTEd8ilCUWh9Aia+g== +"@openid4vc/utils@0.4.2", "@openid4vc/utils@^0.4.1": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@openid4vc/utils/-/utils-0.4.2.tgz#e312884b9ef32d200e912f20ee8741b6ff82b40b" + integrity sha512-D9qj7rACa5Dt62FXxO/kbZyrrZtRJGJXG6Y7nPG0w9Mmb5qnGH7eRl8weZmPt8h9/WFpNNr1F3HlKVIOAXOX6Q== dependencies: buffer "^6.0.3" zod "^4.1.13" @@ -2093,21 +2091,21 @@ resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.38.0.tgz#8b5f415395a7ddb7c8e0c7932171deb9278df1a3" integrity sha512-kocjix+/sSggfJhwXqClZ3i9Y/MI0fp7b+g7kCRm6psy2dsf8uApTRclwG18h8Avm7C9+fnt+O36PspJ/OzoWg== -"@openwallet-foundation/askar-nodejs@^0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@openwallet-foundation/askar-nodejs/-/askar-nodejs-0.3.2.tgz#344de2a4cdba7c22a4fa632581013520cc858270" - integrity sha512-kHZaPl32azKzqT/+ksRqGXNs9lxTrhbuWVuILS1HNGXA+A5vSINRA8WwDHk2KGZ9WP7jhszbPx804cfRKrrBPA== +"@openwallet-foundation/askar-nodejs@^0.4.3": + version "0.4.3" + resolved "https://registry.yarnpkg.com/@openwallet-foundation/askar-nodejs/-/askar-nodejs-0.4.3.tgz#c53a29ef29fa9ef6dddb335034556f407919bf18" + integrity sha512-+7hJaCUz/GP9hhOdbLL+9OzYgb5vILcTmSyqSGTR3Qd/ba+j5HdN3BJfgRETK4Svz1jlbEKbjRLE7RwDqEr2RA== dependencies: "@2060.io/ffi-napi" "^4.0.9" "@2060.io/ref-napi" "^3.0.6" - "@openwallet-foundation/askar-shared" "0.3.2" + "@openwallet-foundation/askar-shared" "0.4.3" ref-array-di "^1.2.2" ref-struct-di "^1.1.1" -"@openwallet-foundation/askar-shared@0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@openwallet-foundation/askar-shared/-/askar-shared-0.3.2.tgz#076e4c5bda41c075da722877a6846054c9738724" - integrity sha512-WQSHM5+5Vy1QMUpUTj0DpwFKYdciNcksWsft/iD6Ff+AdDERKo5Mjv/4JSIZIzXUEyq7kqqNbejl4a3TDGeU3A== +"@openwallet-foundation/askar-shared@0.4.3", "@openwallet-foundation/askar-shared@^0.4.3": + version "0.4.3" + resolved "https://registry.yarnpkg.com/@openwallet-foundation/askar-shared/-/askar-shared-0.4.3.tgz#e1e4576e347c922c18a3a6abd452945060bb1520" + integrity sha512-Zt9zlvjJxNs8UWlnRydZH594Lak15YPHY72VT1+iDbXh0OjTdyq6Bf0FIsh9sfFnRYIgh2zd8+VoXxZ07GjADA== dependencies: buffer "^6.0.3" tar "^7.4.3" From 925a1470375f9999aa3470698603fe2bb757b0d3 Mon Sep 17 00:00:00 2001 From: Krishna Waske Date: Mon, 15 Dec 2025 12:16:10 +0530 Subject: [PATCH 09/38] fix: some type changes Signed-off-by: Krishna Waske --- src/controllers/agent/AgentController.ts | 203 +++++++++++------------ src/controllers/types.ts | 27 +-- 2 files changed, 111 insertions(+), 119 deletions(-) diff --git a/src/controllers/agent/AgentController.ts b/src/controllers/agent/AgentController.ts index 55fd3b76..1d5b530f 100644 --- a/src/controllers/agent/AgentController.ts +++ b/src/controllers/agent/AgentController.ts @@ -1,31 +1,20 @@ -import type { RestAgentModules } from '../../cliAgent' import type { AgentInfo, AgentToken, - CustomW3cJsonLdSignCredentialOptions, SafeW3cJsonLdVerifyCredentialOptions, - SignDataOptions, - VerifyDataOptions, } from '../types' -import { assertAskarWallet } from '@credo-ts/askar/build/utils/assertAskarWallet' import { - Agent, - ClaimFormat, JsonTransformer, - Key, - TypedArrayEncoder, - W3cJsonLdSignCredentialOptions, W3cJsonLdVerifiableCredential, } from '@credo-ts/core' import { Request as Req } from 'express' import jwt from 'jsonwebtoken' -import { Controller, Delete, Get, Route, Tags, Security, Request, Post, Body, Path, Query } from 'tsoa' +import { Controller, Get, Route, Tags, Security, Request, Post, Body } from 'tsoa' import { injectable } from 'tsyringe' import { AgentRole, SCOPES } from '../../enums' import ErrorHandlingService from '../../errorHandlingService' -import { BadRequestError } from '../../errors' @Tags('Agent') @Route('/agent') @@ -39,7 +28,7 @@ export class AgentController extends Controller { public async getAgentInfo(@Request() request: Req): Promise { try { return { - label: request.agent.config.label, + label: request.agent.context.contextCorrelationId, endpoints: request.agent.modules.didcomm.config.endpoints, isInitialized: request.agent.isInitialized, publicDid: undefined, @@ -71,108 +60,108 @@ export class AgentController extends Controller { } } - /** - * Delete wallet - */ - @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) - @Delete('/wallet') - public async deleteWallet(@Request() request: Req) { - try { - const deleteWallet = await request.agent.wallet.delete() - return deleteWallet - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// /** +// * Delete wallet +// */ +// @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) +// @Delete('/wallet') +// public async deleteWallet(@Request() request: Req) { +// try { +// const deleteWallet = await request.agent.wallet.delete() +// return deleteWallet +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Verify data using a key - * - * @param tenantId Tenant identifier - * @param request Verify options - * data - Data has to be in base64 format - * publicKeyBase58 - Public key in base58 format - * signature - Signature in base64 format - * @returns isValidSignature - true if signature is valid, false otherwise - */ - @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) - @Post('/verify') - public async verify(@Request() request: Req, @Body() body: VerifyDataOptions) { - try { - assertAskarWallet(request.agent.context.wallet) - const isValidSignature = await request.agent.context.wallet.verify({ - data: TypedArrayEncoder.fromBase64(body.data), - key: Key.fromPublicKeyBase58(body.publicKeyBase58, body.keyType), - signature: TypedArrayEncoder.fromBase64(body.signature), - }) - return isValidSignature - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// /** +// * Verify data using a key +// * +// * @param tenantId Tenant identifier +// * @param request Verify options +// * data - Data has to be in base64 format +// * publicKeyBase58 - Public key in base58 format +// * signature - Signature in base64 format +// * @returns isValidSignature - true if signature is valid, false otherwise +// */ +// @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) +// @Post('/verify') +// public async verify(@Request() request: Req, @Body() body: VerifyDataOptions) { +// try { +// assertAskarWallet(request.agent.context.wallet) +// const isValidSignature = await request.agent.context.wallet.verify({ +// data: TypedArrayEncoder.fromBase64(body.data), +// key: Key.fromPublicKeyBase58(body.publicKeyBase58, body.keyType), +// signature: TypedArrayEncoder.fromBase64(body.signature), +// }) +// return isValidSignature +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - //Triage: Do we want the BW to be able to sign and verify as well? - @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) - @Post('/credential/sign') - public async signCredential( - @Request() request: Req, - @Query('storeCredential') storeCredential: boolean, - @Query('dataTypeToSign') dataTypeToSign: 'rawData' | 'jsonLd', - @Body() data: CustomW3cJsonLdSignCredentialOptions | SignDataOptions | unknown, - ) { - try { - // JSON-LD VC Signing - if (dataTypeToSign === 'jsonLd') { - const credentialData = data as unknown as W3cJsonLdSignCredentialOptions - credentialData.format = ClaimFormat.LdpVc - const signedCredential = (await request.agent.w3cCredentials.signCredential( - credentialData, - )) as W3cJsonLdVerifiableCredential - if (storeCredential) { - return await request.agent.w3cCredentials.storeCredential({ credential: signedCredential }) - } - return signedCredential.toJson() - } +// //Triage: Do we want the BW to be able to sign and verify as well? +// @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) +// @Post('/credential/sign') +// public async signCredential( +// @Request() request: Req, +// @Query('storeCredential') storeCredential: boolean, +// @Query('dataTypeToSign') dataTypeToSign: 'rawData' | 'jsonLd', +// @Body() data: CustomW3cJsonLdSignCredentialOptions | SignDataOptions | unknown, +// ) { +// try { +// // JSON-LD VC Signing +// if (dataTypeToSign === 'jsonLd') { +// const credentialData = data as unknown as W3cJsonLdSignCredentialOptions +// credentialData.format = ClaimFormat.LdpVc +// const signedCredential = (await request.agent.w3cCredentials.signCredential( +// credentialData, +// )) as W3cJsonLdVerifiableCredential +// if (storeCredential) { +// return await request.agent.w3cCredentials.storeCredential({ credential: signedCredential }) +// } +// return signedCredential.toJson() +// } - // Raw Data Signing - const rawData = data as SignDataOptions - if (!rawData.data) throw new BadRequestError('Missing "data" for raw data signing.') +// // Raw Data Signing +// const rawData = data as SignDataOptions +// if (!rawData.data) throw new BadRequestError('Missing "data" for raw data signing.') - const hasDidOrMethod = rawData.did || rawData.method - const hasPublicKey = rawData.publicKeyBase58 && rawData.keyType - if (!hasDidOrMethod && !hasPublicKey) { - throw new BadRequestError('Either (did or method) OR (publicKeyBase58 and keyType) must be provided.') - } +// const hasDidOrMethod = rawData.did || rawData.method +// const hasPublicKey = rawData.publicKeyBase58 && rawData.keyType +// if (!hasDidOrMethod && !hasPublicKey) { +// throw new BadRequestError('Either (did or method) OR (publicKeyBase58 and keyType) must be provided.') +// } - let keyToUse: Key - if (hasDidOrMethod) { - const dids = await request.agent.dids.getCreatedDids({ - method: rawData.method || undefined, - did: rawData.did || undefined, - }) - const verificationMethod = dids[0]?.didDocument?.verificationMethod?.[0]?.publicKeyBase58 - if (!verificationMethod) { - throw new BadRequestError('No publicKeyBase58 found for the given DID or method.') - } - keyToUse = Key.fromPublicKeyBase58(verificationMethod, rawData.keyType) - } else { - keyToUse = Key.fromPublicKeyBase58(rawData.publicKeyBase58, rawData.keyType) - } +// let keyToUse: Key +// if (hasDidOrMethod) { +// const dids = await request.agent.dids.getCreatedDids({ +// method: rawData.method || undefined, +// did: rawData.did || undefined, +// }) +// const verificationMethod = dids[0]?.didDocument?.verificationMethod?.[0]?.publicKeyBase58 +// if (!verificationMethod) { +// throw new BadRequestError('No publicKeyBase58 found for the given DID or method.') +// } +// keyToUse = Key.fromPublicKeyBase58(verificationMethod, rawData.keyType) +// } else { +// keyToUse = Key.fromPublicKeyBase58(rawData.publicKeyBase58, rawData.keyType) +// } - if (!keyToUse) { - throw new Error('Unable to construct signing key. ') - } +// if (!keyToUse) { +// throw new Error('Unable to construct signing key. ') +// } - const signature = await request.agent.context.wallet.sign({ - data: TypedArrayEncoder.fromBase64(rawData.data), - key: keyToUse, - }) +// const signature = await request.agent.context.wallet.sign({ +// data: TypedArrayEncoder.fromBase64(rawData.data), +// key: keyToUse, +// }) - return TypedArrayEncoder.toBase64(signature) - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// return TypedArrayEncoder.toBase64(signature) +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) @Post('/credential/verify') diff --git a/src/controllers/types.ts b/src/controllers/types.ts index 32005d73..3c9737cf 100644 --- a/src/controllers/types.ts +++ b/src/controllers/types.ts @@ -1,13 +1,12 @@ import type { RecordId } from './examples' import type { CustomHandshakeProtocol } from '../enums' -import type { AnonCredsCredentialDefinitionRecord, AnonCredsDidCommCredentialFormat, LegacyIndyCredentialFormat } from '@credo-ts/anoncreds' +import type { AnonCredsDidCommCredentialFormat, LegacyIndyCredentialFormat } from '@credo-ts/anoncreds' import type { DidResolutionMetadata, DidDocumentMetadata, DidRegistrationExtraOptions, DidDocument, DidRegistrationSecretOptions, - InitConfig, DidResolutionOptions, JsonObject, W3cJsonLdVerifyCredentialOptions, @@ -16,7 +15,6 @@ import type { W3cCredential, W3cCredentialSubject, X509CertificateIssuerAndSubjectOptions, - X509CreateCertificateOptions, SingleOrArray, } from '@credo-ts/core' @@ -36,8 +34,7 @@ import type { DidCommAttachment, } from '@credo-ts/didcomm' import type { DIDDocument } from 'did-resolver' -import { KeyType } from '@credo-ts/core/build/crypto/webcrypto/types.mjs' -import { LinkedDataProofOptions } from '@credo-ts/core/build/modules/vc/data-integrity/models/LinkedDataProof.mjs' +import { KeyAlgorithm } from '@openwallet-foundation/askar-nodejs' export type CustomTenantConfig = {label: string} & { connectionImageUrl?: string @@ -206,7 +203,7 @@ export interface ReceiveInvitationByUrlProps extends ReceiveOutOfBandInvitationP export interface AcceptInvitationConfig { autoAcceptConnection?: boolean reuseConnection?: boolean - label?: string + label: string alias?: string imageUrl?: string mediatorId?: string @@ -295,7 +292,8 @@ export interface ResolvedDid { } export interface DidCreate { - keyType?: KeyType + // FIXME: Check type + keyType?: KeyAlgorithm seed?: string domain?: string method: string @@ -398,7 +396,8 @@ export type ThreadId = string export type SignDataOptions = { data: string - keyType: KeyType + // FIXME: Check type + keyType: any publicKeyBase58: string did?: string method?: string @@ -406,7 +405,8 @@ export type SignDataOptions = { export type VerifyDataOptions = { data: string - keyType: KeyType + // FIXME: Check type + keyType: any publicKeyBase58: string signature: string } @@ -425,7 +425,8 @@ export interface credentialPayloadToSign { } export interface SafeW3cJsonLdVerifyCredentialOptions extends W3cJsonLdVerifyCredentialOptions { // Ommited due to issues with TSOA - proof: SingleOrArray | DataIntegrityProofOptions> + // FIXME: Check type + proof: SingleOrArray } export type ExtensibleW3cCredentialSubject = W3cCredentialSubject & { @@ -448,7 +449,8 @@ export type DisclosureFrame = { export interface BasicX509CreateCertificateConfig extends X509CertificateIssuerAndSubjectOptions { - keyType: KeyType; + // FIXME: Check type + keyType: any; issuerAlternativeNameURL: string; } @@ -464,5 +466,6 @@ export interface X509ImportCertificateOptionsDto { */ privateKey?: string; - keyType: KeyType; + // FIXME: Check type + keyType: any; } \ No newline at end of file From ee543c9e9b4772f32517a070f8ceae09ab5d3013 Mon Sep 17 00:00:00 2001 From: Krishna Waske Date: Mon, 15 Dec 2025 12:18:52 +0530 Subject: [PATCH 10/38] fix: comment controller for agent to start Signed-off-by: Krishna Waske --- .../CredentialDefinitionController.ts | 258 ++--- .../EndorserTransactionController.ts | 380 +++---- .../anoncreds/schema/SchemaController.ts | 222 ++-- src/controllers/did/DidController.ts | 957 ++++++++++-------- .../basic-messages/BasicMessageController.ts | 108 +- .../credentials/CredentialController.ts | 606 +++++------ .../didcomm/proofs/ProofController.ts | 520 +++++----- .../openid4vc/holder/holder.Controller.ts | 172 ++-- .../openid4vc/holder/holder.service.ts | 501 ++++----- .../issuance-sessions.Controller.ts | 198 ++-- .../issuance-sessions.service.ts | 276 ++--- .../openid4vc/issuers/issuer.Controller.ts | 202 ++-- .../openid4vc/issuers/issuer.service.ts | 114 +-- .../verification-sessions.Controller.ts | 166 +-- .../verification-sessions.service.ts | 416 ++++---- .../verifiers/verifier.Controller.ts | 112 +- .../openid4vc/verifiers/verifier.service.ts | 114 +-- src/controllers/polygon/PolygonController.ts | 274 ++--- src/controllers/x509/x509.Controller.ts | 144 +-- src/controllers/x509/x509.service.ts | 439 ++++---- src/controllers/x509/x509.types.ts | 6 +- 21 files changed, 3156 insertions(+), 3029 deletions(-) diff --git a/src/controllers/anoncreds/cred-def/CredentialDefinitionController.ts b/src/controllers/anoncreds/cred-def/CredentialDefinitionController.ts index 4c643bba..57f47061 100644 --- a/src/controllers/anoncreds/cred-def/CredentialDefinitionController.ts +++ b/src/controllers/anoncreds/cred-def/CredentialDefinitionController.ts @@ -1,142 +1,142 @@ -import type { RestAgentModules } from '../../../cliAgent' -import type { SchemaId } from '../../examples' +// import type { RestAgentModules } from '../../../cliAgent' +// import type { SchemaId } from '../../examples' -import { getUnqualifiedCredentialDefinitionId, parseIndyCredentialDefinitionId } from '@credo-ts/anoncreds' -import { Agent } from '@credo-ts/core' -import { Request as Req } from 'express' -import { Body, Controller, Example, Get, Path, Post, Route, Tags, Security, Response, Request } from 'tsoa' -import { injectable } from 'tsyringe' +// import { getUnqualifiedCredentialDefinitionId, parseIndyCredentialDefinitionId } from '@credo-ts/anoncreds' +// import { Agent } from '@credo-ts/core' +// import { Request as Req } from 'express' +// import { Body, Controller, Example, Get, Path, Post, Route, Tags, Security, Response, Request } from 'tsoa' +// import { injectable } from 'tsyringe' -import { CredentialEnum, EndorserMode, SchemaError, SCOPES } from '../../../enums' -import ErrorHandlingService from '../../../errorHandlingService' -import { ENDORSER_DID_NOT_PRESENT } from '../../../errorMessages' -import { BadRequestError, InternalServerError, NotFoundError } from '../../../errors/errors' -import { CredentialDefinitionExample, CredentialDefinitionId } from '../../examples' +// import { CredentialEnum, EndorserMode, SchemaError, SCOPES } from '../../../enums' +// import ErrorHandlingService from '../../../errorHandlingService' +// import { ENDORSER_DID_NOT_PRESENT } from '../../../errorMessages' +// import { BadRequestError, InternalServerError, NotFoundError } from '../../../errors/errors' +// import { CredentialDefinitionExample, CredentialDefinitionId } from '../../examples' -@Tags('Anoncreds - Credential Definitions') -@Route('/anoncreds/credential-definitions') -@Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) -@injectable() -export class CredentialDefinitionController extends Controller { - /** - * Retrieve credential definition by credential definition id - * - * @param credentialDefinitionId - * @returns CredDef - */ - @Example(CredentialDefinitionExample) - @Get('/:credentialDefinitionId') - public async getCredentialDefinitionById( - @Request() request: Req, - @Path('credentialDefinitionId') credentialDefinitionId: CredentialDefinitionId, - ) { - try { - const credentialDefinitionResult = - await request.agent.modules.anoncreds.getCredentialDefinition(credentialDefinitionId) +// @Tags('Anoncreds - Credential Definitions') +// @Route('/anoncreds/credential-definitions') +// @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) +// @injectable() +// export class CredentialDefinitionController extends Controller { +// /** +// * Retrieve credential definition by credential definition id +// * +// * @param credentialDefinitionId +// * @returns CredDef +// */ +// @Example(CredentialDefinitionExample) +// @Get('/:credentialDefinitionId') +// public async getCredentialDefinitionById( +// @Request() request: Req, +// @Path('credentialDefinitionId') credentialDefinitionId: CredentialDefinitionId, +// ) { +// try { +// const credentialDefinitionResult = +// await request.agent.modules.anoncreds.getCredentialDefinition(credentialDefinitionId) - if (credentialDefinitionResult.resolutionMetadata?.error === SchemaError.NotFound) { - throw new NotFoundError(credentialDefinitionResult.resolutionMetadata.message) - } - const error = credentialDefinitionResult.resolutionMetadata?.error +// if (credentialDefinitionResult.resolutionMetadata?.error === SchemaError.NotFound) { +// throw new NotFoundError(credentialDefinitionResult.resolutionMetadata.message) +// } +// const error = credentialDefinitionResult.resolutionMetadata?.error - if (error === 'invalid' || error === SchemaError.UnSupportedAnonCredsMethod) { - throw new BadRequestError(credentialDefinitionResult.resolutionMetadata.message) - } +// if (error === 'invalid' || error === SchemaError.UnSupportedAnonCredsMethod) { +// throw new BadRequestError(credentialDefinitionResult.resolutionMetadata.message) +// } - if (error !== undefined || credentialDefinitionResult.credentialDefinition === undefined) { - throw new InternalServerError(credentialDefinitionResult.resolutionMetadata.message) - } +// if (error !== undefined || credentialDefinitionResult.credentialDefinition === undefined) { +// throw new InternalServerError(credentialDefinitionResult.resolutionMetadata.message) +// } - return credentialDefinitionResult - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// return credentialDefinitionResult +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Creates a new credential definition. - * - * @param credentialDefinitionRequest - * @returns CredDef - */ - @Example(CredentialDefinitionExample) - @Response(200, 'Action required') - @Response(202, 'Wait for action to complete') - @Post('/') - public async createCredentialDefinition( - @Request() request: Req, - @Body() - credentialDefinitionRequest: { - issuerId: string - schemaId: SchemaId - tag: string - endorse?: boolean - endorserDid?: string - }, - ) { - try { - const { issuerId, schemaId, tag, endorse, endorserDid } = credentialDefinitionRequest - credentialDefinitionRequest.endorse = credentialDefinitionRequest.endorse - ? credentialDefinitionRequest.endorse - : false - const credDef = { - issuerId, - schemaId, - tag, - type: 'CL', - } - const credentialDefinitionPayload = { - credentialDefinition: credDef, - options: { - endorserMode: '', - endorserDid: '', - supportRevocation: false, - }, - } - if (!endorse) { - credentialDefinitionPayload.options.endorserMode = EndorserMode.Internal - credentialDefinitionPayload.options.endorserDid = issuerId - } else { - if (!endorserDid) { - throw new BadRequestError(ENDORSER_DID_NOT_PRESENT) - } - credentialDefinitionPayload.options.endorserMode = EndorserMode.External - credentialDefinitionPayload.options.endorserDid = endorserDid ? endorserDid : '' - } +// /** +// * Creates a new credential definition. +// * +// * @param credentialDefinitionRequest +// * @returns CredDef +// */ +// @Example(CredentialDefinitionExample) +// @Response(200, 'Action required') +// @Response(202, 'Wait for action to complete') +// @Post('/') +// public async createCredentialDefinition( +// @Request() request: Req, +// @Body() +// credentialDefinitionRequest: { +// issuerId: string +// schemaId: SchemaId +// tag: string +// endorse?: boolean +// endorserDid?: string +// }, +// ) { +// try { +// const { issuerId, schemaId, tag, endorse, endorserDid } = credentialDefinitionRequest +// credentialDefinitionRequest.endorse = credentialDefinitionRequest.endorse +// ? credentialDefinitionRequest.endorse +// : false +// const credDef = { +// issuerId, +// schemaId, +// tag, +// type: 'CL', +// } +// const credentialDefinitionPayload = { +// credentialDefinition: credDef, +// options: { +// endorserMode: '', +// endorserDid: '', +// supportRevocation: false, +// }, +// } +// if (!endorse) { +// credentialDefinitionPayload.options.endorserMode = EndorserMode.Internal +// credentialDefinitionPayload.options.endorserDid = issuerId +// } else { +// if (!endorserDid) { +// throw new BadRequestError(ENDORSER_DID_NOT_PRESENT) +// } +// credentialDefinitionPayload.options.endorserMode = EndorserMode.External +// credentialDefinitionPayload.options.endorserDid = endorserDid ? endorserDid : '' +// } - const registerCredentialDefinitionResult = - await request.agent.modules.anoncreds.registerCredentialDefinition(credentialDefinitionPayload) +// const registerCredentialDefinitionResult = +// await request.agent.modules.anoncreds.registerCredentialDefinition(credentialDefinitionPayload) - if (registerCredentialDefinitionResult.credentialDefinitionState.state === CredentialEnum.Failed) { - throw new InternalServerError('Falied to register credef on ledger') - } +// if (registerCredentialDefinitionResult.credentialDefinitionState.state === CredentialEnum.Failed) { +// throw new InternalServerError('Falied to register credef on ledger') +// } - if (registerCredentialDefinitionResult.credentialDefinitionState.state === CredentialEnum.Wait) { - // The request has been accepted for processing, but the processing has not been completed. - this.setStatus(202) - return registerCredentialDefinitionResult - } +// if (registerCredentialDefinitionResult.credentialDefinitionState.state === CredentialEnum.Wait) { +// // The request has been accepted for processing, but the processing has not been completed. +// this.setStatus(202) +// return registerCredentialDefinitionResult +// } - if (registerCredentialDefinitionResult.credentialDefinitionState.state === CredentialEnum.Action) { - return registerCredentialDefinitionResult - } +// if (registerCredentialDefinitionResult.credentialDefinitionState.state === CredentialEnum.Action) { +// return registerCredentialDefinitionResult +// } - // TODO: Return uniform response for both Internally and Externally endorsed Schemas - if (!endorse) { - const indyCredDefId = parseIndyCredentialDefinitionId( - registerCredentialDefinitionResult.credentialDefinitionState.credentialDefinitionId as string, - ) - const getCredentialDefinitionId = await getUnqualifiedCredentialDefinitionId( - indyCredDefId.namespaceIdentifier, - indyCredDefId.schemaSeqNo, - indyCredDefId.tag, - ) - registerCredentialDefinitionResult.credentialDefinitionState.credentialDefinitionId = getCredentialDefinitionId - return registerCredentialDefinitionResult.credentialDefinitionState - } - return registerCredentialDefinitionResult - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } -} +// // TODO: Return uniform response for both Internally and Externally endorsed Schemas +// if (!endorse) { +// const indyCredDefId = parseIndyCredentialDefinitionId( +// registerCredentialDefinitionResult.credentialDefinitionState.credentialDefinitionId as string, +// ) +// const getCredentialDefinitionId = await getUnqualifiedCredentialDefinitionId( +// indyCredDefId.namespaceIdentifier, +// indyCredDefId.schemaSeqNo, +// indyCredDefId.tag, +// ) +// registerCredentialDefinitionResult.credentialDefinitionState.credentialDefinitionId = getCredentialDefinitionId +// return registerCredentialDefinitionResult.credentialDefinitionState +// } +// return registerCredentialDefinitionResult +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } +// } diff --git a/src/controllers/anoncreds/endorser-transaction/EndorserTransactionController.ts b/src/controllers/anoncreds/endorser-transaction/EndorserTransactionController.ts index fb0ff621..cbe41fb0 100644 --- a/src/controllers/anoncreds/endorser-transaction/EndorserTransactionController.ts +++ b/src/controllers/anoncreds/endorser-transaction/EndorserTransactionController.ts @@ -1,203 +1,203 @@ -import type { IndyVdrDidCreateOptions } from '@credo-ts/indy-vdr' +// import type { IndyVdrDidCreateOptions } from '@credo-ts/indy-vdr' -import { - getUnqualifiedCredentialDefinitionId, - getUnqualifiedSchemaId, - parseIndyCredentialDefinitionId, - parseIndySchemaId, -} from '@credo-ts/anoncreds' -import { Request as Req } from 'express' -import { Body, Controller, Post, Route, Tags, Security, Request } from 'tsoa' -import { injectable } from 'tsyringe' +// import { +// getUnqualifiedCredentialDefinitionId, +// getUnqualifiedSchemaId, +// parseIndyCredentialDefinitionId, +// parseIndySchemaId, +// } from '@credo-ts/anoncreds' +// import { Request as Req } from 'express' +// import { Body, Controller, Post, Route, Tags, Security, Request } from 'tsoa' +// import { injectable } from 'tsyringe' -import { CredentialEnum, EndorserMode, SCOPES } from '../../../enums' -import ErrorHandlingService from '../../../errorHandlingService' -import { BadRequestError } from '../../../errors' -import { AgentType } from '../../../types' -import { DidNymTransaction, EndorserTransaction, WriteTransaction } from '../../types' +// import { CredentialEnum, EndorserMode, SCOPES } from '../../../enums' +// import ErrorHandlingService from '../../../errorHandlingService' +// import { BadRequestError } from '../../../errors' +// import { AgentType } from '../../../types' +// import { DidNymTransaction, EndorserTransaction, WriteTransaction } from '../../types' -@Tags('Anoncreds - EndorserTransaction') -@Route('/anoncreds/transactions') -@Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) -@injectable() -export class EndorserTransactionController extends Controller { - @Post('/endorse') - public async endorserTransaction(@Request() request: Req, @Body() endorserTransaction: EndorserTransaction) { - try { - if (!endorserTransaction.transaction) { - throw new BadRequestError('Transaction is required') - } - if (!endorserTransaction.endorserDid) { - throw new BadRequestError('EndorserDid is required') - } - const signedTransaction = await request.agent.modules.indyVdr.endorseTransaction( - endorserTransaction.transaction, - endorserTransaction.endorserDid, - ) +// @Tags('Anoncreds - EndorserTransaction') +// @Route('/anoncreds/transactions') +// @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) +// @injectable() +// export class EndorserTransactionController extends Controller { +// @Post('/endorse') +// public async endorserTransaction(@Request() request: Req, @Body() endorserTransaction: EndorserTransaction) { +// try { +// if (!endorserTransaction.transaction) { +// throw new BadRequestError('Transaction is required') +// } +// if (!endorserTransaction.endorserDid) { +// throw new BadRequestError('EndorserDid is required') +// } +// const signedTransaction = await request.agent.modules.indyVdr.endorseTransaction( +// endorserTransaction.transaction, +// endorserTransaction.endorserDid, +// ) - return { signedTransaction } - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// return { signedTransaction } +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - @Post('/set-endorser-role') - public async didNymTransaction(@Request() request: Req, @Body() didNymTransaction: DidNymTransaction) { - try { - const didCreateSubmitResult = await request.agent.dids.create({ - did: didNymTransaction.did, - options: { - endorserMode: EndorserMode.External, - endorsedTransaction: { - nymRequest: didNymTransaction.nymRequest, - }, - }, - }) +// @Post('/set-endorser-role') +// public async didNymTransaction(@Request() request: Req, @Body() didNymTransaction: DidNymTransaction) { +// try { +// const didCreateSubmitResult = await request.agent.dids.create({ +// did: didNymTransaction.did, +// options: { +// endorserMode: EndorserMode.External, +// endorsedTransaction: { +// nymRequest: didNymTransaction.nymRequest, +// }, +// }, +// }) - // Importing did in accordance to the multi-tenant flow - await request.agent.dids.import({ - did: didNymTransaction.did, - overwrite: true, - }) +// // Importing did in accordance to the multi-tenant flow +// await request.agent.dids.import({ +// did: didNymTransaction.did, +// overwrite: true, +// }) - return didCreateSubmitResult - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// return didCreateSubmitResult +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - @Post('/write') - public async writeSchemaAndCredDefOnLedger( - @Request() request: Req, - @Body() - writeTransaction: WriteTransaction, - ) { - try { - if (writeTransaction.schema) { - const writeSchema = await this.submitSchemaOnLedger( - request.agent, - writeTransaction.schema, - writeTransaction.endorsedTransaction, - ) - return writeSchema - } else if (writeTransaction.credentialDefinition) { - const writeCredDef = await this.submitCredDefOnLedger( - request.agent, - writeTransaction.credentialDefinition, - writeTransaction.endorsedTransaction, - ) - return writeCredDef - } else { - throw new Error('Please provide valid schema or credential-def!') - } - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// @Post('/write') +// public async writeSchemaAndCredDefOnLedger( +// @Request() request: Req, +// @Body() +// writeTransaction: WriteTransaction, +// ) { +// try { +// if (writeTransaction.schema) { +// const writeSchema = await this.submitSchemaOnLedger( +// request.agent, +// writeTransaction.schema, +// writeTransaction.endorsedTransaction, +// ) +// return writeSchema +// } else if (writeTransaction.credentialDefinition) { +// const writeCredDef = await this.submitCredDefOnLedger( +// request.agent, +// writeTransaction.credentialDefinition, +// writeTransaction.endorsedTransaction, +// ) +// return writeCredDef +// } else { +// throw new Error('Please provide valid schema or credential-def!') +// } +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - public async submitSchemaOnLedger( - agent: AgentType, - schema: { - issuerId: string - name: string - version: string - attributes: string[] - }, - endorsedTransaction?: string, - ) { - if (!schema.issuerId) { - throw new BadRequestError('IssuerId is required') - } - if (!schema.name) { - throw new BadRequestError('Name is required') - } - if (!schema.version) { - throw new BadRequestError('Version is required') - } - if (!schema.attributes) { - throw new BadRequestError('Attributes is required') - } - const { issuerId, name, version, attributes } = schema - const { schemaState } = await agent.modules.anoncreds.registerSchema({ - options: { - endorserMode: EndorserMode.External, - endorsedTransaction, - }, - schema: { - attrNames: attributes, - issuerId: issuerId, - name: name, - version: version, - }, - }) +// public async submitSchemaOnLedger( +// agent: AgentType, +// schema: { +// issuerId: string +// name: string +// version: string +// attributes: string[] +// }, +// endorsedTransaction?: string, +// ) { +// if (!schema.issuerId) { +// throw new BadRequestError('IssuerId is required') +// } +// if (!schema.name) { +// throw new BadRequestError('Name is required') +// } +// if (!schema.version) { +// throw new BadRequestError('Version is required') +// } +// if (!schema.attributes) { +// throw new BadRequestError('Attributes is required') +// } +// const { issuerId, name, version, attributes } = schema +// const { schemaState } = await agent.modules.anoncreds.registerSchema({ +// options: { +// endorserMode: EndorserMode.External, +// endorsedTransaction, +// }, +// schema: { +// attrNames: attributes, +// issuerId: issuerId, +// name: name, +// version: version, +// }, +// }) - if (!schemaState.schemaId) { - throw new Error('Schema not created') - } - const indySchemaId = parseIndySchemaId(schemaState.schemaId) - const getSchemaUnqualifiedId = await getUnqualifiedSchemaId( - indySchemaId.namespaceIdentifier, - indySchemaId.schemaName, - indySchemaId.schemaVersion, - ) - if (schemaState.state === CredentialEnum.Finished || schemaState.state === CredentialEnum.Action) { - schemaState.schemaId = getSchemaUnqualifiedId - } - return schemaState - } +// if (!schemaState.schemaId) { +// throw new Error('Schema not created') +// } +// const indySchemaId = parseIndySchemaId(schemaState.schemaId) +// const getSchemaUnqualifiedId = await getUnqualifiedSchemaId( +// indySchemaId.namespaceIdentifier, +// indySchemaId.schemaName, +// indySchemaId.schemaVersion, +// ) +// if (schemaState.state === CredentialEnum.Finished || schemaState.state === CredentialEnum.Action) { +// schemaState.schemaId = getSchemaUnqualifiedId +// } +// return schemaState +// } - public async submitCredDefOnLedger( - agent: AgentType, - credentialDefinition: { - schemaId: string - issuerId: string - tag: string - value: unknown - type: string - }, - endorsedTransaction?: string, - ) { - if (!credentialDefinition.schemaId) { - throw new BadRequestError('SchemaId is required') - } - if (!credentialDefinition.issuerId) { - throw new BadRequestError('IssuerId is required') - } - if (!credentialDefinition.tag) { - throw new BadRequestError('Tag is required') - } - if (!credentialDefinition.value) { - throw new BadRequestError('Value is required') - } - if (!credentialDefinition.type) { - throw new BadRequestError('Type is required') - } - const { credentialDefinitionState } = await agent.modules.anoncreds.registerCredentialDefinition({ - credentialDefinition, - options: { - endorserMode: EndorserMode.External, - endorsedTransaction: endorsedTransaction, - // Keep false for now - supportRevocation: false, - }, - }) +// public async submitCredDefOnLedger( +// agent: AgentType, +// credentialDefinition: { +// schemaId: string +// issuerId: string +// tag: string +// value: unknown +// type: string +// }, +// endorsedTransaction?: string, +// ) { +// if (!credentialDefinition.schemaId) { +// throw new BadRequestError('SchemaId is required') +// } +// if (!credentialDefinition.issuerId) { +// throw new BadRequestError('IssuerId is required') +// } +// if (!credentialDefinition.tag) { +// throw new BadRequestError('Tag is required') +// } +// if (!credentialDefinition.value) { +// throw new BadRequestError('Value is required') +// } +// if (!credentialDefinition.type) { +// throw new BadRequestError('Type is required') +// } +// const { credentialDefinitionState } = await agent.modules.anoncreds.registerCredentialDefinition({ +// credentialDefinition, +// options: { +// endorserMode: EndorserMode.External, +// endorsedTransaction: endorsedTransaction, +// // Keep false for now +// supportRevocation: false, +// }, +// }) - if (!credentialDefinitionState.credentialDefinitionId) { - throw Error('Credential Definition Id not found') - } +// if (!credentialDefinitionState.credentialDefinitionId) { +// throw Error('Credential Definition Id not found') +// } - const indyCredDefId = parseIndyCredentialDefinitionId(credentialDefinitionState.credentialDefinitionId) - const getCredentialDefinitionId = await getUnqualifiedCredentialDefinitionId( - indyCredDefId.namespaceIdentifier, - indyCredDefId.schemaSeqNo, - indyCredDefId.tag, - ) - if ( - credentialDefinitionState.state === CredentialEnum.Finished || - credentialDefinitionState.state === CredentialEnum.Action - ) { - credentialDefinitionState.credentialDefinitionId = getCredentialDefinitionId - } - return credentialDefinitionState - } -} +// const indyCredDefId = parseIndyCredentialDefinitionId(credentialDefinitionState.credentialDefinitionId) +// const getCredentialDefinitionId = await getUnqualifiedCredentialDefinitionId( +// indyCredDefId.namespaceIdentifier, +// indyCredDefId.schemaSeqNo, +// indyCredDefId.tag, +// ) +// if ( +// credentialDefinitionState.state === CredentialEnum.Finished || +// credentialDefinitionState.state === CredentialEnum.Action +// ) { +// credentialDefinitionState.credentialDefinitionId = getCredentialDefinitionId +// } +// return credentialDefinitionState +// } +// } diff --git a/src/controllers/anoncreds/schema/SchemaController.ts b/src/controllers/anoncreds/schema/SchemaController.ts index e72fd2aa..7a1e8577 100644 --- a/src/controllers/anoncreds/schema/SchemaController.ts +++ b/src/controllers/anoncreds/schema/SchemaController.ts @@ -1,125 +1,125 @@ -import { getUnqualifiedSchemaId, parseIndySchemaId } from '@credo-ts/anoncreds' -import { Request as Req } from 'express' -import { Example, Get, Post, Route, Tags, Security, Path, Body, Controller, Request } from 'tsoa' -import { injectable } from 'tsyringe' +// import { getUnqualifiedSchemaId, parseIndySchemaId } from '@credo-ts/anoncreds' +// import { Request as Req } from 'express' +// import { Example, Get, Post, Route, Tags, Security, Path, Body, Controller, Request } from 'tsoa' +// import { injectable } from 'tsyringe' -import { CredentialEnum, EndorserMode, SchemaError, SCOPES } from '../../../enums' -import ErrorHandlingService from '../../../errorHandlingService' -import { ENDORSER_DID_NOT_PRESENT } from '../../../errorMessages' -import { BadRequestError, InternalServerError, NotFoundError } from '../../../errors/errors' -import { CreateSchemaSuccessful, SchemaExample, SchemaId } from '../../examples' -import { CreateSchemaInput } from '../../types' +// import { CredentialEnum, EndorserMode, SchemaError, SCOPES } from '../../../enums' +// import ErrorHandlingService from '../../../errorHandlingService' +// import { ENDORSER_DID_NOT_PRESENT } from '../../../errorMessages' +// import { BadRequestError, InternalServerError, NotFoundError } from '../../../errors/errors' +// import { CreateSchemaSuccessful, SchemaExample, SchemaId } from '../../examples' +// import { CreateSchemaInput } from '../../types' -@Tags('Anoncreds - Schemas') -@Route('/anoncreds/schemas') -@Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) -@injectable() -export class SchemaController extends Controller { - /** - * Get schema by schemaId - * @param schemaId - * @param notFoundErrormessage - * @param forbiddenError - * @param badRequestError - * @param internalServerError - * @returns get schema by Id - */ - @Example(SchemaExample) - @Get('/:schemaId') - public async getSchemaById(@Request() request: Req, @Path('schemaId') schemaId: SchemaId) { - try { - const schemBySchemaId = await request.agent.modules.anoncreds.getSchema(schemaId) +// @Tags('Anoncreds - Schemas') +// @Route('/anoncreds/schemas') +// @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) +// @injectable() +// export class SchemaController extends Controller { +// /** +// * Get schema by schemaId +// * @param schemaId +// * @param notFoundErrormessage +// * @param forbiddenError +// * @param badRequestError +// * @param internalServerError +// * @returns get schema by Id +// */ +// @Example(SchemaExample) +// @Get('/:schemaId') +// public async getSchemaById(@Request() request: Req, @Path('schemaId') schemaId: SchemaId) { +// try { +// const schemBySchemaId = await request.agent.modules.anoncreds.getSchema(schemaId) - if ( - (schemBySchemaId && - schemBySchemaId?.resolutionMetadata && - schemBySchemaId?.resolutionMetadata?.error === SchemaError.NotFound) || - schemBySchemaId?.resolutionMetadata?.error === SchemaError.UnSupportedAnonCredsMethod - ) { - throw new NotFoundError( - schemBySchemaId?.resolutionMetadata?.message || `schema details with schema id "${schemaId}" not found.`, - ) - } +// if ( +// (schemBySchemaId && +// schemBySchemaId?.resolutionMetadata && +// schemBySchemaId?.resolutionMetadata?.error === SchemaError.NotFound) || +// schemBySchemaId?.resolutionMetadata?.error === SchemaError.UnSupportedAnonCredsMethod +// ) { +// throw new NotFoundError( +// schemBySchemaId?.resolutionMetadata?.message || `schema details with schema id "${schemaId}" not found.`, +// ) +// } - return schemBySchemaId - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// return schemBySchemaId +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Create schema - * @param schema - * @param notFoundError - * @param forbiddenError - * @param badRequestError - * @param internalServerError - * @returns get schema - */ - @Post('/') - @Example(CreateSchemaSuccessful) - public async createSchema(@Request() request: Req, @Body() schema: CreateSchemaInput) { - try { - const { issuerId, name, version, attributes } = schema +// /** +// * Create schema +// * @param schema +// * @param notFoundError +// * @param forbiddenError +// * @param badRequestError +// * @param internalServerError +// * @returns get schema +// */ +// @Post('/') +// @Example(CreateSchemaSuccessful) +// public async createSchema(@Request() request: Req, @Body() schema: CreateSchemaInput) { +// try { +// const { issuerId, name, version, attributes } = schema - const schemaPayload = { - issuerId, - name, - version, - attrNames: attributes, - } - const createSchemaPayload = { - schema: schemaPayload, - options: { - endorserMode: '', - endorserDid: '', - }, - } +// const schemaPayload = { +// issuerId, +// name, +// version, +// attrNames: attributes, +// } +// const createSchemaPayload = { +// schema: schemaPayload, +// options: { +// endorserMode: '', +// endorserDid: '', +// }, +// } - if (!schema.endorse) { - createSchemaPayload.options.endorserMode = EndorserMode.Internal - createSchemaPayload.options.endorserDid = issuerId - } else { - if (!schema.endorserDid) { - throw new BadRequestError(ENDORSER_DID_NOT_PRESENT) - } - createSchemaPayload.options.endorserMode = EndorserMode.External - createSchemaPayload.options.endorserDid = schema.endorserDid - } +// if (!schema.endorse) { +// createSchemaPayload.options.endorserMode = EndorserMode.Internal +// createSchemaPayload.options.endorserDid = issuerId +// } else { +// if (!schema.endorserDid) { +// throw new BadRequestError(ENDORSER_DID_NOT_PRESENT) +// } +// createSchemaPayload.options.endorserMode = EndorserMode.External +// createSchemaPayload.options.endorserDid = schema.endorserDid +// } - const createSchemaTxResult = await request.agent.modules.anoncreds.registerSchema(createSchemaPayload) +// const createSchemaTxResult = await request.agent.modules.anoncreds.registerSchema(createSchemaPayload) - if (createSchemaTxResult.schemaState.state === CredentialEnum.Failed) { - throw new InternalServerError(`Schema creation failed. Reason: ${createSchemaTxResult.schemaState.reason}`) - } +// if (createSchemaTxResult.schemaState.state === CredentialEnum.Failed) { +// throw new InternalServerError(`Schema creation failed. Reason: ${createSchemaTxResult.schemaState.reason}`) +// } - if (createSchemaTxResult.schemaState.state === CredentialEnum.Wait) { - this.setStatus(202) - return createSchemaTxResult - } +// if (createSchemaTxResult.schemaState.state === CredentialEnum.Wait) { +// this.setStatus(202) +// return createSchemaTxResult +// } - if (createSchemaTxResult.schemaState.state === CredentialEnum.Action) { - return createSchemaTxResult - } +// if (createSchemaTxResult.schemaState.state === CredentialEnum.Action) { +// return createSchemaTxResult +// } - if (createSchemaTxResult.schemaState.state === CredentialEnum.Finished) { - // TODO: Return uniform response for both Internally and Externally endorsed Schemas - if (!schema.endorse) { - const indySchemaId = parseIndySchemaId(createSchemaTxResult.schemaState.schemaId as string) +// if (createSchemaTxResult.schemaState.state === CredentialEnum.Finished) { +// // TODO: Return uniform response for both Internally and Externally endorsed Schemas +// if (!schema.endorse) { +// const indySchemaId = parseIndySchemaId(createSchemaTxResult.schemaState.schemaId as string) - const getSchemaUnqualifiedId = await getUnqualifiedSchemaId( - indySchemaId.namespaceIdentifier, - indySchemaId.schemaName, - indySchemaId.schemaVersion, - ) +// const getSchemaUnqualifiedId = await getUnqualifiedSchemaId( +// indySchemaId.namespaceIdentifier, +// indySchemaId.schemaName, +// indySchemaId.schemaVersion, +// ) - createSchemaTxResult.schemaState.schemaId = getSchemaUnqualifiedId - return createSchemaTxResult.schemaState - } - return createSchemaTxResult - } - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } -} +// createSchemaTxResult.schemaState.schemaId = getSchemaUnqualifiedId +// return createSchemaTxResult.schemaState +// } +// return createSchemaTxResult +// } +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } +// } diff --git a/src/controllers/did/DidController.ts b/src/controllers/did/DidController.ts index 8441d148..193ee075 100644 --- a/src/controllers/did/DidController.ts +++ b/src/controllers/did/DidController.ts @@ -3,13 +3,13 @@ import type { PolygonDidCreateOptions } from '@ayanworks/credo-polygon-w3c-modul import type { DidDocument, KeyDidCreateOptions, PeerDidNumAlgo2CreateOptions } from '@credo-ts/core' import { - KeyType, - TypedArrayEncoder, - DidDocumentBuilder, - getEd25519VerificationKey2018, - getBls12381G2Key2020, - createPeerDidDocumentFromServices, - PeerDidNumAlgo, + TypedArrayEncoder, + DidDocumentBuilder, + getEd25519VerificationKey2018, + createPeerDidDocumentFromServices, + PeerDidNumAlgo, + Kms, + Hasher, } from '@credo-ts/core' import axios from 'axios' import { Request as Req } from 'express' @@ -22,463 +22,586 @@ import { BadRequestError, InternalServerError } from '../../errors' import { AgentType } from '../../types' import { CreateDidResponse, Did, DidRecordExample } from '../examples' import { DidCreate } from '../types' +import { KeyAlgorithm,askar } from '@openwallet-foundation/askar-nodejs' +import { transformPrivateKeyToPrivateJwk, transformSeedToPrivateJwk } from '@credo-ts/askar' + @Tags('Dids') @Route('/dids') @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) @injectable() export class DidController extends Controller { - /** - * Resolves did and returns did resolution result - * @param did Decentralized Identifier - * @returns DidResolutionResult - */ - @Example(DidRecordExample) - @Get('/:did') - public async getDidRecordByDid(@Request() request: Req, @Path('did') did: Did) { - try { - const resolveResult = await request.agent.dids.resolve(did) - const importDid = await request.agent.dids.import({ - did, - overwrite: true, - }) - if (!resolveResult.didDocument) { - throw new InternalServerError(`Error resolving DID docs for did: ${importDid}`) - } - - return { ...resolveResult, didDocument: resolveResult.didDocument.toJSON() } - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } - - /** - * Did nym registration - * @body DidCreateOptions - * @returns DidResolutionResult - */ - // @Example(DidRecordExample) - @Example(CreateDidResponse) - @Post('/write') - public async writeDid(@Request() request: Req, @Body() createDidOptions: DidCreate) { - let didRes - - try { - if (!createDidOptions.method) { - throw new BadRequestError('Method is required') - } - - let result - switch (createDidOptions.method) { - case DidMethod.Indy: - result = await this.handleIndy(request.agent, createDidOptions) - break - - case DidMethod.Key: - result = await this.handleKey(request.agent, createDidOptions) - break - - case DidMethod.Web: - result = await this.handleWeb(request.agent, createDidOptions) - break - - case DidMethod.Polygon: - result = await this.handlePolygon(request.agent, createDidOptions) - break - - case DidMethod.Peer: - result = await this.handleDidPeer(request.agent, createDidOptions) - break - - default: - throw new BadRequestError(`Invalid method: ${createDidOptions.method}`) - } - - didRes = { ...result } - - return didRes - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } - - private async handleDidPeer(agent: AgentType, createDidOptions: DidCreate) { - let didResponse - let did - - if (!createDidOptions.keyType) { - throw Error('keyType is required') + /** + * Resolves did and returns did resolution result + * @param did Decentralized Identifier + * @returns DidResolutionResult + */ + @Example(DidRecordExample) + @Get('/:did') + public async getDidRecordByDid(@Request() request: Req, @Path('did') did: Did) { + try { + const resolveResult = await request.agent.dids.resolve(did) + const importDid = await request.agent.dids.import({ + did, + overwrite: true, + }) + if (!resolveResult.didDocument) { + throw new InternalServerError(`Error resolving DID docs for did: ${importDid}`) + } + + return { ...resolveResult, didDocument: resolveResult.didDocument.toJSON() } + } catch (error) { + throw ErrorHandlingService.handle(error) + } } - const didRouting = await agent.modules.mediationRecipient.getRouting({}) - const didDocument = createPeerDidDocumentFromServices([ - { - id: 'didcomm', - recipientKeys: [didRouting.recipientKey], - routingKeys: didRouting.routingKeys, - serviceEndpoint: didRouting.endpoints[0], - }, - ]) - - const didPeerResponse = await agent.dids.create({ - didDocument, - method: DidMethod.Peer, - options: { - numAlgo: PeerDidNumAlgo.MultipleInceptionKeyWithoutDoc, - }, - }) - - did = didPeerResponse.didState.did - didResponse = { - did, + /** + * Did nym registration + * @body DidCreateOptions + * @returns DidResolutionResult + */ + // @Example(DidRecordExample) + @Example(CreateDidResponse) + @Post('/write') + public async writeDid(@Request() request: Req, @Body() createDidOptions: DidCreate) { + let didRes + + console.log("dsajsa", askar.version()) + try { + if (!createDidOptions.method) { + throw new BadRequestError('Method is required') + } + + let result + switch (createDidOptions.method) { + case DidMethod.Indy: + result = await this.handleIndy(request.agent, createDidOptions) + break + + case DidMethod.Key: + result = await this.handleKey(request.agent, createDidOptions) + break + + case DidMethod.Web: + result = await this.handleWeb(request.agent, createDidOptions) + break + + case DidMethod.Polygon: + result = await this.handlePolygon(request.agent, createDidOptions) + break + + case DidMethod.Peer: + result = await this.handleDidPeer(request.agent, createDidOptions) + break + + default: + throw new BadRequestError(`Invalid method: ${createDidOptions.method}`) + } + + didRes = { ...result } + + return didRes + } catch (error) { + throw ErrorHandlingService.handle(error) + } } - return didResponse - } - private async handleIndy(agent: AgentType, createDidOptions: DidCreate) { - let result - if (!createDidOptions.keyType) { - throw new BadRequestError('keyType is required') - } + private async handleDidPeer(agent: AgentType, createDidOptions: DidCreate) { + let didResponse + let did - if (!createDidOptions.network) { - throw new BadRequestError('For indy method network is required') - } - - if (createDidOptions.keyType !== KeyType.Ed25519) { - throw new BadRequestError('Only ed25519 key type supported') - } + if (!createDidOptions.keyType) { + throw Error('keyType is required') + } - if (!Network.Bcovrin_Testnet && !Network.Indicio_Demonet && !Network.Indicio_Testnet) { - throw new BadRequestError(`Invalid network for 'indy' method: ${createDidOptions.network}`) - } + const didRouting = await agent.modules.didcomm.mediationRecipient.getRouting({}) + const { didDocument, keys } = createPeerDidDocumentFromServices([ + { + id: 'didcomm', + recipientKeys: [didRouting.recipientKey], + routingKeys: didRouting.routingKeys, + serviceEndpoint: didRouting.endpoints[0], + }, + ], + true) + + const didPeerResponse = await agent.dids.create({ + didDocument, + method: DidMethod.Peer, + options: { + numAlgo: PeerDidNumAlgo.MultipleInceptionKeyWithoutDoc, + keys + }, + }) - switch (createDidOptions?.network?.toLowerCase()) { - case Network.Bcovrin_Testnet: - result = await this.handleBcovrin( - agent, - createDidOptions, - `did:${createDidOptions.method}:${createDidOptions.network}`, - ) - break - - case Network.Indicio_Demonet: - case Network.Indicio_Testnet: - result = await this.handleIndicio( - agent, - createDidOptions, - `did:${createDidOptions.method}:${createDidOptions.network}`, - ) - break - - default: - throw new BadRequestError(`Network does not exists`) + did = didPeerResponse.didState.did + didResponse = { + did, + } + return didResponse } - return result - } - private async handleBcovrin(agent: AgentType, createDidOptions: DidCreate, didMethod: string) { - let didDocument - if (!createDidOptions.seed) { - throw new BadRequestError('Seed is required') - } - if (createDidOptions?.role?.toLowerCase() === Role.Endorser) { - if (createDidOptions.did) { - await this.importDid(agent, didMethod, createDidOptions.did, createDidOptions.seed) - const getDid = await agent.dids.getCreatedDids({ - method: createDidOptions.method, - did: `did:${createDidOptions.method}:${createDidOptions.network}:${createDidOptions.did}`, - }) - if (getDid.length > 0) { - didDocument = getDid[0].didDocument + private async handleIndy(agent: AgentType, createDidOptions: DidCreate) { + let result + if (!createDidOptions.keyType) { + throw new BadRequestError('keyType is required') } - return { - did: `${didMethod}:${createDidOptions.did}`, - didDocument: didDocument, + if (!createDidOptions.network) { + throw new BadRequestError('For indy method network is required') } - } else { - const BCOVRIN_REGISTER_URL = process.env.BCOVRIN_REGISTER_URL as string - const res = await axios.post(BCOVRIN_REGISTER_URL, { - role: 'ENDORSER', - alias: 'Alias', - seed: createDidOptions.seed, - }) - const { did } = res?.data || {} - await this.importDid(agent, didMethod, did, createDidOptions.seed) - const didRecord = await agent.dids.getCreatedDids({ - method: DidMethod.Indy, - did: `did:${DidMethod.Indy}:${Network.Bcovrin_Testnet}:${res.data.did}`, - }) - if (didRecord.length > 0) { - didDocument = didRecord[0].didDocument + if (createDidOptions.keyType !== KeyAlgorithm.Ed25519) { + throw new BadRequestError('Only ed25519 key type supported') } - return { - did: `${didMethod}:${res.data.did}`, - didDocument: didDocument, + if (!Network.Bcovrin_Testnet && !Network.Indicio_Demonet && !Network.Indicio_Testnet) { + throw new BadRequestError(`Invalid network for 'indy' method: ${createDidOptions.network}`) } - } - } else { - if (!createDidOptions.endorserDid) { - throw new BadRequestError('Please provide the endorser DID or role') - } - const didCreateTxResult = await this.createEndorserDid(agent, createDidOptions.endorserDid) - return { did: didCreateTxResult.didState.did, didDocument: didCreateTxResult.didState.didDocument } - } - } - private async handleIndicio(agent: AgentType, createDidOptions: DidCreate, didMethod: string) { - let didDocument - if (!createDidOptions.seed) { - throw new BadRequestError('Seed is required') + switch (createDidOptions?.network?.toLowerCase()) { + case Network.Bcovrin_Testnet: + result = await this.handleBcovrin( + agent, + createDidOptions, + `did:${createDidOptions.method}:${createDidOptions.network}`, + ) + break + + case Network.Indicio_Demonet: + case Network.Indicio_Testnet: + result = await this.handleIndicio( + agent, + createDidOptions, + `did:${createDidOptions.method}:${createDidOptions.network}`, + ) + break + + default: + throw new BadRequestError(`Network does not exists`) + } + return result } - if (createDidOptions?.role?.toLowerCase() === Role.Endorser) { - if (createDidOptions.did) { - await this.importDid(agent, didMethod, createDidOptions.did, createDidOptions.seed) - const didRecord = await agent.dids.getCreatedDids({ - method: createDidOptions.method, - did: `did:${createDidOptions.method}:${createDidOptions.network}:${createDidOptions.did}`, - }) - if (didRecord.length > 0) { - didDocument = didRecord[0].didDocument + private async handleBcovrin(agent: AgentType, createDidOptions: DidCreate, didMethod: string) { + let didDocument + if (!createDidOptions.seed) { + throw new BadRequestError('Seed is required') + } + if (createDidOptions?.role?.toLowerCase() === Role.Endorser) { + if (createDidOptions.did) { + await this.importDid(agent, didMethod, createDidOptions.did, createDidOptions.seed) + const getDid = await agent.dids.getCreatedDids({ + method: createDidOptions.method, + did: `did:${createDidOptions.method}:${createDidOptions.network}:${createDidOptions.did}`, + }) + if (getDid.length > 0) { + didDocument = getDid[0].didDocument + } + + return { + did: `${didMethod}:${createDidOptions.did}`, + didDocument: didDocument, + } + } else { + const BCOVRIN_REGISTER_URL = process.env.BCOVRIN_REGISTER_URL as string + const res = await axios.post(BCOVRIN_REGISTER_URL, { + role: 'ENDORSER', + alias: 'Alias', + seed: createDidOptions.seed, + }) + const { did } = res?.data || {} + await this.importDid(agent, didMethod, did, createDidOptions.seed) + const didRecord = await agent.dids.getCreatedDids({ + method: DidMethod.Indy, + did: `did:${DidMethod.Indy}:${Network.Bcovrin_Testnet}:${res.data.did}`, + }) + + if (didRecord.length > 0) { + didDocument = didRecord[0].didDocument + } + + return { + did: `${didMethod}:${res.data.did}`, + didDocument: didDocument, + } + } + } else { + if (!createDidOptions.endorserDid) { + throw new BadRequestError('Please provide the endorser DID or role') + } + const didCreateTxResult = await this.createEndorserDid(agent, createDidOptions.endorserDid) + return { did: didCreateTxResult.didState.did, didDocument: didCreateTxResult.didState.didDocument } } + } - return { - did: `${didMethod}:${createDidOptions.did}`, - didDocument: didDocument, + private async handleIndicio(agent: AgentType, createDidOptions: DidCreate, didMethod: string) { + let didDocument + if (!createDidOptions.seed) { + throw new BadRequestError('Seed is required') } - } else { - const key = await this.createIndicioKey(agent, createDidOptions) - const INDICIO_NYM_URL = process.env.INDICIO_NYM_URL as string - const res = await axios.post(INDICIO_NYM_URL, key) - if (res.data.statusCode === 200) { - await this.importDid(agent, didMethod, key.did, createDidOptions.seed) - const didRecord = await agent.dids.getCreatedDids({ - method: DidMethod.Indy, - did: `${didMethod}:${key.did}`, - }) - - if (didRecord.length > 0) { - didDocument = didRecord[0].didDocument - } - - return { - did: `${didMethod}:${key.did}`, - didDocument: didDocument, - } + if (createDidOptions?.role?.toLowerCase() === Role.Endorser) { + if (createDidOptions.did) { + await this.importDid(agent, didMethod, createDidOptions.did, createDidOptions.seed) + const didRecord = await agent.dids.getCreatedDids({ + method: createDidOptions.method, + did: `did:${createDidOptions.method}:${createDidOptions.network}:${createDidOptions.did}`, + }) + + if (didRecord.length > 0) { + didDocument = didRecord[0].didDocument + } + + return { + did: `${didMethod}:${createDidOptions.did}`, + didDocument: didDocument, + } + } else { + const key = await this.createIndicioKey(agent, createDidOptions) + const INDICIO_NYM_URL = process.env.INDICIO_NYM_URL as string + const res = await axios.post(INDICIO_NYM_URL, key) + if (res.data.statusCode === 200) { + await this.importDid(agent, didMethod, key.did, createDidOptions.seed) + const didRecord = await agent.dids.getCreatedDids({ + method: DidMethod.Indy, + did: `${didMethod}:${key.did}`, + }) + + if (didRecord.length > 0) { + didDocument = didRecord[0].didDocument + } + + return { + did: `${didMethod}:${key.did}`, + didDocument: didDocument, + } + } + } + } else { + if (!createDidOptions.endorserDid) { + throw new BadRequestError('Please provide the endorser DID or role') + } + const didCreateTxResult = await this.createEndorserDid(agent, createDidOptions.endorserDid) + return didCreateTxResult } - } - } else { - if (!createDidOptions.endorserDid) { - throw new BadRequestError('Please provide the endorser DID or role') - } - const didCreateTxResult = await this.createEndorserDid(agent, createDidOptions.endorserDid) - return didCreateTxResult - } - } - - private async createEndorserDid(agent: AgentType, endorserDid: string) { - return agent.dids.create({ - method: 'indy', - options: { - endorserMode: 'external', - endorserDid: endorserDid || '', - }, - }) - } - - private async createIndicioKey(agent: AgentType, createDidOptions: DidCreate) { - if (!createDidOptions.seed) { - throw new BadRequestError('Seed is required') - } - const key = await agent.wallet.createKey({ - privateKey: TypedArrayEncoder.fromString(createDidOptions.seed), - keyType: KeyType.Ed25519, - }) - - const buffer = TypedArrayEncoder.fromBase58(key.publicKeyBase58) - const did = TypedArrayEncoder.toBase58(buffer.slice(0, 16)) - - let body - if (createDidOptions.network === Network.Indicio_Testnet) { - body = { - network: 'testnet', - did, - verkey: TypedArrayEncoder.toBase58(buffer), - } - } else if (createDidOptions.network === Network.Indicio_Demonet) { - body = { - network: 'demonet', - did, - verkey: TypedArrayEncoder.toBase58(buffer), - } - } else { - throw new BadRequestError('Please provide a valid did method') - } - return body - } - - private async importDid(agent: AgentType, didMethod: string, did: string, seed: string) { - await agent.dids.import({ - did: `${didMethod}:${did}`, - overwrite: true, - privateKeys: [ - { - keyType: KeyType.Ed25519, - privateKey: TypedArrayEncoder.fromString(seed), - }, - ], - }) - } - - public async handleKey(agent: AgentType, didOptions: DidCreate) { - let did - let didResponse - let didDocument - - if (!didOptions.seed) { - throw new BadRequestError('Seed is required') - } - if (!didOptions.keyType) { - throw new BadRequestError('keyType is required') - } - if (didOptions.keyType !== KeyType.Ed25519 && didOptions.keyType !== KeyType.Bls12381g2) { - throw new BadRequestError('Only ed25519 and bls12381g2 key type supported') } - if (!didOptions.did) { - await agent.wallet.createKey({ - keyType: didOptions.keyType, - seed: TypedArrayEncoder.fromString(didOptions.seed), - }) - - didResponse = await agent.dids.create({ - method: DidMethod.Key, - options: { - keyType: KeyType.Ed25519, - }, - secret: { - privateKey: TypedArrayEncoder.fromString(didOptions.seed), - }, - }) - did = `${didResponse.didState.did}` - didDocument = didResponse.didState.didDocument - } else { - did = didOptions.did - const createdDid = await agent.dids.getCreatedDids({ - method: DidMethod.Key, - did: didOptions.did, - }) - didDocument = createdDid[0]?.didDocument + private async createEndorserDid(agent: AgentType, endorserDid: string) { + return agent.dids.create({ + method: 'indy', + options: { + endorserMode: 'external', + endorserDid: endorserDid || '', + }, + }) } - await agent.dids.import({ - did, - overwrite: true, - didDocument, - }) - return { did: did, didDocument: didDocument } - } - - public async handleWeb(agent: AgentType, didOptions: DidCreate) { - let didDocument: DidDocument - if (!didOptions.domain) { - throw new BadRequestError('For create did:web, domain is required') + private async createIndicioKey(agent: AgentType, createDidOptions: DidCreate) { + if (!createDidOptions.seed) { + throw new BadRequestError('Seed is required') + } + // TODO: Remove comments afterwards + // const key = await agent.kms.createKey({ + // privateKey: TypedArrayEncoder.fromString(createDidOptions.seed), + // keyType: KeyAlgorithm.Ed25519, + // }) + + // const buffer = TypedArrayEncoder.fromBase58(key.publicKeyBase58) + // const did = TypedArrayEncoder.toBase58(buffer.slice(0, 16)) + + const _verificationKey = ( + await agent.kms.createKey({ + type: { + kty: 'OKP', + crv: 'Ed25519', + }, + }) + ).publicJwk + + const verificationKey = Kms.PublicJwk.fromPublicJwk(_verificationKey) as Kms.PublicJwk + + // Create a new key and calculate did according to the rules for indy did method + const buffer = Hasher.hash(verificationKey.publicKey.publicKey, 'sha-256') + + const did = TypedArrayEncoder.toBase58(buffer.slice(0, 16)) + // const did = `did:indy:${endorserNamespace}:${namespaceIdentifier + + let body + if (createDidOptions.network === Network.Indicio_Testnet) { + body = { + network: 'testnet', + did, + verkey: TypedArrayEncoder.toBase58(buffer), + } + } else if (createDidOptions.network === Network.Indicio_Demonet) { + body = { + network: 'demonet', + did, + verkey: TypedArrayEncoder.toBase58(buffer), + } + } else { + throw new BadRequestError('Please provide a valid did method') + } + return body } - if (!didOptions.seed) { - throw new BadRequestError('Seed is required') - } + private async importDid(agent: AgentType, didMethod: string, did: string, seed: string) { + // TODO: Remove comments afterwards + // await agent.dids.import({ + // did: `${didMethod}:${did}`, + // overwrite: true, + // privateKeys: [ + // { + // keyType: KeyAlgorithm.Ed25519, + // privateKey: TypedArrayEncoder.fromString(seed), + // }, + // ], + // }) + + const { privateJwk } = transformSeedToPrivateJwk({ + type: { + crv: 'Ed25519', + kty: 'OKP', + }, + seed: TypedArrayEncoder.fromString(seed), + }) - if (!didOptions.keyType) { - throw new BadRequestError('keyType is required') + const key = await agent.kms.importKey({ privateJwk }) + + const publicJwk = Kms.PublicJwk.fromPublicJwk(key.publicJwk) + await agent.dids.import({ + did, + keys: [ + { + kmsKeyId: key.keyId, + // TODO: Find what to add here + didDocumentRelativeKeyId: '' + } + ] + }) } - if (didOptions.keyType !== KeyType.Ed25519 && didOptions.keyType !== KeyType.Bls12381g2) { - throw new BadRequestError('Only ed25519 and bls12381g2 key type supported') - } + public async handleKey(agent: AgentType, didOptions: DidCreate) { + let did + let didResponse + let didDocument - const domain = didOptions.domain - const did = `did:${didOptions.method}:${domain}` - const keyId = `${did}#key-1` - - const key = await agent.wallet.createKey({ - keyType: didOptions.keyType, - // Commenting for now, as per the multi-tenant endpoint - // privateKey: TypedArrayEncoder.fromString(didOptions.seed), - seed: TypedArrayEncoder.fromString(didOptions.seed), - }) - - if (didOptions.keyType === KeyType.Ed25519) { - didDocument = new DidDocumentBuilder(did) - .addContext('https://w3id.org/security/suites/ed25519-2018/v1') - .addVerificationMethod(getEd25519VerificationKey2018({ key, id: keyId, controller: did })) - .addAuthentication(keyId) - .addAssertionMethod(keyId) - .build() - } else if (didOptions.keyType === KeyType.Bls12381g2) { - didDocument = new DidDocumentBuilder(did) - .addContext('https://w3id.org/security/bbs/v1') - .addVerificationMethod(getBls12381G2Key2020({ key, id: keyId, controller: did })) - .addAuthentication(keyId) - .addAssertionMethod(keyId) - .build() - } else { - throw new BadRequestError('Unsupported key type') // fallback, but this won't hit due to earlier check - } + if (!didOptions.seed) { + throw new BadRequestError('Seed is required') + } + if (!didOptions.keyType) { + throw new BadRequestError('keyType is required') + } + if (didOptions.keyType === KeyAlgorithm.Bls12381G2) { + throw new BadRequestError('didOptions.keyType for type "bls12381g2" has been deprecated') + } + if (didOptions.keyType !== KeyAlgorithm.Ed25519) { + throw new BadRequestError('Only ed25519 and bls12381g2 key type supported') + } - await agent.dids.import({ - did, - overwrite: true, - didDocument, - }) - return { did, didDocument } - } + if (!didOptions.did) { + console.log("This is inside if") + // Transform seed to private JWK and + // const { privateJwk } = transformSeedToPrivateJwk({ + // type: { + // kty: 'OKP', + // crv: 'Ed25519', + // }, + // seed: TypedArrayEncoder.fromString(didOptions.seed), + // }) + // console.log("This is privateJwk::::::", JSON.stringify(privateJwk)) + + // // Import the key using KMS + // const { keyId } = await agent.kms.importKey({ privateJwk }) + // console.log("This is keyId", keyId) + + // // Create DID using the imported key + // const didResponse = await agent.dids.create({ + // method: 'key', + // options: { + // keyId, + // }, + // }) + const privateJwk = transformPrivateKeyToPrivateJwk({ + privateKey: TypedArrayEncoder.fromString('96213c3d7fc8d4d6754c7a0fd969598e'), + type: { + kty: 'OKP', + crv: 'Ed25519', + }, + }).privateJwk + + const { keyId } = await agent.kms.importKey({ + privateJwk, + }) + + const didResponse = await agent.dids.create({ + method: 'key', + options: { + keyId, + }, + }) + console.log("This is didResponse::::::", JSON.stringify(didResponse)) + + did = `${didResponse.didState.did}` + didDocument = didResponse.didState.didDocument + + // await agent.kms.createKey({ + // keyType: didOptions.keyType, + // seed: TypedArrayEncoder.fromString(didOptions.seed), + // }) + + // didResponse = await agent.dids.create({ + // method: DidMethod.Key, + // options: { + // keyType: KeyAlgorithm.Ed25519, + // }, + // secret: { + // privateKey: TypedArrayEncoder.fromString(didOptions.seed), + // }, + // }) + // did = `${didResponse.didState.did}` + // didDocument = didResponse.didState.didDocument + } else { + did = didOptions.did + const createdDid = await agent.dids.getCreatedDids({ + method: DidMethod.Key, + did: didOptions.did, + }) + didDocument = createdDid[0]?.didDocument + } - public async handlePolygon(agent: AgentType, createDidOptions: DidCreate) { - // need to discuss try catch logic - const { endpoint, network, privatekey } = createDidOptions + console.log('This is did', did) + console.log('This is didDocument', didDocument) - if (!network) { - throw new BadRequestError('Network is required for Polygon method') + await agent.dids.import({ + did, + overwrite: true, + didDocument, + }) + return { did: did, didDocument: didDocument } } - const networkName = network?.split(':')[1] + public async handleWeb(agent: AgentType, didOptions: DidCreate) { + let didDocument: DidDocument + if (!didOptions.domain) { + throw new BadRequestError('For create did:web, domain is required') + } - if (networkName !== 'mainnet' && networkName !== 'testnet') { - throw new BadRequestError('Invalid network type') - } - if (!privatekey || typeof privatekey !== 'string' || !privatekey.trim() || privatekey.length !== 64) { - throw new BadRequestError('Invalid private key or key not supported') + if (!didOptions.seed) { + throw new BadRequestError('Seed is required') + } + + if (!didOptions.keyType) { + throw new BadRequestError('keyType is required') + } + + if (didOptions.keyType !== KeyAlgorithm.Ed25519 && didOptions.keyType !== KeyAlgorithm.Bls12381G2) { + throw new BadRequestError('Only ed25519 and bls12381g2 key type supported') + } + + const domain = didOptions.domain + const did = `did:${didOptions.method}:${domain}` + const keyId = `${did}#key-1` + + // TODO: Remove comments afterwards + // const key = await agent.kms.createKey({ + // keyType: didOptions.keyType, + // // Commenting for now, as per the multi-tenant endpoint + // // privateKey: TypedArrayEncoder.fromString(didOptions.seed), + // seed: TypedArrayEncoder.fromString(didOptions.seed), + // }) + + // const ed25519Key = await agent.kms.createKey({ + // type: { + // crv: 'Ed25519', + // kty: 'OKP', + // } + // }) + // const publicJwk = Kms.PublicJwk.fromPublicJwk(ed25519Key.publicJwk) + // const { privateJwk } = transformPrivateKeyToPrivateJwk({ + // type: { + // crv: 'Ed25519', + // kty: 'OKP', + // }, + // privateKey: TypedArrayEncoder.fromString(didOptions.seed), + // }) + + + + if (didOptions.keyType === KeyAlgorithm.Ed25519) { + const { privateJwk } = transformSeedToPrivateJwk({ + type: { + crv: 'Ed25519', + kty: 'OKP', + }, + seed: TypedArrayEncoder.fromString(didOptions.seed), + }) + + const key = await agent.kms.importKey({ privateJwk }) + + const publicJwk = Kms.PublicJwk.fromPublicJwk(key.publicJwk) + didDocument = new DidDocumentBuilder(did) + .addContext('https://w3id.org/security/suites/ed25519-2018/v1') + .addVerificationMethod(getEd25519VerificationKey2018({ id: keyId, controller: did, publicJwk })) + .addAuthentication(keyId) + .addAssertionMethod(keyId) + .build() + } else if (didOptions.keyType === KeyAlgorithm.Bls12381G2) { + // Support for BBS signature is discontinued from credo-ts version 0.6.0 + throw new BadRequestError(`Support for ${KeyAlgorithm.Bls12381G2} has been deprecated`) + } else { + throw new BadRequestError('Unsupported key type') // fallback, but this won't hit due to earlier check + } + + await agent.dids.import({ + did, + overwrite: true, + didDocument, + }) + return { did, didDocument } } - const createDidResponse = await agent.dids.create({ - method: DidMethod.Polygon, - options: { - network: networkName, - endpoint, - }, - secret: { - privateKey: TypedArrayEncoder.fromHex(`${privatekey}`), - }, - }) - const didResponse = { - did: createDidResponse?.didState?.did, - didDocument: createDidResponse?.didState?.didDocument, + public async handlePolygon(agent: AgentType, createDidOptions: DidCreate) { + // need to discuss try catch logic + const { endpoint, network, privatekey } = createDidOptions + + if (!network) { + throw new BadRequestError('Network is required for Polygon method') + } + + const networkName = network?.split(':')[1] + + if (networkName !== 'mainnet' && networkName !== 'testnet') { + throw new BadRequestError('Invalid network type') + } + if (!privatekey || typeof privatekey !== 'string' || !privatekey.trim() || privatekey.length !== 64) { + throw new BadRequestError('Invalid private key or key not supported') + } + + const createDidResponse = await agent.dids.create({ + method: DidMethod.Polygon, + options: { + network: networkName, + endpoint, + }, + secret: { + privateKey: TypedArrayEncoder.fromHex(`${privatekey}`), + }, + }) + const didResponse = { + did: createDidResponse?.didState?.did, + didDocument: createDidResponse?.didState?.didDocument, + } + return didResponse } - return didResponse - } - - @Get('/') - public async getDids(@Request() request: Req) { - try { - const createdDids = await request.agent.dids.getCreatedDids() - return createdDids - } catch (error) { - throw ErrorHandlingService.handle(error) + + @Get('/') + public async getDids(@Request() request: Req) { + try { + const createdDids = await request.agent.dids.getCreatedDids() + return createdDids + } catch (error) { + throw ErrorHandlingService.handle(error) + } } - } } diff --git a/src/controllers/didcomm/basic-messages/BasicMessageController.ts b/src/controllers/didcomm/basic-messages/BasicMessageController.ts index ecd5e81c..bc691b92 100644 --- a/src/controllers/didcomm/basic-messages/BasicMessageController.ts +++ b/src/controllers/didcomm/basic-messages/BasicMessageController.ts @@ -1,58 +1,58 @@ -import type { BasicMessageRecord, BasicMessageStorageProps } from '@credo-ts/didcomm' +// import type { DidCommBasicMessageRecord, DidCommBasicMessageStorageProps } from '@credo-ts/didcomm' -import { Request as Req } from 'express' -import { Body, Controller, Example, Get, Path, Post, Route, Tags, Security, Request } from 'tsoa' -import { injectable } from 'tsyringe' +// import { Request as Req } from 'express' +// import { Body, Controller, Example, Get, Path, Post, Route, Tags, Security, Request } from 'tsoa' +// import { injectable } from 'tsyringe' -import { SCOPES } from '../../../enums' -import ErrorHandlingService from '../../../errorHandlingService' -import { BasicMessageRecordExample, RecordId } from '../../examples' +// import { SCOPES } from '../../../enums' +// import ErrorHandlingService from '../../../errorHandlingService' +// import { BasicMessageRecordExample, RecordId } from '../../examples' -@Tags('DIDComm - Basic Messages') -@Route('/didcomm/basic-messages') -@Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) -@injectable() -export class BasicMessageController extends Controller { - /** - * Retrieve basic messages by connection id - * - * @param connectionId Connection identifier - * @returns BasicMessageRecord[] - */ - @Example([BasicMessageRecordExample]) - @Get('/:connectionId') - public async getBasicMessages( - @Request() request: Req, - @Path('connectionId') connectionId: RecordId, - ): Promise { - try { - const basicMessageRecords = await request.agent.modules.basicMessages.findAllByQuery({ connectionId }) - this.setStatus(200) - return basicMessageRecords - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// @Tags('DIDComm - Basic Messages') +// @Route('/didcomm/basic-messages') +// @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) +// @injectable() +// export class BasicMessageController extends Controller { +// /** +// * Retrieve basic messages by connection id +// * +// * @param connectionId Connection identifier +// * @returns DidCommBasicMessageRecord[] +// */ +// @Example([BasicMessageRecordExample]) +// @Get('/:connectionId') +// public async getBasicMessages( +// @Request() request: Req, +// @Path('connectionId') connectionId: RecordId, +// ): Promise { +// try { +// const basicMessageRecords = await request.agent.modules.basicMessages.findAllByQuery({ connectionId }) +// this.setStatus(200) +// return basicMessageRecords +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Send a basic message to a connection - * - * @param connectionId Connection identifier - * @param content The content of the message - */ - @Example(BasicMessageRecordExample) - @Post('/:connectionId') - public async sendMessage( - @Request() request: Req, - @Path('connectionId') connectionId: RecordId, - @Body() body: Record<'content', string>, - ) { - try { - const basicMessageRecord = await request.agent.modules.basicMessages.sendMessage(connectionId, body.content) - this.setStatus(201) - return basicMessageRecord - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } -} +// /** +// * Send a basic message to a connection +// * +// * @param connectionId Connection identifier +// * @param content The content of the message +// */ +// @Example(BasicMessageRecordExample) +// @Post('/:connectionId') +// public async sendMessage( +// @Request() request: Req, +// @Path('connectionId') connectionId: RecordId, +// @Body() body: Record<'content', string>, +// ) { +// try { +// const basicMessageRecord = await request.agent.modules.basicMessages.sendMessage(connectionId, body.content) +// this.setStatus(201) +// return basicMessageRecord +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } +// } diff --git a/src/controllers/didcomm/credentials/CredentialController.ts b/src/controllers/didcomm/credentials/CredentialController.ts index 76f38fb0..8b9b1d57 100644 --- a/src/controllers/didcomm/credentials/CredentialController.ts +++ b/src/controllers/didcomm/credentials/CredentialController.ts @@ -1,325 +1,325 @@ -import type { - PeerDidNumAlgo2CreateOptions, -} from '@credo-ts/core' +// import type { +// PeerDidNumAlgo2CreateOptions, +// } from '@credo-ts/core' -import { - W3cCredentialService, - createPeerDidDocumentFromServices, - PeerDidNumAlgo, -} from '@credo-ts/core' -import { - CredentialExchangeRecordProps, - CredentialProtocolVersionType, - CredentialState, - CredentialRole, - Routing -} from '@credo-ts/didcomm' -import { Request as Req } from 'express' -import { Body, Controller, Get, Path, Post, Route, Tags, Example, Query, Security, Request } from 'tsoa' -import { injectable } from 'tsyringe' +// import { +// W3cCredentialService, +// createPeerDidDocumentFromServices, +// PeerDidNumAlgo, +// } from '@credo-ts/core' +// import { +// CredentialExchangeRecordProps, +// CredentialProtocolVersionType, +// CredentialState, +// CredentialRole, +// Routing +// } from '@credo-ts/didcomm' +// import { Request as Req } from 'express' +// import { Body, Controller, Get, Path, Post, Route, Tags, Example, Query, Security, Request } from 'tsoa' +// import { injectable } from 'tsyringe' -import { SCOPES } from '../../../enums' -import ErrorHandlingService from '../../../errorHandlingService' -import { AgentType } from '../../../types' -import { CredentialExchangeRecordExample, RecordId } from '../../examples' -import { - AcceptCredentialRequestOptions, - ProposeCredentialOptions, - AcceptCredentialProposalOptions, - CredentialOfferOptions, - CreateOfferOptions, - AcceptCredential, - CreateOfferOobOptions, - ThreadId, -} from '../../types' -import { OutOfBandController } from '../outofband/OutOfBandController' +// import { SCOPES } from '../../../enums' +// import ErrorHandlingService from '../../../errorHandlingService' +// import { AgentType } from '../../../types' +// import { CredentialExchangeRecordExample, RecordId } from '../../examples' +// import { +// AcceptCredentialRequestOptions, +// ProposeCredentialOptions, +// AcceptCredentialProposalOptions, +// CredentialOfferOptions, +// CreateOfferOptions, +// AcceptCredential, +// CreateOfferOobOptions, +// ThreadId, +// } from '../../types' +// import { OutOfBandController } from '../outofband/OutOfBandController' -@Tags('DIDComm - Credentials') -@Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) -@Route('/didcomm/credentials') -@injectable() -export class CredentialController extends Controller { - private outOfBandController: OutOfBandController +// @Tags('DIDComm - Credentials') +// @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) +// @Route('/didcomm/credentials') +// @injectable() +// export class CredentialController extends Controller { +// private outOfBandController: OutOfBandController - public constructor(outOfBandController: OutOfBandController) { - super() - this.outOfBandController = outOfBandController - } +// public constructor(outOfBandController: OutOfBandController) { +// super() +// this.outOfBandController = outOfBandController +// } - /** - * Retrieve all credential exchange records - * - * @returns CredentialExchangeRecord[] - */ - @Example([CredentialExchangeRecordExample]) - @Get('/') - public async getAllCredentials( - @Request() request: Req, - @Query('threadId') threadId?: ThreadId, - @Query('parentThreadId') parentThreadId?: ThreadId, - @Query('connectionId') connectionId?: RecordId, - @Query('state') state?: CredentialState, - @Query('role') role?: CredentialRole, - ) { - try { - const credentials = await request.agent.modules.credentials.findAllByQuery({ - connectionId, - threadId, - state, - parentThreadId, - role, - }) +// /** +// * Retrieve all credential exchange records +// * +// * @returns CredentialExchangeRecord[] +// */ +// @Example([CredentialExchangeRecordExample]) +// @Get('/') +// public async getAllCredentials( +// @Request() request: Req, +// @Query('threadId') threadId?: ThreadId, +// @Query('parentThreadId') parentThreadId?: ThreadId, +// @Query('connectionId') connectionId?: RecordId, +// @Query('state') state?: CredentialState, +// @Query('role') role?: CredentialRole, +// ) { +// try { +// const credentials = await request.agent.modules.credentials.findAllByQuery({ +// connectionId, +// threadId, +// state, +// parentThreadId, +// role, +// }) - return credentials.map((c) => c.toJSON()) - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// return credentials.map((c) => c.toJSON()) +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - // TODO: Fix W3cCredentialRecordExample from example - // @Example([W3cCredentialRecordExample]) - @Get('/w3c') - public async getAllW3c(@Request() request: Req) { - try { - const w3cCredentialService = await request.agent.dependencyManager.resolve(W3cCredentialService) - const w3cCredentialRecords = await w3cCredentialService.getAllCredentialRecords(request.agent.context) - return w3cCredentialRecords - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// // TODO: Fix W3cCredentialRecordExample from example +// // @Example([W3cCredentialRecordExample]) +// @Get('/w3c') +// public async getAllW3c(@Request() request: Req) { +// try { +// const w3cCredentialService = await request.agent.dependencyManager.resolve(W3cCredentialService) +// const w3cCredentialRecords = await w3cCredentialService.getAllCredentialRecords(request.agent.context) +// return w3cCredentialRecords +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - // TODO: Fix W3cCredentialRecordExample from example - // @Example([W3cCredentialRecordExample]) - @Get('/w3c/:id') - public async getW3cById(@Request() request: Req, @Path('id') id: string) { - try { - const w3cCredentialService = await request.agent.dependencyManager.resolve(W3cCredentialService) - const w3cRecord = await w3cCredentialService.getCredentialRecordById(request.agent.context, id) - return w3cRecord - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// // TODO: Fix W3cCredentialRecordExample from example +// // @Example([W3cCredentialRecordExample]) +// @Get('/w3c/:id') +// public async getW3cById(@Request() request: Req, @Path('id') id: string) { +// try { +// const w3cCredentialService = await request.agent.dependencyManager.resolve(W3cCredentialService) +// const w3cRecord = await w3cCredentialService.getCredentialRecordById(request.agent.context, id) +// return w3cRecord +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Retrieve credential exchange record by credential record id - * - * @param credentialRecordId - * @returns CredentialExchangeRecord - */ - @Example(CredentialExchangeRecordExample) - @Get('/:credentialRecordId') - public async getCredentialById(@Request() request: Req, @Path('credentialRecordId') credentialRecordId: RecordId) { - try { - const credential = await request.agent.modules.credentials.getById(credentialRecordId) - return credential.toJSON() - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// /** +// * Retrieve credential exchange record by credential record id +// * +// * @param credentialRecordId +// * @returns CredentialExchangeRecord +// */ +// @Example(CredentialExchangeRecordExample) +// @Get('/:credentialRecordId') +// public async getCredentialById(@Request() request: Req, @Path('credentialRecordId') credentialRecordId: RecordId) { +// try { +// const credential = await request.agent.modules.credentials.getById(credentialRecordId) +// return credential.toJSON() +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Initiate a new credential exchange as holder by sending a propose credential message - * to the connection with a specified connection id. - * - * @param options - * @returns CredentialExchangeRecord - */ - @Example(CredentialExchangeRecordExample) - @Post('/propose-credential') - public async proposeCredential(@Request() request: Req, @Body() proposeCredentialOptions: ProposeCredentialOptions) { - try { - const credential = await request.agent.modules.credentials.proposeCredential(proposeCredentialOptions) - return credential - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// /** +// * Initiate a new credential exchange as holder by sending a propose credential message +// * to the connection with a specified connection id. +// * +// * @param options +// * @returns CredentialExchangeRecord +// */ +// @Example(CredentialExchangeRecordExample) +// @Post('/propose-credential') +// public async proposeCredential(@Request() request: Req, @Body() proposeCredentialOptions: ProposeCredentialOptions) { +// try { +// const credential = await request.agent.modules.credentials.proposeCredential(proposeCredentialOptions) +// return credential +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Accept a credential proposal as issuer by sending an accept proposal message - * to the connection associated with the credential exchange record. - * - * @param credentialRecordId credential identifier - * @param options - * @returns CredentialExchangeRecord - */ - @Example(CredentialExchangeRecordExample) - @Post('/accept-proposal') - public async acceptProposal( - @Request() request: Req, - @Body() acceptCredentialProposal: AcceptCredentialProposalOptions, - ) { - try { - const credential = await request.agent.modules.credentials.acceptProposal(acceptCredentialProposal) +// /** +// * Accept a credential proposal as issuer by sending an accept proposal message +// * to the connection associated with the credential exchange record. +// * +// * @param credentialRecordId credential identifier +// * @param options +// * @returns CredentialExchangeRecord +// */ +// @Example(CredentialExchangeRecordExample) +// @Post('/accept-proposal') +// public async acceptProposal( +// @Request() request: Req, +// @Body() acceptCredentialProposal: AcceptCredentialProposalOptions, +// ) { +// try { +// const credential = await request.agent.modules.credentials.acceptProposal(acceptCredentialProposal) - return credential - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// return credential +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Initiate a new credential exchange as issuer by creating a credential offer - * without specifying a connection id - * - * @param options - * @returns AgentMessage, CredentialExchangeRecord - */ - @Example(CredentialExchangeRecordExample) - @Post('/create-offer') - public async createOffer(@Request() request: Req, @Body() createOfferOptions: CreateOfferOptions) { - try { - const offer = await request.agent.modules.credentials.offerCredential(createOfferOptions) - return offer - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// /** +// * Initiate a new credential exchange as issuer by creating a credential offer +// * without specifying a connection id +// * +// * @param options +// * @returns AgentMessage, CredentialExchangeRecord +// */ +// @Example(CredentialExchangeRecordExample) +// @Post('/create-offer') +// public async createOffer(@Request() request: Req, @Body() createOfferOptions: CreateOfferOptions) { +// try { +// const offer = await request.agent.modules.credentials.offerCredential(createOfferOptions) +// return offer +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - @Post('/create-offer-oob') - public async createOfferOob(@Request() request: Req, @Body() outOfBandOption: CreateOfferOobOptions) { - try { - let invitationDid: string | undefined - let routing: Routing - await this.ensureLinkSecretExists(request.agent) +// @Post('/create-offer-oob') +// public async createOfferOob(@Request() request: Req, @Body() outOfBandOption: CreateOfferOobOptions) { +// try { +// let invitationDid: string | undefined +// let routing: Routing +// await this.ensureLinkSecretExists(request.agent) - if (outOfBandOption?.invitationDid) { - invitationDid = outOfBandOption?.invitationDid - } else { - routing = await request.agent.modules.mediationRecipient.getRouting({}) - const didDocument = createPeerDidDocumentFromServices([ - { - id: 'didcomm', - recipientKeys: [routing.recipientKey], - routingKeys: routing.routingKeys, - serviceEndpoint: routing.endpoints[0], - }, - ]) - const did = await request.agent.dids.create({ - didDocument, - method: 'peer', - options: { - numAlgo: PeerDidNumAlgo.MultipleInceptionKeyWithoutDoc, - }, - }) - invitationDid = did.didState.did - } +// if (outOfBandOption?.invitationDid) { +// invitationDid = outOfBandOption?.invitationDid +// } else { +// routing = await request.agent.modules.mediationRecipient.getRouting({}) +// const didDocument = createPeerDidDocumentFromServices([ +// { +// id: 'didcomm', +// recipientKeys: [routing.recipientKey], +// routingKeys: routing.routingKeys, +// serviceEndpoint: routing.endpoints[0], +// }, +// ]) +// const did = await request.agent.dids.create({ +// didDocument, +// method: 'peer', +// options: { +// numAlgo: PeerDidNumAlgo.MultipleInceptionKeyWithoutDoc, +// }, +// }) +// invitationDid = did.didState.did +// } - const offerOob = await request.agent.modules.credentials.createOffer({ - protocolVersion: outOfBandOption.protocolVersion as CredentialProtocolVersionType<[]>, - credentialFormats: outOfBandOption.credentialFormats, - autoAcceptCredential: outOfBandOption.autoAcceptCredential, - comment: outOfBandOption.comment, - }) +// const offerOob = await request.agent.modules.credentials.createOffer({ +// protocolVersion: outOfBandOption.protocolVersion as CredentialProtocolVersionType<[]>, +// credentialFormats: outOfBandOption.credentialFormats, +// autoAcceptCredential: outOfBandOption.autoAcceptCredential, +// comment: outOfBandOption.comment, +// }) - const credentialMessage = offerOob.message - const outOfBandRecord = await request.agent.modules.oob.createInvitation({ - label: outOfBandOption.label, - messages: [credentialMessage], - autoAcceptConnection: true, - imageUrl: outOfBandOption?.imageUrl, - goalCode: outOfBandOption?.goalCode, - invitationDid, - }) - return { - invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ - domain: request.agent.modules.didcomm.config.endpoints[0], - }), - invitation: outOfBandRecord.outOfBandInvitation.toJSON({ - useDidSovPrefixWhereAllowed: request.agent.modules.didcomm.config.useDidSovPrefixWhereAllowed, - }), - outOfBandRecord: outOfBandRecord.toJSON(), - outOfBandRecordId: outOfBandRecord.id, - credentialRequestThId: offerOob.credentialRecord.threadId, - invitationDid: outOfBandOption?.invitationDid ? '' : invitationDid, - } - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// const credentialMessage = offerOob.message +// const outOfBandRecord = await request.agent.modules.oob.createInvitation({ +// label: outOfBandOption.label, +// messages: [credentialMessage], +// autoAcceptConnection: true, +// imageUrl: outOfBandOption?.imageUrl, +// goalCode: outOfBandOption?.goalCode, +// invitationDid, +// }) +// return { +// invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ +// domain: request.agent.modules.didcomm.config.endpoints[0], +// }), +// invitation: outOfBandRecord.outOfBandInvitation.toJSON({ +// useDidSovPrefixWhereAllowed: request.agent.modules.didcomm.config.useDidSovPrefixWhereAllowed, +// }), +// outOfBandRecord: outOfBandRecord.toJSON(), +// outOfBandRecordId: outOfBandRecord.id, +// credentialRequestThId: offerOob.credentialRecord.threadId, +// invitationDid: outOfBandOption?.invitationDid ? '' : invitationDid, +// } +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Accept a credential offer as holder by sending an accept offer message - * to the connection associated with the credential exchange record. - * - * @param credentialRecordId credential identifier - * @param options - * @returns CredentialExchangeRecord - */ - @Example(CredentialExchangeRecordExample) - @Post('/accept-offer') - public async acceptOffer(@Request() request: Req, @Body() acceptCredentialOfferOptions: CredentialOfferOptions) { - try { - await this.ensureLinkSecretExists(request.agent) - const acceptOffer = await request.agent.modules.credentials.acceptOffer(acceptCredentialOfferOptions) - return acceptOffer - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// /** +// * Accept a credential offer as holder by sending an accept offer message +// * to the connection associated with the credential exchange record. +// * +// * @param credentialRecordId credential identifier +// * @param options +// * @returns CredentialExchangeRecord +// */ +// @Example(CredentialExchangeRecordExample) +// @Post('/accept-offer') +// public async acceptOffer(@Request() request: Req, @Body() acceptCredentialOfferOptions: CredentialOfferOptions) { +// try { +// await this.ensureLinkSecretExists(request.agent) +// const acceptOffer = await request.agent.modules.credentials.acceptOffer(acceptCredentialOfferOptions) +// return acceptOffer +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Accept a credential request as issuer by sending an accept request message - * to the connection associated with the credential exchange record. - * - * @param credentialRecordId credential identifier - * @param options - * @returns CredentialExchangeRecord - */ - @Example(CredentialExchangeRecordExample) - @Post('/accept-request') - public async acceptRequest( - @Request() request: Req, - @Body() acceptCredentialRequestOptions: AcceptCredentialRequestOptions, - ) { - try { - const credential = await request.agent.modules.credentials.acceptRequest(acceptCredentialRequestOptions) - return credential - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// /** +// * Accept a credential request as issuer by sending an accept request message +// * to the connection associated with the credential exchange record. +// * +// * @param credentialRecordId credential identifier +// * @param options +// * @returns CredentialExchangeRecord +// */ +// @Example(CredentialExchangeRecordExample) +// @Post('/accept-request') +// public async acceptRequest( +// @Request() request: Req, +// @Body() acceptCredentialRequestOptions: AcceptCredentialRequestOptions, +// ) { +// try { +// const credential = await request.agent.modules.credentials.acceptRequest(acceptCredentialRequestOptions) +// return credential +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Accept a credential as holder by sending an accept credential message - * to the connection associated with the credential exchange record. - * - * @param options - * @returns CredentialExchangeRecord - */ - @Example(CredentialExchangeRecordExample) - @Post('/accept-credential') - public async acceptCredential(@Request() request: Req, @Body() acceptCredential: AcceptCredential) { - try { - const credential = await request.agent.modules.credentials.acceptCredential(acceptCredential) - return credential - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// /** +// * Accept a credential as holder by sending an accept credential message +// * to the connection associated with the credential exchange record. +// * +// * @param options +// * @returns CredentialExchangeRecord +// */ +// @Example(CredentialExchangeRecordExample) +// @Post('/accept-credential') +// public async acceptCredential(@Request() request: Req, @Body() acceptCredential: AcceptCredential) { +// try { +// const credential = await request.agent.modules.credentials.acceptCredential(acceptCredential) +// return credential +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Return credentialRecord - * - * @param credentialRecordId - * @returns credentialRecord - */ - @Get('/:credentialRecordId/form-data') - public async credentialFormData(@Request() request: Req, @Path('credentialRecordId') credentialRecordId: string) { - try { - const credentialDetails = await request.agent.modules.credentials.getFormatData(credentialRecordId) - return credentialDetails - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// /** +// * Return credentialRecord +// * +// * @param credentialRecordId +// * @returns credentialRecord +// */ +// @Get('/:credentialRecordId/form-data') +// public async credentialFormData(@Request() request: Req, @Path('credentialRecordId') credentialRecordId: string) { +// try { +// const credentialDetails = await request.agent.modules.credentials.getFormatData(credentialRecordId) +// return credentialDetails +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - private async ensureLinkSecretExists(agent: AgentType): Promise { - const linkSecretIds = await agent.modules.anoncreds.getLinkSecretIds() - if (linkSecretIds.length === 0) { - await agent.modules.anoncreds.createLinkSecret() - } - } -} +// private async ensureLinkSecretExists(agent: AgentType): Promise { +// const linkSecretIds = await agent.modules.anoncreds.getLinkSecretIds() +// if (linkSecretIds.length === 0) { +// await agent.modules.anoncreds.createLinkSecret() +// } +// } +// } diff --git a/src/controllers/didcomm/proofs/ProofController.ts b/src/controllers/didcomm/proofs/ProofController.ts index 55b8de31..a4f4a9f9 100644 --- a/src/controllers/didcomm/proofs/ProofController.ts +++ b/src/controllers/didcomm/proofs/ProofController.ts @@ -1,283 +1,283 @@ -import type { - PeerDidNumAlgo2CreateOptions, -} from '@credo-ts/core' +// import type { +// PeerDidNumAlgo2CreateOptions, +// } from '@credo-ts/core' -import { - AcceptProofRequestOptions, - ProofExchangeRecordProps, - ProofsProtocolVersionType, - Routing, -} from '@credo-ts/didcomm' +// import { +// AcceptProofRequestOptions, +// ProofExchangeRecordProps, +// ProofsProtocolVersionType, +// Routing, +// } from '@credo-ts/didcomm' -import { PeerDidNumAlgo, createPeerDidDocumentFromServices } from '@credo-ts/core' -import { Request as Req } from 'express' -import { Body, Controller, Example, Get, Path, Post, Query, Route, Tags, Security, Request } from 'tsoa' -import { injectable } from 'tsyringe' +// import { PeerDidNumAlgo, createPeerDidDocumentFromServices } from '@credo-ts/core' +// import { Request as Req } from 'express' +// import { Body, Controller, Example, Get, Path, Post, Query, Route, Tags, Security, Request } from 'tsoa' +// import { injectable } from 'tsyringe' -import { SCOPES } from '../../../enums' -import ErrorHandlingService from '../../../errorHandlingService' -import { ProofRecordExample, RecordId } from '../../examples' -import { - AcceptProofProposal, - CreateProofRequestOobOptions, - RequestProofOptions, - RequestProofProposalOptions, -} from '../../types' +// import { SCOPES } from '../../../enums' +// import ErrorHandlingService from '../../../errorHandlingService' +// import { ProofRecordExample, RecordId } from '../../examples' +// import { +// AcceptProofProposal, +// CreateProofRequestOobOptions, +// RequestProofOptions, +// RequestProofProposalOptions, +// } from '../../types' -@Tags('DIDComm - Proofs') -@Route('/didcomm/proofs') -@Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) -@injectable() -export class ProofController extends Controller { - /** - * Retrieve all proof records - * - * @param threadId - * @returns ProofRecord[] - */ - @Example([ProofRecordExample]) - @Get('/') - public async getAllProofs(@Request() request: Req, @Query('threadId') threadId?: string) { - try { - const query = threadId ? { threadId } : {} - const proofs = await request.agent.modules.proofs.findAllByQuery(query) +// @Tags('DIDComm - Proofs') +// @Route('/didcomm/proofs') +// @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) +// @injectable() +// export class ProofController extends Controller { +// /** +// * Retrieve all proof records +// * +// * @param threadId +// * @returns ProofRecord[] +// */ +// @Example([ProofRecordExample]) +// @Get('/') +// public async getAllProofs(@Request() request: Req, @Query('threadId') threadId?: string) { +// try { +// const query = threadId ? { threadId } : {} +// const proofs = await request.agent.modules.proofs.findAllByQuery(query) - return proofs.map((proof) => proof.toJSON()) - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// return proofs.map((proof) => proof.toJSON()) +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Retrieve proof record by proof record id - * - * @param proofRecordId - * @returns ProofRecord - */ - @Get('/:proofRecordId') - @Example(ProofRecordExample) - public async getProofById(@Request() request: Req, @Path('proofRecordId') proofRecordId: RecordId) { - try { - const proof = await request.agent.modules.proofs.getById(proofRecordId) +// /** +// * Retrieve proof record by proof record id +// * +// * @param proofRecordId +// * @returns ProofRecord +// */ +// @Get('/:proofRecordId') +// @Example(ProofRecordExample) +// public async getProofById(@Request() request: Req, @Path('proofRecordId') proofRecordId: RecordId) { +// try { +// const proof = await request.agent.modules.proofs.getById(proofRecordId) - return proof.toJSON() - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// return proof.toJSON() +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Initiate a new presentation exchange as prover by sending a presentation proposal request - * to the connection with the specified connection id. - * - * @param proposal - * @returns ProofRecord - */ - @Post('/propose-proof') - @Example(ProofRecordExample) - public async proposeProof(@Request() request: Req, @Body() requestProofProposalOptions: RequestProofProposalOptions) { - try { - const proof = await request.agent.modules.proofs.proposeProof({ - connectionId: requestProofProposalOptions.connectionId, - protocolVersion: 'v1' as ProofsProtocolVersionType<[]>, - proofFormats: requestProofProposalOptions.proofFormats, - comment: requestProofProposalOptions.comment, - autoAcceptProof: requestProofProposalOptions.autoAcceptProof, - goalCode: requestProofProposalOptions.goalCode, - parentThreadId: requestProofProposalOptions.parentThreadId, - }) +// /** +// * Initiate a new presentation exchange as prover by sending a presentation proposal request +// * to the connection with the specified connection id. +// * +// * @param proposal +// * @returns ProofRecord +// */ +// @Post('/propose-proof') +// @Example(ProofRecordExample) +// public async proposeProof(@Request() request: Req, @Body() requestProofProposalOptions: RequestProofProposalOptions) { +// try { +// const proof = await request.agent.modules.proofs.proposeProof({ +// connectionId: requestProofProposalOptions.connectionId, +// protocolVersion: 'v1' as ProofsProtocolVersionType<[]>, +// proofFormats: requestProofProposalOptions.proofFormats, +// comment: requestProofProposalOptions.comment, +// autoAcceptProof: requestProofProposalOptions.autoAcceptProof, +// goalCode: requestProofProposalOptions.goalCode, +// parentThreadId: requestProofProposalOptions.parentThreadId, +// }) - return proof - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// return proof +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Accept a presentation proposal as verifier by sending an accept proposal message - * to the connection associated with the proof record. - * - * @param proofRecordId - * @param proposal - * @returns ProofRecord - */ - @Post('/:proofRecordId/accept-proposal') - @Example(ProofRecordExample) - public async acceptProposal(@Request() request: Req, @Body() acceptProposal: AcceptProofProposal) { - try { - const proof = await request.agent.modules.proofs.acceptProposal(acceptProposal) +// /** +// * Accept a presentation proposal as verifier by sending an accept proposal message +// * to the connection associated with the proof record. +// * +// * @param proofRecordId +// * @param proposal +// * @returns ProofRecord +// */ +// @Post('/:proofRecordId/accept-proposal') +// @Example(ProofRecordExample) +// public async acceptProposal(@Request() request: Req, @Body() acceptProposal: AcceptProofProposal) { +// try { +// const proof = await request.agent.modules.proofs.acceptProposal(acceptProposal) - return proof - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// return proof +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Creates a presentation request bound to existing connection - */ - @Post('/request-proof') - @Example(ProofRecordExample) - public async requestProof(@Request() request: Req, @Body() requestProofOptions: RequestProofOptions) { - try { - const requestProofPayload = { - connectionId: requestProofOptions.connectionId, - protocolVersion: requestProofOptions.protocolVersion as ProofsProtocolVersionType<[]>, - comment: requestProofOptions.comment, - proofFormats: requestProofOptions.proofFormats, - autoAcceptProof: requestProofOptions.autoAcceptProof, - goalCode: requestProofOptions.goalCode, - parentThreadId: requestProofOptions.parentThreadId, - willConfirm: requestProofOptions.willConfirm, - } - const proof = await request.agent.modules.proofs.requestProof(requestProofPayload) +// /** +// * Creates a presentation request bound to existing connection +// */ +// @Post('/request-proof') +// @Example(ProofRecordExample) +// public async requestProof(@Request() request: Req, @Body() requestProofOptions: RequestProofOptions) { +// try { +// const requestProofPayload = { +// connectionId: requestProofOptions.connectionId, +// protocolVersion: requestProofOptions.protocolVersion as ProofsProtocolVersionType<[]>, +// comment: requestProofOptions.comment, +// proofFormats: requestProofOptions.proofFormats, +// autoAcceptProof: requestProofOptions.autoAcceptProof, +// goalCode: requestProofOptions.goalCode, +// parentThreadId: requestProofOptions.parentThreadId, +// willConfirm: requestProofOptions.willConfirm, +// } +// const proof = await request.agent.modules.proofs.requestProof(requestProofPayload) - return proof - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// return proof +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Creates a presentation request not bound to any proposal or existing connection - */ - @Post('create-request-oob') - @Example(ProofRecordExample) - public async createRequest(@Request() request: Req, @Body() createRequestOptions: CreateProofRequestOobOptions) { - try { - let routing: Routing - let invitationDid: string | undefined +// /** +// * Creates a presentation request not bound to any proposal or existing connection +// */ +// @Post('create-request-oob') +// @Example(ProofRecordExample) +// public async createRequest(@Request() request: Req, @Body() createRequestOptions: CreateProofRequestOobOptions) { +// try { +// let routing: Routing +// let invitationDid: string | undefined - if (createRequestOptions?.invitationDid) { - invitationDid = createRequestOptions?.invitationDid - } else { - routing = await request.agent.modules.mediationRecipient.getRouting({}) - const didDocument = createPeerDidDocumentFromServices([ - { - id: 'didcomm', - recipientKeys: [routing.recipientKey], - routingKeys: routing.routingKeys, - serviceEndpoint: routing.endpoints[0], - }, - ]) - const did = await request.agent.dids.create({ - didDocument, - method: 'peer', - options: { - numAlgo: PeerDidNumAlgo.MultipleInceptionKeyWithoutDoc, - }, - }) - invitationDid = did.didState.did - } +// if (createRequestOptions?.invitationDid) { +// invitationDid = createRequestOptions?.invitationDid +// } else { +// routing = await request.agent.modules.mediationRecipient.getRouting({}) +// const didDocument = createPeerDidDocumentFromServices([ +// { +// id: 'didcomm', +// recipientKeys: [routing.recipientKey], +// routingKeys: routing.routingKeys, +// serviceEndpoint: routing.endpoints[0], +// }, +// ]) +// const did = await request.agent.dids.create({ +// didDocument, +// method: 'peer', +// options: { +// numAlgo: PeerDidNumAlgo.MultipleInceptionKeyWithoutDoc, +// }, +// }) +// invitationDid = did.didState.did +// } - const proof = await request.agent.modules.proofs.createRequest({ - protocolVersion: createRequestOptions.protocolVersion as ProofsProtocolVersionType<[]>, - proofFormats: createRequestOptions.proofFormats, - goalCode: createRequestOptions.goalCode, - willConfirm: createRequestOptions.willConfirm, - parentThreadId: createRequestOptions.parentThreadId, - autoAcceptProof: createRequestOptions.autoAcceptProof, - comment: createRequestOptions.comment, - }) - const proofMessage = proof.message - const outOfBandRecord = await request.agent.modules.oob.createInvitation({ - label: createRequestOptions.label, - messages: [proofMessage], - autoAcceptConnection: true, - imageUrl: createRequestOptions?.imageUrl, - goalCode: createRequestOptions?.goalCode, - invitationDid, - }) +// const proof = await request.agent.modules.proofs.createRequest({ +// protocolVersion: createRequestOptions.protocolVersion as ProofsProtocolVersionType<[]>, +// proofFormats: createRequestOptions.proofFormats, +// goalCode: createRequestOptions.goalCode, +// willConfirm: createRequestOptions.willConfirm, +// parentThreadId: createRequestOptions.parentThreadId, +// autoAcceptProof: createRequestOptions.autoAcceptProof, +// comment: createRequestOptions.comment, +// }) +// const proofMessage = proof.message +// const outOfBandRecord = await request.agent.modules.oob.createInvitation({ +// label: createRequestOptions.label, +// messages: [proofMessage], +// autoAcceptConnection: true, +// imageUrl: createRequestOptions?.imageUrl, +// goalCode: createRequestOptions?.goalCode, +// invitationDid, +// }) - return { - invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ - domain: request.agent.modules.didcomm.config.endpoints[0], - }), - invitation: outOfBandRecord.outOfBandInvitation.toJSON({ - useDidSovPrefixWhereAllowed: request.agent.modules.didcomm.config.useDidSovPrefixWhereAllowed, - }), - outOfBandRecord: outOfBandRecord.toJSON(), - invitationDid: createRequestOptions?.invitationDid ? '' : invitationDid, - proofRecordThId: proof.proofRecord.threadId, - proofMessageId: proof.message.thread?.threadId || proof.message.threadId || proof.message.id, - } - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// return { +// invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ +// domain: request.agent.modules.didcomm.config.endpoints[0], +// }), +// invitation: outOfBandRecord.outOfBandInvitation.toJSON({ +// useDidSovPrefixWhereAllowed: request.agent.modules.didcomm.config.useDidSovPrefixWhereAllowed, +// }), +// outOfBandRecord: outOfBandRecord.toJSON(), +// invitationDid: createRequestOptions?.invitationDid ? '' : invitationDid, +// proofRecordThId: proof.proofRecord.threadId, +// proofMessageId: proof.message.thread?.threadId || proof.message.threadId || proof.message.id, +// } +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Accept a presentation request as prover by sending an accept request message - * to the connection associated with the proof record. - * - * @param proofRecordId - * @param request - * @returns ProofRecord - */ - @Post('/:proofRecordId/accept-request') - @Example(ProofRecordExample) - public async acceptRequest( - @Request() request: Req, - @Path('proofRecordId') proofRecordId: string, - @Body() - body: { - filterByPresentationPreview?: boolean - filterByNonRevocationRequirements?: boolean - comment?: string - }, - ) { - try { - const requestedCredentials = await request.agent.modules.proofs.selectCredentialsForRequest({ - proofRecordId, - }) +// /** +// * Accept a presentation request as prover by sending an accept request message +// * to the connection associated with the proof record. +// * +// * @param proofRecordId +// * @param request +// * @returns ProofRecord +// */ +// @Post('/:proofRecordId/accept-request') +// @Example(ProofRecordExample) +// public async acceptRequest( +// @Request() request: Req, +// @Path('proofRecordId') proofRecordId: string, +// @Body() +// body: { +// filterByPresentationPreview?: boolean +// filterByNonRevocationRequirements?: boolean +// comment?: string +// }, +// ) { +// try { +// const requestedCredentials = await request.agent.modules.proofs.selectCredentialsForRequest({ +// proofRecordId, +// }) - const acceptProofRequest: AcceptProofRequestOptions = { - proofRecordId, - comment: body.comment, - proofFormats: requestedCredentials.proofFormats, - } +// const acceptProofRequest: AcceptProofRequestOptions = { +// proofRecordId, +// comment: body.comment, +// proofFormats: requestedCredentials.proofFormats, +// } - const proof = await request.agent.modules.proofs.acceptRequest(acceptProofRequest) +// const proof = await request.agent.modules.proofs.acceptRequest(acceptProofRequest) - return proof.toJSON() - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// return proof.toJSON() +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Accept a presentation as prover by sending an accept presentation message - * to the connection associated with the proof record. - * - * @param proofRecordId - * @returns ProofRecord - */ - @Post('/:proofRecordId/accept-presentation') - @Example(ProofRecordExample) - public async acceptPresentation(@Request() request: Req, @Path('proofRecordId') proofRecordId: string) { - try { - const proof = await request.agent.modules.proofs.acceptPresentation({ proofRecordId }) - return proof - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// /** +// * Accept a presentation as prover by sending an accept presentation message +// * to the connection associated with the proof record. +// * +// * @param proofRecordId +// * @returns ProofRecord +// */ +// @Post('/:proofRecordId/accept-presentation') +// @Example(ProofRecordExample) +// public async acceptPresentation(@Request() request: Req, @Path('proofRecordId') proofRecordId: string) { +// try { +// const proof = await request.agent.modules.proofs.acceptPresentation({ proofRecordId }) +// return proof +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Return proofRecord - * - * @param proofRecordId - * @returns ProofRecord - */ - @Get('/:proofRecordId/form-data') - @Example(ProofRecordExample) - // TODO: Add return type - public async proofFormData(@Request() request: Req, @Path('proofRecordId') proofRecordId: string) { - try { - const proof = await request.agent.modules.proofs.getFormatData(proofRecordId) - return proof - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } -} +// /** +// * Return proofRecord +// * +// * @param proofRecordId +// * @returns ProofRecord +// */ +// @Get('/:proofRecordId/form-data') +// @Example(ProofRecordExample) +// // TODO: Add return type +// public async proofFormData(@Request() request: Req, @Path('proofRecordId') proofRecordId: string) { +// try { +// const proof = await request.agent.modules.proofs.getFormatData(proofRecordId) +// return proof +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } +// } diff --git a/src/controllers/openid4vc/holder/holder.Controller.ts b/src/controllers/openid4vc/holder/holder.Controller.ts index c071da3a..30f92ad1 100644 --- a/src/controllers/openid4vc/holder/holder.Controller.ts +++ b/src/controllers/openid4vc/holder/holder.Controller.ts @@ -1,97 +1,97 @@ -import { Request as Req } from 'express' -import { Body, Controller, Get, Post, Route, Security, Tags, Request } from 'tsoa' -import { injectable } from 'tsyringe' +// import { Request as Req } from 'express' +// import { Body, Controller, Get, Post, Route, Security, Tags, Request } from 'tsoa' +// import { injectable } from 'tsyringe' -import { SCOPES } from '../../../enums/enum' -import { - AuthorizeRequestCredentialOffer, - RequestCredentialBody, - ResolveCredentialOfferBody, - ResolveProofRequest, -} from '../types/holder.types' +// import { SCOPES } from '../../../enums/enum' +// import { +// AuthorizeRequestCredentialOffer, +// RequestCredentialBody, +// ResolveCredentialOfferBody, +// ResolveProofRequest, +// } from '../types/holder.types' -import { holderService } from './holder.service' +// import { holderService } from './holder.service' -@Tags('oid4vc holders') -@Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) -@Route('openid4vc/holder') -@injectable() -export class HolderController extends Controller { - /** - * Get SdJwt type of credentials - */ - @Get('/sd-jwt-vcs') - public async getSdJwtCredentials(@Request() request: Req) { - return await holderService.getSdJwtCredentials(request) - } +// @Tags('oid4vc holders') +// @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) +// @Route('openid4vc/holder') +// @injectable() +// export class HolderController extends Controller { +// /** +// * Get SdJwt type of credentials +// */ +// @Get('/sd-jwt-vcs') +// public async getSdJwtCredentials(@Request() request: Req) { +// return await holderService.getSdJwtCredentials(request) +// } - /** - * Fetch all mso mdoc credentials in wallet - */ - @Get('/mdoc-vcs') - public async getMdocCredentials(@Request() request: Req) { - return await holderService.getMdocCredentials(request) - } +// /** +// * Fetch all mso mdoc credentials in wallet +// */ +// @Get('/mdoc-vcs') +// public async getMdocCredentials(@Request() request: Req) { +// return await holderService.getMdocCredentials(request) +// } - /** - * Decode mso mdoc credential in wallet - */ - @Post('/mdoc-vcs/decode') - public async decodeMdocCredential( - @Request() request: Req, - @Body() - body: { - base64Url: string - }, - ) { - return await holderService.decodeMdocCredential(request, body) - } +// /** +// * Decode mso mdoc credential in wallet +// */ +// @Post('/mdoc-vcs/decode') +// public async decodeMdocCredential( +// @Request() request: Req, +// @Body() +// body: { +// base64Url: string +// }, +// ) { +// return await holderService.decodeMdocCredential(request, body) +// } - /** - * Resolve a credential offer - */ - @Post('resolve-credential-offer') - public async resolveCredOffer(@Request() request: Req, @Body() body: ResolveCredentialOfferBody) { - return await holderService.resolveCredentialOffer(request, body) - } +// /** +// * Resolve a credential offer +// */ +// @Post('resolve-credential-offer') +// public async resolveCredOffer(@Request() request: Req, @Body() body: ResolveCredentialOfferBody) { +// return await holderService.resolveCredentialOffer(request, body) +// } - // /** - // * Initiate an OID4VCI authorization request - // */ - @Post('authorization-request') - public async requestAuthorizationForCredential( - @Request() request: Req, - @Body() body: AuthorizeRequestCredentialOffer, - ) { - return await holderService.requestAuthorizationForCredential(request, body) - } +// // /** +// // * Initiate an OID4VCI authorization request +// // */ +// @Post('authorization-request') +// public async requestAuthorizationForCredential( +// @Request() request: Req, +// @Body() body: AuthorizeRequestCredentialOffer, +// ) { +// return await holderService.requestAuthorizationForCredential(request, body) +// } - /** - * Initiates a token request, then requests credentials from issuer - */ - @Post('request-credential') - public async requestCredential(@Request() request: Req, @Body() body: RequestCredentialBody) { - return await holderService.requestCredential(request, body) - } +// /** +// * Initiates a token request, then requests credentials from issuer +// */ +// @Post('request-credential') +// public async requestCredential(@Request() request: Req, @Body() body: RequestCredentialBody) { +// return await holderService.requestCredential(request, body) +// } - /** - * Resolve a proof request - */ - @Post('resolve-proof-request') - public async resolveProofRequest(@Request() request: Req, @Body() body: ResolveProofRequest) { - return await holderService.resolveProofRequest(request, body) - } +// /** +// * Resolve a proof request +// */ +// @Post('resolve-proof-request') +// public async resolveProofRequest(@Request() request: Req, @Body() body: ResolveProofRequest) { +// return await holderService.resolveProofRequest(request, body) +// } - /** - * Accept a proof request - */ - @Post('accept-proof-request') - public async acceptProofRequest(@Request() request: Req, @Body() body: ResolveProofRequest) { - return await holderService.acceptPresentationRequest(request, body) - } +// /** +// * Accept a proof request +// */ +// @Post('accept-proof-request') +// public async acceptProofRequest(@Request() request: Req, @Body() body: ResolveProofRequest) { +// return await holderService.acceptPresentationRequest(request, body) +// } - @Post('decode-sdjwt') - public async decodeSdJwt(@Request() request: Req, @Body() body: { jwt: string }) { - return await holderService.decodeSdJwt(request, body) - } -} \ No newline at end of file +// @Post('decode-sdjwt') +// public async decodeSdJwt(@Request() request: Req, @Body() body: { jwt: string }) { +// return await holderService.decodeSdJwt(request, body) +// } +// } \ No newline at end of file diff --git a/src/controllers/openid4vc/holder/holder.service.ts b/src/controllers/openid4vc/holder/holder.service.ts index 1d7be42c..bb2adbc5 100644 --- a/src/controllers/openid4vc/holder/holder.service.ts +++ b/src/controllers/openid4vc/holder/holder.service.ts @@ -1,279 +1,280 @@ -import type { - AuthorizeRequestCredentialOffer, - RequestCredentialBody, - ResolveCredentialOfferBody, - ResolveProofRequest, -} from '../types/holder.types' -import type { Agent, DcqlCredentialsForRequest, DcqlQueryResult } from '@credo-ts/core' -import type { - OpenId4VcAuthorizationCodeTokenRequestOptions, - OpenId4VciPreAuthorizedTokenRequestOptions, - OpenId4VciResolvedCredentialOffer, - OpenId4VciTokenRequestOptions, -} from '@credo-ts/openid4vc' +// import type { +// AuthorizeRequestCredentialOffer, +// RequestCredentialBody, +// ResolveCredentialOfferBody, +// ResolveProofRequest, +// } from '../types/holder.types' +// import type { Agent, DcqlCredentialsForRequest, DcqlQueryResult } from '@credo-ts/core' +// import type { +// OpenId4VcAuthorizationCodeTokenRequestOptions, +// OpenId4VciPreAuthorizedTokenRequestOptions, +// OpenId4VciResolvedCredentialOffer, +// OpenId4VciTokenRequestOptions, +// } from '@credo-ts/openid4vc' -import { - DifPresentationExchangeService, - DidKey, - DidJwk, - getJwkFromKey, - Mdoc, - W3cJsonLdVerifiableCredential, - W3cJwtVerifiableCredential, -} from '@credo-ts/core' -import { - OpenId4VciAuthorizationFlow, - authorizationCodeGrantIdentifier, - preAuthorizedCodeGrantIdentifier, -} from '@credo-ts/openid4vc' -import { Request as Req } from 'express' -export class HolderService { - private HOLDER_REDIRECT = process.env.HOLDER_REDIRECT ?? 'http://localhost:4001/redirect' - private HOLDER_CLIENT_ID = process.env.HOLDER_CLIENT_ID ?? 'wallet' +// import { +// DifPresentationExchangeService, +// DidKey, +// DidJwk, +// // getJwkFromKey, +// Mdoc, +// W3cJsonLdVerifiableCredential, +// W3cJwtVerifiableCredential, +// } from '@credo-ts/core' +// import { +// OpenId4VciAuthorizationFlow, +// authorizationCodeGrantIdentifier, +// preAuthorizedCodeGrantIdentifier, +// } from '@credo-ts/openid4vc' +// import { Request as Req } from 'express' +// export class HolderService { +// private HOLDER_REDIRECT = process.env.HOLDER_REDIRECT ?? 'http://localhost:4001/redirect' +// private HOLDER_CLIENT_ID = process.env.HOLDER_CLIENT_ID ?? 'wallet' - public async getSdJwtCredentials(agentReq: Req) { - return await agentReq.agent.sdJwtVc.getAll() - } +// public async getSdJwtCredentials(agentReq: Req) { +// return await agentReq.agent.sdJwtVc.getAll() +// } - public async getMdocCredentials(agentReq: Req) { - return await agentReq.agent.mdoc.getAll() - } +// public async getMdocCredentials(agentReq: Req) { +// return await agentReq.agent.mdoc.getAll() +// } - public async decodeMdocCredential( - agentReq: Req, - options: { - base64Url: string - }, - ) { - const credential = Mdoc.fromBase64Url(options.base64Url) - return { - namespace: credential.issuerSignedNamespaces, - docType: credential.docType, - validityInfo: credential.validityInfo, - issuerSignedCertificateChain: credential.issuerSignedCertificateChain, - } as any - } +// public async decodeMdocCredential( +// agentReq: Req, +// options: { +// base64Url: string +// }, +// ) { +// const credential = Mdoc.fromBase64Url(options.base64Url) +// return { +// namespace: credential.issuerSignedNamespaces, +// docType: credential.docType, +// validityInfo: credential.validityInfo, +// issuerSignedCertificateChain: credential.issuerSignedCertificateChain, +// } as any +// } - public async resolveCredentialOffer(agentReq: Req, body: ResolveCredentialOfferBody) { - return (await agentReq.agent.modules.openId4VcHolderModule.resolveCredentialOffer(body.credentialOfferUri)) as any - } +// public async resolveCredentialOffer(agentReq: Req, body: ResolveCredentialOfferBody) { +// return (await agentReq.agent.modules.openId4VcHolderModule.resolveCredentialOffer(body.credentialOfferUri)) as any +// } - public async requestAuthorizationForCredential(agentReq: Req, body: AuthorizeRequestCredentialOffer) { - console.log('Requesting authorization for credential offer:', body) - const resolvedCredentialOffer = await agentReq.agent.modules.openId4VcHolderModule.resolveCredentialOffer( - body.credentialOfferUri, - ) - console.log('Resolved credential offer:', resolvedCredentialOffer) - const resolvedAuthorization = await this.initiateAuthorization( - agentReq, - resolvedCredentialOffer, - body.credentialsToRequest, - ) +// public async requestAuthorizationForCredential(agentReq: Req, body: AuthorizeRequestCredentialOffer) { +// console.log('Requesting authorization for credential offer:', body) +// const resolvedCredentialOffer = await agentReq.agent.modules.openId4VcHolderModule.resolveCredentialOffer( +// body.credentialOfferUri, +// ) +// console.log('Resolved credential offer:', resolvedCredentialOffer) +// const resolvedAuthorization = await this.initiateAuthorization( +// agentReq, +// resolvedCredentialOffer, +// body.credentialsToRequest, +// ) - let actionToTake = '' - let authorizationRequestUrl: string | undefined = undefined - let codeVerifier: string | undefined = undefined - console.log('Resolved authorization', resolvedAuthorization) +// let actionToTake = '' +// let authorizationRequestUrl: string | undefined = undefined +// let codeVerifier: string | undefined = undefined +// console.log('Resolved authorization', resolvedAuthorization) - switch (resolvedAuthorization.authorizationFlow) { - case 'Oauth2Redirect': - actionToTake = 'Open the authorizationRequestUrl in your browser.' - authorizationRequestUrl = resolvedAuthorization.authorizationRequestUrl - codeVerifier = resolvedAuthorization.codeVerifier - break - case 'PresentationDuringIssuance': - actionToTake = 'Presentation during issuance not supported yet' - break - case 'PreAuthorized': - if (resolvedCredentialOffer.credentialOfferPayload.grants?.[preAuthorizedCodeGrantIdentifier]?.tx_code) { - actionToTake = 'Ask for txcode from issuer and use it further' - } - break - } +// switch (resolvedAuthorization.authorizationFlow) { +// case 'Oauth2Redirect': +// actionToTake = 'Open the authorizationRequestUrl in your browser.' +// authorizationRequestUrl = resolvedAuthorization.authorizationRequestUrl +// codeVerifier = resolvedAuthorization.codeVerifier +// break +// case 'PresentationDuringIssuance': +// actionToTake = 'Presentation during issuance not supported yet' +// break +// case 'PreAuthorized': +// if (resolvedCredentialOffer.credentialOfferPayload.grants?.[preAuthorizedCodeGrantIdentifier]?.tx_code) { +// actionToTake = 'Ask for txcode from issuer and use it further' +// } +// break +// } - return { actionToTake, authorizationRequestUrl, codeVerifier } as any - } +// return { actionToTake, authorizationRequestUrl, codeVerifier } as any +// } - public async requestCredential(agentReq: Req, body: RequestCredentialBody) { - const resolvedCredentialOffer = await agentReq.agent.modules.openId4VcHolderModule.resolveCredentialOffer( - body.credentialOfferUri, - ) +// public async requestCredential(agentReq: Req, body: RequestCredentialBody) { +// const resolvedCredentialOffer = await agentReq.agent.modules.openId4VcHolderModule.resolveCredentialOffer( +// body.credentialOfferUri, +// ) - let options: OpenId4VciTokenRequestOptions - if (resolvedCredentialOffer.credentialOfferPayload.grants?.[preAuthorizedCodeGrantIdentifier]) { - options = { - resolvedCredentialOffer, - txCode: body.txCode, - code: body.authorizationCode, - } as OpenId4VciPreAuthorizedTokenRequestOptions - } else { - options = { - resolvedCredentialOffer, - code: body.authorizationCode, - clientId: this.HOLDER_CLIENT_ID, - codeVerifier: body.codeVerifier, - redirectUri: this.HOLDER_REDIRECT, - } as OpenId4VcAuthorizationCodeTokenRequestOptions - } +// let options: OpenId4VciTokenRequestOptions +// if (resolvedCredentialOffer.credentialOfferPayload.grants?.[preAuthorizedCodeGrantIdentifier]) { +// options = { +// resolvedCredentialOffer, +// txCode: body.txCode, +// code: body.authorizationCode, +// } as OpenId4VciPreAuthorizedTokenRequestOptions +// } else { +// options = { +// resolvedCredentialOffer, +// code: body.authorizationCode, +// clientId: this.HOLDER_CLIENT_ID, +// codeVerifier: body.codeVerifier, +// redirectUri: this.HOLDER_REDIRECT, +// } as OpenId4VcAuthorizationCodeTokenRequestOptions +// } - return (await this.requestAndStoreCredentials(agentReq, resolvedCredentialOffer, options)) as any - } +// // return (await this.requestAndStoreCredentials(agentReq, resolvedCredentialOffer, options)) as any +// return {} as any +// } - private async requestAndStoreCredentials( - agentReq: Req, - resolvedCredentialOffer: OpenId4VciResolvedCredentialOffer, - options: OpenId4VciTokenRequestOptions, - ) { - const tokenResponse = await agentReq.agent.modules.openId4VcHolderModule.requestToken({ ...options }) - const credentialResponse = await agentReq.agent.modules.openId4VcHolderModule.requestCredentials({ - ...options, - credentialConfigurationIds: resolvedCredentialOffer.credentialOfferPayload.credential_configuration_ids, - credentialBindingResolver: async ({ - keyTypes, - supportedDidMethods, - supportsAllDidMethods, - }: { - keyTypes: string[] - supportedDidMethods?: string[] - supportsAllDidMethods?: boolean - }) => { - const key = await agentReq.agent.wallet.createKey({ keyType: keyTypes[0] as any }) - if (supportsAllDidMethods || supportedDidMethods?.includes('did:key')) { - const didKey = new DidKey(key) - return { method: 'did', didUrl: `${didKey.did}#${didKey.key.fingerprint}` } - } - if (supportedDidMethods?.includes('did:jwk')) { - const didJwk = DidJwk.fromJwk(getJwkFromKey(key)) - return { method: 'did', didUrl: `${didJwk.did}#0` } - } - return { method: 'jwk', jwk: getJwkFromKey(key) } - }, - ...tokenResponse, - }) +// // private async requestAndStoreCredentials( +// // agentReq: Req, +// // resolvedCredentialOffer: OpenId4VciResolvedCredentialOffer, +// // options: OpenId4VciTokenRequestOptions, +// // ) { +// // const tokenResponse = await agentReq.agent.modules.openId4VcHolderModule.requestToken({ ...options }) +// // const credentialResponse = await agentReq.agent.modules.openId4VcHolderModule.requestCredentials({ +// // ...options, +// // credentialConfigurationIds: resolvedCredentialOffer.credentialOfferPayload.credential_configuration_ids, +// // credentialBindingResolver: async ({ +// // keyTypes, +// // supportedDidMethods, +// // supportsAllDidMethods, +// // }: { +// // keyTypes: string[] +// // supportedDidMethods?: string[] +// // supportsAllDidMethods?: boolean +// // }) => { +// // const key = await agentReq.agent.wallet.createKey({ keyType: keyTypes[0] as any }) +// // if (supportsAllDidMethods || supportedDidMethods?.includes('did:key')) { +// // const didKey = new DidKey(key) +// // return { method: 'did', didUrl: `${didKey.did}#${didKey.key.fingerprint}` } +// // } +// // if (supportedDidMethods?.includes('did:jwk')) { +// // const didJwk = DidJwk.fromJwk(getJwkFromKey(key)) +// // return { method: 'did', didUrl: `${didJwk.did}#0` } +// // } +// // return { method: 'jwk', jwk: getJwkFromKey(key) } +// // }, +// // ...tokenResponse, +// // }) - const storedCredentials = await Promise.all( - credentialResponse.credentials.map(async (response: any) => { - const credential = response.credentials[0] - if (credential instanceof W3cJwtVerifiableCredential || credential instanceof W3cJsonLdVerifiableCredential) { - return await agentReq.agent.w3cCredentials.storeCredential({ credential }) - } - if (credential instanceof Mdoc) { - return await agentReq.agent.mdoc.store(credential) - } - return await agentReq.agent.sdJwtVc.store(credential.compact) - }), - ) +// // const storedCredentials = await Promise.all( +// // credentialResponse.credentials.map(async (response: any) => { +// // const credential = response.credentials[0] +// // if (credential instanceof W3cJwtVerifiableCredential || credential instanceof W3cJsonLdVerifiableCredential) { +// // return await agentReq.agent.w3cCredentials.storeCredential({ credential }) +// // } +// // if (credential instanceof Mdoc) { +// // return await agentReq.agent.mdoc.store(credential) +// // } +// // return await agentReq.agent.sdJwtVc.store(credential.compact) +// // }), +// // ) - return storedCredentials as any - } +// // return storedCredentials as any +// // } - private async initiateAuthorization( - agentReq: Req, - resolvedCredentialOffer: OpenId4VciResolvedCredentialOffer, - credentialsToRequest: string[], - ) { - console.log('Initiating authorization with resolvedCredentialOffer:', resolvedCredentialOffer) - console.log('Credentials to request:', credentialsToRequest) +// private async initiateAuthorization( +// agentReq: Req, +// resolvedCredentialOffer: OpenId4VciResolvedCredentialOffer, +// credentialsToRequest: string[], +// ) { +// console.log('Initiating authorization with resolvedCredentialOffer:', resolvedCredentialOffer) +// console.log('Credentials to request:', credentialsToRequest) - const grants = resolvedCredentialOffer.credentialOfferPayload.grants - console.log('Grants:', grants) +// const grants = resolvedCredentialOffer.credentialOfferPayload.grants +// console.log('Grants:', grants) - // 👉 Handle Pre-Authorized Code Grant - if (grants?.[preAuthorizedCodeGrantIdentifier]) { - const preAuthorizedCode = grants[preAuthorizedCodeGrantIdentifier]['pre-authorized_code'] - return { - authorizationFlow: 'PreAuthorized' as const, - preAuthorizedCode, - } - } +// // 👉 Handle Pre-Authorized Code Grant +// if (grants?.[preAuthorizedCodeGrantIdentifier]) { +// const preAuthorizedCode = grants[preAuthorizedCodeGrantIdentifier]['pre-authorized_code'] +// return { +// authorizationFlow: 'PreAuthorized' as const, +// preAuthorizedCode, +// } +// } - // 👉 Handle Authorization Code Grant - if (grants?.[authorizationCodeGrantIdentifier]) { - console.log('Using authorization code grant flow') +// // 👉 Handle Authorization Code Grant +// if (grants?.[authorizationCodeGrantIdentifier]) { +// console.log('Using authorization code grant flow') - const scope = Object.entries(resolvedCredentialOffer.offeredCredentialConfigurations) - .map(([id, val]) => (credentialsToRequest.includes(id) ? val.scope : undefined)) - .filter((v): v is string => Boolean(v)) +// const scope = Object.entries(resolvedCredentialOffer.offeredCredentialConfigurations) +// .map(([id, val]) => (credentialsToRequest.includes(id) ? val.scope : undefined)) +// .filter((v): v is string => Boolean(v)) - const resolved = await agentReq.agent.modules.openId4VcHolderModule.resolveOpenId4VciAuthorizationRequest( - resolvedCredentialOffer, - { - clientId: this.HOLDER_CLIENT_ID, - redirectUri: this.HOLDER_REDIRECT, - scope, - }, - ) +// const resolved = await agentReq.agent.modules.openId4VcHolderModule.resolveOpenId4VciAuthorizationRequest( +// resolvedCredentialOffer, +// { +// clientId: this.HOLDER_CLIENT_ID, +// redirectUri: this.HOLDER_REDIRECT, +// scope, +// }, +// ) - // 👉 Support Presentation During Issuance flow - if (resolved.authorizationFlow === OpenId4VciAuthorizationFlow.PresentationDuringIssuance) { - return { - ...resolved, - authorizationFlow: 'PresentationDuringIssuance' as const, - } - } +// // 👉 Support Presentation During Issuance flow +// if (resolved.authorizationFlow === OpenId4VciAuthorizationFlow.PresentationDuringIssuance) { +// return { +// ...resolved, +// authorizationFlow: 'PresentationDuringIssuance' as const, +// } +// } - return { - ...resolved, - authorizationFlow: 'Oauth2Redirect' as const, - } as any - } +// return { +// ...resolved, +// authorizationFlow: 'Oauth2Redirect' as const, +// } as any +// } - // ❌ Unsupported grant - throw new Error('Unsupported grant type') - } +// // ❌ Unsupported grant +// throw new Error('Unsupported grant type') +// } - public async resolveProofRequest(agentReq: Req, body: ResolveProofRequest) { - return (await agentReq.agent.modules.openId4VcHolderModule.resolveOpenId4VpAuthorizationRequest( - body.proofRequestUri, - )) as any - } +// public async resolveProofRequest(agentReq: Req, body: ResolveProofRequest) { +// return (await agentReq.agent.modules.openId4VcHolderModule.resolveOpenId4VpAuthorizationRequest( +// body.proofRequestUri, +// )) as any +// } - public async acceptPresentationRequest(agentReq: Req, body: ResolveProofRequest) { - const resolved = await agentReq.agent.modules.openId4VcHolderModule.resolveOpenId4VpAuthorizationRequest( - body.proofRequestUri, - ) - console.log('Resolved proof request:', resolved) - // const presentationExchangeService = agent.dependencyManager.resolve(DifPresentationExchangeService) +// public async acceptPresentationRequest(agentReq: Req, body: ResolveProofRequest) { +// const resolved = await agentReq.agent.modules.openId4VcHolderModule.resolveOpenId4VpAuthorizationRequest( +// body.proofRequestUri, +// ) +// console.log('Resolved proof request:', resolved) +// // const presentationExchangeService = agent.dependencyManager.resolve(DifPresentationExchangeService) - if (!resolved.dcql) throw new Error('Missing DCQL on request') - console.log('DCQL query result:', resolved.dcql.queryResult) - // - let dcqlCredentials - try { - dcqlCredentials = await agentReq.agent.modules.openId4VcHolderModule.selectCredentialsForDcqlRequest( - resolved.dcql.queryResult, - ) - console.log('Selected credentials for DCQL request:', dcqlCredentials) - } catch (error) { - console.error('Error selecting credentials for DCQL request:', error) - throw error - } - const submissionResult = await agentReq.agent.modules.openId4VcHolderModule.acceptOpenId4VpAuthorizationRequest({ - authorizationRequestPayload: resolved.authorizationRequestPayload, - dcql: { - credentials: dcqlCredentials as DcqlCredentialsForRequest, - }, - }) - console.log('Presentation submission result:', submissionResult) - return submissionResult.serverResponse - } +// if (!resolved.dcql) throw new Error('Missing DCQL on request') +// console.log('DCQL query result:', resolved.dcql.queryResult) +// // +// let dcqlCredentials +// try { +// dcqlCredentials = await agentReq.agent.modules.openId4VcHolderModule.selectCredentialsForDcqlRequest( +// resolved.dcql.queryResult, +// ) +// console.log('Selected credentials for DCQL request:', dcqlCredentials) +// } catch (error) { +// console.error('Error selecting credentials for DCQL request:', error) +// throw error +// } +// const submissionResult = await agentReq.agent.modules.openId4VcHolderModule.acceptOpenId4VpAuthorizationRequest({ +// authorizationRequestPayload: resolved.authorizationRequestPayload, +// dcql: { +// credentials: dcqlCredentials as DcqlCredentialsForRequest, +// }, +// }) +// console.log('Presentation submission result:', submissionResult) +// return submissionResult.serverResponse +// } - public async decodeSdJwt(agentReq: Req, body: { jwt: string }) { - const sdJwt = agentReq.agent.sdJwtVc.fromCompact(body.jwt) - return sdJwt as any - } +// public async decodeSdJwt(agentReq: Req, body: { jwt: string }) { +// const sdJwt = agentReq.agent.sdJwtVc.fromCompact(body.jwt) +// return sdJwt as any +// } - public async getSelectedCredentialsForRequest( - dcqlQueryResult: DcqlQueryResult, - selectedCredentials: { [credentialQueryId: string]: string }, - ) { - if (!dcqlQueryResult.canBeSatisfied) { - throw new Error( - 'Cannot select the credentials for the dcql query presentation if the request cannot be satisfied', - ) - } - // TODO: Implement logic to select credentials based on selectedCredentials - return {} as any // Placeholder return to avoid errors - } -} -export const holderService = new HolderService() +// public async getSelectedCredentialsForRequest( +// dcqlQueryResult: DcqlQueryResult, +// selectedCredentials: { [credentialQueryId: string]: string }, +// ) { +// if (!dcqlQueryResult.can_be_satisfied) { +// throw new Error( +// 'Cannot select the credentials for the dcql query presentation if the request cannot be satisfied', +// ) +// } +// // TODO: Implement logic to select credentials based on selectedCredentials +// return {} as any // Placeholder return to avoid errors +// } +// } +// export const holderService = new HolderService() diff --git a/src/controllers/openid4vc/issuance-sessions/issuance-sessions.Controller.ts b/src/controllers/openid4vc/issuance-sessions/issuance-sessions.Controller.ts index 792e58b4..f49e3d0f 100644 --- a/src/controllers/openid4vc/issuance-sessions/issuance-sessions.Controller.ts +++ b/src/controllers/openid4vc/issuance-sessions/issuance-sessions.Controller.ts @@ -1,107 +1,107 @@ -import { OpenId4VcIssuanceSessionState } from '@credo-ts/openid4vc' -import { Request as Req } from 'express' -import { Body, Controller, Delete, Get, Path, Post, Put, Query, Request, Route, Tags, Security } from 'tsoa' -import { injectable } from 'tsyringe' +// import { OpenId4VcIssuanceSessionState } from '@credo-ts/openid4vc' +// import { Request as Req } from 'express' +// import { Body, Controller, Delete, Get, Path, Post, Put, Query, Request, Route, Tags, Security } from 'tsoa' +// import { injectable } from 'tsyringe' -import { SCOPES } from '../../../enums' -// eslint-disable-next-line import/order -import ErrorHandlingService from '../../../errorHandlingService' +// import { SCOPES } from '../../../enums' +// // eslint-disable-next-line import/order +// import ErrorHandlingService from '../../../errorHandlingService' -// import { AgentWithRootOrTenant } from '../../types/agent' -import { OpenId4VcIssuanceSessionsCreateOffer } from '../types/issuer.types' +// // import { AgentWithRootOrTenant } from '../../types/agent' +// import { OpenId4VcIssuanceSessionsCreateOffer } from '../types/issuer.types' -import { issuanceSessionService } from './issuance-sessions.service' +// import { issuanceSessionService } from './issuance-sessions.service' -/** - * Controller for managing OpenID4VC issuance sessions. - * Provides endpoints to create credential offers, retrieve issuance sessions, - * update session metadata, and delete sessions. - */ -@Tags('oid4vc issuance sessions') -@Route('/openid4vc/issuance-sessions') -@Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) -@injectable() -export class IssuanceSessionsController extends Controller { - /** - * Creates a credential offer with the specified credential configurations and authorization type. - */ - @Post('/create-credential-offer') - public async createCredentialOffer(@Request() request: Req, @Body() options: OpenId4VcIssuanceSessionsCreateOffer) { - try { - return await issuanceSessionService.createCredentialOffer(options, request) - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// /** +// * Controller for managing OpenID4VC issuance sessions. +// * Provides endpoints to create credential offers, retrieve issuance sessions, +// * update session metadata, and delete sessions. +// */ +// @Tags('oid4vc issuance sessions') +// @Route('/openid4vc/issuance-sessions') +// @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) +// @injectable() +// export class IssuanceSessionsController extends Controller { +// /** +// * Creates a credential offer with the specified credential configurations and authorization type. +// */ +// @Post('/create-credential-offer') +// public async createCredentialOffer(@Request() request: Req, @Body() options: OpenId4VcIssuanceSessionsCreateOffer) { +// try { +// return await issuanceSessionService.createCredentialOffer(options, request) +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Get issuance details by issuance SessionId - */ - @Get('/:issuanceSessionId') - public async getIssuanceSessionsById(@Request() request: Req, @Path('issuanceSessionId') issuanceSessionId: string) { - try { - return await issuanceSessionService.getIssuanceSessionsById(request, issuanceSessionId) - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// /** +// * Get issuance details by issuance SessionId +// */ +// @Get('/:issuanceSessionId') +// public async getIssuanceSessionsById(@Request() request: Req, @Path('issuanceSessionId') issuanceSessionId: string) { +// try { +// return await issuanceSessionService.getIssuanceSessionsById(request, issuanceSessionId) +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Fetch all issuance sessions by query - */ - @Get('/') - public async getIssuanceSessionsByQuery( - @Request() request: Req, - @Query() cNonce?: string, - @Query() publicIssuerId?: string, - @Query() preAuthorizedCode?: string, - @Query() state?: OpenId4VcIssuanceSessionState, - @Query() credentialOfferUri?: string, - @Query() authorizationCode?: string, - ) { - try { - return await issuanceSessionService.getIssuanceSessionsByQuery( - request, - cNonce, - publicIssuerId, - preAuthorizedCode, - state, - credentialOfferUri, - authorizationCode, - ) - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// /** +// * Fetch all issuance sessions by query +// */ +// @Get('/') +// public async getIssuanceSessionsByQuery( +// @Request() request: Req, +// @Query() cNonce?: string, +// @Query() publicIssuerId?: string, +// @Query() preAuthorizedCode?: string, +// @Query() state?: OpenId4VcIssuanceSessionState, +// @Query() credentialOfferUri?: string, +// @Query() authorizationCode?: string, +// ) { +// try { +// return await issuanceSessionService.getIssuanceSessionsByQuery( +// request, +// cNonce, +// publicIssuerId, +// preAuthorizedCode, +// state, +// credentialOfferUri, +// authorizationCode, +// ) +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Update issuance session metadata by session ID - */ - @Put('/:issuanceSessionId') - public async updateSessionById( - @Request() request: Req, - @Path('issuanceSessionId') issuanceSessionId: string, - @Body() metadata: Record, - ) { - try { - return await issuanceSessionService.updateSessionIssuanceMetadataById(request, issuanceSessionId, metadata) - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// /** +// * Update issuance session metadata by session ID +// */ +// @Put('/:issuanceSessionId') +// public async updateSessionById( +// @Request() request: Req, +// @Path('issuanceSessionId') issuanceSessionId: string, +// @Body() metadata: Record, +// ) { +// try { +// return await issuanceSessionService.updateSessionIssuanceMetadataById(request, issuanceSessionId, metadata) +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Delete issuance session by session ID - */ - @Delete('/:issuanceSessionId') - public async deleteIssuanceSessionById( - @Request() request: Req, - @Path('issuanceSessionId') issuanceSessionId: string, - ) { - try { - await issuanceSessionService.deleteById(request, issuanceSessionId) - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } -} +// /** +// * Delete issuance session by session ID +// */ +// @Delete('/:issuanceSessionId') +// public async deleteIssuanceSessionById( +// @Request() request: Req, +// @Path('issuanceSessionId') issuanceSessionId: string, +// ) { +// try { +// await issuanceSessionService.deleteById(request, issuanceSessionId) +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } +// } diff --git a/src/controllers/openid4vc/issuance-sessions/issuance-sessions.service.ts b/src/controllers/openid4vc/issuance-sessions/issuance-sessions.service.ts index e45755a3..ffd2cf17 100644 --- a/src/controllers/openid4vc/issuance-sessions/issuance-sessions.service.ts +++ b/src/controllers/openid4vc/issuance-sessions/issuance-sessions.service.ts @@ -1,138 +1,138 @@ -import type { OpenId4VcIssuanceSessionsCreateOffer } from '../types/issuer.types' -import type { Request as Req } from 'express' - -import { type OpenId4VcIssuanceSessionState } from '@credo-ts/openid4vc' -import { OpenId4VcIssuanceSessionRepository } from '@credo-ts/openid4vc/build/openid4vc-issuer/repository' - -import { SignerMethod } from '../../../enums/enum' -import { BadRequestError, NotFoundError } from '../../../errors/errors' - -class IssuanceSessionsService { - public async createCredentialOffer(options: OpenId4VcIssuanceSessionsCreateOffer, agentReq: Req) { - const { credentials, publicIssuerId } = options - - const issuer = await agentReq.agent.modules.openId4VcIssuer.getIssuerByIssuerId(publicIssuerId) - - const mappedCredentials = credentials.map((cred) => { - const supported = issuer.credentialConfigurationsSupported[cred.credentialSupportedId] - if (!supported) { - throw new Error(`CredentialSupportedId '${cred.credentialSupportedId}' is not supported by issuer`) - } - if (supported.format !== cred.format) { - throw new Error( - `Format mismatch for '${cred.credentialSupportedId}': expected '${supported.format}', got '${cred.format}'`, - ) - } - - // must have signing options - if (!cred.signerOptions?.method) { - throw new BadRequestError( - `signerOptions must be provided and allowed methods are ${Object.values(SignerMethod).join(', ')}`, - ) - } - - if (cred.signerOptions.method == SignerMethod.Did && !cred.signerOptions.did) { - throw new BadRequestError( - `For ${cred.credentialSupportedId} : did must be present inside signerOptions if SignerMethod is 'did' `, - ) - } - - if (cred.signerOptions.method === SignerMethod.X5c && !cred.signerOptions.x5c) { - throw new BadRequestError( - `For ${cred.credentialSupportedId} : x5c must be present inside signerOptions if SignerMethod is 'x5c' `, - ) - } - - const currentVct = cred.payload && 'vct' in cred.payload ? cred.payload.vct : undefined - return { - ...cred, - payload: { - ...cred.payload, - vct: currentVct ?? (typeof supported.vct === 'string' ? supported.vct : undefined), - }, - } - }) - - options.issuanceMetadata ||= {} - - options.issuanceMetadata.credentials = mappedCredentials - - const { credentialOffer, issuanceSession } = await agentReq.agent.modules.openId4VcIssuer.createCredentialOffer({ - issuerId: publicIssuerId, - issuanceMetadata: options.issuanceMetadata, - offeredCredentials: credentials.map((c) => c.credentialSupportedId), - preAuthorizedCodeFlowConfig: options.preAuthorizedCodeFlowConfig, - authorizationCodeFlowConfig: options.authorizationCodeFlowConfig, - }) - - return { credentialOffer, issuanceSession } - } - - public async getIssuanceSessionsById(agentReq: Req, sessionId: string) { - return agentReq.agent.modules.openId4VcIssuer.getIssuanceSessionById(sessionId) - } - - public async getIssuanceSessionsByQuery( - agentReq: Req, - cNonce?: string, - publicIssuerId?: string, - preAuthorizedCode?: string, - state?: OpenId4VcIssuanceSessionState, - credentialOfferUri?: string, - authorizationCode?: string, - ) { - const issuanceSessionRepository = agentReq.agent.dependencyManager.resolve(OpenId4VcIssuanceSessionRepository) - const issuanceSessions = await issuanceSessionRepository.findByQuery(agentReq.agent.context, { - cNonce, - issuerId: publicIssuerId, - preAuthorizedCode, - state, - credentialOfferUri, - authorizationCode, - }) - - return issuanceSessions - } - - /** - * update an existing issuance session metadata, useful for mobile edge - * agents that will scan QR codes to notify the system of their - * wallet user id - * - * @param issuerAgent - * @param sessionId - * @param metadata - * @returns the updated issuance session record - */ - public async updateSessionIssuanceMetadataById(agentReq: Req, sessionId: string, metadata: Record) { - const issuanceSessionRepository = agentReq.agent.dependencyManager.resolve(OpenId4VcIssuanceSessionRepository) - - const record = await issuanceSessionRepository.findById(agentReq.agent.context, sessionId) - - if (!record) { - throw new NotFoundError(`Issuance session with id ${sessionId} not found`) - } - - record.issuanceMetadata = { - ...record.issuanceMetadata, - ...metadata, - } - - await issuanceSessionRepository.update(agentReq.agent.context, record) - - return record - } - - /** - * deletes ann issuance session by id - * - * @param sessionId - * @param issuerAgent - */ - public async deleteById(agentReq: Req, sessionId: string): Promise { - const issuanceSessionRepository = agentReq.agent.dependencyManager.resolve(OpenId4VcIssuanceSessionRepository) - await issuanceSessionRepository.deleteById(agentReq.agent.context, sessionId) - } -} - -export const issuanceSessionService = new IssuanceSessionsService() +// import type { OpenId4VcIssuanceSessionsCreateOffer } from '../types/issuer.types' +// import type { Request as Req } from 'express' + +// import { type OpenId4VcIssuanceSessionState } from '@credo-ts/openid4vc' +// import { OpenId4VcIssuanceSessionRepository } from '@credo-ts/openid4vc' + +// import { SignerMethod } from '../../../enums/enum' +// import { BadRequestError, NotFoundError } from '../../../errors/errors' + +// class IssuanceSessionsService { +// public async createCredentialOffer(options: OpenId4VcIssuanceSessionsCreateOffer, agentReq: Req) { +// const { credentials, publicIssuerId } = options + +// const issuer = await agentReq.agent.modules.openId4VcIssuer.getIssuerByIssuerId(publicIssuerId) + +// const mappedCredentials = credentials.map((cred) => { +// const supported = issuer.credentialConfigurationsSupported[cred.credentialSupportedId] +// if (!supported) { +// throw new Error(`CredentialSupportedId '${cred.credentialSupportedId}' is not supported by issuer`) +// } +// if (supported.format !== cred.format) { +// throw new Error( +// `Format mismatch for '${cred.credentialSupportedId}': expected '${supported.format}', got '${cred.format}'`, +// ) +// } + +// // must have signing options +// if (!cred.signerOptions?.method) { +// throw new BadRequestError( +// `signerOptions must be provided and allowed methods are ${Object.values(SignerMethod).join(', ')}`, +// ) +// } + +// if (cred.signerOptions.method == SignerMethod.Did && !cred.signerOptions.did) { +// throw new BadRequestError( +// `For ${cred.credentialSupportedId} : did must be present inside signerOptions if SignerMethod is 'did' `, +// ) +// } + +// if (cred.signerOptions.method === SignerMethod.X5c && !cred.signerOptions.x5c) { +// throw new BadRequestError( +// `For ${cred.credentialSupportedId} : x5c must be present inside signerOptions if SignerMethod is 'x5c' `, +// ) +// } + +// const currentVct = cred.payload && 'vct' in cred.payload ? cred.payload.vct : undefined +// return { +// ...cred, +// payload: { +// ...cred.payload, +// vct: currentVct ?? (typeof supported.vct === 'string' ? supported.vct : undefined), +// }, +// } +// }) + +// options.issuanceMetadata ||= {} + +// options.issuanceMetadata.credentials = mappedCredentials + +// const { credentialOffer, issuanceSession } = await agentReq.agent.modules.openId4VcIssuer.createCredentialOffer({ +// issuerId: publicIssuerId, +// issuanceMetadata: options.issuanceMetadata, +// offeredCredentials: credentials.map((c) => c.credentialSupportedId), +// preAuthorizedCodeFlowConfig: options.preAuthorizedCodeFlowConfig, +// authorizationCodeFlowConfig: options.authorizationCodeFlowConfig, +// }) + +// return { credentialOffer, issuanceSession } +// } + +// public async getIssuanceSessionsById(agentReq: Req, sessionId: string) { +// return agentReq.agent.modules.openId4VcIssuer.getIssuanceSessionById(sessionId) +// } + +// public async getIssuanceSessionsByQuery( +// agentReq: Req, +// cNonce?: string, +// publicIssuerId?: string, +// preAuthorizedCode?: string, +// state?: OpenId4VcIssuanceSessionState, +// credentialOfferUri?: string, +// authorizationCode?: string, +// ) { +// const issuanceSessionRepository = agentReq.agent.dependencyManager.resolve(OpenId4VcIssuanceSessionRepository) +// const issuanceSessions = await issuanceSessionRepository.findByQuery(agentReq.agent.context, { +// cNonce, +// issuerId: publicIssuerId, +// preAuthorizedCode, +// state, +// credentialOfferUri, +// authorizationCode, +// }) + +// return issuanceSessions +// } + +// /** +// * update an existing issuance session metadata, useful for mobile edge +// * agents that will scan QR codes to notify the system of their +// * wallet user id +// * +// * @param issuerAgent +// * @param sessionId +// * @param metadata +// * @returns the updated issuance session record +// */ +// public async updateSessionIssuanceMetadataById(agentReq: Req, sessionId: string, metadata: Record) { +// const issuanceSessionRepository = agentReq.agent.dependencyManager.resolve(OpenId4VcIssuanceSessionRepository) + +// const record = await issuanceSessionRepository.findById(agentReq.agent.context, sessionId) + +// if (!record) { +// throw new NotFoundError(`Issuance session with id ${sessionId} not found`) +// } + +// record.issuanceMetadata = { +// ...record.issuanceMetadata, +// ...metadata, +// } + +// await issuanceSessionRepository.update(agentReq.agent.context, record) + +// return record +// } + +// /** +// * deletes ann issuance session by id +// * +// * @param sessionId +// * @param issuerAgent +// */ +// public async deleteById(agentReq: Req, sessionId: string): Promise { +// const issuanceSessionRepository = agentReq.agent.dependencyManager.resolve(OpenId4VcIssuanceSessionRepository) +// await issuanceSessionRepository.deleteById(agentReq.agent.context, sessionId) +// } +// } + +// export const issuanceSessionService = new IssuanceSessionsService() diff --git a/src/controllers/openid4vc/issuers/issuer.Controller.ts b/src/controllers/openid4vc/issuers/issuer.Controller.ts index cfd49d6b..149ed0b8 100644 --- a/src/controllers/openid4vc/issuers/issuer.Controller.ts +++ b/src/controllers/openid4vc/issuers/issuer.Controller.ts @@ -1,108 +1,108 @@ -import { - Controller, - Delete, - Get, - Post, - Put, - Route, - Tags, - Path, - Query, - Body, - Security, - Request, - Example -} from 'tsoa' -import { injectable } from 'tsyringe' +// import { +// Controller, +// Delete, +// Get, +// Post, +// Put, +// Route, +// Tags, +// Path, +// Query, +// Body, +// Security, +// Request, +// Example +// } from 'tsoa' +// import { injectable } from 'tsyringe' -import ErrorHandlingService from '../../../errorHandlingService' -import { CreateIssuerOptions, UpdateIssuerRecordOptions } from '../types/issuer.types' -import { Request as Req } from 'express' +// import ErrorHandlingService from '../../../errorHandlingService' +// import { CreateIssuerOptions, UpdateIssuerRecordOptions } from '../types/issuer.types' +// import { Request as Req } from 'express' -import { issuerService } from './issuer.service' -import { SCOPES } from '../../../enums' -import { OpenId4VcUpdateIssuerRecordOptionsExample } from '../examples/issuer.examples' -@Route('/openid4vc/issuer') -@Tags('oid4vc issuers') -@Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) -@injectable() -export class IssuerController extends Controller { - /** - * Creates an issuer with issuer metadata. - */ - @Post() - @Example( - OpenId4VcUpdateIssuerRecordOptionsExample.withScope.value - ) - public async createIssuer(@Request() request: Req, @Body() createIssuerOptions: CreateIssuerOptions) { - try { - return await issuerService.createIssuerAgent(request, createIssuerOptions) - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// import { issuerService } from './issuer.service' +// import { SCOPES } from '../../../enums' +// import { OpenId4VcUpdateIssuerRecordOptionsExample } from '../examples/issuer.examples' +// @Route('/openid4vc/issuer') +// @Tags('oid4vc issuers') +// @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) +// @injectable() +// export class IssuerController extends Controller { +// /** +// * Creates an issuer with issuer metadata. +// */ +// @Post() +// @Example( +// OpenId4VcUpdateIssuerRecordOptionsExample.withScope.value +// ) +// public async createIssuer(@Request() request: Req, @Body() createIssuerOptions: CreateIssuerOptions) { +// try { +// return await issuerService.createIssuerAgent(request, createIssuerOptions) +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Updates issuer metadata for a given publicIssuerId. - */ - @Put('{publicIssuerId}') - public async updateIssuerMetadata( - @Request() request: Req, - @Path() publicIssuerId: string, - @Body() updateIssuerRecordOptions: UpdateIssuerRecordOptions, - ) { - try { - return await issuerService.updateIssuerMetadata(request, publicIssuerId, updateIssuerRecordOptions) - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// /** +// * Updates issuer metadata for a given publicIssuerId. +// */ +// @Put('{publicIssuerId}') +// public async updateIssuerMetadata( +// @Request() request: Req, +// @Path() publicIssuerId: string, +// @Body() updateIssuerRecordOptions: UpdateIssuerRecordOptions, +// ) { +// try { +// return await issuerService.updateIssuerMetadata(request, publicIssuerId, updateIssuerRecordOptions) +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Returns metadata for a specific issuer. - */ - @Get('{issuerId}/metadata') - public async getIssuerAgentMetaData(@Request() request: Req, @Path() issuerId: string) { - try { - return await issuerService.getIssuerAgentMetaData(request, issuerId) - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// /** +// * Returns metadata for a specific issuer. +// */ +// @Get('{issuerId}/metadata') +// public async getIssuerAgentMetaData(@Request() request: Req, @Path() issuerId: string) { +// try { +// return await issuerService.getIssuerAgentMetaData(request, issuerId) +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Query issuers by optional publicIssuerId. - */ - @Get() - public async getIssuersByQuery(@Request() request: Req, @Query() publicIssuerId?: string) { - try { - return await issuerService.getIssuersByQuery(request, publicIssuerId) - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// /** +// * Query issuers by optional publicIssuerId. +// */ +// @Get() +// public async getIssuersByQuery(@Request() request: Req, @Query() publicIssuerId?: string) { +// try { +// return await issuerService.getIssuersByQuery(request, publicIssuerId) +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Returns a specific issuer by publicIssuerId. - */ - @Get('{publicIssuerId}') - public async getIssuer(@Request() request: Req, @Path() publicIssuerId: string) { - try { - return await issuerService.getIssuer(request, publicIssuerId) - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// /** +// * Returns a specific issuer by publicIssuerId. +// */ +// @Get('{publicIssuerId}') +// public async getIssuer(@Request() request: Req, @Path() publicIssuerId: string) { +// try { +// return await issuerService.getIssuer(request, publicIssuerId) +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Deletes a specific issuer by record id. - */ - @Delete('{id}') - public async deleteIssuer(@Request() request: Req, @Path() id: string): Promise { - try { - await issuerService.deleteIssuer(request, id) - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } -} +// /** +// * Deletes a specific issuer by record id. +// */ +// @Delete('{id}') +// public async deleteIssuer(@Request() request: Req, @Path() id: string): Promise { +// try { +// await issuerService.deleteIssuer(request, id) +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } +// } diff --git a/src/controllers/openid4vc/issuers/issuer.service.ts b/src/controllers/openid4vc/issuers/issuer.service.ts index aff9f7fb..f1552097 100644 --- a/src/controllers/openid4vc/issuers/issuer.service.ts +++ b/src/controllers/openid4vc/issuers/issuer.service.ts @@ -1,57 +1,57 @@ -import type { RestAgentModules, RestMultiTenantAgentModules } from '../../../cliAgent' -import type { Agent } from '@credo-ts/core' -import { Request as Req } from 'express' - -import { OpenId4VcIssuerRepository } from '@credo-ts/openid4vc/build/openid4vc-issuer/repository' - -export class IssuerService { - public async createIssuerAgent( - agentReq: Req, - createIssuerOptions: any, //TODO: Replace with OpenId4VciCreateIssuerOptions, - ) { - const issuerRecord = await agentReq.agent.modules.openId4VcIssuer.createIssuer(createIssuerOptions) - const issuerMetadata = await agentReq.agent.modules.openId4VcIssuer.getIssuerMetadata(issuerRecord.issuerId) - // eslint-disable-next-line no-console - console.log(`\nIssuer URL: ${issuerMetadata.credentialIssuer.credential_issuer}`) - return issuerRecord - } - - public async updateIssuerMetadata( - agentReq: Req, - publicIssuerId: string, - updateIssuerRecordOptions: any, // TODO: Replace with OpenId4VcUpdateIssuerRecordOptions - ) { - await agentReq.agent.modules.openId4VcIssuer.updateIssuerMetadata({ - issuerId: publicIssuerId, - ...updateIssuerRecordOptions, - }) - return await this.getIssuer(agentReq, publicIssuerId) - } - - public async getIssuersByQuery( - agentReq: Req, - publicIssuerId?: string, - ) { - const repository = agentReq.agent.dependencyManager.resolve(OpenId4VcIssuerRepository) - return await repository.findByQuery(agentReq.agent.context, { issuerId: publicIssuerId }) - } - - public async getIssuer(agentReq:Req , publicIssuerId: string) { - return await agentReq.agent.modules.openId4VcIssuer.getIssuerByIssuerId(publicIssuerId) - } - - public async deleteIssuer(agentReq: Req, issuerId: string) { - const repository = agentReq.agent.dependencyManager.resolve(OpenId4VcIssuerRepository) - await repository.deleteById(agentReq.agent.context, issuerId) - } - - public async getIssuerAgentMetaData( - agentReq: Req, - issuerId: string, - ) { - // return await agent.modules.openId4VcIssuer.getIssuerMetadata(issuerId) - return 0 - } -} - -export const issuerService = new IssuerService() +// import type { RestAgentModules, RestMultiTenantAgentModules } from '../../../cliAgent' +// import type { Agent } from '@credo-ts/core' +// // import { OpenId4VcIssuerRepository } from '@credo-ts/openid4vc/build/openid4vc-issuer/repository/OpenId4VcIssuerRepository.mjs' +// import { Request as Req } from 'express' + + +// export class IssuerService { +// public async createIssuerAgent( +// agentReq: Req, +// createIssuerOptions: any, //TODO: Replace with OpenId4VciCreateIssuerOptions, +// ) { +// const issuerRecord = await agentReq.agent.modules.openId4VcIssuer.createIssuer(createIssuerOptions) +// const issuerMetadata = await agentReq.agent.modules.openId4VcIssuer.getIssuerMetadata(issuerRecord.issuerId) +// // eslint-disable-next-line no-console +// console.log(`\nIssuer URL: ${issuerMetadata.credentialIssuer.credential_issuer}`) +// return issuerRecord +// } + +// public async updateIssuerMetadata( +// agentReq: Req, +// publicIssuerId: string, +// updateIssuerRecordOptions: any, // TODO: Replace with OpenId4VcUpdateIssuerRecordOptions +// ) { +// await agentReq.agent.modules.openId4VcIssuer.updateIssuerMetadata({ +// issuerId: publicIssuerId, +// ...updateIssuerRecordOptions, +// }) +// return await this.getIssuer(agentReq, publicIssuerId) +// } + +// public async getIssuersByQuery( +// agentReq: Req, +// publicIssuerId?: string, +// ) { +// const repository = agentReq.agent.dependencyManager.resolve(OpenId4VcIssuerRepository) +// return await repository.findByQuery(agentReq.agent.context, { issuerId: publicIssuerId }) +// } + +// public async getIssuer(agentReq:Req , publicIssuerId: string) { +// return await agentReq.agent.modules.openId4VcIssuer.getIssuerByIssuerId(publicIssuerId) +// } + +// public async deleteIssuer(agentReq: Req, issuerId: string) { +// const repository = agentReq.agent.dependencyManager.resolve(OpenId4VcIssuerRepository) +// await repository.deleteById(agentReq.agent.context, issuerId) +// } + +// public async getIssuerAgentMetaData( +// agentReq: Req, +// issuerId: string, +// ) { +// // return await agent.modules.openId4VcIssuer.getIssuerMetadata(issuerId) +// return 0 +// } +// } + +// export const issuerService = new IssuerService() diff --git a/src/controllers/openid4vc/verifier-sessions/verification-sessions.Controller.ts b/src/controllers/openid4vc/verifier-sessions/verification-sessions.Controller.ts index 20d47555..83dd01c6 100644 --- a/src/controllers/openid4vc/verifier-sessions/verification-sessions.Controller.ts +++ b/src/controllers/openid4vc/verifier-sessions/verification-sessions.Controller.ts @@ -1,87 +1,87 @@ -import { Agent } from '@credo-ts/core' -import { OpenId4VcVerificationSessionState } from '@credo-ts/openid4vc' -import { Controller, Get, Path, Query, Route, Request, Security, Tags, Post, Body } from 'tsoa' -import { injectable } from 'tsyringe' -import ErrorHandlingService from '../../../errorHandlingService' +// import { Agent } from '@credo-ts/core' +// import { OpenId4VcVerificationSessionState } from '@credo-ts/openid4vc' +// import { Controller, Get, Path, Query, Route, Request, Security, Tags, Post, Body } from 'tsoa' +// import { injectable } from 'tsyringe' +// import ErrorHandlingService from '../../../errorHandlingService' -import { verificationSessionService } from './verification-sessions.service' -import { SCOPES } from '../../../enums' -import { Request as Req } from 'express' -import { CreateAuthorizationRequest } from '../types/verifier.types' +// import { verificationSessionService } from './verification-sessions.service' +// import { SCOPES } from '../../../enums' +// import { Request as Req } from 'express' +// import { CreateAuthorizationRequest } from '../types/verifier.types' -@Tags('oid4vc verification sessions') -@Route('/openid4vc/verification-sessions') -@Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) -@injectable() -export class VerificationSessionsController extends Controller { - /** - * Create an authorization request, acting as a Relying Party (RP) - */ - @Post('/create-presentation-request') - public async createProofRequest( - @Request() request: Req, - @Body() createAuthorizationRequest: CreateAuthorizationRequest, - ) { - try { - return await verificationSessionService.createProofRequest(request, createAuthorizationRequest) - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// @Tags('oid4vc verification sessions') +// @Route('/openid4vc/verification-sessions') +// @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) +// @injectable() +// export class VerificationSessionsController extends Controller { +// /** +// * Create an authorization request, acting as a Relying Party (RP) +// */ +// @Post('/create-presentation-request') +// public async createProofRequest( +// @Request() request: Req, +// @Body() createAuthorizationRequest: CreateAuthorizationRequest, +// ) { +// try { +// return await verificationSessionService.createProofRequest(request, createAuthorizationRequest) +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Retrieve all verification session records - */ - @Get('/') - public async getAllVerificationSessions( - @Request() request: Req, - @Query('publicVerifierId') publicVerifierId?: string, - @Query('payloadState') payloadState?: string, - @Query('state') state?: OpenId4VcVerificationSessionState, - @Query('authorizationRequestUri') authorizationRequestUri?: string, - @Query('nonce') nonce?: string, - ) { - try { - return await verificationSessionService.findVerificationSessionsByQuery( - request, - publicVerifierId, - payloadState, - state, - authorizationRequestUri, - nonce, - ) - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// /** +// * Retrieve all verification session records +// */ +// @Get('/') +// public async getAllVerificationSessions( +// @Request() request: Req, +// @Query('publicVerifierId') publicVerifierId?: string, +// @Query('payloadState') payloadState?: string, +// @Query('state') state?: OpenId4VcVerificationSessionState, +// @Query('authorizationRequestUri') authorizationRequestUri?: string, +// @Query('nonce') nonce?: string, +// ) { +// try { +// return await verificationSessionService.findVerificationSessionsByQuery( +// request, +// publicVerifierId, +// payloadState, +// state, +// authorizationRequestUri, +// nonce, +// ) +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Get verification session by ID - */ - @Get('/:verificationSessionId') - public async getVerificationSessionsById( - @Request() request: Req, - @Path('verificationSessionId') verificationSessionId: string, - ) { - try { - return await verificationSessionService.getVerificationSessionsById(request, verificationSessionId) - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } - // TODO: Uncomment when the method is implemented: There was a problem resolving type of 'IDTokenPayload'. - // /** - // * Get verification response by verification Session ID - // */ - @Get('/response/:verificationSessionId') - public async getVerifiedAuthorizationResponse( - @Request() request: Req, - @Path('verificationSessionId') verificationSessionId: string, - ) { - try { - return await verificationSessionService.getVerifiedAuthorizationResponse(request, verificationSessionId) - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } -} +// /** +// * Get verification session by ID +// */ +// @Get('/:verificationSessionId') +// public async getVerificationSessionsById( +// @Request() request: Req, +// @Path('verificationSessionId') verificationSessionId: string, +// ) { +// try { +// return await verificationSessionService.getVerificationSessionsById(request, verificationSessionId) +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } +// // TODO: Uncomment when the method is implemented: There was a problem resolving type of 'IDTokenPayload'. +// // /** +// // * Get verification response by verification Session ID +// // */ +// @Get('/response/:verificationSessionId') +// public async getVerifiedAuthorizationResponse( +// @Request() request: Req, +// @Path('verificationSessionId') verificationSessionId: string, +// ) { +// try { +// return await verificationSessionService.getVerifiedAuthorizationResponse(request, verificationSessionId) +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } +// } diff --git a/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts b/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts index ffa49c0c..1a648246 100644 --- a/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts +++ b/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts @@ -1,207 +1,209 @@ -import type { RestAgentModules, RestMultiTenantAgentModules } from '../../../cliAgent' - -import { - Agent, - ClaimFormat, - DidKey, - JsonEncoder, - JsonTransformer, - Jwt, - MdocDeviceResponse, - RecordNotFoundError, - TypedArrayEncoder, - W3cJsonLdVerifiablePresentation, - W3cJwtVerifiablePresentation, - X509Service, -} from '@credo-ts/core' -import { OpenId4VcIssuerX5c, OpenId4VcJwtIssuerDid, OpenId4VcVerificationSessionState } from '@credo-ts/openid4vc' -import { injectable } from 'tsyringe' -import { Request as Req } from 'express' -import { SignerMethod } from '../../../enums' -import { CreateAuthorizationRequest, ResponseModeEnum } from '../types/verifier.types' - -// import { CreateAuthorizationRequest } from '../types/verifier.types' - -@injectable() -class VerificationSessionsService { - public async createProofRequest(agentReq: Req, dto: CreateAuthorizationRequest) { - try { - let requestSigner - if (dto.requestSigner.method === SignerMethod.Did) { - requestSigner = dto.requestSigner as OpenId4VcJwtIssuerDid - - const didToResolve = dto.requestSigner?.didUrl - if (!didToResolve) { - throw new Error('No DID provided to resolve (neither requestSigner.didUrl nor verifierDid present)') - } - - const didDocument = await agentReq.agent.dids.resolveDidDocument(didToResolve) - - let verifierDidUrl: string | undefined = undefined - if (didDocument.verificationMethod?.[0]?.id) { - verifierDidUrl = didDocument.verificationMethod[0].id - } - - if (!verifierDidUrl) { - throw new Error('No matching verification method found on verifier DID document') - } - - if (!requestSigner.didUrl || !String(requestSigner.didUrl).includes('#')) { - requestSigner.didUrl = verifierDidUrl - } - - requestSigner = { method: 'did', didUrl: verifierDidUrl } as any - } else { - requestSigner = dto.requestSigner as OpenId4VcIssuerX5c - - const parsedCertificate = X509Service.parseCertificate(agentReq.agent.context, { - encodedCertificate: requestSigner.x5c[0], - }) - requestSigner.issuer = parsedCertificate.sanUriNames[0] - } - - if (!requestSigner) { - } else if (requestSigner.method === 'did') { - } - const options: any = { - requestSigner, - verifierId: dto.verifierId, - } - - if(dto.responseMode === ResponseModeEnum.DC_API || ResponseModeEnum.DC_API_JWT){ - options.expectedOrigins = dto.expectedOrigins - } - - if (dto.responseMode) options.responseMode = dto.responseMode - if (dto.presentationExchange) { - options.presentationExchange = dto.presentationExchange - } else if (dto.dcql) { - options.dcql = dto.dcql - } - - return (await agentReq.agent.modules.openId4VcVerifier.createAuthorizationRequest(options)) as any - } catch (error) { - throw error - } - } - - public async findVerificationSessionsByQuery( - agentReq: Req, - publicVerifierId?: string, - payloadState?: string, - state?: OpenId4VcVerificationSessionState, - authorizationRequestUri?: string, - nonce?: string, - ) { - return await agentReq.agent.modules.openId4VcVerifier.findVerificationSessionsByQuery({ - verifierId: publicVerifierId, - payloadState, - state, - authorizationRequestUri, - nonce, - }) - } - - public async getVerificationSessionsById(agentReq: Req, verificationSessionId: string) { - return await agentReq.agent.modules.openId4VcVerifier.getVerificationSessionById(verificationSessionId) - } - - public async getVerifiedAuthorizationResponse(request: Req, verificationSessionId: string) { - const verificationSession = - await request.agent.modules.openId4VcVerifier.getVerificationSessionById(verificationSessionId) - const verified = await request.agent.modules.openId4VcVerifier.getVerifiedAuthorizationResponse( - verificationSession.id, - ) - console.log(verified.presentationExchange?.presentations) - console.log(verified.dcql?.presentationResult) - - const presentations = await Promise.all( - (verified.presentationExchange?.presentations ?? Object.values(verified.dcql?.presentations ?? {})) - .flat() - .map(async (presentation) => { - if (presentation instanceof W3cJsonLdVerifiablePresentation) { - return { - pretty: presentation.toJson(), - encoded: presentation.toJson(), - } - } - - if (presentation instanceof W3cJwtVerifiablePresentation) { - return { - pretty: JsonTransformer.toJSON(presentation.presentation), - encoded: presentation.serializedJwt, - } - } - - if (presentation instanceof MdocDeviceResponse) { - return { - pretty: JsonTransformer.toJSON({ - documents: presentation.documents.map((doc) => ({ - doctype: doc.docType, - alg: doc.alg, - base64Url: doc.base64Url, - validityInfo: doc.validityInfo, - deviceSignedNamespaces: doc.deviceSignedNamespaces, - issuerSignedNamespaces: Object.entries(doc.issuerSignedNamespaces).map( - ([nameSpace, nameSpacEntries]) => [ - nameSpace, - Object.entries(nameSpacEntries).map(([key, value]) => - value instanceof Uint8Array - ? [`base64:${key}`, `data:image/jpeg;base64,${TypedArrayEncoder.toBase64(value)}`] - : [key, value], - ), - ], - ), - })), - }), - encoded: presentation.base64Url, - } - } - - // if ( - // presentation instanceof W3cV2JwtVerifiablePresentation || - // presentation instanceof W3cV2SdJwtVerifiablePresentation - // ) { - // throw new Error('W3C V2 presentations are not supported yet') - // } - - return { - pretty: { - ...presentation, - compact: undefined, - }, - encoded: presentation.compact, - } - }) ?? [], - ) - - const dcqlSubmission = verified.dcql - ? Object.keys(verified.dcql.presentations).map((key, index) => ({ - queryCredentialId: key, - presentationIndex: index, - })) - : undefined - - console.log('presentations', presentations) - - return { - verificationSessionId: verificationSession.id, - responseStatus: verificationSession.state, - error: verificationSession.errorMessage, - //authorizationRequest, - - presentations: presentations, - - submission: verified.presentationExchange?.submission, - definition: verified.presentationExchange?.definition, - transactionDataSubmission: verified.transactionData, - - // dcqlQuery, - dcqlSubmission: verified.dcql - ? { ...verified.dcql.presentationResult, vpTokenMapping: dcqlSubmission } - : undefined, - } as any - } -} - -export const verificationSessionService = new VerificationSessionsService() +// import type { RestAgentModules, RestMultiTenantAgentModules } from '../../../cliAgent' + +// import { +// Agent, +// ClaimFormat, +// DidKey, +// JsonEncoder, +// JsonTransformer, +// Jwt, +// Mdoc, +// MdocDeviceResponse, +// RecordNotFoundError, +// TypedArrayEncoder, +// W3cJsonLdVerifiablePresentation, +// W3cJwtVerifiablePresentation, +// W3cPresentation, +// X509Service, +// } from '@credo-ts/core' +// import { OpenId4VcJwtIssuerDid, OpenId4VcVerificationSessionState } from '@credo-ts/openid4vc' +// import { injectable } from 'tsyringe' +// import { Request as Req } from 'express' +// import { SignerMethod } from '../../../enums' +// import { CreateAuthorizationRequest, OpenId4VcIssuerX5c, ResponseModeEnum } from '../types/verifier.types' + +// // import { CreateAuthorizationRequest } from '../types/verifier.types' + +// @injectable() +// class VerificationSessionsService { +// public async createProofRequest(agentReq: Req, dto: CreateAuthorizationRequest) { +// try { +// let requestSigner +// if (dto.requestSigner.method === SignerMethod.Did) { +// requestSigner = dto.requestSigner as OpenId4VcJwtIssuerDid + +// const didToResolve = dto.requestSigner?.didUrl +// if (!didToResolve) { +// throw new Error('No DID provided to resolve (neither requestSigner.didUrl nor verifierDid present)') +// } + +// const didDocument = await agentReq.agent.dids.resolveDidDocument(didToResolve) + +// let verifierDidUrl: string | undefined = undefined +// if (didDocument.verificationMethod?.[0]?.id) { +// verifierDidUrl = didDocument.verificationMethod[0].id +// } + +// if (!verifierDidUrl) { +// throw new Error('No matching verification method found on verifier DID document') +// } + +// if (!requestSigner.didUrl || !String(requestSigner.didUrl).includes('#')) { +// requestSigner.didUrl = verifierDidUrl +// } + +// requestSigner = { method: 'did', didUrl: verifierDidUrl } as any +// } else { +// requestSigner = dto.requestSigner as OpenId4VcIssuerX5c + +// const parsedCertificate = X509Service.parseCertificate(agentReq.agent.context, { +// encodedCertificate: requestSigner.x5c[0], +// }) +// requestSigner.issuer = parsedCertificate.sanUriNames[0] +// } + +// if (!requestSigner) { +// } else if (requestSigner.method === 'did') { +// } +// const options: any = { +// requestSigner, +// verifierId: dto.verifierId, +// } + +// if(dto.responseMode === ResponseModeEnum.DC_API || ResponseModeEnum.DC_API_JWT){ +// options.expectedOrigins = dto.expectedOrigins +// } + +// if (dto.responseMode) options.responseMode = dto.responseMode +// if (dto.presentationExchange) { +// options.presentationExchange = dto.presentationExchange +// } else if (dto.dcql) { +// options.dcql = dto.dcql +// } + +// return (await agentReq.agent.modules.openId4VcVerifier.createAuthorizationRequest(options)) as any +// } catch (error) { +// throw error +// } +// } + +// public async findVerificationSessionsByQuery( +// agentReq: Req, +// publicVerifierId?: string, +// payloadState?: string, +// state?: OpenId4VcVerificationSessionState, +// authorizationRequestUri?: string, +// nonce?: string, +// ) { +// return await agentReq.agent.modules.openId4VcVerifier.findVerificationSessionsByQuery({ +// verifierId: publicVerifierId, +// payloadState, +// state, +// authorizationRequestUri, +// nonce, +// }) +// } + +// public async getVerificationSessionsById(agentReq: Req, verificationSessionId: string) { +// return await agentReq.agent.modules.openId4VcVerifier.getVerificationSessionById(verificationSessionId) +// } + +// public async getVerifiedAuthorizationResponse(request: Req, verificationSessionId: string) { +// const verificationSession = +// await request.agent.modules.openId4VcVerifier.getVerificationSessionById(verificationSessionId) +// const verified = await request.agent.modules.openId4VcVerifier.getVerifiedAuthorizationResponse( +// verificationSession.id, +// ) +// console.log(verified.presentationExchange?.presentations) +// console.log(verified.dcql?.presentationResult) + +// const presentations = await Promise.all( +// (verified.presentationExchange?.presentations ?? Object.values(verified.dcql?.presentations ?? {})) +// .flat() +// .map(async (presentation: { toJson: () => any; presentation: W3cPresentation; serializedJwt: any; documents: Mdoc[]; base64Url: any; compact: any }) => { +// if (presentation instanceof W3cJsonLdVerifiablePresentation) { +// return { +// pretty: presentation.toJson(), +// encoded: presentation.toJson(), +// } +// } + +// if (presentation instanceof W3cJwtVerifiablePresentation) { +// return { +// pretty: JsonTransformer.toJSON(presentation.presentation), +// encoded: presentation.serializedJwt, +// } +// } + +// if (presentation instanceof MdocDeviceResponse) { +// return { +// pretty: JsonTransformer.toJSON({ +// documents: presentation.documents.map((doc) => ({ +// doctype: doc.docType, +// alg: doc.alg, +// base64Url: doc.base64Url, +// validityInfo: doc.validityInfo, +// deviceSignedNamespaces: doc.deviceSignedNamespaces, +// issuerSignedNamespaces: Object.entries(doc.issuerSignedNamespaces).map( +// ([nameSpace, nameSpacEntries]) => [ +// nameSpace, +// Object.entries(nameSpacEntries).map(([key, value]) => +// value instanceof Uint8Array +// ? [`base64:${key}`, `data:image/jpeg;base64,${TypedArrayEncoder.toBase64(value)}`] +// : [key, value], +// ), +// ], +// ), +// })), +// }), +// encoded: presentation.base64Url, +// } +// } + +// // if ( +// // presentation instanceof W3cV2JwtVerifiablePresentation || +// // presentation instanceof W3cV2SdJwtVerifiablePresentation +// // ) { +// // throw new Error('W3C V2 presentations are not supported yet') +// // } + +// return { +// pretty: { +// ...presentation, +// compact: undefined, +// }, +// encoded: presentation.compact, +// } +// }) ?? [], +// ) + +// const dcqlSubmission = verified.dcql +// ? Object.keys(verified.dcql.presentations).map((key, index) => ({ +// queryCredentialId: key, +// presentationIndex: index, +// })) +// : undefined + +// console.log('presentations', presentations) + +// return { +// verificationSessionId: verificationSession.id, +// responseStatus: verificationSession.state, +// error: verificationSession.errorMessage, +// //authorizationRequest, + +// presentations: presentations, + +// submission: verified.presentationExchange?.submission, +// definition: verified.presentationExchange?.definition, +// transactionDataSubmission: verified.transactionData, + +// // dcqlQuery, +// dcqlSubmission: verified.dcql +// ? { ...verified.dcql.presentationResult, vpTokenMapping: dcqlSubmission } +// : undefined, +// } as any +// } +// } + +// export const verificationSessionService = new VerificationSessionsService() diff --git a/src/controllers/openid4vc/verifiers/verifier.Controller.ts b/src/controllers/openid4vc/verifiers/verifier.Controller.ts index 21266961..3dd6006e 100644 --- a/src/controllers/openid4vc/verifiers/verifier.Controller.ts +++ b/src/controllers/openid4vc/verifiers/verifier.Controller.ts @@ -1,64 +1,64 @@ -import { SCOPES } from '../../../enums' -import { Body, Delete, Get, Path, Post, Put, Query, Route, Request, Security, Tags } from 'tsoa' -import { Request as Req } from 'express' +// import { SCOPES } from '../../../enums' +// import { Body, Delete, Get, Path, Post, Put, Query, Route, Request, Security, Tags } from 'tsoa' +// import { Request as Req } from 'express' -import { OpenId4VcSiopCreateVerifierOptions, OpenId4VcUpdateVerifierRecordOptions } from '../types/verifier.types' -import { VerifierService } from '../verifiers/verifier.service' +// import { OpenId4VcSiopCreateVerifierOptions, OpenId4VcUpdateVerifierRecordOptions } from '../types/verifier.types' +// import { VerifierService } from '../verifiers/verifier.service' -@Tags('oid4vc verifiers') -@Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) -@Route('openid4vc/verifier') -export class VerifierController { - private verifierService: VerifierService +// @Tags('oid4vc verifiers') +// @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) +// @Route('openid4vc/verifier') +// export class VerifierController { +// private verifierService: VerifierService - public constructor() { - this.verifierService = new VerifierService() - } +// public constructor() { +// this.verifierService = new VerifierService() +// } - /** - * Create a new verifier and store the verifier record - */ - @Post('/') - public async createVerifier(@Request() request: Req, @Body() options: OpenId4VcSiopCreateVerifierOptions) { - return await this.verifierService.createVerifier(request, options) - } +// /** +// * Create a new verifier and store the verifier record +// */ +// @Post('/') +// public async createVerifier(@Request() request: Req, @Body() options: OpenId4VcSiopCreateVerifierOptions) { +// return await this.verifierService.createVerifier(request, options) +// } - /** - * Update verifier metadata - */ - @Put('{publicVerifierId}') - public async updateVerifierMetadata( - @Request() request: Req, - @Path('publicVerifierId') publicVerifierId: string, - @Body() verifierRecordOptions: OpenId4VcUpdateVerifierRecordOptions, - ) { - return await this.verifierService.updateVerifierMetadata(request, { - verifierId: publicVerifierId, - clientMetadata: verifierRecordOptions.clientMetadata, - }) - } +// /** +// * Update verifier metadata +// */ +// @Put('{publicVerifierId}') +// public async updateVerifierMetadata( +// @Request() request: Req, +// @Path('publicVerifierId') publicVerifierId: string, +// @Body() verifierRecordOptions: OpenId4VcUpdateVerifierRecordOptions, +// ) { +// return await this.verifierService.updateVerifierMetadata(request, { +// verifierId: publicVerifierId, +// clientMetadata: verifierRecordOptions.clientMetadata, +// }) +// } - /** - * Get verifiers by query - */ - @Get('/') - public async getVerifiersByQuery(@Request() request: Req, @Query() publicVerifierId?: string) { - return await this.verifierService.getVerifiersByQuery(request, publicVerifierId) - } +// /** +// * Get verifiers by query +// */ +// @Get('/') +// public async getVerifiersByQuery(@Request() request: Req, @Query() publicVerifierId?: string) { +// return await this.verifierService.getVerifiersByQuery(request, publicVerifierId) +// } - /** - * Get single verifier by ID - */ - @Get('{publicVerifierId}') - public async getVerifier(@Request() request: Req, @Path('publicVerifierId') publicVerifierId: string) { - return await this.verifierService.getVerifier(request, publicVerifierId) - } +// /** +// * Get single verifier by ID +// */ +// @Get('{publicVerifierId}') +// public async getVerifier(@Request() request: Req, @Path('publicVerifierId') publicVerifierId: string) { +// return await this.verifierService.getVerifier(request, publicVerifierId) +// } - /** - * Delete verifier by ID - */ - @Delete('{verifierId}') - public async deleteVerifier(@Request() request: Req, @Path('verifierId') verifierId: string): Promise { - await this.verifierService.deleteVerifier(request, verifierId) - } -} +// /** +// * Delete verifier by ID +// */ +// @Delete('{verifierId}') +// public async deleteVerifier(@Request() request: Req, @Path('verifierId') verifierId: string): Promise { +// await this.verifierService.deleteVerifier(request, verifierId) +// } +// } diff --git a/src/controllers/openid4vc/verifiers/verifier.service.ts b/src/controllers/openid4vc/verifiers/verifier.service.ts index 3a4d696c..9bb29c12 100644 --- a/src/controllers/openid4vc/verifiers/verifier.service.ts +++ b/src/controllers/openid4vc/verifiers/verifier.service.ts @@ -1,57 +1,57 @@ -import type { RestAgentModules, RestMultiTenantAgentModules } from '../../../../src/cliAgent' -import type { Agent } from '@credo-ts/core' -import type { OpenId4VcUpdateVerifierRecordOptions } from '@credo-ts/openid4vc' - -import { OpenId4VcVerifierRepository } from '@credo-ts/openid4vc' -import { OpenId4VcSiopCreateVerifierOptions } from '../types/verifier.types' -import { Request as Req } from 'express' - -export class VerifierService { - public async createVerifier( - agentReq: Req, - options: OpenId4VcSiopCreateVerifierOptions, - ) { - const verifierRecord = await agentReq.agent.modules.openId4VcVerifier.createVerifier(options) - return verifierRecord - } - - public async updateVerifierMetadata( - agentReq: Req, - options: OpenId4VcUpdateVerifierRecordOptions, - ) { - // console.log(`Updating verifier ${options.verifierId}`) - - await agentReq.agent.modules.openId4VcVerifier.updateVerifierMetadata(options) - const verifierRecord = await this.getVerifier(agentReq, options.verifierId) - return verifierRecord - } - - public async getVerifiersByQuery( - agentReq: Req, - publicVerifierId?: string, - ) { - const verifierRepository = agentReq.agent.dependencyManager.resolve(OpenId4VcVerifierRepository) - const verifiers = await verifierRepository.findByQuery(agentReq.agent.context, { - verifierId: publicVerifierId, - }) - - return verifiers - } - - public async getVerifier( - agentReq: Req, - publicVerifierId: string, - ) { - return await agentReq.agent.modules.openId4VcVerifier.getVerifierByVerifierId(publicVerifierId) - } - - public async deleteVerifier( - agentReq: Req, - publicVerifierId: string, - ) { - const verifierRepository = agentReq.agent.dependencyManager.resolve(OpenId4VcVerifierRepository) - await verifierRepository.deleteById(agentReq.agent.context, publicVerifierId) - } -} - -export const issuerService = new VerifierService() +// import type { RestAgentModules, RestMultiTenantAgentModules } from '../../../../src/cliAgent' +// import type { Agent } from '@credo-ts/core' +// import type { OpenId4VcUpdateVerifierRecordOptions } from '@credo-ts/openid4vc' + +// import { OpenId4VcVerifierRepository } from '@credo-ts/openid4vc' +// import { OpenId4VcSiopCreateVerifierOptions } from '../types/verifier.types' +// import { Request as Req } from 'express' + +// export class VerifierService { +// public async createVerifier( +// agentReq: Req, +// options: OpenId4VcSiopCreateVerifierOptions, +// ) { +// const verifierRecord = await agentReq.agent.modules.openId4VcVerifier.createVerifier(options) +// return verifierRecord +// } + +// public async updateVerifierMetadata( +// agentReq: Req, +// options: OpenId4VcUpdateVerifierRecordOptions, +// ) { +// // console.log(`Updating verifier ${options.verifierId}`) + +// await agentReq.agent.modules.openId4VcVerifier.updateVerifierMetadata(options) +// const verifierRecord = await this.getVerifier(agentReq, options.verifierId) +// return verifierRecord +// } + +// public async getVerifiersByQuery( +// agentReq: Req, +// publicVerifierId?: string, +// ) { +// const verifierRepository = agentReq.agent.dependencyManager.resolve(OpenId4VcVerifierRepository) +// const verifiers = await verifierRepository.findByQuery(agentReq.agent.context, { +// verifierId: publicVerifierId, +// }) + +// return verifiers +// } + +// public async getVerifier( +// agentReq: Req, +// publicVerifierId: string, +// ) { +// return await agentReq.agent.modules.openId4VcVerifier.getVerifierByVerifierId(publicVerifierId) +// } + +// public async deleteVerifier( +// agentReq: Req, +// publicVerifierId: string, +// ) { +// const verifierRepository = agentReq.agent.dependencyManager.resolve(OpenId4VcVerifierRepository) +// await verifierRepository.deleteById(agentReq.agent.context, publicVerifierId) +// } +// } + +// export const issuerService = new VerifierService() diff --git a/src/controllers/polygon/PolygonController.ts b/src/controllers/polygon/PolygonController.ts index edcc46cb..e889e2b7 100644 --- a/src/controllers/polygon/PolygonController.ts +++ b/src/controllers/polygon/PolygonController.ts @@ -1,146 +1,146 @@ -import type { SchemaMetadata } from '../types' +// import type { SchemaMetadata } from '../types' -import { generateSecp256k1KeyPair } from '@ayanworks/credo-polygon-w3c-module' -import { DidOperation, DidOperationOptions } from '@ayanworks/credo-polygon-w3c-module/build/ledger' -import { Request as Req } from 'express' -import * as fs from 'fs' -import { Route, Tags, Security, Controller, Post, Body, Get, Path, Request } from 'tsoa' -import { injectable } from 'tsyringe' +// import { generateSecp256k1KeyPair } from '@ayanworks/credo-polygon-w3c-module' +// // import { DidOperation, DidOperationOptions } from '@ayanworks/credo-polygon-w3c-module' +// import { Request as Req } from 'express' +// import * as fs from 'fs' +// import { Route, Tags, Security, Controller, Post, Body, Get, Path, Request } from 'tsoa' +// import { injectable } from 'tsyringe' -import { CredentialEnum, SCOPES } from '../../enums' -import ErrorHandlingService from '../../errorHandlingService' -import { BadRequestError, UnprocessableEntityError } from '../../errors' +// import { CredentialEnum, SCOPES } from '../../enums' +// import ErrorHandlingService from '../../errorHandlingService' +// import { BadRequestError, UnprocessableEntityError } from '../../errors' -@Tags('Polygon') -@Route('/polygon') -@injectable() -export class Polygon extends Controller { - /** - * Create Secp256k1 key pair for polygon DID - * - * @returns Secp256k1KeyPair - */ - @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT, SCOPES.MULTITENANT_BASE_AGENT]) - @Post('create-keys') - public async createKeyPair(): Promise<{ - privateKey: string - publicKeyBase58: string - address: string - }> { - try { - return await generateSecp256k1KeyPair() - } catch (error) { - // Handle the error here - throw ErrorHandlingService.handle(error) - } - } +// @Tags('Polygon') +// @Route('/polygon') +// @injectable() +// export class Polygon extends Controller { +// /** +// * Create Secp256k1 key pair for polygon DID +// * +// * @returns Secp256k1KeyPair +// */ +// @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT, SCOPES.MULTITENANT_BASE_AGENT]) +// @Post('create-keys') +// public async createKeyPair(): Promise<{ +// privateKey: string +// publicKeyBase58: string +// address: string +// }> { +// try { +// return await generateSecp256k1KeyPair() +// } catch (error) { +// // Handle the error here +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Create polygon based W3C schema - * - * @returns Schema JSON - */ - @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) - @Post('create-schema') - public async createSchema( - @Request() request: Req, - @Body() - createSchemaRequest: { - did: string - schemaName: string - schema: Record - }, - ): Promise { - try { - const { did, schemaName, schema } = createSchemaRequest - if (!did || !schemaName || !schema) { - throw new BadRequestError('One or more parameters are empty or undefined.') - } +// /** +// * Create polygon based W3C schema +// * +// * @returns Schema JSON +// */ +// @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) +// @Post('create-schema') +// public async createSchema( +// @Request() request: Req, +// @Body() +// createSchemaRequest: { +// did: string +// schemaName: string +// schema: Record +// }, +// ): Promise { +// try { +// const { did, schemaName, schema } = createSchemaRequest +// if (!did || !schemaName || !schema) { +// throw new BadRequestError('One or more parameters are empty or undefined.') +// } - const schemaResponse = await request.agent.modules.polygon.createSchema({ - did, - schemaName, - schema, - }) - if (schemaResponse.schemaState?.state === CredentialEnum.Failed) { - const reason = schemaResponse.schemaState?.reason?.toLowerCase() - if (reason && reason.includes('insufficient') && reason.includes('funds')) { - throw new UnprocessableEntityError( - 'Insufficient funds to the address, Please add funds to perform this operation', - ) - } else { - throw new Error(schemaResponse.schemaState?.reason) - } - } - const schemaServerConfig = fs.readFileSync('config.json', 'utf-8') - const configJson = JSON.parse(schemaServerConfig) - if (!configJson.schemaFileServerURL) { - throw new Error('Please provide valid schema file server URL') - } +// const schemaResponse = await request.agent.modules.polygon.createSchema({ +// did, +// schemaName, +// schema, +// }) +// if (schemaResponse.schemaState?.state === CredentialEnum.Failed) { +// const reason = schemaResponse.schemaState?.reason?.toLowerCase() +// if (reason && reason.includes('insufficient') && reason.includes('funds')) { +// throw new UnprocessableEntityError( +// 'Insufficient funds to the address, Please add funds to perform this operation', +// ) +// } else { +// throw new Error(schemaResponse.schemaState?.reason) +// } +// } +// const schemaServerConfig = fs.readFileSync('config.json', 'utf-8') +// const configJson = JSON.parse(schemaServerConfig) +// if (!configJson.schemaFileServerURL) { +// throw new Error('Please provide valid schema file server URL') +// } - if (!schemaResponse?.schemaId) { - throw new BadRequestError('Error in getting schema response or Invalid schema response') - } - const schemaPayload: SchemaMetadata = { - schemaUrl: configJson.schemaFileServerURL + schemaResponse?.schemaId, - did: schemaResponse?.did, - schemaId: schemaResponse?.schemaId, - schemaTxnHash: schemaResponse?.resourceTxnHash, - } - return schemaPayload - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// if (!schemaResponse?.schemaId) { +// throw new BadRequestError('Error in getting schema response or Invalid schema response') +// } +// const schemaPayload: SchemaMetadata = { +// schemaUrl: configJson.schemaFileServerURL + schemaResponse?.schemaId, +// did: schemaResponse?.did, +// schemaId: schemaResponse?.schemaId, +// schemaTxnHash: schemaResponse?.resourceTxnHash, +// } +// return schemaPayload +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - /** - * Estimate transaction - * - * @returns Transaction Object - */ - @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT, SCOPES.MULTITENANT_BASE_AGENT]) - @Post('estimate-transaction') - public async estimateTransaction( - @Request() request: Req, - @Body() - estimateTransactionRequest: DidOperationOptions, - ): Promise { - try { - const { operation } = estimateTransactionRequest +// // /** +// // * Estimate transaction +// // * +// // * @returns Transaction Object +// // */ +// // @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT, SCOPES.MULTITENANT_BASE_AGENT]) +// // @Post('estimate-transaction') +// // public async estimateTransaction( +// // @Request() request: Req, +// // @Body() +// // estimateTransactionRequest: DidOperationOptions, +// // ): Promise { +// // try { +// // const { operation } = estimateTransactionRequest - if (!(operation in DidOperation)) { - throw new BadRequestError('Invalid method parameter!') - } - if (operation === DidOperation.Create) { - return request.agent.modules.polygon.estimateFeeForDidOperation({ operation }) - } else if (operation === DidOperation.Update) { - return request.agent.modules.polygon.estimateFeeForDidOperation({ ...estimateTransactionRequest }) - } - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// // if (!(operation in DidOperation)) { +// // throw new BadRequestError('Invalid method parameter!') +// // } +// // if (operation === DidOperation.Create) { +// // return request.agent.modules.polygon.estimateFeeForDidOperation({ operation }) +// // } else if (operation === DidOperation.Update) { +// // return request.agent.modules.polygon.estimateFeeForDidOperation({ ...estimateTransactionRequest }) +// // } +// // } catch (error) { +// // throw ErrorHandlingService.handle(error) +// // } +// // } - /** - * Fetch schema details - * - * @returns Schema Object - */ - @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) - @Get(':did/:schemaId') - public async getSchemaById( - @Request() request: Req, - @Path('did') did: string, - @Path('schemaId') schemaId: string, - ): Promise { - try { - if (!did || !schemaId) { - throw new BadRequestError('Missing or invalid parameters.') - } - const schemaDetails = await request.agent.modules.polygon.getSchemaById(did, schemaId) - return schemaDetails - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } -} +// /** +// * Fetch schema details +// * +// * @returns Schema Object +// */ +// @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) +// @Get(':did/:schemaId') +// public async getSchemaById( +// @Request() request: Req, +// @Path('did') did: string, +// @Path('schemaId') schemaId: string, +// ): Promise { +// try { +// if (!did || !schemaId) { +// throw new BadRequestError('Missing or invalid parameters.') +// } +// const schemaDetails = await request.agent.modules.polygon.getSchemaById(did, schemaId) +// return schemaDetails +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } +// } diff --git a/src/controllers/x509/x509.Controller.ts b/src/controllers/x509/x509.Controller.ts index 61a412eb..a8e3e4bb 100644 --- a/src/controllers/x509/x509.Controller.ts +++ b/src/controllers/x509/x509.Controller.ts @@ -1,78 +1,78 @@ -import { injectable } from '@credo-ts/core' -import { Request as Req } from 'express' -import { Body, Controller, Post, Route, Tags, Security, Request, Get } from 'tsoa' +// import { injectable } from '@credo-ts/core' +// import { Request as Req } from 'express' +// import { Body, Controller, Post, Route, Tags, Security, Request, Get } from 'tsoa' -import { SCOPES } from '../../enums' -import ErrorHandlingService from '../../errorHandlingService' -import { X509ImportCertificateOptionsDto } from '../types' -import { x509ServiceT } from './x509.service' -import { X509CreateCertificateOptionsDto } from './x509.types' +// import { SCOPES } from '../../enums' +// import ErrorHandlingService from '../../errorHandlingService' +// import { X509ImportCertificateOptionsDto } from '../types' +// import { x509ServiceT } from './x509.service' +// import { X509CreateCertificateOptionsDto } from './x509.types' -@Tags('x509') -@Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) -@Route('/x509') -@injectable() -export class X509Controller extends Controller { - @Post('/') - public async createX509Certificate( - @Request() request: Req, - @Body() createX509Options: X509CreateCertificateOptionsDto, - ) { - try { - return await x509ServiceT.createCertificate(request, createX509Options) - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// @Tags('x509') +// @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) +// @Route('/x509') +// @injectable() +// export class X509Controller extends Controller { +// @Post('/') +// public async createX509Certificate( +// @Request() request: Req, +// @Body() createX509Options: X509CreateCertificateOptionsDto, +// ) { +// try { +// return await x509ServiceT.createCertificate(request, createX509Options) +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - @Post('/import') - public async ImportX509Certificates( - @Request() request: Req, - @Body() importX509Options: X509ImportCertificateOptionsDto, - ) { - try { - return await x509ServiceT.ImportX509Certificates(request, importX509Options) - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// @Post('/import') +// public async ImportX509Certificates( +// @Request() request: Req, +// @Body() importX509Options: X509ImportCertificateOptionsDto, +// ) { +// try { +// return await x509ServiceT.ImportX509Certificates(request, importX509Options) +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - @Post('/trusted') - public async addTrustedCertificate( - @Request() request: Req, - @Body() - options: { - certificate: string - }, - ) { - try { - return await x509ServiceT.addTrustedCertificate(request, options) - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// @Post('/trusted') +// public async addTrustedCertificate( +// @Request() request: Req, +// @Body() +// options: { +// certificate: string +// }, +// ) { +// try { +// return await x509ServiceT.addTrustedCertificate(request, options) +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - @Get('/trusted') - public async getTrustedCertificates(@Request() request: Req) { - try { - return await x509ServiceT.getTrustedCertificates(request) - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } +// @Get('/trusted') +// public async getTrustedCertificates(@Request() request: Req) { +// try { +// return await x509ServiceT.getTrustedCertificates(request) +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } - @Post('/decode') - public async decodeCertificate( - @Request() request: Req, - @Body() - options: { - certificate: string - }, - ) { - try { - return await x509ServiceT.decodeCertificate(request, options) - } catch (error) { - throw ErrorHandlingService.handle(error) - } - } -} +// @Post('/decode') +// public async decodeCertificate( +// @Request() request: Req, +// @Body() +// options: { +// certificate: string +// }, +// ) { +// try { +// return await x509ServiceT.decodeCertificate(request, options) +// } catch (error) { +// throw ErrorHandlingService.handle(error) +// } +// } +// } diff --git a/src/controllers/x509/x509.service.ts b/src/controllers/x509/x509.service.ts index 94d7d7a6..6bdef914 100644 --- a/src/controllers/x509/x509.service.ts +++ b/src/controllers/x509/x509.service.ts @@ -1,220 +1,219 @@ -import type { X509CreateCertificateOptionsDto } from './x509.types' -import type { BasicX509CreateCertificateConfig, X509ImportCertificateOptionsDto } from '../types' -import type { CredoError, Key } from '@credo-ts/core' -import type { Request as Req } from 'express' - -import { - KeyType, - TypedArrayEncoder, - WalletKeyExistsError, - X509Certificate, - X509ExtendedKeyUsage, - X509KeyUsage, - X509ModuleConfig, - X509Service, - type Agent, -} from '@credo-ts/core' - -import { generateSecretKey, getCertificateValidityForSystem } from '../../utils/helpers' - -import { pemToRawEd25519PrivateKey } from './crypto-util' - -class x509Service { - public async createSelfSignedDCS(createX509Options: BasicX509CreateCertificateConfig, agentReq: Req) { - const agent = agentReq.agent - - const authorityKey = await createKey(agent as Agent, createX509Options.keyType) - const AGENT_HOST = createX509Options.issuerAlternativeNameURL - const AGENT_DNS = AGENT_HOST.replace('https://', '') - const selfSignedx509certificate = await X509Service.createCertificate(agent.context, { - authorityKey: authorityKey, //createX509Options.subjectKey, - issuer: { countryName: createX509Options.countryName, commonName: createX509Options.commonName }, - validity: getCertificateValidityForSystem(false), - extensions: { - subjectKeyIdentifier: { - include: true, - }, - keyUsage: { - usages: [X509KeyUsage.KeyCertSign, X509KeyUsage.CrlSign, X509KeyUsage.DigitalSignature], - markAsCritical: true, - }, - subjectAlternativeName: { - name: [ - { type: 'dns', value: AGENT_DNS }, - { type: 'url', value: AGENT_HOST }, - ], - }, - issuerAlternativeName: { - // biome-ignore lint/style/noNonNullAssertion: - //name: rootCertificate.issuerAlternativeNames!, - name: [ - { type: 'dns', value: AGENT_DNS }, - { type: 'url', value: AGENT_HOST }, - ], - }, - extendedKeyUsage: { - usages: [X509ExtendedKeyUsage.MdlDs], - markAsCritical: true, - }, - basicConstraints: { - ca: true, - pathLenConstraint: 0, - markAsCritical: true, - }, - // TODO: Create revocation list and add URL here - store this in platform - // crlDistributionPoints: { - // urls: [`${"AGENT_HOST"}/crl`], - // }, - }, - }) - - agent.config.logger.info('======= X.509 IACA Self Signed Certificate ===========') - const selfSignedx509certificateBase64 = selfSignedx509certificate.toString('base64') - agent.config.logger.debug('selfSignedx509certificateBase64', { selfSignedx509certificateBase64 }) - return { publicCertificateBase64: selfSignedx509certificateBase64 } - } - - public async createCertificate(agentReq: Req, options: X509CreateCertificateOptionsDto) { - const agent = agentReq.agent - - let authorityKeyID, subjectPublicKeyID - - agent.config.logger.debug(`createCertificate options:`, options) - - if (options.authorityKey && options?.authorityKey?.seed) { - authorityKeyID = await agent.context.wallet.createKey({ - keyType: options.authorityKey.keyType ?? KeyType.P256, - seed: TypedArrayEncoder.fromString(options.authorityKey.seed), - }) - } else { - authorityKeyID = await agent.context.wallet.createKey({ - keyType: KeyType.P256, - }) - } - - if (options.subjectPublicKey) { - if (options?.subjectPublicKey?.seed) { - subjectPublicKeyID = await agent.context.wallet.createKey({ - keyType: options.subjectPublicKey.keyType ?? KeyType.P256, - seed: TypedArrayEncoder.fromString(options.subjectPublicKey.seed), - }) - } else { - subjectPublicKeyID = await agent.context.wallet.createKey({ - keyType: KeyType.P256, - }) - } - } - - const certificate = await agent.x509.createCertificate({ - authorityKey: authorityKeyID as Key, - subjectPublicKey: (subjectPublicKeyID as Key) ?? undefined, - serialNumber: options.serialNumber, - issuer: options.issuer, - extensions: options.extensions, - subject: options.subject, - validity: options.validity, - }) - - const issuerCertificate = certificate.toString('base64') - return { publicCertificateBase64: issuerCertificate } - } - - public async ImportX509Certificates(agentReq: Req, options: X509ImportCertificateOptionsDto) { - const agent = agentReq.agent - agent.config.logger.debug(`Start validating keys`) - const secretHexKey = await pemToRawEd25519PrivateKey(options.privateKey ?? '') - const privateKey = TypedArrayEncoder.fromHex(secretHexKey) - - agent.config.logger.debug(`Decode certificate`) - const parsedCertificate = X509Service.parseCertificate(agent.context, { - encodedCertificate: options.certificate, - }) - const issuerCertficicate = parsedCertificate.toString('base64') - - try { - const documentSignerKey = await agent.wallet.createKey({ - privateKey: privateKey, - keyType: options.keyType, - }) - - if ( - parsedCertificate.publicKey.keyType !== options.keyType || - !Buffer.from(parsedCertificate.publicKey.publicKey).equals(Buffer.from(documentSignerKey.publicKey)) - ) { - throw new Error(`Key mismatched in provided X509_CERTIFICATE to import`) - } - console.log(`Keys matched with certificate`) - } catch (error) { - // If the key already exists, we assume the self-signed certificate is already created - if (error instanceof WalletKeyExistsError) { - console.error( - `key already exists while importing certificate ${JSON.stringify(parsedCertificate.privateKey)}`, - parsedCertificate.privateKey, - ) - } else { - agent.config.logger.error(`${JSON.stringify(error)}`) - throw error - } - } - - return { issuerCertficicate } - } - - public addTrustedCertificate( - agentReq: Req, - options: { - certificate: string - }, - ) { - const agent = agentReq.agent - return agent.x509.addTrustedCertificate(options.certificate) - } - - public getTrustedCertificates(agentReq: Req) { - const trustedCertificates = agentReq.agent.context.dependencyManager - .resolve(X509ModuleConfig) - .trustedCertificates?.map((cert) => X509Certificate.fromEncodedCertificate(cert).toString('base64')) // as [string, ...string[]] - - return trustedCertificates - } - - /** - * Parses a base64-encoded X.509 certificate into a X509Certificate - * - * @param issuerAgent {Agent} - * @param options {x509Input} - * @returns - */ - public decodeCertificate( - agentReq: Req, - options: { - certificate: string - }, - ) { - const parsedCertificate = X509Service.parseCertificate(agentReq.agent.context, { - encodedCertificate: options.certificate, - }) - - return parsedCertificate - } -} - -export const x509ServiceT = new x509Service() - -export async function createKey(agent: Agent, keyType: KeyType) { - try { - const seed = await generateSecretKey(keyType === KeyType.P256 ? 64 : 32) - - agent.config.logger.debug(`createKey: got seed ${seed}`) - - const authorityKey = await agent.wallet.createKey({ - keyType: keyType, - seed: TypedArrayEncoder.fromString(seed), - }) - - return authorityKey - } catch (error) { - agent.config.logger.debug(`Error while creating authorityKey`, { message: (error as CredoError).message }) - throw error - } -} +// import type { X509CreateCertificateOptionsDto } from './x509.types' +// import type { BasicX509CreateCertificateConfig, X509ImportCertificateOptionsDto } from '../types' +// import type { CredoError } from '@credo-ts/core' +// import type { Request as Req } from 'express' + +// import { +// TypedArrayEncoder, +// X509Certificate, +// X509ExtendedKeyUsage, +// X509KeyUsage, +// X509ModuleConfig, +// X509Service, +// type Agent, +// } from '@credo-ts/core' + +// import { generateSecretKey, getCertificateValidityForSystem } from '../../utils/helpers' + +// import { pemToRawEd25519PrivateKey } from './crypto-util' +// import { KeyAlgorithm } from '@openwallet-foundation/askar-nodejs' + +// class x509Service { +// public async createSelfSignedDCS(createX509Options: BasicX509CreateCertificateConfig, agentReq: Req) { +// const agent = agentReq.agent + +// const authorityKey = await createKey(agent as Agent, createX509Options.keyType) +// const AGENT_HOST = createX509Options.issuerAlternativeNameURL +// const AGENT_DNS = AGENT_HOST.replace('https://', '') +// const selfSignedx509certificate = await X509Service.createCertificate(agent.context, { +// authorityKey: authorityKey, //createX509Options.subjectKey, +// issuer: { countryName: createX509Options.countryName, commonName: createX509Options.commonName }, +// validity: getCertificateValidityForSystem(false), +// extensions: { +// subjectKeyIdentifier: { +// include: true, +// }, +// keyUsage: { +// usages: [X509KeyUsage.KeyCertSign, X509KeyUsage.CrlSign, X509KeyUsage.DigitalSignature], +// markAsCritical: true, +// }, +// subjectAlternativeName: { +// name: [ +// { type: 'dns', value: AGENT_DNS }, +// { type: 'url', value: AGENT_HOST }, +// ], +// }, +// issuerAlternativeName: { +// // biome-ignore lint/style/noNonNullAssertion: +// //name: rootCertificate.issuerAlternativeNames!, +// name: [ +// { type: 'dns', value: AGENT_DNS }, +// { type: 'url', value: AGENT_HOST }, +// ], +// }, +// extendedKeyUsage: { +// usages: [X509ExtendedKeyUsage.MdlDs], +// markAsCritical: true, +// }, +// basicConstraints: { +// ca: true, +// pathLenConstraint: 0, +// markAsCritical: true, +// }, +// // TODO: Create revocation list and add URL here - store this in platform +// // crlDistributionPoints: { +// // urls: [`${"AGENT_HOST"}/crl`], +// // }, +// }, +// }) + +// agent.config.logger.info('======= X.509 IACA Self Signed Certificate ===========') +// const selfSignedx509certificateBase64 = selfSignedx509certificate.toString('base64') +// agent.config.logger.debug('selfSignedx509certificateBase64', { selfSignedx509certificateBase64 }) +// return { publicCertificateBase64: selfSignedx509certificateBase64 } +// } + +// public async createCertificate(agentReq: Req, options: X509CreateCertificateOptionsDto) { +// const agent = agentReq.agent + +// let authorityKeyID, subjectPublicKeyID + +// agent.config.logger.debug(`createCertificate options:`, options) + +// if (options.authorityKey && options?.authorityKey?.seed) { +// authorityKeyID = await agent.context.wallet.createKey({ +// keyType: options.authorityKey.keyType ?? KeyAlgorithm.EcSecp256r1, +// seed: TypedArrayEncoder.fromString(options.authorityKey.seed), +// }) +// } else { +// authorityKeyID = await agent.context.wallet.createKey({ +// keyType: KeyAlgorithm.EcSecp256r1, +// }) +// } + +// if (options.subjectPublicKey) { +// if (options?.subjectPublicKey?.seed) { +// subjectPublicKeyID = await agent.context.wallet.createKey({ +// keyType: options.subjectPublicKey.keyType ?? KeyAlgorithm.EcSecp256r1, +// seed: TypedArrayEncoder.fromString(options.subjectPublicKey.seed), +// }) +// } else { +// subjectPublicKeyID = await agent.context.wallet.createKey({ +// keyType: KeyAlgorithm.EcSecp256r1, +// }) +// } +// } + +// const certificate = await agent.x509.createCertificate({ +// authorityKey: authorityKeyID as Key, +// subjectPublicKey: (subjectPublicKeyID as Key) ?? undefined, +// serialNumber: options.serialNumber, +// issuer: options.issuer, +// extensions: options.extensions, +// subject: options.subject, +// validity: options.validity, +// }) + +// const issuerCertificate = certificate.toString('base64') +// return { publicCertificateBase64: issuerCertificate } +// } + +// public async ImportX509Certificates(agentReq: Req, options: X509ImportCertificateOptionsDto) { +// const agent = agentReq.agent +// agent.config.logger.debug(`Start validating keys`) +// const secretHexKey = await pemToRawEd25519PrivateKey(options.privateKey ?? '') +// const privateKey = TypedArrayEncoder.fromHex(secretHexKey) + +// agent.config.logger.debug(`Decode certificate`) +// const parsedCertificate = X509Service.parseCertificate(agent.context, { +// encodedCertificate: options.certificate, +// }) +// const issuerCertficicate = parsedCertificate.toString('base64') + +// try { +// const documentSignerKey = await agent.wallet.createKey({ +// privateKey: privateKey, +// keyType: options.keyType, +// }) + +// if ( +// parsedCertificate.publicKey.keyType !== options.keyType || +// !Buffer.from(parsedCertificate.publicKey.publicKey).equals(Buffer.from(documentSignerKey.publicKey)) +// ) { +// throw new Error(`Key mismatched in provided X509_CERTIFICATE to import`) +// } +// console.log(`Keys matched with certificate`) +// } catch (error) { +// // If the key already exists, we assume the self-signed certificate is already created +// if (error instanceof WalletKeyExistsError) { +// console.error( +// `key already exists while importing certificate ${JSON.stringify(parsedCertificate.privateKey)}`, +// parsedCertificate.privateKey, +// ) +// } else { +// agent.config.logger.error(`${JSON.stringify(error)}`) +// throw error +// } +// } + +// return { issuerCertficicate } +// } + +// public addTrustedCertificate( +// agentReq: Req, +// options: { +// certificate: string +// }, +// ) { +// const agent = agentReq.agent +// return agent.x509.addTrustedCertificate(options.certificate) +// } + +// public getTrustedCertificates(agentReq: Req) { +// const trustedCertificates = agentReq.agent.context.dependencyManager +// .resolve(X509ModuleConfig) +// .trustedCertificates?.map((cert) => X509Certificate.fromEncodedCertificate(cert).toString('base64')) // as [string, ...string[]] + +// return trustedCertificates +// } + +// /** +// * Parses a base64-encoded X.509 certificate into a X509Certificate +// * +// * @param issuerAgent {Agent} +// * @param options {x509Input} +// * @returns +// */ +// public decodeCertificate( +// agentReq: Req, +// options: { +// certificate: string +// }, +// ) { +// const parsedCertificate = X509Service.parseCertificate(agentReq.agent.context, { +// encodedCertificate: options.certificate, +// }) + +// return parsedCertificate +// } +// } + +// export const x509ServiceT = new x509Service() + +// export async function createKey(agent: Agent, keyType: KeyAlgorithm) { +// try { +// const seed = await generateSecretKey(keyType === KeyAlgorithm.EcSecp256r1 ? 64 : 32) + +// agent.config.logger.debug(`createKey: got seed ${seed}`) + +// const authorityKey = await agent.kms.createKey({ +// algorithm: keyType, +// seed: TypedArrayEncoder.fromString(seed), +// }) + +// return authorityKey +// } catch (error) { +// agent.config.logger.debug(`Error while creating authorityKey`, { message: (error as CredoError).message }) +// throw error +// } +// } diff --git a/src/controllers/x509/x509.types.ts b/src/controllers/x509/x509.types.ts index 45eca35c..9a0f2f9e 100644 --- a/src/controllers/x509/x509.types.ts +++ b/src/controllers/x509/x509.types.ts @@ -1,4 +1,5 @@ -import type { KeyType, X509ExtendedKeyUsage, X509KeyUsage } from '@credo-ts/core' +import type { X509ExtendedKeyUsage, X509KeyUsage } from '@credo-ts/core' +import { KeyAlgorithm } from '@openwallet-foundation/askar-nodejs' import { Extension, Example } from 'tsoa' @@ -31,7 +32,8 @@ export interface AuthorityAndSubjectKeyDto { * @example "p256" * @description Type of the key used for signing the X.509 Certificate (default is p256) */ - keyType?: KeyType + // FIXME: Check type + keyType?: KeyAlgorithm } export interface NameDto { From 32e1ab07e7df9084413497991ce474a714f12241 Mon Sep 17 00:00:00 2001 From: Krishna Waske Date: Mon, 15 Dec 2025 12:21:21 +0530 Subject: [PATCH 11/38] fix: oidc4vc agent changes for building agent Signed-off-by: Krishna Waske --- src/utils/oid4vc-agent.ts | 364 +++++++------------------------------- 1 file changed, 66 insertions(+), 298 deletions(-) diff --git a/src/utils/oid4vc-agent.ts b/src/utils/oid4vc-agent.ts index 672bdf5e..f9a8053d 100644 --- a/src/utils/oid4vc-agent.ts +++ b/src/utils/oid4vc-agent.ts @@ -1,4 +1,7 @@ +// FIXME: We've made many changes in this file for building agent with OIDC modules, please check the types and proper implementation of the changes + import type { DisclosureFrame } from '../controllers/types' +import type { SdJwtVcHolderBinding } from '@credo-ts/core' import type { OpenId4VcCredentialHolderBinding, OpenId4VcCredentialHolderDidBinding, @@ -8,7 +11,7 @@ import type { OpenId4VciSignW3cCredentials, } from '@credo-ts/openid4vc' -import { DidsApi, X509Service } from '@credo-ts/core' +import { DidsApi, Kms, MdocApi, X509Certificate, X509Service } from '@credo-ts/core' import { ClaimFormat, CredoError, @@ -24,183 +27,31 @@ import { OpenId4VciCredentialFormatProfile } from '@credo-ts/openid4vc' import { SignerMethod } from '../enums/enum' -export function getCredentialRequestToCredentialMapper(): OpenId4VciCredentialRequestToCredentialMapper { - return async ({ - holderBindings, - issuanceSession, - verification, - credentialConfigurationIds, - credentialConfigurationsSupported: supported, - agentContext, - authorization, - }: { - holderBindings: OpenId4VcCredentialHolderBinding[] - issuanceSession: any - verification?: any - credentialConfigurationIds: string[] - credentialConfigurationsSupported: any - agentContext: any - authorization: any - }) => { - const issuanceMetadata = issuanceSession.issuanceMetadata - const issuerDid = issuanceMetadata?.['issuerDid'] as string | undefined - const issuerx509certificate = issuanceMetadata?.['issuerx509certificate'] as string[] | undefined - - if (!issuerDid && !issuerx509certificate) { - throw new Error('Either issuerDid or issuerx509certificate must be provided') - } - - let issuerDidUrl: string | undefined = '' - if (issuerDid) { - const didsApi = await agentContext.dependencyManager.resolve(DidsApi) - const didDocument = await didsApi.resolveDidDocument(issuerDid) - - // Set the first verificationMethod as backup, in case we won't find a match - if (!issuerDidUrl && didDocument.verificationMethod?.[0].id) { - issuerDidUrl = didDocument.verificationMethod?.[0].id - } - } - - if (!issuerDidUrl && !issuerx509certificate) { - throw new Error('No matching verification method found') - } - - if (!issuanceMetadata?.['credentials']) throw new Error('credential payload is not provided') - - const allCredentialPayload = issuanceMetadata?.['credentials'] - - const credentialConfigurationId = credentialConfigurationIds[0] - - // Returns an array of all matching credentials - const credentialPayload = Array.isArray(allCredentialPayload) - ? allCredentialPayload.filter((c) => c.credentialSupportedId === credentialConfigurationId) - : [] - const credentialConfiguration = supported[credentialConfigurationId] - - if (credentialConfigurationId === 'PresentationAuthorization') { - const trustedCertificates = agentContext.dependencyManager.resolve(X509ModuleConfig).trustedCertificates - if (trustedCertificates?.length !== 1) { - throw new Error(`Expected exactly one trusted certificate. Received ${trustedCertificates?.length}.`) - } - - return { - credentialConfigurationId, - format: ClaimFormat.SdJwtVc, - credentials: holderBindings.map((holderBinding) => ({ - payload: { - vct: credentialConfiguration.vct, - authorized_user: authorization.accessToken.payload.sub, - }, - holder: holderBinding, - issuer: - holderBindings[0].method === 'did' - ? { - method: 'did', - didUrl: issuerDidUrl ?? '', - } - : { method: 'x5c', x5c: trustedCertificates, issuer: 'ISSUER_HOST ' }, - })), - } satisfies OpenId4VciSignSdJwtCredentials - } - - if (credentialConfiguration.format === OpenId4VciCredentialFormatProfile.JwtVcJson) { - for (const holderBinding of holderBindings) { - assertDidBasedHolderBinding(holderBinding) - } - - return { - credentialConfigurationId, - format: ClaimFormat.JwtVc, - credentials: holderBindings.map((holderBinding) => { - assertDidBasedHolderBinding(holderBinding) - - const verificationMethod: string = issuerDidUrl ?? '' - if (!verificationMethod) { - throw new Error('issuerDidUrl is required for verificationMethod') - } - - const finalVC = { - credential: new W3cCredential({ - type: credentialConfiguration.credential_definition.type, - issuer: new W3cIssuer({ - id: parseDid(verificationMethod).did, - }), - credentialSubject: JsonTransformer.fromJSON( - { - id: parseDid(holderBinding.didUrl).did, - claims: { - ...credentialPayload[0].payload, - }, - }, - W3cCredentialSubject, - ), - issuanceDate: w3cDate(Date.now()), - }), - verificationMethod, - } - return finalVC - }), - } satisfies OpenId4VciSignW3cCredentials - } - - if (credentialConfiguration.format === OpenId4VciCredentialFormatProfile.SdJwtVc) { - const disclosureFramePayload = - credentialPayload[0].disclosureFrame && Object.keys(credentialPayload[0].disclosureFrame).length > 0 - ? credentialPayload[0].disclosureFrame - : {} - - return { - credentialConfigurationId, - format: ClaimFormat.SdJwtVc, - credentials: holderBindings.map((holderBinding) => ({ - payload: credentialPayload[0].payload, - holder: holderBinding, - issuer: issuerDidUrl - ? { - method: 'did', - didUrl: issuerDidUrl, - } - : { - method: 'x5c', - x5c: issuerx509certificate ?? [], //[issuerx509certificate??""], - issuer: process.env.AGENT_HOST ?? 'http://localhost:4001', - }, - disclosureFrame: disclosureFramePayload, - })), - } satisfies OpenId4VciSignSdJwtCredentials - } - throw new Error('Invalid request') - } -} - export function getMixedCredentialRequestToCredentialMapper(): OpenId4VciCredentialRequestToCredentialMapper { return async ({ - holderBindings, + holderBinding, issuanceSession, verification, - credentialConfigurationIds, - credentialConfigurationsSupported, + credentialConfigurationId, + credentialConfiguration, agentContext, authorization, }) => { const issuanceMetadata = issuanceSession.issuanceMetadata - if (!issuanceMetadata?.['credentials']) throw new Error('credential payload is not provided') const allCredentialPayload = issuanceMetadata?.['credentials'] - const credentialConfigurationId = credentialConfigurationIds[0] - // Returns an array of all matching credentials const credentialPayload = Array.isArray(allCredentialPayload) ? allCredentialPayload.filter( (c: Record) => c.credentialSupportedId === credentialConfigurationId, ) : [] - const credentialConfiguration = credentialConfigurationsSupported[credentialConfigurationId] - + if (credentialPayload.length === 0) { + throw new Error(`No credential payload found for credentialConfigurationId: ${credentialConfigurationId}`) + } const credential = credentialPayload[0] - let issuerDidVerificationMethod: string | undefined = '' let issuerx509certificate: string[] | undefined @@ -208,14 +59,13 @@ export function getMixedCredentialRequestToCredentialMapper(): OpenId4VciCredent if (credential.signerOptions.did) { const didsApi = agentContext.dependencyManager.resolve(DidsApi) const didDocument = await didsApi.resolveDidDocument(credential.signerOptions.did) - // Set the first verificationMethod as backup, in case we won't find a match if (didDocument.verificationMethod?.[0].id) { issuerDidVerificationMethod = didDocument.verificationMethod?.[0].id } if (!issuerDidVerificationMethod) { - throw new Error('No matching verification method found') + throw new Error('DID must be provided when using Did as signer method') } } } else if (credential.signerOptions.method === SignerMethod.X5c) { @@ -235,22 +85,25 @@ export function getMixedCredentialRequestToCredentialMapper(): OpenId4VciCredent } return { - credentialConfigurationId, - format: ClaimFormat.SdJwtVc, - credentials: holderBindings.map((holderBinding) => ({ - payload: { - vct: credentialConfiguration.vct, - authorized_user: authorization.accessToken.payload.sub, + format: ClaimFormat.SdJwtDc, + credentials: [ + { + payload: { + vct: credentialConfiguration.vct, + authorized_user: authorization.accessToken.payload.sub, + }, + holder: { + method: 'jwk', + jwk: holderBinding.keys[0].jwk, + } as SdJwtVcHolderBinding, + issuer: { + method: 'x5c', + x5c: trustedCertificates.map((cert) => X509Certificate.fromEncodedCertificate(cert)), + issuer: 'ISSUER_HOST', + }, }, - holder: holderBinding, - issuer: - holderBindings[0].method === 'did' - ? { - method: 'did', - didUrl: issuerDidVerificationMethod ?? '', - } - : { method: 'x5c', x5c: trustedCertificates, issuer: 'ISSUER_HOST ' }, - })), + ], + type: 'credentials', } satisfies OpenId4VciSignSdJwtCredentials } @@ -261,83 +114,53 @@ export function getMixedCredentialRequestToCredentialMapper(): OpenId4VciCredent ) if (!credentialConfiguration.doctype) { - throw new Error( - `'doctype' not found in credential configuration, ${JSON.stringify(credentialConfiguration, null, 2)}`, - ) + throw new Error(`'doctype' not found in credential configuration,`) } - // national id and ICAO default - const namespace = credentialConfiguration.doctype - + const parsedCertificate = X509Service.parseCertificate(agentContext, { + encodedCertificate: issuerx509certificate[0], + }) + parsedCertificate.publicJwk.keyId = credential.signerOptions.keyId return { - credentialConfigurationId, + type: 'credentials', format: ClaimFormat.MsoMdoc, - credentials: holderBindings.map((holderBinding) => ({ - issuerCertificate: issuerx509certificate[0], - holderKey: holderBinding.key, + credentials: holderBinding.keys.map((holderBindingDetails) => ({ + issuerCertificate: parsedCertificate, + holderKey: holderBindingDetails.jwk, ...credential.payload, docType: credentialConfiguration.doctype, })), } satisfies OpenId4VciSignMdocCredentials } - - if (credentialConfiguration.format === OpenId4VciCredentialFormatProfile.JwtVcJson) { - for (const holderBinding of holderBindings) { - assertDidBasedHolderBinding(holderBinding) - } - - return { - credentialConfigurationId, - format: ClaimFormat.JwtVc, - credentials: holderBindings.map((holderBinding) => { - assertDidBasedHolderBinding(holderBinding) - - const finalVC = { - credential: new W3cCredential({ - type: credentialConfiguration.credential_definition.type, - issuer: new W3cIssuer({ - id: parseDid(issuerDidVerificationMethod).did, - }), - credentialSubject: JsonTransformer.fromJSON( - { - id: parseDid(holderBinding.didUrl).did, - claims: { - ...credential.payload, - }, - }, - W3cCredentialSubject, - ), - issuanceDate: w3cDate(Date.now()), - }), - verificationMethod: issuerDidVerificationMethod, - } - return finalVC - }), - } satisfies OpenId4VciSignW3cCredentials - } - - if (credentialConfiguration.format === OpenId4VciCredentialFormatProfile.SdJwtVc) { + if (credentialConfiguration.format === OpenId4VciCredentialFormatProfile.SdJwtDc) { const disclosureFramePayload = credential.disclosureFrame && Object.keys(credential.disclosureFrame).length > 0 ? credential.disclosureFrame : {} - //Taking leaf certifcate from chain as issuer certificate, if not provided explicitly taking AGENT_HTTP_URL as issuer let parsedCertificate: any - if (!issuerDidVerificationMethod && issuerx509certificate) { + if (!issuerDidVerificationMethod && issuerx509certificate && issuerx509certificate.length > 0) { parsedCertificate = X509Service.parseCertificate(agentContext, { encodedCertificate: issuerx509certificate[0], }) + parsedCertificate.publicJwk.keyId = credential.signerOptions.keyId } else if (!issuerDidVerificationMethod) { throw new Error(`issuerx509certificate is not provided for credential ${credentialConfigurationId}`) } - return { - credentialConfigurationId, - format: ClaimFormat.SdJwtVc, - credentials: holderBindings.map((holderBinding) => ({ - payload: credential.payload, - holder: holderBinding, + format: ClaimFormat.SdJwtDc, + credentials: holderBinding.keys.map((binding) => ({ + payload: credentialPayload[0]?.payload, + holder: + binding.method === 'did' + ? ({ + method: 'did' as const, + didUrl: binding.didUrl, + } as SdJwtVcHolderBinding) + : ({ + method: 'jwk' as const, + jwk: binding.method === 'jwk' ? binding.jwk : {}, + } as SdJwtVcHolderBinding), issuer: issuerDidVerificationMethod ? { method: 'did', @@ -345,11 +168,13 @@ export function getMixedCredentialRequestToCredentialMapper(): OpenId4VciCredent } : { method: 'x5c', - x5c: issuerx509certificate ?? [], - issuer: parsedCertificate.sanUriNames[0], + x5c: [parsedCertificate], + // TODO: Need to check validation for issuer value + // issuer: process.env.AGENT_HOST ?? 'http://localhost:4001', }, disclosureFrame: disclosureFramePayload, })), + type: 'credentials', } satisfies OpenId4VciSignSdJwtCredentials } @@ -357,81 +182,24 @@ export function getMixedCredentialRequestToCredentialMapper(): OpenId4VciCredent } } -function assertDidBasedHolderBinding( - holderBinding: OpenId4VcCredentialHolderBinding, -): asserts holderBinding is OpenId4VcCredentialHolderDidBinding { - if (holderBinding.method !== 'did') { - throw new CredoError('Only did based holder bindings supported for this credential type') - } -} - -export interface OpenId4VcIssuanceSessionCreateOfferSdJwtCredentialOptions { - /** - * The id of the `credential_supported` entry that is present in the issuer - * metadata. This id is used to identify the credential that is being offered. - * - * @example "ExampleCredentialSdJwtVc" - */ - credentialSupportedId: string - - /** - * The format of the credential that is being offered. - * MUST match the format of the `credential_supported` entry. - * - * @example {@link OpenId4VciCredentialFormatProfile.SdJwtVc} - */ - format: OpenId4VciCredentialFormatProfile - - /** - * The payload of the credential that will be issued. - * - * If `vct` claim is included, it MUST match the `vct` claim from the issuer metadata. - * If `vct` claim is not included, it will be added automatically. - * - * @example - * { - * "first_name": "John", - * "last_name": "Doe", - * "age": { - * "over_18": true, - * "over_21": true, - * "over_65": false - * } - * } - */ - payload: { - vct?: string - [key: string]: unknown - } - - /** - * Disclosure frame indicating which fields of the credential can be selectively disclosed. - * - * @example - * { - * "first_name": false, - * "last_name": false, - * "age": { - * "over_18": true, - * "over_21": true, - * "over_65": true - * } - * } - */ - disclosureFrame: DisclosureFrame -} +// function assertDidBasedHolderBinding( +// holderBinding: OpenId4VcCredentialHolderBinding, +// ): asserts holderBinding is OpenId4VcCredentialHolderDidBinding { +// if (holderBinding.method !== 'did') { +// throw new CredoError('Only did based holder bindings supported for this credential type') +// } +// } export async function getTrustedCerts() { try { const response = await fetch(`${process.env.TRUST_LIST_URL}`) - if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`) } - const data = await response.json() return data as string[] } catch (error) { + // eslint-disable-next-line no-console console.error('Error fetching data:', error) return [] } From b47de32f0cbd7f67f25010f2a873a0e8ee80967c Mon Sep 17 00:00:00 2001 From: Krishna Waske Date: Mon, 15 Dec 2025 12:21:49 +0530 Subject: [PATCH 12/38] fix: auto generated file changes Signed-off-by: Krishna Waske --- src/routes/routes.ts | 6063 -------------------- src/routes/swagger.json | 11779 +++++++------------------------------- 2 files changed, 2032 insertions(+), 15810 deletions(-) diff --git a/src/routes/routes.ts b/src/routes/routes.ts index b0c9e188..e69de29b 100644 --- a/src/routes/routes.ts +++ b/src/routes/routes.ts @@ -1,6063 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// 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 -import type { TsoaRoute } from '@tsoa/runtime'; -import { fetchMiddlewares, ExpressTemplateService } from '@tsoa/runtime'; -// 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 -import { X509Controller } from './../controllers/x509/x509.Controller'; -// 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 -import { Polygon } from './../controllers/polygon/PolygonController'; -// 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 -import { EndorserTransactionController } from './../controllers/anoncreds/endorser-transaction/EndorserTransactionController'; -// 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 -import { DidController } from './../controllers/did/DidController'; -// 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 -import { SchemaController } from './../controllers/anoncreds/schema/SchemaController'; -// 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 -import { CredentialDefinitionController } from './../controllers/anoncreds/cred-def/CredentialDefinitionController'; -// 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 -import { AgentController } from './../controllers/agent/AgentController'; -// 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 -import { QuestionAnswerController } from './../controllers/didcomm/question-answer/QuestionAnswerController'; -// 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 -import { ProofController } from './../controllers/didcomm/proofs/ProofController'; -// 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 -import { OutOfBandController } from './../controllers/didcomm/outofband/OutOfBandController'; -// 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 -import { CredentialController } from './../controllers/didcomm/credentials/CredentialController'; -// 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 -import { ConnectionController } from './../controllers/didcomm/connections/ConnectionController'; -// 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 -import { BasicMessageController } from './../controllers/didcomm/basic-messages/BasicMessageController'; -// 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 -import { MultiTenancyController } from './../controllers/multi-tenancy/MultiTenancyController'; -// 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 -import { IssuanceSessionsController } from './../controllers/openid4vc/issuance-sessions/issuance-sessions.Controller'; -// 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 -import { IssuerController } from './../controllers/openid4vc/issuers/issuer.Controller'; -// 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 -import { VerificationSessionsController } from './../controllers/openid4vc/verifier-sessions/verification-sessions.Controller'; -// 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 -import { HolderController } from './../controllers/openid4vc/holder/holder.Controller'; -// 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 -import { VerifierController } from './../controllers/openid4vc/verifiers/verifier.Controller'; -import { expressAuthentication } from './../authentication'; -// @ts-ignore - no great way to install types from subpackage -import { iocContainer } from './../utils/tsyringeTsoaIocContainer'; -import type { IocContainer, IocContainerFactory } from '@tsoa/runtime'; -import type { Request as ExRequest, Response as ExResponse, RequestHandler, Router } from 'express'; - -const expressAuthenticationRecasted = expressAuthentication as (req: ExRequest, securityName: string, scopes?: string[], res?: ExResponse) => Promise; - - -// 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 - -const models: TsoaRoute.Models = { - "KeyType": { - "dataType": "refEnum", - "enums": ["ed25519","bls12381g1g2","bls12381g1","bls12381g2","x25519","p256","p384","p521","k256"], - }, - // 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 - "AuthorityAndSubjectKeyDto": { - "dataType": "refObject", - "properties": { - "seed": {"dataType":"string"}, - "publicKeyBase58": {"dataType":"string"}, - "keyType": {"ref":"KeyType"}, - }, - "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 - "X509CertificateIssuerAndSubjectOptionsDto": { - "dataType": "refObject", - "properties": { - "countryName": {"dataType":"string"}, - "stateOrProvinceName": {"dataType":"string"}, - "organizationalUnit": {"dataType":"string"}, - "commonName": {"dataType":"string"}, - }, - "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 - "ValidityDto": { - "dataType": "refObject", - "properties": { - "notBefore": {"dataType":"datetime"}, - "notAfter": {"dataType":"datetime"}, - }, - "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 - "X509KeyUsage": { - "dataType": "refEnum", - "enums": [1,2,4,8,16,32,64,128,256], - }, - // 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 - "KeyUsageDto": { - "dataType": "refObject", - "properties": { - "usages": {"dataType":"array","array":{"dataType":"refEnum","ref":"X509KeyUsage"},"required":true}, - "markAsCritical": {"dataType":"boolean"}, - }, - "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 - "X509ExtendedKeyUsage": { - "dataType": "refEnum", - "enums": ["1.3.6.1.5.5.7.3.1","1.3.6.1.5.5.7.3.2","1.3.6.1.5.5.7.3.3","1.3.6.1.5.5.7.3.4","1.3.6.1.5.5.7.3.8","1.3.6.1.5.5.7.3.9","1.0.18013.5.1.2"], - }, - // 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 - "ExtendedKeyUsageDto": { - "dataType": "refObject", - "properties": { - "usages": {"dataType":"array","array":{"dataType":"refEnum","ref":"X509ExtendedKeyUsage"},"required":true}, - "markAsCritical": {"dataType":"boolean"}, - }, - "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 - "AuthorityAndSubjectKeyIdentifierDto": { - "dataType": "refObject", - "properties": { - "include": {"dataType":"boolean","required":true}, - "markAsCritical": {"dataType":"boolean"}, - }, - "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 - "GeneralNameType": { - "dataType": "refEnum", - "enums": ["dns","dn","email","guid","ip","url","upn","id"], - }, - // 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 - "NameDto": { - "dataType": "refObject", - "properties": { - "type": {"ref":"GeneralNameType","required":true}, - "value": {"dataType":"string","required":true}, - }, - "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 - "NameListDto": { - "dataType": "refObject", - "properties": { - "name": {"dataType":"array","array":{"dataType":"refObject","ref":"NameDto"},"required":true}, - "markAsCritical": {"dataType":"boolean"}, - }, - "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 - "BasicConstraintsDto": { - "dataType": "refObject", - "properties": { - "ca": {"dataType":"boolean","required":true}, - "pathLenConstraint": {"dataType":"double"}, - "markAsCritical": {"dataType":"boolean"}, - }, - "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 - "CrlDistributionPointsDto": { - "dataType": "refObject", - "properties": { - "urls": {"dataType":"array","array":{"dataType":"string"},"required":true}, - "markAsCritical": {"dataType":"boolean"}, - }, - "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 - "X509CertificateExtensionsOptionsDto": { - "dataType": "refObject", - "properties": { - "keyUsage": {"ref":"KeyUsageDto"}, - "extendedKeyUsage": {"ref":"ExtendedKeyUsageDto"}, - "authorityKeyIdentifier": {"ref":"AuthorityAndSubjectKeyIdentifierDto"}, - "subjectKeyIdentifier": {"ref":"AuthorityAndSubjectKeyIdentifierDto"}, - "issuerAlternativeName": {"ref":"NameListDto"}, - "subjectAlternativeName": {"ref":"NameListDto"}, - "basicConstraints": {"ref":"BasicConstraintsDto"}, - "crlDistributionPoints": {"ref":"CrlDistributionPointsDto"}, - }, - "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 - "X509CreateCertificateOptionsDto": { - "dataType": "refObject", - "properties": { - "authorityKey": {"ref":"AuthorityAndSubjectKeyDto"}, - "subjectPublicKey": {"ref":"AuthorityAndSubjectKeyDto"}, - "serialNumber": {"dataType":"string"}, - "issuer": {"dataType":"union","subSchemas":[{"ref":"X509CertificateIssuerAndSubjectOptionsDto"},{"dataType":"string"}],"required":true}, - "subject": {"dataType":"union","subSchemas":[{"ref":"X509CertificateIssuerAndSubjectOptionsDto"},{"dataType":"string"}]}, - "validity": {"ref":"ValidityDto"}, - "extensions": {"ref":"X509CertificateExtensionsOptionsDto"}, - }, - "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 - "X509ImportCertificateOptionsDto": { - "dataType": "refObject", - "properties": { - "certificate": {"dataType":"string","required":true}, - "privateKey": {"dataType":"string"}, - "keyType": {"ref":"KeyType","required":true}, - }, - "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 - "Uint8Array": { - "dataType": "refObject", - "properties": { - }, - "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 - "Key": { - "dataType": "refObject", - "properties": { - "publicKey": {"ref":"Uint8Array","required":true}, - "keyType": {"ref":"KeyType","required":true}, - }, - "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 - "X509Certificate": { - "dataType": "refObject", - "properties": { - "publicKey": {"ref":"Key","required":true}, - "privateKey": {"ref":"Uint8Array"}, - }, - "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 - "Record_string.unknown_": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{},"additionalProperties":{"dataType":"any"},"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 - "DidOperation.Create": { - "dataType": "refEnum", - "enums": ["createDID"], - }, - // 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 - "CreateDidOperationOptions": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"serviceEndpoint":{"dataType":"string"},"operation":{"ref":"DidOperation.Create","required":true}},"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 - "DidOperation.Update": { - "dataType": "refEnum", - "enums": ["updateDIDDoc"], - }, - // 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 - "Record_string.any_": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{},"additionalProperties":{"dataType":"any"},"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 - "DidDocument": { - "dataType": "refAlias", - "type": {"ref":"Record_string.any_","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 - "UpdateDidOperationOptions": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"did":{"dataType":"string","required":true},"didDocument":{"ref":"DidDocument","required":true},"operation":{"ref":"DidOperation.Update","required":true}},"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 - "DidOperation.Deactivate": { - "dataType": "refEnum", - "enums": ["deactivate"], - }, - // 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 - "DeactivateDidOperationOptions": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"did":{"dataType":"string","required":true},"operation":{"ref":"DidOperation.Deactivate","required":true}},"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 - "DidOperation.AddResource": { - "dataType": "refEnum", - "enums": ["addResource"], - }, - // 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 - "AddResourceDidOperationOptions": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"did":{"dataType":"string","required":true},"resource":{"dataType":"object","required":true},"resourceId":{"dataType":"string","required":true},"operation":{"ref":"DidOperation.AddResource","required":true}},"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 - "DidOperationOptions": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"ref":"CreateDidOperationOptions"},{"ref":"UpdateDidOperationOptions"},{"ref":"DeactivateDidOperationOptions"},{"ref":"AddResourceDidOperationOptions"}],"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 - "EndorserTransaction": { - "dataType": "refObject", - "properties": { - "transaction": {"dataType":"union","subSchemas":[{"dataType":"string"},{"ref":"Record_string.unknown_"}],"required":true}, - "endorserDid": {"dataType":"string","required":true}, - }, - "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 - "DidRegistrationSecretOptions": { - "dataType": "refAlias", - "type": {"ref":"Record_string.unknown_","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 - "DidOperationStateWait": { - "dataType": "refObject", - "properties": { - "state": {"dataType":"enum","enums":["wait"],"required":true}, - "did": {"dataType":"string"}, - "secret": {"ref":"DidRegistrationSecretOptions"}, - "didDocument": {"ref":"DidDocument"}, - }, - "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 - "DidOperationStateActionBase": { - "dataType": "refObject", - "properties": { - "state": {"dataType":"enum","enums":["action"],"required":true}, - "action": {"dataType":"string","required":true}, - "did": {"dataType":"string"}, - "secret": {"ref":"DidRegistrationSecretOptions"}, - "didDocument": {"ref":"DidDocument"}, - }, - "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 - "DidOperationStateFinished": { - "dataType": "refObject", - "properties": { - "state": {"dataType":"enum","enums":["finished"],"required":true}, - "did": {"dataType":"string","required":true}, - "secret": {"ref":"DidRegistrationSecretOptions"}, - "didDocument": {"ref":"DidDocument","required":true}, - }, - "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 - "DidOperationStateFailed": { - "dataType": "refObject", - "properties": { - "state": {"dataType":"enum","enums":["failed"],"required":true}, - "did": {"dataType":"string"}, - "secret": {"ref":"DidRegistrationSecretOptions"}, - "didDocument": {"ref":"DidDocument"}, - "reason": {"dataType":"string","required":true}, - }, - "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 - "DidRegistrationMetadata": { - "dataType": "refAlias", - "type": {"ref":"Record_string.unknown_","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 - "DidResolutionMetadata": { - "dataType": "refObject", - "properties": { - "contentType": {"dataType":"string"}, - "error": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":["invalidDid"]},{"dataType":"enum","enums":["notFound"]},{"dataType":"enum","enums":["representationNotSupported"]},{"dataType":"enum","enums":["unsupportedDidMethod"]},{"dataType":"string"}]}, - "message": {"dataType":"string"}, - "servedFromCache": {"dataType":"boolean"}, - "servedFromDidRecord": {"dataType":"boolean"}, - }, - "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 - "DidCreateResult_DidOperationStateActionBase_": { - "dataType": "refObject", - "properties": { - "jobId": {"dataType":"string"}, - "didState": {"dataType":"union","subSchemas":[{"ref":"DidOperationStateWait"},{"ref":"DidOperationStateActionBase"},{"ref":"DidOperationStateFinished"},{"ref":"DidOperationStateFailed"}],"required":true}, - "didRegistrationMetadata": {"ref":"DidRegistrationMetadata","required":true}, - "didDocumentMetadata": {"ref":"DidResolutionMetadata","required":true}, - }, - "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 - "DidNymTransaction": { - "dataType": "refObject", - "properties": { - "did": {"dataType":"string","required":true}, - "nymRequest": {"dataType":"string","required":true}, - }, - "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 - "AnonCredsSchema": { - "dataType": "refObject", - "properties": { - "issuerId": {"dataType":"string","required":true}, - "name": {"dataType":"string","required":true}, - "version": {"dataType":"string","required":true}, - "attrNames": {"dataType":"array","array":{"dataType":"string"},"required":true}, - }, - "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 - "RegisterSchemaReturnStateWait": { - "dataType": "refObject", - "properties": { - "state": {"dataType":"enum","enums":["wait"],"required":true}, - "schema": {"ref":"AnonCredsSchema"}, - "schemaId": {"dataType":"string"}, - }, - "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 - "RegisterSchemaReturnStateAction": { - "dataType": "refObject", - "properties": { - "state": {"dataType":"enum","enums":["action"],"required":true}, - "action": {"dataType":"string","required":true}, - "schema": {"ref":"AnonCredsSchema","required":true}, - "schemaId": {"dataType":"string","required":true}, - }, - "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 - "RegisterSchemaReturnStateFinished": { - "dataType": "refObject", - "properties": { - "state": {"dataType":"enum","enums":["finished"],"required":true}, - "schema": {"ref":"AnonCredsSchema","required":true}, - "schemaId": {"dataType":"string","required":true}, - }, - "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 - "RegisterSchemaReturnStateFailed": { - "dataType": "refObject", - "properties": { - "state": {"dataType":"enum","enums":["failed"],"required":true}, - "reason": {"dataType":"string","required":true}, - "schema": {"ref":"AnonCredsSchema"}, - "schemaId": {"dataType":"string"}, - }, - "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 - "AnonCredsCredentialDefinition": { - "dataType": "refObject", - "properties": { - "issuerId": {"dataType":"string","required":true}, - "schemaId": {"dataType":"string","required":true}, - "type": {"dataType":"enum","enums":["CL"],"required":true}, - "tag": {"dataType":"string","required":true}, - "value": {"dataType":"nestedObjectLiteral","nestedProperties":{"revocation":{"dataType":"any"},"primary":{"ref":"Record_string.unknown_","required":true}},"required":true}, - }, - "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 - "RegisterCredentialDefinitionReturnStateWait": { - "dataType": "refObject", - "properties": { - "state": {"dataType":"enum","enums":["wait"],"required":true}, - "credentialDefinition": {"ref":"AnonCredsCredentialDefinition"}, - "credentialDefinitionId": {"dataType":"string"}, - }, - "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 - "RegisterCredentialDefinitionReturnStateAction": { - "dataType": "refObject", - "properties": { - "state": {"dataType":"enum","enums":["action"],"required":true}, - "action": {"dataType":"string","required":true}, - "credentialDefinitionId": {"dataType":"string","required":true}, - "credentialDefinition": {"ref":"AnonCredsCredentialDefinition","required":true}, - }, - "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 - "RegisterCredentialDefinitionReturnStateFinished": { - "dataType": "refObject", - "properties": { - "state": {"dataType":"enum","enums":["finished"],"required":true}, - "credentialDefinition": {"ref":"AnonCredsCredentialDefinition","required":true}, - "credentialDefinitionId": {"dataType":"string","required":true}, - }, - "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 - "RegisterCredentialDefinitionReturnStateFailed": { - "dataType": "refObject", - "properties": { - "state": {"dataType":"enum","enums":["failed"],"required":true}, - "reason": {"dataType":"string","required":true}, - "credentialDefinition": {"ref":"AnonCredsCredentialDefinition"}, - "credentialDefinitionId": {"dataType":"string"}, - }, - "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 - "WriteTransaction": { - "dataType": "refObject", - "properties": { - "endorsedTransaction": {"dataType":"string","required":true}, - "endorserDid": {"dataType":"string"}, - "schema": {"dataType":"nestedObjectLiteral","nestedProperties":{"attributes":{"dataType":"array","array":{"dataType":"string"},"required":true},"version":{"dataType":"string","required":true},"name":{"dataType":"string","required":true},"issuerId":{"dataType":"string","required":true}}}, - "credentialDefinition": {"dataType":"nestedObjectLiteral","nestedProperties":{"type":{"dataType":"string","required":true},"value":{"dataType":"any","required":true},"tag":{"dataType":"string","required":true},"issuerId":{"dataType":"string","required":true},"schemaId":{"dataType":"string","required":true}}}, - }, - "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 - "DIDDocumentMetadata": { - "dataType": "refObject", - "properties": { - "created": {"dataType":"string"}, - "updated": {"dataType":"string"}, - "deactivated": {"dataType":"boolean"}, - "versionId": {"dataType":"string"}, - "nextUpdate": {"dataType":"string"}, - "nextVersionId": {"dataType":"string"}, - "equivalentId": {"dataType":"string"}, - "canonicalId": {"dataType":"string"}, - }, - "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 - "Did": { - "dataType": "refAlias", - "type": {"dataType":"string","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 - "DidCreate": { - "dataType": "refObject", - "properties": { - "keyType": {"ref":"KeyType"}, - "seed": {"dataType":"string"}, - "domain": {"dataType":"string"}, - "method": {"dataType":"string","required":true}, - "network": {"dataType":"string"}, - "did": {"dataType":"string"}, - "role": {"dataType":"string"}, - "endorserDid": {"dataType":"string"}, - "didDocument": {"ref":"DidDocument"}, - "privatekey": {"dataType":"string"}, - "endpoint": {"dataType":"string"}, - }, - "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 - "DidRecord": { - "dataType": "refAlias", - "type": {"ref":"Record_string.unknown_","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 - "AnonCredsResolutionMetadata": { - "dataType": "refObject", - "properties": { - "error": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":["invalid"]},{"dataType":"enum","enums":["notFound"]},{"dataType":"enum","enums":["unsupportedAnonCredsMethod"]},{"dataType":"string"}]}, - "message": {"dataType":"string"}, - }, - "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 - "CredoExtensible": { - "dataType": "refAlias", - "type": {"ref":"Record_string.unknown_","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 - "GetSchemaReturn": { - "dataType": "refObject", - "properties": { - "schema": {"ref":"AnonCredsSchema"}, - "schemaId": {"dataType":"string","required":true}, - "resolutionMetadata": {"ref":"AnonCredsResolutionMetadata","required":true}, - "schemaMetadata": {"ref":"CredoExtensible","required":true}, - }, - "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 - "SchemaId": { - "dataType": "refAlias", - "type": {"dataType":"string","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 - "RegisterSchemaReturn": { - "dataType": "refObject", - "properties": { - "jobId": {"dataType":"string"}, - "schemaState": {"dataType":"union","subSchemas":[{"ref":"RegisterSchemaReturnStateWait"},{"ref":"RegisterSchemaReturnStateAction"},{"ref":"RegisterSchemaReturnStateFinished"},{"ref":"RegisterSchemaReturnStateFailed"}],"required":true}, - "schemaMetadata": {"ref":"CredoExtensible","required":true}, - "registrationMetadata": {"ref":"CredoExtensible","required":true}, - }, - "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 - "CreateSchemaInput": { - "dataType": "refObject", - "properties": { - "issuerId": {"dataType":"string","required":true}, - "name": {"dataType":"string","required":true}, - "version": {"dataType":"string","required":true}, - "attributes": {"dataType":"array","array":{"dataType":"string"},"required":true}, - "endorse": {"dataType":"boolean"}, - "endorserDid": {"dataType":"string"}, - }, - "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 - "GetCredentialDefinitionReturn": { - "dataType": "refObject", - "properties": { - "credentialDefinition": {"ref":"AnonCredsCredentialDefinition"}, - "credentialDefinitionId": {"dataType":"string","required":true}, - "resolutionMetadata": {"ref":"AnonCredsResolutionMetadata","required":true}, - "credentialDefinitionMetadata": {"ref":"CredoExtensible","required":true}, - }, - "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 - "CredentialDefinitionId": { - "dataType": "refAlias", - "type": {"dataType":"string","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 - "RegisterCredentialDefinitionReturn": { - "dataType": "refObject", - "properties": { - "jobId": {"dataType":"string"}, - "credentialDefinitionState": {"dataType":"union","subSchemas":[{"ref":"RegisterCredentialDefinitionReturnStateWait"},{"ref":"RegisterCredentialDefinitionReturnStateAction"},{"ref":"RegisterCredentialDefinitionReturnStateFinished"},{"ref":"RegisterCredentialDefinitionReturnStateFailed"}],"required":true}, - "credentialDefinitionMetadata": {"ref":"CredoExtensible","required":true}, - "registrationMetadata": {"ref":"CredoExtensible","required":true}, - }, - "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 - "AgentInfo": { - "dataType": "refObject", - "properties": { - "label": {"dataType":"string","required":true}, - "endpoints": {"dataType":"array","array":{"dataType":"string"},"required":true}, - "isInitialized": {"dataType":"boolean","required":true}, - "publicDid": {"dataType":"void","required":true}, - }, - "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 - "AgentToken": { - "dataType": "refObject", - "properties": { - "token": {"dataType":"string","required":true}, - }, - "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 - "VerifyDataOptions": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"signature":{"dataType":"string","required":true},"publicKeyBase58":{"dataType":"string","required":true},"keyType":{"ref":"KeyType","required":true},"data":{"dataType":"string","required":true}},"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 - "W3cCredentialRecord": { - "dataType": "refAlias", - "type": {"ref":"Record_string.unknown_","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 - "JsonObject": { - "dataType": "refObject", - "properties": { - }, - "additionalProperties": {"ref":"JsonValue"}, - }, - // 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 - "JsonValue": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"dataType":"string"},{"dataType":"double"},{"dataType":"boolean"},{"dataType":"enum","enums":[null]},{"ref":"JsonObject"},{"ref":"JsonArray"}],"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 - "JsonArray": { - "dataType": "refAlias", - "type": {"dataType":"array","array":{"dataType":"refAlias","ref":"JsonValue"},"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 - "W3cIssuer": { - "dataType": "refObject", - "properties": { - "id": {"dataType":"string","required":true}, - }, - "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 - "W3cCredentialSubject": { - "dataType": "refObject", - "properties": { - "id": {"dataType":"string"}, - "claims": {"ref":"Record_string.unknown_"}, - }, - "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 - "SingleOrArray_W3cCredentialSubject_": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"ref":"W3cCredentialSubject"},{"dataType":"array","array":{"dataType":"refObject","ref":"W3cCredentialSubject"}}],"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 - "W3cCredentialSchema": { - "dataType": "refObject", - "properties": { - "id": {"dataType":"string","required":true}, - "type": {"dataType":"string","required":true}, - }, - "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 - "SingleOrArray_W3cCredentialSchema_": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"ref":"W3cCredentialSchema"},{"dataType":"array","array":{"dataType":"refObject","ref":"W3cCredentialSchema"}}],"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 - "W3cCredentialStatus": { - "dataType": "refObject", - "properties": { - "id": {"dataType":"string","required":true}, - "type": {"dataType":"string","required":true}, - }, - "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 - "W3cCredential": { - "dataType": "refObject", - "properties": { - "context": {"dataType":"array","array":{"dataType":"union","subSchemas":[{"dataType":"string"},{"ref":"JsonObject"}]},"required":true}, - "id": {"dataType":"string"}, - "type": {"dataType":"array","array":{"dataType":"string"},"required":true}, - "issuer": {"dataType":"union","subSchemas":[{"dataType":"string"},{"ref":"W3cIssuer"}],"required":true}, - "issuanceDate": {"dataType":"string","required":true}, - "expirationDate": {"dataType":"string"}, - "credentialSubject": {"ref":"SingleOrArray_W3cCredentialSubject_","required":true}, - "credentialSchema": {"ref":"SingleOrArray_W3cCredentialSchema_"}, - "credentialStatus": {"ref":"W3cCredentialStatus"}, - }, - "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 - "Pick_W3cJsonLdSignCredentialOptions.Exclude_keyofW3cJsonLdSignCredentialOptions.format__": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"credential":{"ref":"W3cCredential","required":true},"proofType":{"dataType":"string","required":true},"proofPurpose":{"dataType":"any"},"created":{"dataType":"string"},"verificationMethod":{"dataType":"string","required":true}},"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 - "Omit_W3cJsonLdSignCredentialOptions.format_": { - "dataType": "refAlias", - "type": {"ref":"Pick_W3cJsonLdSignCredentialOptions.Exclude_keyofW3cJsonLdSignCredentialOptions.format__","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 - "CustomW3cJsonLdSignCredentialOptions": { - "dataType": "refAlias", - "type": {"dataType":"intersection","subSchemas":[{"ref":"Omit_W3cJsonLdSignCredentialOptions.format_"},{"dataType":"nestedObjectLiteral","nestedProperties":{},"additionalProperties":{"dataType":"any"}}],"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 - "SignDataOptions": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"method":{"dataType":"string"},"did":{"dataType":"string"},"publicKeyBase58":{"dataType":"string","required":true},"keyType":{"ref":"KeyType","required":true},"data":{"dataType":"string","required":true}},"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 - "Partial_W3cCredentialValidations_": { - "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 - "Error": { - "dataType": "refObject", - "properties": { - "name": {"dataType":"string","required":true}, - "message": {"dataType":"string","required":true}, - "stack": {"dataType":"string"}, - }, - "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 - "W3cVerifyResult_W3cCredentialValidations_": { - "dataType": "refObject", - "properties": { - "isValid": {"dataType":"boolean","required":true}, - "validations": {"ref":"Partial_W3cCredentialValidations_","required":true}, - "error": {"ref":"Error"}, - }, - "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 - "W3cVerifyCredentialResult": { - "dataType": "refAlias", - "type": {"ref":"W3cVerifyResult_W3cCredentialValidations_","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 - "Pick_LinkedDataProofOptions.Exclude_keyofLinkedDataProofOptions.cryptosuite__": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"proofPurpose":{"dataType":"string","required":true},"created":{"dataType":"string","required":true},"verificationMethod":{"dataType":"string","required":true},"type":{"dataType":"string","required":true},"domain":{"dataType":"string"},"challenge":{"dataType":"string"},"jws":{"dataType":"string"},"proofValue":{"dataType":"string"},"nonce":{"dataType":"string"}},"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 - "Omit_LinkedDataProofOptions.cryptosuite_": { - "dataType": "refAlias", - "type": {"ref":"Pick_LinkedDataProofOptions.Exclude_keyofLinkedDataProofOptions.cryptosuite__","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 - "DataIntegrityProofOptions": { - "dataType": "refObject", - "properties": { - "type": {"dataType":"string","required":true}, - "cryptosuite": {"dataType":"string","required":true}, - "verificationMethod": {"dataType":"string","required":true}, - "proofPurpose": {"dataType":"string","required":true}, - "domain": {"dataType":"string"}, - "challenge": {"dataType":"string"}, - "nonce": {"dataType":"string"}, - "created": {"dataType":"string"}, - "expires": {"dataType":"string"}, - "proofValue": {"dataType":"string"}, - "previousProof": {"dataType":"string"}, - }, - "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 - "SingleOrArray_Omit_LinkedDataProofOptions.cryptosuite_-or-DataIntegrityProofOptions_": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"dataType":"union","subSchemas":[{"ref":"Omit_LinkedDataProofOptions.cryptosuite_"},{"ref":"DataIntegrityProofOptions"}]},{"dataType":"array","array":{"dataType":"union","subSchemas":[{"ref":"Omit_LinkedDataProofOptions.cryptosuite_"},{"ref":"DataIntegrityProofOptions"}]}}],"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 - "LinkedDataProof": { - "dataType": "refObject", - "properties": { - "type": {"dataType":"string","required":true}, - "proofPurpose": {"dataType":"string","required":true}, - "verificationMethod": {"dataType":"string","required":true}, - "created": {"dataType":"string","required":true}, - "domain": {"dataType":"string"}, - "challenge": {"dataType":"string"}, - "jws": {"dataType":"string"}, - "proofValue": {"dataType":"string"}, - "nonce": {"dataType":"string"}, - }, - "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 - "DataIntegrityProof": { - "dataType": "refObject", - "properties": { - "type": {"dataType":"string","required":true}, - "cryptosuite": {"dataType":"string","required":true}, - "proofPurpose": {"dataType":"string","required":true}, - "verificationMethod": {"dataType":"string","required":true}, - "domain": {"dataType":"string"}, - "challenge": {"dataType":"string"}, - "nonce": {"dataType":"string"}, - "created": {"dataType":"string"}, - "expires": {"dataType":"string"}, - "proofValue": {"dataType":"string"}, - "previousProof": {"dataType":"string"}, - }, - "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 - "SingleOrArray_LinkedDataProof-or-DataIntegrityProof_": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"dataType":"union","subSchemas":[{"ref":"LinkedDataProof"},{"ref":"DataIntegrityProof"}]},{"dataType":"array","array":{"dataType":"union","subSchemas":[{"ref":"LinkedDataProof"},{"ref":"DataIntegrityProof"}]}}],"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 - "W3cJsonLdVerifiableCredential": { - "dataType": "refObject", - "properties": { - "context": {"dataType":"array","array":{"dataType":"union","subSchemas":[{"dataType":"string"},{"ref":"JsonObject"}]},"required":true}, - "id": {"dataType":"string"}, - "type": {"dataType":"array","array":{"dataType":"string"},"required":true}, - "issuer": {"dataType":"union","subSchemas":[{"dataType":"string"},{"ref":"W3cIssuer"}],"required":true}, - "issuanceDate": {"dataType":"string","required":true}, - "expirationDate": {"dataType":"string"}, - "credentialSubject": {"ref":"SingleOrArray_W3cCredentialSubject_","required":true}, - "credentialSchema": {"ref":"SingleOrArray_W3cCredentialSchema_"}, - "credentialStatus": {"ref":"W3cCredentialStatus"}, - "proof": {"ref":"SingleOrArray_LinkedDataProof-or-DataIntegrityProof_","required":true}, - }, - "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 - "ProofPurpose": { - "dataType": "refAlias", - "type": {"dataType":"any","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 - "SafeW3cJsonLdVerifyCredentialOptions": { - "dataType": "refObject", - "properties": { - "credential": {"ref":"W3cJsonLdVerifiableCredential","required":true}, - "verifyCredentialStatus": {"dataType":"boolean"}, - "proofPurpose": {"ref":"ProofPurpose"}, - "proof": {"ref":"SingleOrArray_Omit_LinkedDataProofOptions.cryptosuite_-or-DataIntegrityProofOptions_","required":true}, - }, - "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 - "QuestionAnswerRole": { - "dataType": "refEnum", - "enums": ["questioner","responder"], - }, - // 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 - "QuestionAnswerState": { - "dataType": "refEnum", - "enums": ["question-sent","question-received","answer-received","answer-sent"], - }, - // 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 - "RecordId": { - "dataType": "refAlias", - "type": {"dataType":"string","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 - "ValidResponse": { - "dataType": "refObject", - "properties": { - "text": {"dataType":"string","required":true}, - }, - "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 - "Record_response.string_": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"response":{"dataType":"string","required":true}},"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 - "ProofExchangeRecord": { - "dataType": "refAlias", - "type": {"ref":"Record_string.unknown_","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 - "AutoAcceptProof": { - "dataType": "refEnum", - "enums": ["always","contentApproved","never"], - }, - // 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 - "RequestProofProposalOptions": { - "dataType": "refObject", - "properties": { - "connectionId": {"dataType":"string","required":true}, - "proofFormats": {"dataType":"any","required":true}, - "goalCode": {"dataType":"string"}, - "parentThreadId": {"dataType":"string"}, - "autoAcceptProof": {"ref":"AutoAcceptProof"}, - "comment": {"dataType":"string"}, - }, - "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 - "AcceptProofProposal": { - "dataType": "refObject", - "properties": { - "proofRecordId": {"dataType":"string","required":true}, - "proofFormats": {"dataType":"any","required":true}, - "comment": {"dataType":"string"}, - "autoAcceptProof": {"ref":"AutoAcceptProof"}, - "goalCode": {"dataType":"string"}, - "willConfirm": {"dataType":"boolean"}, - }, - "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 - "RequestProofOptions": { - "dataType": "refObject", - "properties": { - "connectionId": {"dataType":"string","required":true}, - "protocolVersion": {"dataType":"string","required":true}, - "proofFormats": {"dataType":"any","required":true}, - "comment": {"dataType":"string","required":true}, - "autoAcceptProof": {"ref":"AutoAcceptProof","required":true}, - "goalCode": {"dataType":"string"}, - "parentThreadId": {"dataType":"string"}, - "willConfirm": {"dataType":"boolean"}, - }, - "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 - "PlaintextMessage": { - "dataType": "refObject", - "properties": { - "@type": {"dataType":"string","required":true}, - "@id": {"dataType":"string","required":true}, - "~thread": {"dataType":"nestedObjectLiteral","nestedProperties":{"pthid":{"dataType":"string"},"thid":{"dataType":"string"}}}, - }, - "additionalProperties": {"dataType":"any"}, - }, - // 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 - "CreateProofRequestOobOptions": { - "dataType": "refObject", - "properties": { - "protocolVersion": {"dataType":"string","required":true}, - "proofFormats": {"dataType":"any","required":true}, - "goalCode": {"dataType":"string"}, - "parentThreadId": {"dataType":"string"}, - "willConfirm": {"dataType":"boolean"}, - "autoAcceptProof": {"ref":"AutoAcceptProof"}, - "comment": {"dataType":"string"}, - "label": {"dataType":"string"}, - "imageUrl": {"dataType":"string"}, - "recipientKey": {"dataType":"string"}, - "invitationDid": {"dataType":"string"}, - }, - "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 - "ProofFormatDataMessagePayload__40_LegacyIndyProofFormat-or-AnonCredsProofFormat-or-DifPresentationExchangeProofFormat_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 - "ProofFormatDataMessagePayload__40_LegacyIndyProofFormat-or-AnonCredsProofFormat-or-DifPresentationExchangeProofFormat_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 - "ProofFormatDataMessagePayload__40_LegacyIndyProofFormat-or-AnonCredsProofFormat-or-DifPresentationExchangeProofFormat_41_-Array.presentation_": { - "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 - "GetProofFormatDataReturn__40_LegacyIndyProofFormat-or-AnonCredsProofFormat-or-DifPresentationExchangeProofFormat_41_-Array_": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"presentation":{"ref":"ProofFormatDataMessagePayload__40_LegacyIndyProofFormat-or-AnonCredsProofFormat-or-DifPresentationExchangeProofFormat_41_-Array.presentation_"},"request":{"ref":"ProofFormatDataMessagePayload__40_LegacyIndyProofFormat-or-AnonCredsProofFormat-or-DifPresentationExchangeProofFormat_41_-Array.request_"},"proposal":{"ref":"ProofFormatDataMessagePayload__40_LegacyIndyProofFormat-or-AnonCredsProofFormat-or-DifPresentationExchangeProofFormat_41_-Array.proposal_"}},"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 - "HandshakeProtocol": { - "dataType": "refEnum", - "enums": ["https://didcomm.org/didexchange/1.x","https://didcomm.org/connections/1.x"], - }, - // 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 - "AgentMessage": { - "dataType": "refAlias", - "type": {"ref":"PlaintextMessage","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 - "Routing": { - "dataType": "refObject", - "properties": { - "endpoints": {"dataType":"array","array":{"dataType":"string"},"required":true}, - "recipientKey": {"ref":"Key","required":true}, - "routingKeys": {"dataType":"array","array":{"dataType":"refObject","ref":"Key"},"required":true}, - "mediatorId": {"dataType":"string"}, - }, - "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 - "Pick_JwsGeneralFormat.Exclude_keyofJwsGeneralFormat.payload__": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"header":{"ref":"Record_string.unknown_","required":true},"signature":{"dataType":"string","required":true},"protected":{"dataType":"string","required":true}},"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 - "Omit_JwsGeneralFormat.payload_": { - "dataType": "refAlias", - "type": {"ref":"Pick_JwsGeneralFormat.Exclude_keyofJwsGeneralFormat.payload__","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 - "JwsDetachedFormat": { - "dataType": "refAlias", - "type": {"ref":"Omit_JwsGeneralFormat.payload_","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 - "JwsFlattenedDetachedFormat": { - "dataType": "refObject", - "properties": { - "signatures": {"dataType":"array","array":{"dataType":"refAlias","ref":"JwsDetachedFormat"},"required":true}, - }, - "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 - "AttachmentData": { - "dataType": "refObject", - "properties": { - "base64": {"dataType":"string"}, - "json": {"ref":"JsonValue"}, - "links": {"dataType":"array","array":{"dataType":"string"}}, - "jws": {"dataType":"union","subSchemas":[{"ref":"JwsDetachedFormat"},{"ref":"JwsFlattenedDetachedFormat"}]}, - "sha256": {"dataType":"string"}, - }, - "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 - "Attachment": { - "dataType": "refObject", - "properties": { - "id": {"dataType":"string","required":true}, - "description": {"dataType":"string"}, - "filename": {"dataType":"string"}, - "mimeType": {"dataType":"string"}, - "lastmodTime": {"dataType":"datetime"}, - "byteCount": {"dataType":"double"}, - "data": {"ref":"AttachmentData","required":true}, - }, - "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 - "CreateInvitationOptions": { - "dataType": "refObject", - "properties": { - "label": {"dataType":"string"}, - "alias": {"dataType":"string"}, - "imageUrl": {"dataType":"string"}, - "goalCode": {"dataType":"string"}, - "goal": {"dataType":"string"}, - "handshake": {"dataType":"boolean"}, - "handshakeProtocols": {"dataType":"array","array":{"dataType":"refEnum","ref":"HandshakeProtocol"}}, - "messages": {"dataType":"array","array":{"dataType":"refAlias","ref":"AgentMessage"}}, - "multiUseInvitation": {"dataType":"boolean"}, - "autoAcceptConnection": {"dataType":"boolean"}, - "routing": {"ref":"Routing"}, - "appendedAttachments": {"dataType":"array","array":{"dataType":"refObject","ref":"Attachment"}}, - "invitationDid": {"dataType":"string"}, - }, - "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 - "RecipientKeyOption": { - "dataType": "refObject", - "properties": { - "recipientKey": {"dataType":"string"}, - }, - "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 - "Pick_CreateLegacyInvitationConfig.Exclude_keyofCreateLegacyInvitationConfig.routing__": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"alias":{"dataType":"string"},"label":{"dataType":"string"},"imageUrl":{"dataType":"string"},"multiUseInvitation":{"dataType":"boolean"},"autoAcceptConnection":{"dataType":"boolean"}},"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 - "Omit_CreateLegacyInvitationConfig.routing_": { - "dataType": "refAlias", - "type": {"ref":"Pick_CreateLegacyInvitationConfig.Exclude_keyofCreateLegacyInvitationConfig.routing__","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 - "OutOfBandRecord": { - "dataType": "refAlias", - "type": {"ref":"Record_string.unknown_","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 - "CustomHandshakeProtocol": { - "dataType": "refEnum", - "enums": ["https://didcomm.org/didexchange/1.1","https://didcomm.org/connections/1.0"], - }, - // 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 - "SingleOrArray_string-or-Record_string.unknown__": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"dataType":"union","subSchemas":[{"dataType":"string"},{"ref":"Record_string.unknown_"}]},{"dataType":"array","array":{"dataType":"union","subSchemas":[{"dataType":"string"},{"ref":"Record_string.unknown_"}]}}],"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 - "OutOfBandDidCommService": { - "dataType": "refObject", - "properties": { - "id": {"dataType":"string","required":true}, - "serviceEndpoint": {"dataType":"string","required":true}, - "type": {"dataType":"string","required":true}, - "recipientKeys": {"dataType":"array","array":{"dataType":"string"},"required":true}, - "routingKeys": {"dataType":"array","array":{"dataType":"string"}}, - "accept": {"dataType":"array","array":{"dataType":"string"}}, - }, - "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 - "OutOfBandInvitationSchema": { - "dataType": "refObject", - "properties": { - "@id": {"dataType":"string"}, - "@type": {"dataType":"string","required":true}, - "label": {"dataType":"string","required":true}, - "goalCode": {"dataType":"string"}, - "goal": {"dataType":"string"}, - "accept": {"dataType":"array","array":{"dataType":"string"}}, - "handshake_protocols": {"dataType":"array","array":{"dataType":"refEnum","ref":"CustomHandshakeProtocol"}}, - "services": {"dataType":"array","array":{"dataType":"union","subSchemas":[{"ref":"OutOfBandDidCommService"},{"dataType":"string"}]},"required":true}, - "imageUrl": {"dataType":"string"}, - }, - "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 - "Pick_ReceiveOutOfBandInvitationConfig.Exclude_keyofReceiveOutOfBandInvitationConfig.routing__": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"alias":{"dataType":"string"},"label":{"dataType":"string"},"imageUrl":{"dataType":"string"},"autoAcceptConnection":{"dataType":"boolean"},"autoAcceptInvitation":{"dataType":"boolean"},"reuseConnection":{"dataType":"boolean"},"acceptInvitationTimeoutMs":{"dataType":"double"},"ourDid":{"dataType":"string"}},"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 - "Omit_ReceiveOutOfBandInvitationConfig.routing_": { - "dataType": "refAlias", - "type": {"ref":"Pick_ReceiveOutOfBandInvitationConfig.Exclude_keyofReceiveOutOfBandInvitationConfig.routing__","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 - "ReceiveInvitationProps": { - "dataType": "refObject", - "properties": { - "alias": {"dataType":"string"}, - "label": {"dataType":"string"}, - "imageUrl": {"dataType":"string"}, - "autoAcceptConnection": {"dataType":"boolean"}, - "autoAcceptInvitation": {"dataType":"boolean"}, - "reuseConnection": {"dataType":"boolean"}, - "acceptInvitationTimeoutMs": {"dataType":"double"}, - "ourDid": {"dataType":"string"}, - "invitation": {"ref":"OutOfBandInvitationSchema","required":true}, - }, - "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 - "ReceiveInvitationByUrlProps": { - "dataType": "refObject", - "properties": { - "alias": {"dataType":"string"}, - "label": {"dataType":"string"}, - "imageUrl": {"dataType":"string"}, - "autoAcceptConnection": {"dataType":"boolean"}, - "autoAcceptInvitation": {"dataType":"boolean"}, - "reuseConnection": {"dataType":"boolean"}, - "acceptInvitationTimeoutMs": {"dataType":"double"}, - "ourDid": {"dataType":"string"}, - "invitationUrl": {"dataType":"string","required":true}, - }, - "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 - "AcceptInvitationConfig": { - "dataType": "refObject", - "properties": { - "autoAcceptConnection": {"dataType":"boolean"}, - "reuseConnection": {"dataType":"boolean"}, - "label": {"dataType":"string"}, - "alias": {"dataType":"string"}, - "imageUrl": {"dataType":"string"}, - "mediatorId": {"dataType":"string"}, - }, - "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 - "ThreadId": { - "dataType": "refAlias", - "type": {"dataType":"string","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 - "CredentialState": { - "dataType": "refEnum", - "enums": ["proposal-sent","proposal-received","offer-sent","offer-received","declined","request-sent","request-received","credential-issued","credential-received","done","abandoned"], - }, - // 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 - "CredentialRole": { - "dataType": "refEnum", - "enums": ["issuer","holder"], - }, - // 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 - "CredentialExchangeRecord": { - "dataType": "refAlias", - "type": {"ref":"Record_string.unknown_","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 - "ProtocolVersion": { - "dataType": "refEnum", - "enums": ["v1","v2"], - }, - // 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 - "CredentialPreviewAttributeOptions": { - "dataType": "refObject", - "properties": { - "name": {"dataType":"string","required":true}, - "mimeType": {"dataType":"string"}, - "value": {"dataType":"string","required":true}, - }, - "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 - "LinkedAttachment": { - "dataType": "refObject", - "properties": { - "attributeName": {"dataType":"string","required":true}, - "attachment": {"ref":"Attachment","required":true}, - }, - "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 - "Pick_AnonCredsProposeCredentialFormat.Exclude_keyofAnonCredsProposeCredentialFormat.schemaIssuerId-or-issuerId__": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"schemaId":{"dataType":"string"},"schemaName":{"dataType":"string"},"schemaVersion":{"dataType":"string"},"credentialDefinitionId":{"dataType":"string"},"attributes":{"dataType":"array","array":{"dataType":"refObject","ref":"CredentialPreviewAttributeOptions"}},"linkedAttachments":{"dataType":"array","array":{"dataType":"refObject","ref":"LinkedAttachment"}},"schemaIssuerDid":{"dataType":"string"},"issuerDid":{"dataType":"string"}},"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 - "Omit_AnonCredsProposeCredentialFormat.schemaIssuerId-or-issuerId_": { - "dataType": "refAlias", - "type": {"ref":"Pick_AnonCredsProposeCredentialFormat.Exclude_keyofAnonCredsProposeCredentialFormat.schemaIssuerId-or-issuerId__","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 - "LegacyIndyProposeCredentialFormat": { - "dataType": "refAlias", - "type": {"ref":"Omit_AnonCredsProposeCredentialFormat.schemaIssuerId-or-issuerId_","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 - "W3cIssuerOptions": { - "dataType": "refObject", - "properties": { - "id": {"dataType":"string","required":true}, - }, - "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 - "SingleOrArray_JsonObject_": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"ref":"JsonObject"},{"dataType":"array","array":{"dataType":"refObject","ref":"JsonObject"}}],"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 - "JsonCredential": { - "dataType": "refObject", - "properties": { - "@context": {"dataType":"union","subSchemas":[{"dataType":"array","array":{"dataType":"string"}},{"ref":"JsonObject"}],"required":true}, - "id": {"dataType":"string"}, - "type": {"dataType":"array","array":{"dataType":"string"},"required":true}, - "issuer": {"dataType":"union","subSchemas":[{"dataType":"string"},{"ref":"W3cIssuerOptions"}],"required":true}, - "issuanceDate": {"dataType":"string","required":true}, - "expirationDate": {"dataType":"string"}, - "credentialSubject": {"ref":"SingleOrArray_JsonObject_","required":true}, - "prettyVc": {"dataType":"any"}, - }, - "additionalProperties": {"dataType":"any"}, - }, - // 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 - "JsonLdCredentialDetailFormat": { - "dataType": "refObject", - "properties": { - "credential": {"ref":"JsonCredential","required":true}, - "options": {"dataType":"nestedObjectLiteral","nestedProperties":{"proofType":{"dataType":"string","required":true},"proofPurpose":{"dataType":"string","required":true}},"required":true}, - }, - "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 - "AnonCredsProposeCredentialFormat": { - "dataType": "refObject", - "properties": { - "schemaIssuerId": {"dataType":"string"}, - "schemaId": {"dataType":"string"}, - "schemaName": {"dataType":"string"}, - "schemaVersion": {"dataType":"string"}, - "credentialDefinitionId": {"dataType":"string"}, - "issuerId": {"dataType":"string"}, - "attributes": {"dataType":"array","array":{"dataType":"refObject","ref":"CredentialPreviewAttributeOptions"}}, - "linkedAttachments": {"dataType":"array","array":{"dataType":"refObject","ref":"LinkedAttachment"}}, - "schemaIssuerDid": {"dataType":"string"}, - "issuerDid": {"dataType":"string"}, - }, - "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 - "CredentialFormatPayload_CredentialFormatType-Array.createProposal_": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"indy":{"ref":"LegacyIndyProposeCredentialFormat"},"jsonld":{"ref":"JsonLdCredentialDetailFormat"},"anoncreds":{"ref":"AnonCredsProposeCredentialFormat"}},"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 - "AutoAcceptCredential": { - "dataType": "refEnum", - "enums": ["always","contentApproved","never"], - }, - // 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 - "ProposeCredentialOptions": { - "dataType": "refObject", - "properties": { - "protocolVersion": {"ref":"ProtocolVersion","required":true}, - "credentialFormats": {"ref":"CredentialFormatPayload_CredentialFormatType-Array.createProposal_","required":true}, - "autoAcceptCredential": {"ref":"AutoAcceptCredential"}, - "comment": {"dataType":"string"}, - "connectionId": {"ref":"RecordId","required":true}, - }, - "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 - "AnonCredsAcceptProposalFormat": { - "dataType": "refObject", - "properties": { - "credentialDefinitionId": {"dataType":"string"}, - "revocationRegistryDefinitionId": {"dataType":"string"}, - "revocationRegistryIndex": {"dataType":"double"}, - "attributes": {"dataType":"array","array":{"dataType":"refObject","ref":"CredentialPreviewAttributeOptions"}}, - "linkedAttachments": {"dataType":"array","array":{"dataType":"refObject","ref":"LinkedAttachment"}}, - }, - "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 - "Record_string.never_": { - "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 - "EmptyObject": { - "dataType": "refAlias", - "type": {"ref":"Record_string.never_","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 - "CredentialFormatPayload_CredentialFormats.acceptProposal_": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"indy":{"ref":"AnonCredsAcceptProposalFormat"},"jsonld":{"ref":"EmptyObject"},"anoncreds":{"ref":"AnonCredsAcceptProposalFormat"}},"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 - "AcceptCredentialProposalOptions": { - "dataType": "refObject", - "properties": { - "credentialRecordId": {"dataType":"string","required":true}, - "credentialFormats": {"ref":"CredentialFormatPayload_CredentialFormats.acceptProposal_"}, - "autoAcceptCredential": {"ref":"AutoAcceptCredential"}, - "comment": {"dataType":"string"}, - }, - "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 - "AnonCredsOfferCredentialFormat": { - "dataType": "refObject", - "properties": { - "credentialDefinitionId": {"dataType":"string","required":true}, - "revocationRegistryDefinitionId": {"dataType":"string"}, - "revocationRegistryIndex": {"dataType":"double"}, - "attributes": {"dataType":"array","array":{"dataType":"refObject","ref":"CredentialPreviewAttributeOptions"},"required":true}, - "linkedAttachments": {"dataType":"array","array":{"dataType":"refObject","ref":"LinkedAttachment"}}, - }, - "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 - "CredentialFormatPayload_CredentialFormats.createOffer_": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"indy":{"ref":"AnonCredsOfferCredentialFormat"},"jsonld":{"ref":"JsonLdCredentialDetailFormat"},"anoncreds":{"ref":"AnonCredsOfferCredentialFormat"}},"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 - "CreateOfferOptions": { - "dataType": "refObject", - "properties": { - "protocolVersion": {"ref":"ProtocolVersion","required":true}, - "connectionId": {"ref":"RecordId","required":true}, - "credentialFormats": {"ref":"CredentialFormatPayload_CredentialFormats.createOffer_","required":true}, - "autoAcceptCredential": {"ref":"AutoAcceptCredential"}, - "comment": {"dataType":"string"}, - "goalCode": {"dataType":"string"}, - "goal": {"dataType":"string"}, - }, - "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 - "CredentialFormatPayload_CredentialFormatType-Array.createOffer_": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"indy":{"ref":"AnonCredsOfferCredentialFormat"},"jsonld":{"ref":"JsonLdCredentialDetailFormat"},"anoncreds":{"ref":"AnonCredsOfferCredentialFormat"}},"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 - "CreateOfferOobOptions": { - "dataType": "refObject", - "properties": { - "protocolVersion": {"dataType":"string","required":true}, - "credentialFormats": {"ref":"CredentialFormatPayload_CredentialFormatType-Array.createOffer_","required":true}, - "autoAcceptCredential": {"ref":"AutoAcceptCredential"}, - "comment": {"dataType":"string"}, - "goalCode": {"dataType":"string"}, - "parentThreadId": {"dataType":"string"}, - "willConfirm": {"dataType":"boolean"}, - "label": {"dataType":"string"}, - "imageUrl": {"dataType":"string"}, - "recipientKey": {"dataType":"string"}, - "invitationDid": {"dataType":"string"}, - }, - "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 - "AnonCredsAcceptOfferFormat": { - "dataType": "refObject", - "properties": { - "linkSecretId": {"dataType":"string"}, - }, - "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 - "CredentialFormatPayload_CredentialFormats.acceptOffer_": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"indy":{"ref":"AnonCredsAcceptOfferFormat"},"jsonld":{"ref":"EmptyObject"},"anoncreds":{"ref":"AnonCredsAcceptOfferFormat"}},"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 - "CredentialOfferOptions": { - "dataType": "refObject", - "properties": { - "credentialRecordId": {"ref":"RecordId","required":true}, - "credentialFormats": {"ref":"CredentialFormatPayload_CredentialFormats.acceptOffer_"}, - "autoAcceptCredential": {"ref":"AutoAcceptCredential"}, - "comment": {"dataType":"string"}, - }, - "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 - "AnonCredsAcceptRequestFormat": { - "dataType": "refAlias", - "type": {"ref":"Record_string.never_","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 - "JsonLdAcceptRequestFormat": { - "dataType": "refObject", - "properties": { - "verificationMethod": {"dataType":"string"}, - }, - "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 - "CredentialFormatPayload_CredentialFormats.acceptRequest_": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"indy":{"ref":"AnonCredsAcceptRequestFormat"},"jsonld":{"ref":"JsonLdAcceptRequestFormat"},"anoncreds":{"ref":"AnonCredsAcceptRequestFormat"}},"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 - "AcceptCredentialRequestOptions": { - "dataType": "refObject", - "properties": { - "credentialRecordId": {"ref":"RecordId","required":true}, - "credentialFormats": {"ref":"CredentialFormatPayload_CredentialFormats.acceptRequest_"}, - "autoAcceptCredential": {"ref":"AutoAcceptCredential"}, - "comment": {"dataType":"string"}, - }, - "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 - "AcceptCredential": { - "dataType": "refObject", - "properties": { - "credentialRecordId": {"ref":"RecordId","required":true}, - }, - "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 - "DidExchangeState": { - "dataType": "refEnum", - "enums": ["start","invitation-sent","invitation-received","request-sent","request-received","response-sent","response-received","abandoned","completed"], - }, - // 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 - "ConnectionRecord": { - "dataType": "refAlias", - "type": {"ref":"Record_string.unknown_","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":{}}, - }, - // 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 - "Record_content.string_": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"content":{"dataType":"string","required":true}},"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 - "Pick_InitConfig.label_": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"label":{"dataType":"string","required":true}},"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 - "KeyDerivationMethod": { - "dataType": "refEnum", - "enums": ["ARGON2I_MOD","ARGON2I_INT","RAW"], - }, - // 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 - "Pick_WalletConfig.id-or-key-or-keyDerivationMethod_": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"key":{"dataType":"string","required":true},"id":{"dataType":"string","required":true},"keyDerivationMethod":{"ref":"KeyDerivationMethod"}},"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 - "TenantConfig": { - "dataType": "refAlias", - "type": {"dataType":"intersection","subSchemas":[{"ref":"Pick_InitConfig.label_"},{"dataType":"nestedObjectLiteral","nestedProperties":{"walletConfig":{"ref":"Pick_WalletConfig.id-or-key-or-keyDerivationMethod_","required":true}}}],"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 - "MetadataValue": { - "dataType": "refAlias", - "type": {"ref":"Record_string.any_","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 - "MetadataBase": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{},"additionalProperties":{"ref":"MetadataValue"},"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 - "Metadata____": { - "dataType": "refObject", - "properties": { - "data": {"ref":"MetadataBase","required":true}, - }, - "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 - "Pick_CustomTenantConfig.Exclude_keyofCustomTenantConfig.walletConfig__": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"label":{"dataType":"string","required":true},"connectionImageUrl":{"dataType":"string"}},"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 - "Omit_CustomTenantConfig.walletConfig_": { - "dataType": "refAlias", - "type": {"ref":"Pick_CustomTenantConfig.Exclude_keyofCustomTenantConfig.walletConfig__","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 - "CreateTenantOptions": { - "dataType": "refObject", - "properties": { - "config": {"ref":"Omit_CustomTenantConfig.walletConfig_","required":true}, - }, - "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 - "OpenId4VcIssuanceSessionRecord": { - "dataType": "refAlias", - "type": {"ref":"Record_string.unknown_","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 - "DisclosureFrame": { - "dataType": "refObject", - "properties": { - "_sd": {"dataType":"array","array":{"dataType":"string"}}, - }, - "additionalProperties": {"dataType":"union","subSchemas":[{"ref":"DisclosureFrame"},{"dataType":"array","array":{"dataType":"string"}},{"dataType":"undefined"}]}, - }, - // 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 - "OpenId4VciCredentialFormatProfile": { - "dataType": "refEnum", - "enums": ["jwt_vc_json","jwt_vc_json-ld","ldp_vc","vc+sd-jwt","mso_mdoc"], - }, - // 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 - "SignerMethod": { - "dataType": "refEnum", - "enums": ["did","x5c"], - }, - // 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 - "OpenId4VciOfferSdJwtCredential": { - "dataType": "refObject", - "properties": { - "credentialSupportedId": {"dataType":"string","required":true}, - "format": {"ref":"OpenId4VciCredentialFormatProfile","required":true}, - "signerOptions": {"dataType":"nestedObjectLiteral","nestedProperties":{"x5c":{"dataType":"array","array":{"dataType":"string"}},"did":{"dataType":"string"},"method":{"ref":"SignerMethod","required":true}},"required":true}, - "payload": {"dataType":"nestedObjectLiteral","nestedProperties":{"vct":{"dataType":"string"}},"additionalProperties":{"dataType":"any"},"required":true}, - "disclosureFrame": {"ref":"DisclosureFrame"}, - }, - "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 - "Partial_ValidityInfo_": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"signed":{"dataType":"datetime"},"validFrom":{"dataType":"datetime"},"validUntil":{"dataType":"datetime"},"expectedUpdate":{"dataType":"datetime"}},"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 - "Record_string.Record_string.unknown__": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{},"additionalProperties":{"ref":"Record_string.unknown_"},"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 - "MdocNameSpaces": { - "dataType": "refAlias", - "type": {"ref":"Record_string.Record_string.unknown__","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 - "OpenId4VciOfferMdocCredential": { - "dataType": "refObject", - "properties": { - "credentialSupportedId": {"dataType":"string","required":true}, - "format": {"ref":"OpenId4VciCredentialFormatProfile","required":true}, - "signerOptions": {"dataType":"nestedObjectLiteral","nestedProperties":{"x5c":{"dataType":"array","array":{"dataType":"string"}},"did":{"dataType":"string"},"method":{"ref":"SignerMethod","required":true}},"required":true}, - "payload": {"dataType":"nestedObjectLiteral","nestedProperties":{"namespaces":{"ref":"MdocNameSpaces","required":true},"validityInfo":{"ref":"Partial_ValidityInfo_"},"docType":{"dataType":"union","subSchemas":[{"dataType":"enum","enums":["org.iso.18013.5.1.mDL"]},{"dataType":"intersection","subSchemas":[{"dataType":"string"},{"dataType":"nestedObjectLiteral","nestedProperties":{}}]}],"required":true}},"required":true}, - }, - "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 - "OpenId4VciOfferW3cCredential": { - "dataType": "refObject", - "properties": { - "credentialSupportedId": {"dataType":"string","required":true}, - "format": {"ref":"OpenId4VciCredentialFormatProfile","required":true}, - "signerOptions": {"dataType":"nestedObjectLiteral","nestedProperties":{"x5c":{"dataType":"array","array":{"dataType":"string"}},"did":{"dataType":"string"},"method":{"ref":"SignerMethod","required":true}},"required":true}, - "payload": {"dataType":"nestedObjectLiteral","nestedProperties":{"credential":{"ref":"W3cCredential","required":true},"verificationMethod":{"dataType":"string","required":true}},"required":true}, - }, - "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 - "OpenId4VcIssuanceSessionsCreateOffer": { - "dataType": "refObject", - "properties": { - "publicIssuerId": {"dataType":"string","required":true}, - "credentials": {"dataType":"array","array":{"dataType":"union","subSchemas":[{"ref":"OpenId4VciOfferSdJwtCredential"},{"ref":"OpenId4VciOfferMdocCredential"},{"ref":"OpenId4VciOfferW3cCredential"}]},"required":true}, - "authorizationCodeFlowConfig": {"dataType":"nestedObjectLiteral","nestedProperties":{"issuerState":{"dataType":"string"},"requirePresentationDuringIssuance":{"dataType":"boolean"},"authorizationServerUrl":{"dataType":"string","required":true}}}, - "preAuthorizedCodeFlowConfig": {"dataType":"nestedObjectLiteral","nestedProperties":{"authorizationServerUrl":{"dataType":"string","required":true},"txCode":{"dataType":"union","subSchemas":[{"dataType":"nestedObjectLiteral","nestedProperties":{"input_mode":{"dataType":"union","subSchemas":[{"dataType":"enum","enums":["numeric"]},{"dataType":"enum","enums":["text"]}]},"length":{"dataType":"double"},"description":{"dataType":"string"}}},{"dataType":"undefined"}]},"preAuthorizedCode":{"dataType":"string"}}}, - "issuanceMetadata": {"ref":"Record_string.unknown_"}, - }, - "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 - "OpenId4VcIssuanceSessionState": { - "dataType": "refEnum", - "enums": ["OfferCreated","OfferUriRetrieved","AuthorizationInitiated","AuthorizationGranted","AccessTokenRequested","AccessTokenCreated","CredentialRequestReceived","CredentialsPartiallyIssued","Completed","Error"], - }, - // 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 - "OpenId4VcIssuerRecord": { - "dataType": "refAlias", - "type": {"ref":"Record_string.unknown_","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 - "Logo": { - "dataType": "refObject", - "properties": { - "uri": {"dataType":"string"}, - "alt_text": {"dataType":"string"}, - }, - "additionalProperties": {"dataType":"any"}, - }, - // 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 - "CredentialDisplay": { - "dataType": "refObject", - "properties": { - "name": {"dataType":"string"}, - "locale": {"dataType":"string"}, - "logo": {"ref":"Logo"}, - }, - "additionalProperties": {"dataType":"any"}, - }, - // 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 - "AuthorizationServerClientAuth": { - "dataType": "refObject", - "properties": { - "clientId": {"dataType":"string","required":true}, - "clientSecret": {"dataType":"string","required":true}, - }, - "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 - "AuthorizationServerConfig": { - "dataType": "refObject", - "properties": { - "issuer": {"dataType":"string","required":true}, - "clientAuthentication": {"ref":"AuthorizationServerClientAuth"}, - }, - "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 - "ProofTypeConfig": { - "dataType": "refObject", - "properties": { - "proof_signing_alg_values_supported": {"dataType":"array","array":{"dataType":"string"},"required":true}, - }, - "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 - "Record_string.ProofTypeConfig_": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{},"additionalProperties":{"ref":"ProofTypeConfig"},"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 - "CredentialDefinition": { - "dataType": "refObject", - "properties": { - "type": {"dataType":"array","array":{"dataType":"string"},"required":true}, - }, - "additionalProperties": {"dataType":"any"}, - }, - // 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 - "CredentialConfigurationDisplay": { - "dataType": "refObject", - "properties": { - "name": {"dataType":"string","required":true}, - "locale": {"dataType":"string"}, - "logo": {"ref":"Logo"}, - "description": {"dataType":"string"}, - "background_color": {"dataType":"string"}, - "background_image": {"ref":"Logo"}, - "text_color": {"dataType":"string"}, - }, - "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 - "CredentialConfigurationSupportedWithFormats": { - "dataType": "refObject", - "properties": { - "format": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":["vc+sd-jwt"]},{"dataType":"enum","enums":["mso_mdoc"]},{"dataType":"enum","enums":["jwt_vc_json"]},{"dataType":"string"}],"required":true}, - "vct": {"dataType":"string"}, - "doctype": {"dataType":"string"}, - "scope": {"dataType":"string"}, - "claims": {"dataType":"any"}, - "cryptographic_binding_methods_supported": {"dataType":"array","array":{"dataType":"string"}}, - "credential_signing_alg_values_supported": {"dataType":"array","array":{"dataType":"string"}}, - "proof_types_supported": {"ref":"Record_string.ProofTypeConfig_"}, - "credential_definition": {"ref":"CredentialDefinition"}, - "display": {"dataType":"array","array":{"dataType":"refObject","ref":"CredentialConfigurationDisplay"}}, - }, - "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 - "Record_string.CredentialConfigurationSupportedWithFormats_": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{},"additionalProperties":{"ref":"CredentialConfigurationSupportedWithFormats"},"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 - "BatchCredentialIssuanceOptions": { - "dataType": "refObject", - "properties": { - "batchSize": {"dataType":"double","required":true}, - }, - "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 - "CreateIssuerOptions": { - "dataType": "refObject", - "properties": { - "issuerId": {"dataType":"string"}, - "accessTokenSignerKeyType": {"dataType":"string"}, - "display": {"dataType":"array","array":{"dataType":"refObject","ref":"CredentialDisplay"}}, - "authorizationServerConfigs": {"dataType":"array","array":{"dataType":"refObject","ref":"AuthorizationServerConfig"}}, - "dpopSigningAlgValuesSupported": {"dataType":"array","array":{"dataType":"string"}}, - "credentialConfigurationsSupported": {"ref":"Record_string.CredentialConfigurationSupportedWithFormats_","required":true}, - "batchCredentialIssuance": {"ref":"BatchCredentialIssuanceOptions"}, - }, - "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 - "UpdateIssuerRecordOptions": { - "dataType": "refObject", - "properties": { - "display": {"dataType":"array","array":{"dataType":"refObject","ref":"CredentialDisplay"}}, - "dpopSigningAlgValuesSupported": {"dataType":"array","array":{"dataType":"string"}}, - "credentialConfigurationsSupported": {"ref":"Record_string.CredentialConfigurationSupportedWithFormats_","required":true}, - "batchCredentialIssuance": {"ref":"BatchCredentialIssuanceOptions"}, - }, - "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 - "JwtObject": { - "dataType": "refObject", - "properties": { - "alg": {"dataType":"array","array":{"dataType":"string"},"required":true}, - }, - "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 - "LdpObject": { - "dataType": "refObject", - "properties": { - "proof_type": {"dataType":"array","array":{"dataType":"string"},"required":true}, - }, - "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 - "DiObject": { - "dataType": "refObject", - "properties": { - "proof_type": {"dataType":"array","array":{"dataType":"string"},"required":true}, - "cryptosuite": {"dataType":"array","array":{"dataType":"string"},"required":true}, - }, - "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 - "SdJwtObject": { - "dataType": "refObject", - "properties": { - "undefined": {"dataType":"array","array":{"dataType":"string"}}, - }, - "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 - "MsoMdocObject": { - "dataType": "refObject", - "properties": { - "alg": {"dataType":"array","array":{"dataType":"string"},"required":true}, - }, - "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 - "Format": { - "dataType": "refObject", - "properties": { - "jwt": {"ref":"JwtObject"}, - "jwt_vc": {"ref":"JwtObject"}, - "jwt_vc_json": {"ref":"JwtObject"}, - "jwt_vp": {"ref":"JwtObject"}, - "jwt_vp_json": {"ref":"JwtObject"}, - "ldp": {"ref":"LdpObject"}, - "ldp_vc": {"ref":"LdpObject"}, - "ldp_vp": {"ref":"LdpObject"}, - "di": {"ref":"DiObject"}, - "di_vc": {"ref":"DiObject"}, - "di_vp": {"ref":"DiObject"}, - "undefined": {"ref":"SdJwtObject"}, - "mso_mdoc": {"ref":"MsoMdocObject"}, - }, - "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 - "Issuance": { - "dataType": "refObject", - "properties": { - "manifest": {"dataType":"string"}, - }, - "additionalProperties": {"dataType":"union","subSchemas":[{"dataType":"any"},{"dataType":"any"}]}, - }, - // 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 - "Optionality": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":["required"]},{"dataType":"enum","enums":["preferred"]}],"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 - "Directives": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":["required"]},{"dataType":"enum","enums":["allowed"]},{"dataType":"enum","enums":["disallowed"]}],"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 - "PdStatus": { - "dataType": "refObject", - "properties": { - "directive": {"ref":"Directives"}, - }, - "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 - "Statuses": { - "dataType": "refObject", - "properties": { - "active": {"ref":"PdStatus"}, - "suspended": {"ref":"PdStatus"}, - "revoked": {"ref":"PdStatus"}, - }, - "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 - "OneOfNumberStringBoolean": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"dataType":"boolean"},{"dataType":"double"},{"dataType":"string"}],"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 - "OneOfNumberString": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"dataType":"double"},{"dataType":"string"}],"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 - "FilterV2": { - "dataType": "refObject", - "properties": { - "const": {"ref":"OneOfNumberStringBoolean"}, - "enum": {"dataType":"array","array":{"dataType":"refAlias","ref":"OneOfNumberStringBoolean"}}, - "exclusiveMinimum": {"ref":"OneOfNumberString"}, - "exclusiveMaximum": {"ref":"OneOfNumberString"}, - "format": {"dataType":"string"}, - "formatMaximum": {"dataType":"string"}, - "formatMinimum": {"dataType":"string"}, - "formatExclusiveMaximum": {"dataType":"string"}, - "formatExclusiveMinimum": {"dataType":"string"}, - "minLength": {"dataType":"double"}, - "maxLength": {"dataType":"double"}, - "minimum": {"ref":"OneOfNumberString"}, - "maximum": {"ref":"OneOfNumberString"}, - "not": {"dataType":"object"}, - "pattern": {"dataType":"string"}, - "type": {"dataType":"string"}, - "contains": {"ref":"FilterV2"}, - "items": {"ref":"FilterV2Items"}, - }, - "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 - "FilterV2Items": { - "dataType": "refObject", - "properties": { - "const": {"ref":"OneOfNumberStringBoolean"}, - "enum": {"dataType":"array","array":{"dataType":"refAlias","ref":"OneOfNumberStringBoolean"}}, - "exclusiveMinimum": {"ref":"OneOfNumberString"}, - "exclusiveMaximum": {"ref":"OneOfNumberString"}, - "format": {"dataType":"string"}, - "formatMaximum": {"dataType":"string"}, - "formatMinimum": {"dataType":"string"}, - "formatExclusiveMaximum": {"dataType":"string"}, - "formatExclusiveMinimum": {"dataType":"string"}, - "minLength": {"dataType":"double"}, - "maxLength": {"dataType":"double"}, - "minimum": {"ref":"OneOfNumberString"}, - "maximum": {"ref":"OneOfNumberString"}, - "not": {"dataType":"object"}, - "pattern": {"dataType":"string"}, - "type": {"dataType":"string"}, - "contains": {"ref":"FilterV2"}, - "items": {"ref":"FilterV2Items"}, - }, - "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 - "FieldV2": { - "dataType": "refObject", - "properties": { - "id": {"dataType":"string"}, - "path": {"dataType":"array","array":{"dataType":"string"},"required":true}, - "purpose": {"dataType":"string"}, - "filter": {"ref":"FilterV2"}, - "predicate": {"ref":"Optionality"}, - "intent_to_retain": {"dataType":"boolean"}, - "name": {"dataType":"string"}, - "optional": {"dataType":"boolean"}, - }, - "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 - "HolderSubject": { - "dataType": "refObject", - "properties": { - "field_id": {"dataType":"array","array":{"dataType":"string"},"required":true}, - "directive": {"ref":"Optionality","required":true}, - }, - "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 - "ConstraintsV2": { - "dataType": "refObject", - "properties": { - "limit_disclosure": {"ref":"Optionality"}, - "statuses": {"ref":"Statuses"}, - "fields": {"dataType":"array","array":{"dataType":"refObject","ref":"FieldV2"}}, - "subject_is_issuer": {"ref":"Optionality"}, - "is_holder": {"dataType":"array","array":{"dataType":"refObject","ref":"HolderSubject"}}, - "same_subject": {"dataType":"array","array":{"dataType":"refObject","ref":"HolderSubject"}}, - }, - "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 - "InputDescriptorV2Model": { - "dataType": "refObject", - "properties": { - "id": {"dataType":"string","required":true}, - "name": {"dataType":"string"}, - "purpose": {"dataType":"string"}, - "format": {"ref":"Format"}, - "group": {"dataType":"array","array":{"dataType":"string"}}, - "issuance": {"dataType":"array","array":{"dataType":"refObject","ref":"Issuance"}}, - "constraints": {"ref":"ConstraintsV2","required":true}, - }, - "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 - "Rules": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":["all"]},{"dataType":"enum","enums":["pick"]}],"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 - "SubmissionRequirement": { - "dataType": "refObject", - "properties": { - "name": {"dataType":"string"}, - "purpose": {"dataType":"string"}, - "rule": {"ref":"Rules","required":true}, - "count": {"dataType":"double"}, - "min": {"dataType":"double"}, - "max": {"dataType":"double"}, - "from": {"dataType":"string"}, - "from_nested": {"dataType":"array","array":{"dataType":"refObject","ref":"SubmissionRequirement"}}, - }, - "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 - "InputDescriptorV2": { - "dataType": "refObject", - "properties": { - "id": {"dataType":"string","required":true}, - "name": {"dataType":"string"}, - "purpose": {"dataType":"string"}, - "format": {"ref":"Format"}, - "group": {"dataType":"array","array":{"dataType":"string"}}, - "issuance": {"dataType":"array","array":{"dataType":"refObject","ref":"Issuance"}}, - "constraints": {"ref":"ConstraintsV2","required":true}, - }, - "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 - "PresentationDefinitionV2": { - "dataType": "refObject", - "properties": { - "id": {"dataType":"string","required":true}, - "name": {"dataType":"string"}, - "purpose": {"dataType":"string"}, - "format": {"ref":"Format"}, - "submission_requirements": {"dataType":"array","array":{"dataType":"refObject","ref":"SubmissionRequirement"}}, - "input_descriptors": {"dataType":"array","array":{"dataType":"refObject","ref":"InputDescriptorV2"},"required":true}, - "frame": {"dataType":"object"}, - }, - "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 - "DifPresentationExchangeDefinitionV2Model": { - "dataType": "refObject", - "properties": { - "id": {"dataType":"string","required":true}, - "name": {"dataType":"string"}, - "purpose": {"dataType":"string"}, - "format": {"ref":"Format"}, - "submission_requirements": {"dataType":"array","array":{"dataType":"any"}}, - "input_descriptors": {"dataType":"array","array":{"dataType":"refObject","ref":"InputDescriptorV2Model"},"required":true}, - "frame": {"dataType":"object"}, - }, - "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 - "PresentationDefinition": { - "dataType": "refObject", - "properties": { - "definition": {"ref":"DifPresentationExchangeDefinitionV2Model","required":true}, - }, - "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 - "DcqlDefinition": { - "dataType": "refObject", - "properties": { - "query": {"dataType":"any","required":true}, - }, - "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 - "ResponseModeEnum": { - "dataType": "refEnum", - "enums": ["direct_post","direct_post.jwt","dc_api","dc_api.jwt"], - }, - // 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 - "OpenId4VcJwtIssuerDid": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"didUrl":{"dataType":"string","required":true},"method":{"dataType":"enum","enums":["did"],"required":true}},"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 - "OpenId4VcIssuerX5c": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"alg":{"dataType":"string"},"x5c":{"dataType":"array","array":{"dataType":"string"},"required":true},"issuer":{"dataType":"string"},"method":{"dataType":"enum","enums":["x5c"],"required":true}},"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 - "CreateAuthorizationRequest": { - "dataType": "refObject", - "properties": { - "verifierId": {"dataType":"string","required":true}, - "presentationExchange": {"ref":"PresentationDefinition"}, - "dcql": {"dataType":"union","subSchemas":[{"dataType":"string"},{"ref":"DcqlDefinition"}]}, - "responseMode": {"ref":"ResponseModeEnum"}, - "requestSigner": {"dataType":"union","subSchemas":[{"ref":"OpenId4VcJwtIssuerDid"},{"ref":"OpenId4VcIssuerX5c"}],"required":true}, - "expectedOrigins": {"dataType":"array","array":{"dataType":"string"}}, - }, - "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 - "OpenId4VcVerificationSessionRecord": { - "dataType": "refAlias", - "type": {"ref":"Record_string.unknown_","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 - "OpenId4VcVerificationSessionState": { - "dataType": "refEnum", - "enums": ["RequestCreated","RequestUriRetrieved","ResponseVerified","Error"], - }, - // 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 - "SdJwtVcRecord": { - "dataType": "refAlias", - "type": {"ref":"Record_string.unknown_","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 - "MdocRecord": { - "dataType": "refAlias", - "type": {"ref":"Record_string.unknown_","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 - "ResolveCredentialOfferBody": { - "dataType": "refObject", - "properties": { - "credentialOfferUri": {"dataType":"string","required":true}, - }, - "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 - "AuthorizeRequestCredentialOffer": { - "dataType": "refObject", - "properties": { - "credentialOfferUri": {"dataType":"string","required":true}, - "credentialsToRequest": {"dataType":"array","array":{"dataType":"string"},"required":true}, - }, - "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 - "RequestCredentialBody": { - "dataType": "refObject", - "properties": { - "credentialOfferUri": {"dataType":"string","required":true}, - "credentialsToRequest": {"dataType":"array","array":{"dataType":"string"},"required":true}, - "authorizationCode": {"dataType":"string"}, - "codeVerifier": {"dataType":"string"}, - "txCode": {"dataType":"string"}, - }, - "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 - "ResolveProofRequest": { - "dataType": "refObject", - "properties": { - "proofRequestUri": {"dataType":"string","required":true}, - }, - "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 - "OpenId4VcVerifierRecord": { - "dataType": "refAlias", - "type": {"ref":"Record_string.unknown_","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 - "OpenId4VcSiopVerifierClientMetadata": { - "dataType": "refObject", - "properties": { - "client_name": {"dataType":"string"}, - "logo_uri": {"dataType":"string"}, - }, - "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 - "OpenId4VcSiopCreateVerifierOptions": { - "dataType": "refObject", - "properties": { - "verifierId": {"dataType":"string"}, - "clientMetadata": {"ref":"OpenId4VcSiopVerifierClientMetadata"}, - }, - "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 - "OpenId4VcUpdateVerifierRecordOptions": { - "dataType": "refObject", - "properties": { - "verifierId": {"dataType":"string"}, - "clientMetadata": {"ref":"OpenId4VcSiopVerifierClientMetadata"}, - }, - "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 -}; -const templateService = new ExpressTemplateService(models, {"noImplicitAdditionalProperties":"throw-on-extras","bodyCoercion":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 - - - - -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 - // ########################################################################################################### - - - - const argsX509Controller_createX509Certificate: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - createX509Options: {"in":"body","name":"createX509Options","required":true,"ref":"X509CreateCertificateOptionsDto"}, - }; - app.post('/x509', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(X509Controller)), - ...(fetchMiddlewares(X509Controller.prototype.createX509Certificate)), - - async function X509Controller_createX509Certificate(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsX509Controller_createX509Certificate, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(X509Controller); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'createX509Certificate', - 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 - const argsX509Controller_ImportX509Certificates: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - importX509Options: {"in":"body","name":"importX509Options","required":true,"ref":"X509ImportCertificateOptionsDto"}, - }; - app.post('/x509/import', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(X509Controller)), - ...(fetchMiddlewares(X509Controller.prototype.ImportX509Certificates)), - - async function X509Controller_ImportX509Certificates(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsX509Controller_ImportX509Certificates, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(X509Controller); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'ImportX509Certificates', - 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 - const argsX509Controller_addTrustedCertificate: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - options: {"in":"body","name":"options","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"certificate":{"dataType":"string","required":true}}}, - }; - app.post('/x509/trusted', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(X509Controller)), - ...(fetchMiddlewares(X509Controller.prototype.addTrustedCertificate)), - - async function X509Controller_addTrustedCertificate(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsX509Controller_addTrustedCertificate, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(X509Controller); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'addTrustedCertificate', - 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 - const argsX509Controller_getTrustedCertificates: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - }; - app.get('/x509/trusted', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(X509Controller)), - ...(fetchMiddlewares(X509Controller.prototype.getTrustedCertificates)), - - async function X509Controller_getTrustedCertificates(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsX509Controller_getTrustedCertificates, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(X509Controller); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getTrustedCertificates', - 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 - const argsX509Controller_decodeCertificate: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - options: {"in":"body","name":"options","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"certificate":{"dataType":"string","required":true}}}, - }; - app.post('/x509/decode', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(X509Controller)), - ...(fetchMiddlewares(X509Controller.prototype.decodeCertificate)), - - async function X509Controller_decodeCertificate(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsX509Controller_decodeCertificate, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(X509Controller); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'decodeCertificate', - 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 - const argsPolygon_createKeyPair: Record = { - }; - app.post('/polygon/create-keys', - authenticateMiddleware([{"jwt":["tenant","dedicated","Basewallet"]}]), - ...(fetchMiddlewares(Polygon)), - ...(fetchMiddlewares(Polygon.prototype.createKeyPair)), - - async function Polygon_createKeyPair(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsPolygon_createKeyPair, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(Polygon); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'createKeyPair', - 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 - const argsPolygon_createSchema: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - createSchemaRequest: {"in":"body","name":"createSchemaRequest","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"schema":{"ref":"Record_string.unknown_","required":true},"schemaName":{"dataType":"string","required":true},"did":{"dataType":"string","required":true}}}, - }; - app.post('/polygon/create-schema', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(Polygon)), - ...(fetchMiddlewares(Polygon.prototype.createSchema)), - - async function Polygon_createSchema(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsPolygon_createSchema, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(Polygon); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'createSchema', - 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 - const argsPolygon_estimateTransaction: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - estimateTransactionRequest: {"in":"body","name":"estimateTransactionRequest","required":true,"ref":"DidOperationOptions"}, - }; - app.post('/polygon/estimate-transaction', - authenticateMiddleware([{"jwt":["tenant","dedicated","Basewallet"]}]), - ...(fetchMiddlewares(Polygon)), - ...(fetchMiddlewares(Polygon.prototype.estimateTransaction)), - - async function Polygon_estimateTransaction(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsPolygon_estimateTransaction, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(Polygon); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'estimateTransaction', - 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 - const argsPolygon_getSchemaById: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - did: {"in":"path","name":"did","required":true,"dataType":"string"}, - schemaId: {"in":"path","name":"schemaId","required":true,"dataType":"string"}, - }; - app.get('/polygon/:did/:schemaId', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(Polygon)), - ...(fetchMiddlewares(Polygon.prototype.getSchemaById)), - - async function Polygon_getSchemaById(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsPolygon_getSchemaById, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(Polygon); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getSchemaById', - 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 - const argsEndorserTransactionController_endorserTransaction: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - endorserTransaction: {"in":"body","name":"endorserTransaction","required":true,"ref":"EndorserTransaction"}, - }; - app.post('/anoncreds/transactions/endorse', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(EndorserTransactionController)), - ...(fetchMiddlewares(EndorserTransactionController.prototype.endorserTransaction)), - - async function EndorserTransactionController_endorserTransaction(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsEndorserTransactionController_endorserTransaction, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(EndorserTransactionController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'endorserTransaction', - 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 - const argsEndorserTransactionController_didNymTransaction: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - didNymTransaction: {"in":"body","name":"didNymTransaction","required":true,"ref":"DidNymTransaction"}, - }; - app.post('/anoncreds/transactions/set-endorser-role', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(EndorserTransactionController)), - ...(fetchMiddlewares(EndorserTransactionController.prototype.didNymTransaction)), - - async function EndorserTransactionController_didNymTransaction(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsEndorserTransactionController_didNymTransaction, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(EndorserTransactionController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'didNymTransaction', - 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 - const argsEndorserTransactionController_writeSchemaAndCredDefOnLedger: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - writeTransaction: {"in":"body","name":"writeTransaction","required":true,"ref":"WriteTransaction"}, - }; - app.post('/anoncreds/transactions/write', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(EndorserTransactionController)), - ...(fetchMiddlewares(EndorserTransactionController.prototype.writeSchemaAndCredDefOnLedger)), - - async function EndorserTransactionController_writeSchemaAndCredDefOnLedger(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsEndorserTransactionController_writeSchemaAndCredDefOnLedger, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(EndorserTransactionController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'writeSchemaAndCredDefOnLedger', - 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 - const argsDidController_getDidRecordByDid: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - did: {"in":"path","name":"did","required":true,"ref":"Did"}, - }; - app.get('/dids/:did', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(DidController)), - ...(fetchMiddlewares(DidController.prototype.getDidRecordByDid)), - - async function DidController_getDidRecordByDid(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsDidController_getDidRecordByDid, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(DidController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getDidRecordByDid', - 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 - const argsDidController_writeDid: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - createDidOptions: {"in":"body","name":"createDidOptions","required":true,"ref":"DidCreate"}, - }; - app.post('/dids/write', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(DidController)), - ...(fetchMiddlewares(DidController.prototype.writeDid)), - - async function DidController_writeDid(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsDidController_writeDid, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(DidController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'writeDid', - 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 - const argsDidController_getDids: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - }; - app.get('/dids', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(DidController)), - ...(fetchMiddlewares(DidController.prototype.getDids)), - - async function DidController_getDids(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsDidController_getDids, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(DidController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getDids', - 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 - const argsSchemaController_getSchemaById: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - schemaId: {"in":"path","name":"schemaId","required":true,"ref":"SchemaId"}, - }; - app.get('/anoncreds/schemas/:schemaId', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(SchemaController)), - ...(fetchMiddlewares(SchemaController.prototype.getSchemaById)), - - async function SchemaController_getSchemaById(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsSchemaController_getSchemaById, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(SchemaController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getSchemaById', - 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 - const argsSchemaController_createSchema: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - schema: {"in":"body","name":"schema","required":true,"ref":"CreateSchemaInput"}, - }; - app.post('/anoncreds/schemas', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(SchemaController)), - ...(fetchMiddlewares(SchemaController.prototype.createSchema)), - - async function SchemaController_createSchema(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsSchemaController_createSchema, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(SchemaController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'createSchema', - 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 - const argsCredentialDefinitionController_getCredentialDefinitionById: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - credentialDefinitionId: {"in":"path","name":"credentialDefinitionId","required":true,"ref":"CredentialDefinitionId"}, - }; - app.get('/anoncreds/credential-definitions/:credentialDefinitionId', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(CredentialDefinitionController)), - ...(fetchMiddlewares(CredentialDefinitionController.prototype.getCredentialDefinitionById)), - - async function CredentialDefinitionController_getCredentialDefinitionById(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsCredentialDefinitionController_getCredentialDefinitionById, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(CredentialDefinitionController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getCredentialDefinitionById', - 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 - const argsCredentialDefinitionController_createCredentialDefinition: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - credentialDefinitionRequest: {"in":"body","name":"credentialDefinitionRequest","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"endorserDid":{"dataType":"string"},"endorse":{"dataType":"boolean"},"tag":{"dataType":"string","required":true},"schemaId":{"ref":"SchemaId","required":true},"issuerId":{"dataType":"string","required":true}}}, - }; - app.post('/anoncreds/credential-definitions', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(CredentialDefinitionController)), - ...(fetchMiddlewares(CredentialDefinitionController.prototype.createCredentialDefinition)), - - async function CredentialDefinitionController_createCredentialDefinition(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsCredentialDefinitionController_createCredentialDefinition, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(CredentialDefinitionController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'createCredentialDefinition', - 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 - const argsAgentController_getAgentInfo: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - }; - app.get('/agent', - authenticateMiddleware([{"jwt":["tenant","dedicated","Basewallet"]}]), - ...(fetchMiddlewares(AgentController)), - ...(fetchMiddlewares(AgentController.prototype.getAgentInfo)), - - async function AgentController_getAgentInfo(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsAgentController_getAgentInfo, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(AgentController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getAgentInfo', - 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 - const argsAgentController_getAgentToken: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - }; - app.post('/agent/token', - authenticateMiddleware([{"apiKey":[]}]), - ...(fetchMiddlewares(AgentController)), - ...(fetchMiddlewares(AgentController.prototype.getAgentToken)), - - async function AgentController_getAgentToken(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsAgentController_getAgentToken, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(AgentController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getAgentToken', - 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 - const argsAgentController_deleteWallet: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - }; - app.delete('/agent/wallet', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(AgentController)), - ...(fetchMiddlewares(AgentController.prototype.deleteWallet)), - - async function AgentController_deleteWallet(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsAgentController_deleteWallet, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(AgentController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'deleteWallet', - 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 - const argsAgentController_verify: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - body: {"in":"body","name":"body","required":true,"ref":"VerifyDataOptions"}, - }; - app.post('/agent/verify', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(AgentController)), - ...(fetchMiddlewares(AgentController.prototype.verify)), - - async function AgentController_verify(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsAgentController_verify, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(AgentController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'verify', - 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 - const argsAgentController_signCredential: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - storeCredential: {"in":"query","name":"storeCredential","required":true,"dataType":"boolean"}, - dataTypeToSign: {"in":"query","name":"dataTypeToSign","required":true,"dataType":"union","subSchemas":[{"dataType":"enum","enums":["rawData"]},{"dataType":"enum","enums":["jsonLd"]}]}, - data: {"in":"body","name":"data","required":true,"dataType":"union","subSchemas":[{"ref":"CustomW3cJsonLdSignCredentialOptions"},{"ref":"SignDataOptions"},{"dataType":"any"}]}, - }; - app.post('/agent/credential/sign', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(AgentController)), - ...(fetchMiddlewares(AgentController.prototype.signCredential)), - - async function AgentController_signCredential(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsAgentController_signCredential, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(AgentController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'signCredential', - 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 - const argsAgentController_verifyCredential: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - credentialToVerify: {"in":"body","name":"credentialToVerify","required":true,"dataType":"union","subSchemas":[{"ref":"SafeW3cJsonLdVerifyCredentialOptions"},{"dataType":"any"}]}, - }; - app.post('/agent/credential/verify', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(AgentController)), - ...(fetchMiddlewares(AgentController.prototype.verifyCredential)), - - async function AgentController_verifyCredential(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsAgentController_verifyCredential, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(AgentController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'verifyCredential', - 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 - const argsQuestionAnswerController_getQuestionAnswerRecords: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - connectionId: {"in":"query","name":"connectionId","dataType":"string"}, - role: {"in":"query","name":"role","ref":"QuestionAnswerRole"}, - state: {"in":"query","name":"state","ref":"QuestionAnswerState"}, - threadId: {"in":"query","name":"threadId","dataType":"string"}, - }; - app.get('/didcomm/question-answer', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(QuestionAnswerController)), - ...(fetchMiddlewares(QuestionAnswerController.prototype.getQuestionAnswerRecords)), - - async function QuestionAnswerController_getQuestionAnswerRecords(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsQuestionAnswerController_getQuestionAnswerRecords, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(QuestionAnswerController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getQuestionAnswerRecords', - 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 - const argsQuestionAnswerController_sendQuestion: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - connectionId: {"in":"path","name":"connectionId","required":true,"ref":"RecordId"}, - config: {"in":"body","name":"config","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"detail":{"dataType":"string"},"validResponses":{"dataType":"array","array":{"dataType":"refObject","ref":"ValidResponse"},"required":true},"question":{"dataType":"string","required":true}}}, - }; - app.post('/didcomm/question-answer/question/:connectionId', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(QuestionAnswerController)), - ...(fetchMiddlewares(QuestionAnswerController.prototype.sendQuestion)), - - async function QuestionAnswerController_sendQuestion(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsQuestionAnswerController_sendQuestion, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(QuestionAnswerController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'sendQuestion', - 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 - const argsQuestionAnswerController_sendAnswer: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - id: {"in":"path","name":"id","required":true,"ref":"RecordId"}, - body: {"in":"body","name":"body","required":true,"ref":"Record_response.string_"}, - }; - app.post('/didcomm/question-answer/answer/:id', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(QuestionAnswerController)), - ...(fetchMiddlewares(QuestionAnswerController.prototype.sendAnswer)), - - async function QuestionAnswerController_sendAnswer(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsQuestionAnswerController_sendAnswer, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(QuestionAnswerController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'sendAnswer', - 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 - const argsQuestionAnswerController_getQuestionAnswerRecordById: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - id: {"in":"path","name":"id","required":true,"ref":"RecordId"}, - }; - app.get('/didcomm/question-answer/:id', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(QuestionAnswerController)), - ...(fetchMiddlewares(QuestionAnswerController.prototype.getQuestionAnswerRecordById)), - - async function QuestionAnswerController_getQuestionAnswerRecordById(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsQuestionAnswerController_getQuestionAnswerRecordById, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(QuestionAnswerController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getQuestionAnswerRecordById', - 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 - const argsProofController_getAllProofs: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - threadId: {"in":"query","name":"threadId","dataType":"string"}, - }; - app.get('/didcomm/proofs', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(ProofController)), - ...(fetchMiddlewares(ProofController.prototype.getAllProofs)), - - async function ProofController_getAllProofs(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsProofController_getAllProofs, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(ProofController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getAllProofs', - 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 - const argsProofController_getProofById: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - proofRecordId: {"in":"path","name":"proofRecordId","required":true,"ref":"RecordId"}, - }; - app.get('/didcomm/proofs/:proofRecordId', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(ProofController)), - ...(fetchMiddlewares(ProofController.prototype.getProofById)), - - async function ProofController_getProofById(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsProofController_getProofById, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(ProofController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getProofById', - 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 - const argsProofController_proposeProof: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - requestProofProposalOptions: {"in":"body","name":"requestProofProposalOptions","required":true,"ref":"RequestProofProposalOptions"}, - }; - app.post('/didcomm/proofs/propose-proof', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(ProofController)), - ...(fetchMiddlewares(ProofController.prototype.proposeProof)), - - async function ProofController_proposeProof(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsProofController_proposeProof, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(ProofController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'proposeProof', - 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 - const argsProofController_acceptProposal: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - acceptProposal: {"in":"body","name":"acceptProposal","required":true,"ref":"AcceptProofProposal"}, - }; - app.post('/didcomm/proofs/:proofRecordId/accept-proposal', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(ProofController)), - ...(fetchMiddlewares(ProofController.prototype.acceptProposal)), - - async function ProofController_acceptProposal(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsProofController_acceptProposal, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(ProofController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'acceptProposal', - 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 - const argsProofController_requestProof: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - requestProofOptions: {"in":"body","name":"requestProofOptions","required":true,"ref":"RequestProofOptions"}, - }; - app.post('/didcomm/proofs/request-proof', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(ProofController)), - ...(fetchMiddlewares(ProofController.prototype.requestProof)), - - async function ProofController_requestProof(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsProofController_requestProof, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(ProofController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'requestProof', - 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 - const argsProofController_createRequest: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - createRequestOptions: {"in":"body","name":"createRequestOptions","required":true,"ref":"CreateProofRequestOobOptions"}, - }; - app.post('/didcomm/proofs/create-request-oob', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(ProofController)), - ...(fetchMiddlewares(ProofController.prototype.createRequest)), - - async function ProofController_createRequest(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsProofController_createRequest, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(ProofController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'createRequest', - 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 - const argsProofController_acceptRequest: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - proofRecordId: {"in":"path","name":"proofRecordId","required":true,"dataType":"string"}, - body: {"in":"body","name":"body","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"comment":{"dataType":"string"},"filterByNonRevocationRequirements":{"dataType":"boolean"},"filterByPresentationPreview":{"dataType":"boolean"}}}, - }; - app.post('/didcomm/proofs/:proofRecordId/accept-request', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(ProofController)), - ...(fetchMiddlewares(ProofController.prototype.acceptRequest)), - - async function ProofController_acceptRequest(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsProofController_acceptRequest, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(ProofController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'acceptRequest', - 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 - const argsProofController_acceptPresentation: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - proofRecordId: {"in":"path","name":"proofRecordId","required":true,"dataType":"string"}, - }; - app.post('/didcomm/proofs/:proofRecordId/accept-presentation', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(ProofController)), - ...(fetchMiddlewares(ProofController.prototype.acceptPresentation)), - - async function ProofController_acceptPresentation(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsProofController_acceptPresentation, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(ProofController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'acceptPresentation', - 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 - const argsProofController_proofFormData: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - proofRecordId: {"in":"path","name":"proofRecordId","required":true,"dataType":"string"}, - }; - app.get('/didcomm/proofs/:proofRecordId/form-data', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(ProofController)), - ...(fetchMiddlewares(ProofController.prototype.proofFormData)), - - async function ProofController_proofFormData(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsProofController_proofFormData, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(ProofController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'proofFormData', - 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 - const argsOutOfBandController_getAllOutOfBandRecords: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - invitationId: {"in":"query","name":"invitationId","ref":"RecordId"}, - }; - app.get('/didcomm/oob', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(OutOfBandController)), - ...(fetchMiddlewares(OutOfBandController.prototype.getAllOutOfBandRecords)), - - async function OutOfBandController_getAllOutOfBandRecords(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsOutOfBandController_getAllOutOfBandRecords, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(OutOfBandController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getAllOutOfBandRecords', - 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 - const argsOutOfBandController_getOutOfBandRecordById: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - outOfBandId: {"in":"path","name":"outOfBandId","required":true,"ref":"RecordId"}, - }; - app.get('/didcomm/oob/:outOfBandId', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(OutOfBandController)), - ...(fetchMiddlewares(OutOfBandController.prototype.getOutOfBandRecordById)), - - async function OutOfBandController_getOutOfBandRecordById(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsOutOfBandController_getOutOfBandRecordById, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(OutOfBandController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getOutOfBandRecordById', - 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 - const argsOutOfBandController_createInvitation: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - config: {"in":"body","name":"config","required":true,"dataType":"intersection","subSchemas":[{"ref":"CreateInvitationOptions"},{"ref":"RecipientKeyOption"}]}, - }; - app.post('/didcomm/oob/create-invitation', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(OutOfBandController)), - ...(fetchMiddlewares(OutOfBandController.prototype.createInvitation)), - - async function OutOfBandController_createInvitation(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsOutOfBandController_createInvitation, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(OutOfBandController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'createInvitation', - 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 - const argsOutOfBandController_createLegacyInvitation: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - config: {"in":"body","name":"config","dataType":"intersection","subSchemas":[{"ref":"Omit_CreateLegacyInvitationConfig.routing_"},{"ref":"RecipientKeyOption"}]}, - }; - app.post('/didcomm/oob/create-legacy-invitation', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(OutOfBandController)), - ...(fetchMiddlewares(OutOfBandController.prototype.createLegacyInvitation)), - - async function OutOfBandController_createLegacyInvitation(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsOutOfBandController_createLegacyInvitation, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(OutOfBandController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'createLegacyInvitation', - 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 - const argsOutOfBandController_createLegacyConnectionlessInvitation: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - config: {"in":"body","name":"config","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"routing":{"ref":"Routing"},"domain":{"dataType":"string","required":true},"message":{"ref":"Record_string.unknown_","required":true},"recordId":{"dataType":"string","required":true}}}, - }; - app.post('/didcomm/oob/create-legacy-connectionless-invitation', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(OutOfBandController)), - ...(fetchMiddlewares(OutOfBandController.prototype.createLegacyConnectionlessInvitation)), - - async function OutOfBandController_createLegacyConnectionlessInvitation(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsOutOfBandController_createLegacyConnectionlessInvitation, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(OutOfBandController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'createLegacyConnectionlessInvitation', - 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 - const argsOutOfBandController_receiveInvitation: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - invitationRequest: {"in":"body","name":"invitationRequest","required":true,"ref":"ReceiveInvitationProps"}, - }; - app.post('/didcomm/oob/receive-invitation', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(OutOfBandController)), - ...(fetchMiddlewares(OutOfBandController.prototype.receiveInvitation)), - - async function OutOfBandController_receiveInvitation(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsOutOfBandController_receiveInvitation, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(OutOfBandController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'receiveInvitation', - 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 - const argsOutOfBandController_receiveInvitationFromUrl: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - invitationRequest: {"in":"body","name":"invitationRequest","required":true,"ref":"ReceiveInvitationByUrlProps"}, - }; - app.post('/didcomm/oob/receive-invitation-url', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(OutOfBandController)), - ...(fetchMiddlewares(OutOfBandController.prototype.receiveInvitationFromUrl)), - - async function OutOfBandController_receiveInvitationFromUrl(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsOutOfBandController_receiveInvitationFromUrl, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(OutOfBandController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'receiveInvitationFromUrl', - 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 - const argsOutOfBandController_acceptInvitation: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - outOfBandId: {"in":"path","name":"outOfBandId","required":true,"ref":"RecordId"}, - acceptInvitationConfig: {"in":"body","name":"acceptInvitationConfig","required":true,"ref":"AcceptInvitationConfig"}, - }; - app.post('/didcomm/oob/:outOfBandId/accept-invitation', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(OutOfBandController)), - ...(fetchMiddlewares(OutOfBandController.prototype.acceptInvitation)), - - async function OutOfBandController_acceptInvitation(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsOutOfBandController_acceptInvitation, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(OutOfBandController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'acceptInvitation', - 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 - const argsOutOfBandController_deleteOutOfBandRecord: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - outOfBandId: {"in":"path","name":"outOfBandId","required":true,"ref":"RecordId"}, - }; - app.delete('/didcomm/oob/:outOfBandId', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(OutOfBandController)), - ...(fetchMiddlewares(OutOfBandController.prototype.deleteOutOfBandRecord)), - - async function OutOfBandController_deleteOutOfBandRecord(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsOutOfBandController_deleteOutOfBandRecord, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(OutOfBandController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'deleteOutOfBandRecord', - 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 - const argsCredentialController_getAllCredentials: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - threadId: {"in":"query","name":"threadId","ref":"ThreadId"}, - parentThreadId: {"in":"query","name":"parentThreadId","ref":"ThreadId"}, - connectionId: {"in":"query","name":"connectionId","ref":"RecordId"}, - state: {"in":"query","name":"state","ref":"CredentialState"}, - role: {"in":"query","name":"role","ref":"CredentialRole"}, - }; - app.get('/didcomm/credentials', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(CredentialController)), - ...(fetchMiddlewares(CredentialController.prototype.getAllCredentials)), - - async function CredentialController_getAllCredentials(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsCredentialController_getAllCredentials, 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: 'getAllCredentials', - 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 - const argsCredentialController_getAllW3c: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - }; - app.get('/didcomm/credentials/w3c', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(CredentialController)), - ...(fetchMiddlewares(CredentialController.prototype.getAllW3c)), - - async function CredentialController_getAllW3c(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsCredentialController_getAllW3c, 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: 'getAllW3c', - 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 - const argsCredentialController_getW3cById: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - id: {"in":"path","name":"id","required":true,"dataType":"string"}, - }; - app.get('/didcomm/credentials/w3c/:id', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(CredentialController)), - ...(fetchMiddlewares(CredentialController.prototype.getW3cById)), - - async function CredentialController_getW3cById(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsCredentialController_getW3cById, 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: 'getW3cById', - 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 - const argsCredentialController_getCredentialById: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - credentialRecordId: {"in":"path","name":"credentialRecordId","required":true,"ref":"RecordId"}, - }; - app.get('/didcomm/credentials/:credentialRecordId', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(CredentialController)), - ...(fetchMiddlewares(CredentialController.prototype.getCredentialById)), - - async function CredentialController_getCredentialById(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsCredentialController_getCredentialById, 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: 'getCredentialById', - 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 - const argsCredentialController_proposeCredential: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - proposeCredentialOptions: {"in":"body","name":"proposeCredentialOptions","required":true,"ref":"ProposeCredentialOptions"}, - }; - app.post('/didcomm/credentials/propose-credential', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(CredentialController)), - ...(fetchMiddlewares(CredentialController.prototype.proposeCredential)), - - async function CredentialController_proposeCredential(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsCredentialController_proposeCredential, 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: 'proposeCredential', - 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 - const argsCredentialController_acceptProposal: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - acceptCredentialProposal: {"in":"body","name":"acceptCredentialProposal","required":true,"ref":"AcceptCredentialProposalOptions"}, - }; - app.post('/didcomm/credentials/accept-proposal', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(CredentialController)), - ...(fetchMiddlewares(CredentialController.prototype.acceptProposal)), - - async function CredentialController_acceptProposal(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsCredentialController_acceptProposal, 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: 'acceptProposal', - 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 - const argsCredentialController_createOffer: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - createOfferOptions: {"in":"body","name":"createOfferOptions","required":true,"ref":"CreateOfferOptions"}, - }; - app.post('/didcomm/credentials/create-offer', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(CredentialController)), - ...(fetchMiddlewares(CredentialController.prototype.createOffer)), - - async function CredentialController_createOffer(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsCredentialController_createOffer, 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: 'createOffer', - 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 - const argsCredentialController_createOfferOob: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - outOfBandOption: {"in":"body","name":"outOfBandOption","required":true,"ref":"CreateOfferOobOptions"}, - }; - app.post('/didcomm/credentials/create-offer-oob', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(CredentialController)), - ...(fetchMiddlewares(CredentialController.prototype.createOfferOob)), - - async function CredentialController_createOfferOob(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsCredentialController_createOfferOob, 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: 'createOfferOob', - 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 - const argsCredentialController_acceptOffer: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - acceptCredentialOfferOptions: {"in":"body","name":"acceptCredentialOfferOptions","required":true,"ref":"CredentialOfferOptions"}, - }; - app.post('/didcomm/credentials/accept-offer', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(CredentialController)), - ...(fetchMiddlewares(CredentialController.prototype.acceptOffer)), - - async function CredentialController_acceptOffer(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsCredentialController_acceptOffer, 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: 'acceptOffer', - 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 - const argsCredentialController_acceptRequest: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - acceptCredentialRequestOptions: {"in":"body","name":"acceptCredentialRequestOptions","required":true,"ref":"AcceptCredentialRequestOptions"}, - }; - app.post('/didcomm/credentials/accept-request', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(CredentialController)), - ...(fetchMiddlewares(CredentialController.prototype.acceptRequest)), - - async function CredentialController_acceptRequest(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsCredentialController_acceptRequest, 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: 'acceptRequest', - 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 - const argsCredentialController_acceptCredential: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - acceptCredential: {"in":"body","name":"acceptCredential","required":true,"ref":"AcceptCredential"}, - }; - app.post('/didcomm/credentials/accept-credential', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(CredentialController)), - ...(fetchMiddlewares(CredentialController.prototype.acceptCredential)), - - async function CredentialController_acceptCredential(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsCredentialController_acceptCredential, 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: 'acceptCredential', - 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 - const argsCredentialController_credentialFormData: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - credentialRecordId: {"in":"path","name":"credentialRecordId","required":true,"dataType":"string"}, - }; - app.get('/didcomm/credentials/:credentialRecordId/form-data', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(CredentialController)), - ...(fetchMiddlewares(CredentialController.prototype.credentialFormData)), - - async function CredentialController_credentialFormData(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsCredentialController_credentialFormData, 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 - const argsConnectionController_getAllConnections: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - outOfBandId: {"in":"query","name":"outOfBandId","dataType":"string"}, - alias: {"in":"query","name":"alias","dataType":"string"}, - state: {"in":"query","name":"state","ref":"DidExchangeState"}, - myDid: {"in":"query","name":"myDid","dataType":"string"}, - theirDid: {"in":"query","name":"theirDid","dataType":"string"}, - theirLabel: {"in":"query","name":"theirLabel","dataType":"string"}, - }; - app.get('/didcomm/connections', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(ConnectionController)), - ...(fetchMiddlewares(ConnectionController.prototype.getAllConnections)), - - async function ConnectionController_getAllConnections(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsConnectionController_getAllConnections, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(ConnectionController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getAllConnections', - 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 - const argsConnectionController_getConnectionById: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - connectionId: {"in":"path","name":"connectionId","required":true,"ref":"RecordId"}, - }; - app.get('/didcomm/connections/:connectionId', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(ConnectionController)), - ...(fetchMiddlewares(ConnectionController.prototype.getConnectionById)), - - async function ConnectionController_getConnectionById(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsConnectionController_getConnectionById, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(ConnectionController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getConnectionById', - 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 - const argsConnectionController_deleteConnection: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - connectionId: {"in":"path","name":"connectionId","required":true,"ref":"RecordId"}, - }; - app.delete('/didcomm/connections/:connectionId', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(ConnectionController)), - ...(fetchMiddlewares(ConnectionController.prototype.deleteConnection)), - - async function ConnectionController_deleteConnection(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsConnectionController_deleteConnection, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(ConnectionController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'deleteConnection', - 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 - const argsConnectionController_acceptRequest: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - connectionId: {"in":"path","name":"connectionId","required":true,"ref":"RecordId"}, - }; - app.post('/didcomm/connections/:connectionId/accept-request', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(ConnectionController)), - ...(fetchMiddlewares(ConnectionController.prototype.acceptRequest)), - - async function ConnectionController_acceptRequest(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsConnectionController_acceptRequest, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(ConnectionController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'acceptRequest', - 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 - const argsConnectionController_acceptResponse: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - connectionId: {"in":"path","name":"connectionId","required":true,"ref":"RecordId"}, - }; - app.post('/didcomm/connections/:connectionId/accept-response', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(ConnectionController)), - ...(fetchMiddlewares(ConnectionController.prototype.acceptResponse)), - - async function ConnectionController_acceptResponse(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsConnectionController_acceptResponse, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(ConnectionController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'acceptResponse', - 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 - const argsConnectionController_getInvitation: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - invitationId: {"in":"path","name":"invitationId","required":true,"dataType":"string"}, - }; - app.get('/didcomm/url/:invitationId', - ...(fetchMiddlewares(ConnectionController)), - ...(fetchMiddlewares(ConnectionController.prototype.getInvitation)), - - async function ConnectionController_getInvitation(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsConnectionController_getInvitation, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(ConnectionController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getInvitation', - 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 - const argsBasicMessageController_getBasicMessages: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - connectionId: {"in":"path","name":"connectionId","required":true,"ref":"RecordId"}, - }; - app.get('/didcomm/basic-messages/:connectionId', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(BasicMessageController)), - ...(fetchMiddlewares(BasicMessageController.prototype.getBasicMessages)), - - async function BasicMessageController_getBasicMessages(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsBasicMessageController_getBasicMessages, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(BasicMessageController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getBasicMessages', - 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 - const argsBasicMessageController_sendMessage: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - connectionId: {"in":"path","name":"connectionId","required":true,"ref":"RecordId"}, - body: {"in":"body","name":"body","required":true,"ref":"Record_content.string_"}, - }; - app.post('/didcomm/basic-messages/:connectionId', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(BasicMessageController)), - ...(fetchMiddlewares(BasicMessageController.prototype.sendMessage)), - - async function BasicMessageController_sendMessage(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsBasicMessageController_sendMessage, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(BasicMessageController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'sendMessage', - 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 - const argsMultiTenancyController_createTenant: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - createTenantOptions: {"in":"body","name":"createTenantOptions","required":true,"ref":"CreateTenantOptions"}, - }; - app.post('/multi-tenancy/create-tenant', - authenticateMiddleware([{"jwt":["Basewallet"]}]), - ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.createTenant)), - - async function MultiTenancyController_createTenant(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsMultiTenancyController_createTenant, 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: 'createTenant', - 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 - const argsMultiTenancyController_getTenantToken: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, - }; - app.post('/multi-tenancy/get-token/:tenantId', - authenticateMiddleware([{"jwt":["Basewallet"]}]), - ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.getTenantToken)), - - async function MultiTenancyController_getTenantToken(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsMultiTenancyController_getTenantToken, 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: 'getTenantToken', - 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 - const argsMultiTenancyController_getTenantById: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, - }; - app.get('/multi-tenancy/:tenantId', - authenticateMiddleware([{"jwt":["Basewallet"]}]), - ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.getTenantById)), - - async function MultiTenancyController_getTenantById(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsMultiTenancyController_getTenantById, 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: 'getTenantById', - 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 - const argsMultiTenancyController_deleteTenantById: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, - }; - app.delete('/multi-tenancy/:tenantId', - authenticateMiddleware([{"jwt":["Basewallet"]}]), - ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.deleteTenantById)), - - async function MultiTenancyController_deleteTenantById(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsMultiTenancyController_deleteTenantById, 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: 'deleteTenantById', - 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 - const argsIssuanceSessionsController_createCredentialOffer: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - options: {"in":"body","name":"options","required":true,"ref":"OpenId4VcIssuanceSessionsCreateOffer"}, - }; - app.post('/openid4vc/issuance-sessions/create-credential-offer', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(IssuanceSessionsController)), - ...(fetchMiddlewares(IssuanceSessionsController.prototype.createCredentialOffer)), - - async function IssuanceSessionsController_createCredentialOffer(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsIssuanceSessionsController_createCredentialOffer, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(IssuanceSessionsController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'createCredentialOffer', - 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 - const argsIssuanceSessionsController_getIssuanceSessionsById: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - issuanceSessionId: {"in":"path","name":"issuanceSessionId","required":true,"dataType":"string"}, - }; - app.get('/openid4vc/issuance-sessions/:issuanceSessionId', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(IssuanceSessionsController)), - ...(fetchMiddlewares(IssuanceSessionsController.prototype.getIssuanceSessionsById)), - - async function IssuanceSessionsController_getIssuanceSessionsById(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsIssuanceSessionsController_getIssuanceSessionsById, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(IssuanceSessionsController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getIssuanceSessionsById', - 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 - const argsIssuanceSessionsController_getIssuanceSessionsByQuery: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - cNonce: {"in":"query","name":"cNonce","dataType":"string"}, - publicIssuerId: {"in":"query","name":"publicIssuerId","dataType":"string"}, - preAuthorizedCode: {"in":"query","name":"preAuthorizedCode","dataType":"string"}, - state: {"in":"query","name":"state","ref":"OpenId4VcIssuanceSessionState"}, - credentialOfferUri: {"in":"query","name":"credentialOfferUri","dataType":"string"}, - authorizationCode: {"in":"query","name":"authorizationCode","dataType":"string"}, - }; - app.get('/openid4vc/issuance-sessions', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(IssuanceSessionsController)), - ...(fetchMiddlewares(IssuanceSessionsController.prototype.getIssuanceSessionsByQuery)), - - async function IssuanceSessionsController_getIssuanceSessionsByQuery(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsIssuanceSessionsController_getIssuanceSessionsByQuery, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(IssuanceSessionsController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getIssuanceSessionsByQuery', - 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 - const argsIssuanceSessionsController_updateSessionById: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - issuanceSessionId: {"in":"path","name":"issuanceSessionId","required":true,"dataType":"string"}, - metadata: {"in":"body","name":"metadata","required":true,"ref":"Record_string.unknown_"}, - }; - app.put('/openid4vc/issuance-sessions/:issuanceSessionId', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(IssuanceSessionsController)), - ...(fetchMiddlewares(IssuanceSessionsController.prototype.updateSessionById)), - - async function IssuanceSessionsController_updateSessionById(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsIssuanceSessionsController_updateSessionById, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(IssuanceSessionsController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'updateSessionById', - 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 - const argsIssuanceSessionsController_deleteIssuanceSessionById: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - issuanceSessionId: {"in":"path","name":"issuanceSessionId","required":true,"dataType":"string"}, - }; - app.delete('/openid4vc/issuance-sessions/:issuanceSessionId', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(IssuanceSessionsController)), - ...(fetchMiddlewares(IssuanceSessionsController.prototype.deleteIssuanceSessionById)), - - async function IssuanceSessionsController_deleteIssuanceSessionById(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsIssuanceSessionsController_deleteIssuanceSessionById, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(IssuanceSessionsController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'deleteIssuanceSessionById', - 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 - const argsIssuerController_createIssuer: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - createIssuerOptions: {"in":"body","name":"createIssuerOptions","required":true,"ref":"CreateIssuerOptions"}, - }; - app.post('/openid4vc/issuer', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(IssuerController)), - ...(fetchMiddlewares(IssuerController.prototype.createIssuer)), - - async function IssuerController_createIssuer(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsIssuerController_createIssuer, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(IssuerController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'createIssuer', - 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 - const argsIssuerController_updateIssuerMetadata: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - publicIssuerId: {"in":"path","name":"publicIssuerId","required":true,"dataType":"string"}, - updateIssuerRecordOptions: {"in":"body","name":"updateIssuerRecordOptions","required":true,"ref":"UpdateIssuerRecordOptions"}, - }; - app.put('/openid4vc/issuer/:publicIssuerId', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(IssuerController)), - ...(fetchMiddlewares(IssuerController.prototype.updateIssuerMetadata)), - - async function IssuerController_updateIssuerMetadata(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsIssuerController_updateIssuerMetadata, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(IssuerController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'updateIssuerMetadata', - 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 - const argsIssuerController_getIssuerAgentMetaData: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - issuerId: {"in":"path","name":"issuerId","required":true,"dataType":"string"}, - }; - app.get('/openid4vc/issuer/:issuerId/metadata', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(IssuerController)), - ...(fetchMiddlewares(IssuerController.prototype.getIssuerAgentMetaData)), - - async function IssuerController_getIssuerAgentMetaData(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsIssuerController_getIssuerAgentMetaData, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(IssuerController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getIssuerAgentMetaData', - 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 - const argsIssuerController_getIssuersByQuery: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - publicIssuerId: {"in":"query","name":"publicIssuerId","dataType":"string"}, - }; - app.get('/openid4vc/issuer', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(IssuerController)), - ...(fetchMiddlewares(IssuerController.prototype.getIssuersByQuery)), - - async function IssuerController_getIssuersByQuery(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsIssuerController_getIssuersByQuery, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(IssuerController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getIssuersByQuery', - 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 - const argsIssuerController_getIssuer: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - publicIssuerId: {"in":"path","name":"publicIssuerId","required":true,"dataType":"string"}, - }; - app.get('/openid4vc/issuer/:publicIssuerId', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(IssuerController)), - ...(fetchMiddlewares(IssuerController.prototype.getIssuer)), - - async function IssuerController_getIssuer(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsIssuerController_getIssuer, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(IssuerController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getIssuer', - 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 - const argsIssuerController_deleteIssuer: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - id: {"in":"path","name":"id","required":true,"dataType":"string"}, - }; - app.delete('/openid4vc/issuer/:id', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(IssuerController)), - ...(fetchMiddlewares(IssuerController.prototype.deleteIssuer)), - - async function IssuerController_deleteIssuer(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsIssuerController_deleteIssuer, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(IssuerController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'deleteIssuer', - 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 - const argsVerificationSessionsController_createProofRequest: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - createAuthorizationRequest: {"in":"body","name":"createAuthorizationRequest","required":true,"ref":"CreateAuthorizationRequest"}, - }; - app.post('/openid4vc/verification-sessions/create-presentation-request', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(VerificationSessionsController)), - ...(fetchMiddlewares(VerificationSessionsController.prototype.createProofRequest)), - - async function VerificationSessionsController_createProofRequest(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsVerificationSessionsController_createProofRequest, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(VerificationSessionsController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'createProofRequest', - 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 - const argsVerificationSessionsController_getAllVerificationSessions: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - publicVerifierId: {"in":"query","name":"publicVerifierId","dataType":"string"}, - payloadState: {"in":"query","name":"payloadState","dataType":"string"}, - state: {"in":"query","name":"state","ref":"OpenId4VcVerificationSessionState"}, - authorizationRequestUri: {"in":"query","name":"authorizationRequestUri","dataType":"string"}, - nonce: {"in":"query","name":"nonce","dataType":"string"}, - }; - app.get('/openid4vc/verification-sessions', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(VerificationSessionsController)), - ...(fetchMiddlewares(VerificationSessionsController.prototype.getAllVerificationSessions)), - - async function VerificationSessionsController_getAllVerificationSessions(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsVerificationSessionsController_getAllVerificationSessions, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(VerificationSessionsController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getAllVerificationSessions', - 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 - const argsVerificationSessionsController_getVerificationSessionsById: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - verificationSessionId: {"in":"path","name":"verificationSessionId","required":true,"dataType":"string"}, - }; - app.get('/openid4vc/verification-sessions/:verificationSessionId', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(VerificationSessionsController)), - ...(fetchMiddlewares(VerificationSessionsController.prototype.getVerificationSessionsById)), - - async function VerificationSessionsController_getVerificationSessionsById(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsVerificationSessionsController_getVerificationSessionsById, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(VerificationSessionsController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getVerificationSessionsById', - 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 - const argsVerificationSessionsController_getVerifiedAuthorizationResponse: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - verificationSessionId: {"in":"path","name":"verificationSessionId","required":true,"dataType":"string"}, - }; - app.get('/openid4vc/verification-sessions/response/:verificationSessionId', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(VerificationSessionsController)), - ...(fetchMiddlewares(VerificationSessionsController.prototype.getVerifiedAuthorizationResponse)), - - async function VerificationSessionsController_getVerifiedAuthorizationResponse(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsVerificationSessionsController_getVerifiedAuthorizationResponse, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(VerificationSessionsController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getVerifiedAuthorizationResponse', - 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 - const argsHolderController_getSdJwtCredentials: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - }; - app.get('/openid4vc/holder/sd-jwt-vcs', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(HolderController)), - ...(fetchMiddlewares(HolderController.prototype.getSdJwtCredentials)), - - async function HolderController_getSdJwtCredentials(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsHolderController_getSdJwtCredentials, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(HolderController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getSdJwtCredentials', - 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 - const argsHolderController_getMdocCredentials: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - }; - app.get('/openid4vc/holder/mdoc-vcs', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(HolderController)), - ...(fetchMiddlewares(HolderController.prototype.getMdocCredentials)), - - async function HolderController_getMdocCredentials(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsHolderController_getMdocCredentials, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(HolderController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getMdocCredentials', - 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 - const argsHolderController_decodeMdocCredential: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - body: {"in":"body","name":"body","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"base64Url":{"dataType":"string","required":true}}}, - }; - app.post('/openid4vc/holder/mdoc-vcs/decode', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(HolderController)), - ...(fetchMiddlewares(HolderController.prototype.decodeMdocCredential)), - - async function HolderController_decodeMdocCredential(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsHolderController_decodeMdocCredential, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(HolderController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'decodeMdocCredential', - 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 - const argsHolderController_resolveCredOffer: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - body: {"in":"body","name":"body","required":true,"ref":"ResolveCredentialOfferBody"}, - }; - app.post('/openid4vc/holder/resolve-credential-offer', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(HolderController)), - ...(fetchMiddlewares(HolderController.prototype.resolveCredOffer)), - - async function HolderController_resolveCredOffer(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsHolderController_resolveCredOffer, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(HolderController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'resolveCredOffer', - 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 - const argsHolderController_requestAuthorizationForCredential: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - body: {"in":"body","name":"body","required":true,"ref":"AuthorizeRequestCredentialOffer"}, - }; - app.post('/openid4vc/holder/authorization-request', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(HolderController)), - ...(fetchMiddlewares(HolderController.prototype.requestAuthorizationForCredential)), - - async function HolderController_requestAuthorizationForCredential(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsHolderController_requestAuthorizationForCredential, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(HolderController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'requestAuthorizationForCredential', - 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 - const argsHolderController_requestCredential: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - body: {"in":"body","name":"body","required":true,"ref":"RequestCredentialBody"}, - }; - app.post('/openid4vc/holder/request-credential', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(HolderController)), - ...(fetchMiddlewares(HolderController.prototype.requestCredential)), - - async function HolderController_requestCredential(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsHolderController_requestCredential, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(HolderController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'requestCredential', - 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 - const argsHolderController_resolveProofRequest: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - body: {"in":"body","name":"body","required":true,"ref":"ResolveProofRequest"}, - }; - app.post('/openid4vc/holder/resolve-proof-request', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(HolderController)), - ...(fetchMiddlewares(HolderController.prototype.resolveProofRequest)), - - async function HolderController_resolveProofRequest(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsHolderController_resolveProofRequest, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(HolderController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'resolveProofRequest', - 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 - const argsHolderController_acceptProofRequest: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - body: {"in":"body","name":"body","required":true,"ref":"ResolveProofRequest"}, - }; - app.post('/openid4vc/holder/accept-proof-request', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(HolderController)), - ...(fetchMiddlewares(HolderController.prototype.acceptProofRequest)), - - async function HolderController_acceptProofRequest(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsHolderController_acceptProofRequest, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(HolderController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'acceptProofRequest', - 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 - const argsHolderController_decodeSdJwt: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - body: {"in":"body","name":"body","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"jwt":{"dataType":"string","required":true}}}, - }; - app.post('/openid4vc/holder/decode-sdjwt', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(HolderController)), - ...(fetchMiddlewares(HolderController.prototype.decodeSdJwt)), - - async function HolderController_decodeSdJwt(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsHolderController_decodeSdJwt, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(HolderController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'decodeSdJwt', - 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 - const argsVerifierController_createVerifier: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - options: {"in":"body","name":"options","required":true,"ref":"OpenId4VcSiopCreateVerifierOptions"}, - }; - app.post('/openid4vc/verifier', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(VerifierController)), - ...(fetchMiddlewares(VerifierController.prototype.createVerifier)), - - async function VerifierController_createVerifier(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsVerifierController_createVerifier, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(VerifierController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'createVerifier', - 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 - const argsVerifierController_updateVerifierMetadata: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - publicVerifierId: {"in":"path","name":"publicVerifierId","required":true,"dataType":"string"}, - verifierRecordOptions: {"in":"body","name":"verifierRecordOptions","required":true,"ref":"OpenId4VcUpdateVerifierRecordOptions"}, - }; - app.put('/openid4vc/verifier/:publicVerifierId', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(VerifierController)), - ...(fetchMiddlewares(VerifierController.prototype.updateVerifierMetadata)), - - async function VerifierController_updateVerifierMetadata(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsVerifierController_updateVerifierMetadata, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(VerifierController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'updateVerifierMetadata', - 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 - const argsVerifierController_getVerifiersByQuery: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - publicVerifierId: {"in":"query","name":"publicVerifierId","dataType":"string"}, - }; - app.get('/openid4vc/verifier', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(VerifierController)), - ...(fetchMiddlewares(VerifierController.prototype.getVerifiersByQuery)), - - async function VerifierController_getVerifiersByQuery(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsVerifierController_getVerifiersByQuery, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(VerifierController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getVerifiersByQuery', - 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 - const argsVerifierController_getVerifier: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - publicVerifierId: {"in":"path","name":"publicVerifierId","required":true,"dataType":"string"}, - }; - app.get('/openid4vc/verifier/:publicVerifierId', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(VerifierController)), - ...(fetchMiddlewares(VerifierController.prototype.getVerifier)), - - async function VerifierController_getVerifier(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsVerifierController_getVerifier, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(VerifierController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'getVerifier', - 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 - const argsVerifierController_deleteVerifier: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - verifierId: {"in":"path","name":"verifierId","required":true,"dataType":"string"}, - }; - app.delete('/openid4vc/verifier/:verifierId', - authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), - ...(fetchMiddlewares(VerifierController)), - ...(fetchMiddlewares(VerifierController.prototype.deleteVerifier)), - - async function VerifierController_deleteVerifier(request: ExRequest, response: ExResponse, next: any) { - - // 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: argsVerifierController_deleteVerifier, request, response }); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(VerifierController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - await templateService.apiHandler({ - methodName: 'deleteVerifier', - 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 - - // 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 - - function authenticateMiddleware(security: TsoaRoute.Security[] = []) { - return async function runAuthenticationMiddleware(request: any, response: any, next: any) { - - // 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 - - // keep track of failed auth attempts so we can hand back the most - // recent one. This behavior was previously existing so preserving it - // here - const failedAttempts: any[] = []; - const pushAndRethrow = (error: any) => { - failedAttempts.push(error); - throw error; - }; - - const secMethodOrPromises: Promise[] = []; - for (const secMethod of security) { - if (Object.keys(secMethod).length > 1) { - const secMethodAndPromises: Promise[] = []; - - for (const name in secMethod) { - secMethodAndPromises.push( - expressAuthenticationRecasted(request, name, secMethod[name], response) - .catch(pushAndRethrow) - ); - } - - // 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 - - secMethodOrPromises.push(Promise.all(secMethodAndPromises) - .then(users => { return users[0]; })); - } else { - for (const name in secMethod) { - secMethodOrPromises.push( - expressAuthenticationRecasted(request, name, secMethod[name], response) - .catch(pushAndRethrow) - ); - } - } - } - - // 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 - - try { - request['user'] = await Promise.any(secMethodOrPromises); - - // Response was sent in middleware, abort - if (response.writableEnded) { - return; - } - - next(); - } - catch(err) { - // Show most recent error as response - const error = failedAttempts.pop(); - error.status = error.status || 401; - - // Response was sent in middleware, abort - if (response.writableEnded) { - return; - } - next(error); - } - - // 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 -} - -// 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 7c35d65b..5f991327 100644 --- a/src/routes/swagger.json +++ b/src/routes/swagger.json @@ -7,532 +7,359 @@ "requestBodies": {}, "responses": {}, "schemas": { - "KeyType": { + "QuestionAnswerRole": { "enum": [ - "ed25519", - "bls12381g1g2", - "bls12381g1", - "bls12381g2", - "x25519", - "p256", - "p384", - "p521", - "k256" + "questioner", + "responder" ], "type": "string" }, - "AuthorityAndSubjectKeyDto": { - "properties": { - "seed": { - "type": "string", - "example": "my-seed-12345" - }, - "publicKeyBase58": { - "type": "string", - "example": "3yPQbnk6WwLgX8K3JZ4t7vBnJ8XqY2mMpRcD9fNvGtHw" - }, - "keyType": { - "$ref": "#/components/schemas/KeyType", - "example": "p256" - } - }, + "QuestionAnswerState": { + "description": "QuestionAnswer states inferred from RFC 0113.", + "enum": [ + "question-sent", + "question-received", + "answer-received", + "answer-sent" + ], + "type": "string" + }, + "Record_string.unknown_": { + "properties": {}, "type": "object", - "additionalProperties": false + "description": "Construct a type with a set of properties K of type T" + }, + "RecordId": { + "type": "string", + "example": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e" }, - "X509CertificateIssuerAndSubjectOptionsDto": { + "ValidResponse": { "properties": { - "countryName": { - "type": "string", - "example": "US" - }, - "stateOrProvinceName": { - "type": "string", - "example": "California" - }, - "organizationalUnit": { - "type": "string", - "example": "IT Department" - }, - "commonName": { - "type": "string", - "example": "Example Corporation" + "text": { + "type": "string" } }, + "required": [ + "text" + ], "type": "object", "additionalProperties": false }, - "ValidityDto": { + "Record_response.string_": { "properties": { - "notBefore": { - "type": "string", - "format": "date-time", - "example": "2024-01-01T00:00:00.000Z" - }, - "notAfter": { - "type": "string", - "format": "date-time", - "example": "2025-01-01T00:00:00.000Z" + "response": { + "type": "string" } }, - "type": "object", - "additionalProperties": false - }, - "X509KeyUsage": { - "enum": [ - 1, - 2, - 4, - 8, - 16, - 32, - 64, - 128, - 256 + "required": [ + "response" ], - "type": "number" + "type": "object", + "description": "Construct a type with a set of properties K of type T" }, - "KeyUsageDto": { + "DidCommPlaintextMessage": { "properties": { - "usages": { - "items": { - "$ref": "#/components/schemas/X509KeyUsage" - }, - "type": "array", - "example": [ - "digitalSignature", - "keyEncipherment", - "crlSign" - ] + "@type": { + "type": "string" }, - "markAsCritical": { - "type": "boolean", - "example": true + "@id": { + "type": "string" + }, + "~thread": { + "properties": { + "pthid": { + "type": "string" + }, + "thid": { + "type": "string" + } + }, + "type": "object" } }, "required": [ - "usages" + "@type", + "@id" ], "type": "object", - "additionalProperties": false + "additionalProperties": {} }, - "X509ExtendedKeyUsage": { + "DidCommHandshakeProtocol": { + "description": "Enum values should be sorted based on order of preference. Values will be\nincluded in this order when creating out of band invitations.", "enum": [ - "1.3.6.1.5.5.7.3.1", - "1.3.6.1.5.5.7.3.2", - "1.3.6.1.5.5.7.3.3", - "1.3.6.1.5.5.7.3.4", - "1.3.6.1.5.5.7.3.8", - "1.3.6.1.5.5.7.3.9", - "1.0.18013.5.1.2" + "https://didcomm.org/didexchange/1.x", + "https://didcomm.org/connections/1.x" ], "type": "string" }, - "ExtendedKeyUsageDto": { + "DidCommMessage": { + "$ref": "#/components/schemas/DidCommPlaintextMessage" + }, + "PublicJwk_Ed25519PublicJwk_": { + "properties": {}, + "type": "object", + "additionalProperties": false + }, + "DidCommRouting": { "properties": { - "usages": { + "endpoints": { "items": { - "$ref": "#/components/schemas/X509ExtendedKeyUsage" + "type": "string" }, - "type": "array", - "example": [ - "MdlDs", - "ServerAuth", - "ClientAuth" - ] + "type": "array" }, - "markAsCritical": { - "type": "boolean", - "example": true + "recipientKey": { + "$ref": "#/components/schemas/PublicJwk_Ed25519PublicJwk_" + }, + "routingKeys": { + "items": { + "$ref": "#/components/schemas/PublicJwk_Ed25519PublicJwk_" + }, + "type": "array" + }, + "mediatorId": { + "type": "string" } }, "required": [ - "usages" + "endpoints", + "recipientKey", + "routingKeys" ], "type": "object", "additionalProperties": false }, - "AuthorityAndSubjectKeyIdentifierDto": { - "properties": { - "include": { - "type": "boolean", - "example": true + "JsonValue": { + "anyOf": [ + { + "type": "string" }, - "markAsCritical": { - "type": "boolean", - "example": true + { + "type": "number", + "format": "double" + }, + { + "type": "boolean" + }, + { + "$ref": "#/components/schemas/JsonObject" + }, + { + "$ref": "#/components/schemas/JsonArray" } - }, - "required": [ - "include" ], + "nullable": true + }, + "JsonObject": { + "properties": {}, "type": "object", - "additionalProperties": false + "additionalProperties": { + "$ref": "#/components/schemas/JsonValue" + } }, - "GeneralNameType": { - "enum": [ - "dns", - "dn", - "email", - "guid", - "ip", - "url", - "upn", - "id" - ], - "type": "string" + "JsonArray": { + "items": { + "$ref": "#/components/schemas/JsonValue" + }, + "type": "array" }, - "NameDto": { + "Pick_JwsGeneralFormat.Exclude_keyofJwsGeneralFormat.payload__": { "properties": { - "type": { - "$ref": "#/components/schemas/GeneralNameType", - "example": "dns" + "header": { + "$ref": "#/components/schemas/Record_string.unknown_", + "description": "unprotected header" + }, + "signature": { + "type": "string", + "description": "Base64url encoded signature" }, - "value": { + "protected": { "type": "string", - "example": "example.com" + "description": "Base64url encoded protected header" } }, "required": [ - "type", - "value" + "header", + "signature", + "protected" ], "type": "object", - "additionalProperties": false + "description": "From T, pick a set of properties whose keys are in the union K" + }, + "Omit_JwsGeneralFormat.payload_": { + "$ref": "#/components/schemas/Pick_JwsGeneralFormat.Exclude_keyofJwsGeneralFormat.payload__", + "description": "Construct a type with the properties of T except for those in type K." + }, + "JwsDetachedFormat": { + "$ref": "#/components/schemas/Omit_JwsGeneralFormat.payload_" }, - "NameListDto": { + "JwsFlattenedDetachedFormat": { "properties": { - "name": { + "signatures": { "items": { - "$ref": "#/components/schemas/NameDto" + "$ref": "#/components/schemas/JwsDetachedFormat" }, - "type": "array", - "example": [ - { - "type": "dns", - "value": "example.com" - }, - { - "type": "email", - "value": "admin@example.com" - } - ] - }, - "markAsCritical": { - "type": "boolean", - "example": true + "type": "array" } }, "required": [ - "name" + "signatures" ], "type": "object", "additionalProperties": false }, - "BasicConstraintsDto": { + "DidCommAttachmentData": { + "description": "A JSON object that gives access to the actual content of the attachment", "properties": { - "ca": { - "type": "boolean", - "example": false + "base64": { + "type": "string", + "description": "Base64-encoded data, when representing arbitrary content inline instead of via links. Optional." }, - "pathLenConstraint": { - "type": "number", - "format": "double", - "example": 0 + "json": { + "$ref": "#/components/schemas/JsonValue", + "description": "Directly embedded JSON data, when representing content inline instead of via links, and when the content is natively conveyable as JSON. Optional." }, - "markAsCritical": { - "type": "boolean", - "example": true - } - }, - "required": [ - "ca" - ], - "type": "object", - "additionalProperties": false - }, - "CrlDistributionPointsDto": { - "properties": { - "urls": { + "links": { "items": { "type": "string" }, "type": "array", - "example": [ - "http://crl.example.com/ca.crl" - ] + "description": "A list of zero or more locations at which the content may be fetched. Optional." }, - "markAsCritical": { - "type": "boolean", - "example": true + "jws": { + "anyOf": [ + { + "$ref": "#/components/schemas/JwsDetachedFormat" + }, + { + "$ref": "#/components/schemas/JwsFlattenedDetachedFormat" + } + ], + "description": "A JSON Web Signature over the content of the attachment. Optional." + }, + "sha256": { + "type": "string", + "description": "The hash of the content. Optional." } }, - "required": [ - "urls" - ], "type": "object", "additionalProperties": false }, - "X509CertificateExtensionsOptionsDto": { + "DidCommAttachment": { + "description": "Represents DIDComm attachment\nhttps://github.com/hyperledger/aries-rfcs/blob/master/concepts/0017-attachments/README.md", "properties": { - "keyUsage": { - "$ref": "#/components/schemas/KeyUsageDto" - }, - "extendedKeyUsage": { - "$ref": "#/components/schemas/ExtendedKeyUsageDto" + "id": { + "type": "string" }, - "authorityKeyIdentifier": { - "$ref": "#/components/schemas/AuthorityAndSubjectKeyIdentifierDto" + "description": { + "type": "string", + "description": "An optional human-readable description of the content." }, - "subjectKeyIdentifier": { - "$ref": "#/components/schemas/AuthorityAndSubjectKeyIdentifierDto" + "filename": { + "type": "string", + "description": "A hint about the name that might be used if this attachment is persisted as a file. It is not required, and need not be unique. If this field is present and mime-type is not, the extension on the filename may be used to infer a MIME type." }, - "issuerAlternativeName": { - "$ref": "#/components/schemas/NameListDto" + "mimeType": { + "type": "string", + "description": "Describes the MIME type of the attached content. Optional but recommended." }, - "subjectAlternativeName": { - "$ref": "#/components/schemas/NameListDto" + "lastmodTime": { + "type": "string", + "format": "date-time", + "description": "A hint about when the content in this attachment was last modified." }, - "basicConstraints": { - "$ref": "#/components/schemas/BasicConstraintsDto" + "byteCount": { + "type": "number", + "format": "double", + "description": "Optional, and mostly relevant when content is included by reference instead of by value. Lets the receiver guess how expensive it will be, in time, bandwidth, and storage, to fully fetch the attachment." }, - "crlDistributionPoints": { - "$ref": "#/components/schemas/CrlDistributionPointsDto" + "data": { + "$ref": "#/components/schemas/DidCommAttachmentData" } }, + "required": [ + "id", + "data" + ], "type": "object", "additionalProperties": false }, - "X509CreateCertificateOptionsDto": { + "CreateInvitationOptions": { "properties": { - "authorityKey": { - "$ref": "#/components/schemas/AuthorityAndSubjectKeyDto" + "label": { + "type": "string" }, - "subjectPublicKey": { - "$ref": "#/components/schemas/AuthorityAndSubjectKeyDto" + "alias": { + "type": "string" }, - "serialNumber": { - "type": "string", - "example": "1234567890" + "imageUrl": { + "type": "string" }, - "issuer": { - "anyOf": [ - { - "$ref": "#/components/schemas/X509CertificateIssuerAndSubjectOptionsDto" - }, - { - "type": "string" - } - ] + "goalCode": { + "type": "string" }, - "subject": { - "anyOf": [ - { - "$ref": "#/components/schemas/X509CertificateIssuerAndSubjectOptionsDto" - }, - { - "type": "string" - } - ] + "goal": { + "type": "string" }, - "validity": { - "$ref": "#/components/schemas/ValidityDto" + "handshake": { + "type": "boolean" }, - "extensions": { - "$ref": "#/components/schemas/X509CertificateExtensionsOptionsDto" - } - }, - "required": [ - "issuer" - ], - "type": "object", - "additionalProperties": false - }, - "X509ImportCertificateOptionsDto": { - "properties": { - "certificate": { - "type": "string" + "handshakeProtocols": { + "items": { + "$ref": "#/components/schemas/DidCommHandshakeProtocol" + }, + "type": "array" }, - "privateKey": { - "type": "string" + "messages": { + "items": { + "$ref": "#/components/schemas/DidCommMessage" + }, + "type": "array" }, - "keyType": { - "$ref": "#/components/schemas/KeyType" - } - }, - "required": [ - "certificate", - "keyType" - ], - "type": "object", - "additionalProperties": false - }, - "Uint8Array": { - "description": "A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the\nrequested number of bytes could not be allocated an exception is raised.", - "properties": {}, - "type": "object", - "additionalProperties": false - }, - "Key": { - "properties": { - "publicKey": { - "$ref": "#/components/schemas/Uint8Array" + "multiUseInvitation": { + "type": "boolean" }, - "keyType": { - "$ref": "#/components/schemas/KeyType" - } - }, - "required": [ - "publicKey", - "keyType" - ], - "type": "object", - "additionalProperties": false - }, - "X509Certificate": { - "properties": { - "publicKey": { - "$ref": "#/components/schemas/Key" + "autoAcceptConnection": { + "type": "boolean" + }, + "routing": { + "$ref": "#/components/schemas/DidCommRouting" + }, + "appendedAttachments": { + "items": { + "$ref": "#/components/schemas/DidCommAttachment" + }, + "type": "array" }, - "privateKey": { - "$ref": "#/components/schemas/Uint8Array" + "invitationDid": { + "type": "string" } }, - "required": [ - "publicKey" - ], "type": "object", "additionalProperties": false }, - "Record_string.unknown_": { - "properties": {}, - "additionalProperties": {}, - "type": "object", - "description": "Construct a type with a set of properties K of type T" - }, - "DidOperation.Create": { - "enum": [ - "createDID" - ], - "type": "string" - }, - "CreateDidOperationOptions": { + "RecipientKeyOption": { "properties": { - "serviceEndpoint": { + "recipientKey": { "type": "string" - }, - "operation": { - "$ref": "#/components/schemas/DidOperation.Create" } }, - "required": [ - "operation" - ], - "type": "object" - }, - "DidOperation.Update": { - "enum": [ - "updateDIDDoc" - ], - "type": "string" - }, - "Record_string.any_": { - "properties": {}, - "additionalProperties": {}, "type": "object", - "description": "Construct a type with a set of properties K of type T" - }, - "DidDocument": { - "$ref": "#/components/schemas/Record_string.any_" - }, - "UpdateDidOperationOptions": { - "properties": { - "did": { - "type": "string" - }, - "didDocument": { - "$ref": "#/components/schemas/DidDocument" - }, - "operation": { - "$ref": "#/components/schemas/DidOperation.Update" - } - }, - "required": [ - "did", - "didDocument", - "operation" - ], - "type": "object" - }, - "DidOperation.Deactivate": { - "enum": [ - "deactivate" - ], - "type": "string" + "additionalProperties": false }, - "DeactivateDidOperationOptions": { - "properties": { - "did": { - "type": "string" - }, - "operation": { - "$ref": "#/components/schemas/DidOperation.Deactivate" - } - }, - "required": [ - "did", - "operation" - ], - "type": "object" + "DidCommOutOfBandRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" }, - "DidOperation.AddResource": { + "CustomHandshakeProtocol": { "enum": [ - "addResource" + "https://didcomm.org/didexchange/1.1", + "https://didcomm.org/connections/1.0" ], "type": "string" }, - "AddResourceDidOperationOptions": { - "properties": { - "did": { - "type": "string" - }, - "resource": { - "additionalProperties": false, - "type": "object" - }, - "resourceId": { - "type": "string" - }, - "operation": { - "$ref": "#/components/schemas/DidOperation.AddResource" - } - }, - "required": [ - "did", - "resource", - "resourceId", - "operation" - ], - "type": "object" - }, - "DidOperationOptions": { + "SingleOrArray_string-or-Record_string.unknown__": { "anyOf": [ { - "$ref": "#/components/schemas/CreateDidOperationOptions" - }, - { - "$ref": "#/components/schemas/UpdateDidOperationOptions" - }, - { - "$ref": "#/components/schemas/DeactivateDidOperationOptions" - }, - { - "$ref": "#/components/schemas/AddResourceDidOperationOptions" - } - ] - }, - "EndorserTransaction": { - "properties": { - "transaction": { "anyOf": [ { "type": "string" @@ -542,566 +369,325 @@ } ] }, - "endorserDid": { - "type": "string" + { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Record_string.unknown_" + } + ] + }, + "type": "array" } - }, - "required": [ - "transaction", - "endorserDid" - ], - "type": "object", - "additionalProperties": false - }, - "DidRegistrationSecretOptions": { - "$ref": "#/components/schemas/Record_string.unknown_" + ] }, - "DidOperationStateWait": { + "OutOfBandDidCommService": { "properties": { - "state": { - "type": "string", - "enum": [ - "wait" - ], - "nullable": false + "id": { + "type": "string" }, - "did": { + "serviceEndpoint": { "type": "string" }, - "secret": { - "$ref": "#/components/schemas/DidRegistrationSecretOptions" + "type": { + "type": "string" }, - "didDocument": { - "$ref": "#/components/schemas/DidDocument" + "recipientKeys": { + "items": { + "type": "string" + }, + "type": "array" + }, + "routingKeys": { + "items": { + "type": "string" + }, + "type": "array" + }, + "accept": { + "items": { + "type": "string" + }, + "type": "array" } }, "required": [ - "state" + "id", + "serviceEndpoint", + "type", + "recipientKeys" ], "type": "object", "additionalProperties": false }, - "DidOperationStateActionBase": { + "OutOfBandInvitationSchema": { "properties": { - "state": { - "type": "string", - "enum": [ - "action" - ], - "nullable": false - }, - "action": { + "@id": { "type": "string" }, - "did": { + "@type": { "type": "string" }, - "secret": { - "$ref": "#/components/schemas/DidRegistrationSecretOptions" + "label": { + "type": "string" }, - "didDocument": { - "$ref": "#/components/schemas/DidDocument" - } - }, - "required": [ - "state", - "action" - ], - "type": "object", - "additionalProperties": false - }, - "DidOperationStateFinished": { - "properties": { - "state": { - "type": "string", - "enum": [ - "finished" - ], - "nullable": false + "goalCode": { + "type": "string" }, - "did": { + "goal": { "type": "string" }, - "secret": { - "$ref": "#/components/schemas/DidRegistrationSecretOptions" + "accept": { + "items": { + "type": "string" + }, + "type": "array" }, - "didDocument": { - "$ref": "#/components/schemas/DidDocument" + "handshake_protocols": { + "items": { + "$ref": "#/components/schemas/CustomHandshakeProtocol" + }, + "type": "array" + }, + "services": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/OutOfBandDidCommService" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "imageUrl": { + "type": "string" } }, "required": [ - "state", - "did", - "didDocument" + "@type", + "label", + "services" ], "type": "object", "additionalProperties": false }, - "DidOperationStateFailed": { + "Pick_ReceiveOutOfBandInvitationConfig.Exclude_keyofReceiveOutOfBandInvitationConfig.routing__": { "properties": { - "state": { - "type": "string", - "enum": [ - "failed" - ], - "nullable": false + "alias": { + "type": "string" }, - "did": { + "label": { "type": "string" }, - "secret": { - "$ref": "#/components/schemas/DidRegistrationSecretOptions" + "imageUrl": { + "type": "string" }, - "didDocument": { - "$ref": "#/components/schemas/DidDocument" + "autoAcceptInvitation": { + "type": "boolean" + }, + "autoAcceptConnection": { + "type": "boolean" + }, + "reuseConnection": { + "type": "boolean" + }, + "acceptInvitationTimeoutMs": { + "type": "number", + "format": "double" }, - "reason": { + "ourDid": { "type": "string" } }, "required": [ - "state", - "reason" + "label" ], "type": "object", - "additionalProperties": false + "description": "From T, pick a set of properties whose keys are in the union K" }, - "DidRegistrationMetadata": { - "$ref": "#/components/schemas/Record_string.unknown_" + "Omit_ReceiveOutOfBandInvitationConfig.routing_": { + "$ref": "#/components/schemas/Pick_ReceiveOutOfBandInvitationConfig.Exclude_keyofReceiveOutOfBandInvitationConfig.routing__", + "description": "Construct a type with the properties of T except for those in type K." }, - "DidResolutionMetadata": { + "ReceiveInvitationProps": { "properties": { - "contentType": { + "alias": { "type": "string" }, - "error": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "invalidDid", - "notFound", - "representationNotSupported", - "unsupportedDidMethod" - ] - } - ] + "label": { + "type": "string" }, - "message": { + "imageUrl": { "type": "string" }, - "servedFromCache": { - "type": "boolean", - "description": "Whether the did document was served from the cache" + "autoAcceptInvitation": { + "type": "boolean" }, - "servedFromDidRecord": { - "type": "boolean", - "description": "Whether the did document was served from a local did record" - } - }, - "type": "object", - "additionalProperties": false - }, - "DidCreateResult_DidOperationStateActionBase_": { - "properties": { - "jobId": { - "type": "string" + "autoAcceptConnection": { + "type": "boolean" }, - "didState": { - "anyOf": [ - { - "$ref": "#/components/schemas/DidOperationStateWait" - }, - { - "$ref": "#/components/schemas/DidOperationStateActionBase" - }, - { - "$ref": "#/components/schemas/DidOperationStateFinished" - }, - { - "$ref": "#/components/schemas/DidOperationStateFailed" - } - ] + "reuseConnection": { + "type": "boolean" }, - "didRegistrationMetadata": { - "$ref": "#/components/schemas/DidRegistrationMetadata" + "acceptInvitationTimeoutMs": { + "type": "number", + "format": "double" }, - "didDocumentMetadata": { - "$ref": "#/components/schemas/DidResolutionMetadata" - } - }, - "required": [ - "didState", - "didRegistrationMetadata", - "didDocumentMetadata" - ], - "type": "object", - "additionalProperties": false - }, - "DidNymTransaction": { - "properties": { - "did": { + "ourDid": { "type": "string" }, - "nymRequest": { - "type": "string" + "invitation": { + "$ref": "#/components/schemas/OutOfBandInvitationSchema" } }, "required": [ - "did", - "nymRequest" + "label", + "invitation" ], "type": "object", "additionalProperties": false }, - "AnonCredsSchema": { + "ReceiveInvitationByUrlProps": { "properties": { - "issuerId": { + "alias": { "type": "string" }, - "name": { + "label": { "type": "string" }, - "version": { + "imageUrl": { "type": "string" }, - "attrNames": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "issuerId", - "name", - "version", - "attrNames" - ], - "type": "object", - "additionalProperties": false - }, - "RegisterSchemaReturnStateWait": { - "properties": { - "state": { - "type": "string", - "enum": [ - "wait" - ], - "nullable": false + "autoAcceptInvitation": { + "type": "boolean" + }, + "autoAcceptConnection": { + "type": "boolean" + }, + "reuseConnection": { + "type": "boolean" + }, + "acceptInvitationTimeoutMs": { + "type": "number", + "format": "double" }, - "schema": { - "$ref": "#/components/schemas/AnonCredsSchema" + "ourDid": { + "type": "string" }, - "schemaId": { + "invitationUrl": { "type": "string" } }, "required": [ - "state" + "label", + "invitationUrl" ], "type": "object", "additionalProperties": false }, - "RegisterSchemaReturnStateAction": { + "AcceptInvitationConfig": { "properties": { - "state": { - "type": "string", - "enum": [ - "action" - ], - "nullable": false + "autoAcceptConnection": { + "type": "boolean" + }, + "reuseConnection": { + "type": "boolean" + }, + "label": { + "type": "string" }, - "action": { + "alias": { "type": "string" }, - "schema": { - "$ref": "#/components/schemas/AnonCredsSchema" + "imageUrl": { + "type": "string" }, - "schemaId": { + "mediatorId": { "type": "string" } }, "required": [ - "state", - "action", - "schema", - "schemaId" + "label" ], "type": "object", "additionalProperties": false }, - "RegisterSchemaReturnStateFinished": { - "properties": { - "state": { - "type": "string", - "enum": [ - "finished" - ], - "nullable": false - }, - "schema": { - "$ref": "#/components/schemas/AnonCredsSchema" - }, - "schemaId": { - "type": "string" - } - }, - "required": [ - "state", - "schema", - "schemaId" + "DidCommDidExchangeState": { + "description": "Connection states as defined in RFC 0023.", + "enum": [ + "start", + "invitation-sent", + "invitation-received", + "request-sent", + "request-received", + "response-sent", + "response-received", + "abandoned", + "completed" ], + "type": "string" + }, + "DidCommConnectionRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "Record_string.any_": { + "properties": {}, "type": "object", - "additionalProperties": false + "description": "Construct a type with a set of properties K of type T" }, - "RegisterSchemaReturnStateFailed": { + "DidResolutionMetadata": { "properties": { - "state": { - "type": "string", - "enum": [ - "failed" - ], - "nullable": false - }, - "reason": { + "contentType": { "type": "string" }, - "schema": { - "$ref": "#/components/schemas/AnonCredsSchema" + "error": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "invalidDid", + "notFound", + "representationNotSupported", + "unsupportedDidMethod" + ] + } + ] }, - "schemaId": { + "message": { "type": "string" + }, + "servedFromCache": { + "type": "boolean", + "description": "Whether the did document was served from the cache" + }, + "servedFromDidRecord": { + "type": "boolean", + "description": "Whether the did document was served from a local did record" } }, - "required": [ - "state", - "reason" - ], "type": "object", "additionalProperties": false }, - "AnonCredsCredentialDefinition": { + "DIDDocumentMetadata": { + "description": "Represents metadata about the DID document resulting from a {@link Resolvable.resolve} operation.", "properties": { - "issuerId": { + "created": { "type": "string" }, - "schemaId": { + "updated": { "type": "string" }, - "type": { - "type": "string", - "enum": [ - "CL" - ], - "nullable": false - }, - "tag": { - "type": "string" - }, - "value": { - "properties": { - "revocation": {}, - "primary": { - "$ref": "#/components/schemas/Record_string.unknown_" - } - }, - "required": [ - "primary" - ], - "type": "object" - } - }, - "required": [ - "issuerId", - "schemaId", - "type", - "tag", - "value" - ], - "type": "object", - "additionalProperties": false - }, - "RegisterCredentialDefinitionReturnStateWait": { - "properties": { - "state": { - "type": "string", - "enum": [ - "wait" - ], - "nullable": false - }, - "credentialDefinition": { - "$ref": "#/components/schemas/AnonCredsCredentialDefinition" - }, - "credentialDefinitionId": { - "type": "string" - } - }, - "required": [ - "state" - ], - "type": "object", - "additionalProperties": false - }, - "RegisterCredentialDefinitionReturnStateAction": { - "properties": { - "state": { - "type": "string", - "enum": [ - "action" - ], - "nullable": false - }, - "action": { - "type": "string" - }, - "credentialDefinitionId": { - "type": "string" - }, - "credentialDefinition": { - "$ref": "#/components/schemas/AnonCredsCredentialDefinition" - } - }, - "required": [ - "state", - "action", - "credentialDefinitionId", - "credentialDefinition" - ], - "type": "object", - "additionalProperties": false - }, - "RegisterCredentialDefinitionReturnStateFinished": { - "properties": { - "state": { - "type": "string", - "enum": [ - "finished" - ], - "nullable": false - }, - "credentialDefinition": { - "$ref": "#/components/schemas/AnonCredsCredentialDefinition" - }, - "credentialDefinitionId": { - "type": "string" - } - }, - "required": [ - "state", - "credentialDefinition", - "credentialDefinitionId" - ], - "type": "object", - "additionalProperties": false - }, - "RegisterCredentialDefinitionReturnStateFailed": { - "properties": { - "state": { - "type": "string", - "enum": [ - "failed" - ], - "nullable": false - }, - "reason": { - "type": "string" - }, - "credentialDefinition": { - "$ref": "#/components/schemas/AnonCredsCredentialDefinition" - }, - "credentialDefinitionId": { - "type": "string" - } - }, - "required": [ - "state", - "reason" - ], - "type": "object", - "additionalProperties": false - }, - "WriteTransaction": { - "properties": { - "endorsedTransaction": { - "type": "string" - }, - "endorserDid": { - "type": "string" - }, - "schema": { - "properties": { - "attributes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "version": { - "type": "string" - }, - "name": { - "type": "string" - }, - "issuerId": { - "type": "string" - } - }, - "required": [ - "attributes", - "version", - "name", - "issuerId" - ], - "type": "object" - }, - "credentialDefinition": { - "properties": { - "type": { - "type": "string" - }, - "value": {}, - "tag": { - "type": "string" - }, - "issuerId": { - "type": "string" - }, - "schemaId": { - "type": "string" - } - }, - "required": [ - "type", - "value", - "tag", - "issuerId", - "schemaId" - ], - "type": "object" - } - }, - "required": [ - "endorsedTransaction" - ], - "type": "object", - "additionalProperties": false - }, - "DIDDocumentMetadata": { - "description": "Represents metadata about the DID document resulting from a {@link Resolvable.resolve} operation.", - "properties": { - "created": { - "type": "string" - }, - "updated": { - "type": "string" - }, - "deactivated": { - "type": "boolean" + "deactivated": { + "type": "boolean" }, "versionId": { "type": "string" @@ -1126,10 +712,33 @@ "type": "string", "example": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL" }, + "KeyAlgorithm": { + "enum": [ + "a128gcm", + "a256gcm", + "a128cbchs256", + "a256cbchs512", + "a128kw", + "a256kw", + "bls12381g1", + "bls12381g2", + "c20p", + "xc20p", + "ed25519", + "x25519", + "k256", + "p256", + "p384" + ], + "type": "string" + }, + "DidDocument": { + "$ref": "#/components/schemas/Record_string.any_" + }, "DidCreate": { "properties": { "keyType": { - "$ref": "#/components/schemas/KeyType" + "$ref": "#/components/schemas/KeyAlgorithm" }, "seed": { "type": "string" @@ -1171,8015 +780,707 @@ "DidRecord": { "$ref": "#/components/schemas/Record_string.unknown_" }, - "AnonCredsResolutionMetadata": { + "AgentInfo": { "properties": { - "error": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "invalid", - "notFound", - "unsupportedAnonCredsMethod" - ] - } - ] - }, - "message": { + "label": { "type": "string" - } - }, - "type": "object", - "additionalProperties": false - }, - "CredoExtensible": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "GetSchemaReturn": { - "properties": { - "schema": { - "$ref": "#/components/schemas/AnonCredsSchema" }, - "schemaId": { - "type": "string" + "endpoints": { + "items": { + "type": "string" + }, + "type": "array" }, - "resolutionMetadata": { - "$ref": "#/components/schemas/AnonCredsResolutionMetadata" + "isInitialized": { + "type": "boolean" }, - "schemaMetadata": { - "$ref": "#/components/schemas/CredoExtensible" - } + "publicDid": {} }, "required": [ - "schemaId", - "resolutionMetadata", - "schemaMetadata" + "label", + "endpoints", + "isInitialized", + "publicDid" ], "type": "object", "additionalProperties": false }, - "SchemaId": { - "type": "string", - "example": "WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0" - }, - "RegisterSchemaReturn": { + "AgentToken": { "properties": { - "jobId": { + "token": { "type": "string" - }, - "schemaState": { - "anyOf": [ - { - "$ref": "#/components/schemas/RegisterSchemaReturnStateWait" - }, - { - "$ref": "#/components/schemas/RegisterSchemaReturnStateAction" - }, - { - "$ref": "#/components/schemas/RegisterSchemaReturnStateFinished" - }, - { - "$ref": "#/components/schemas/RegisterSchemaReturnStateFailed" - } - ] - }, - "schemaMetadata": { - "$ref": "#/components/schemas/CredoExtensible" - }, - "registrationMetadata": { - "$ref": "#/components/schemas/CredoExtensible" } }, "required": [ - "schemaState", - "schemaMetadata", - "registrationMetadata" + "token" ], "type": "object", "additionalProperties": false }, - "CreateSchemaInput": { + "Partial_W3cCredentialValidations_": { + "properties": {}, + "type": "object", + "description": "Make all properties in T optional" + }, + "Error": { "properties": { - "issuerId": { - "type": "string" - }, "name": { "type": "string" }, - "version": { + "message": { "type": "string" }, - "attributes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "endorse": { - "type": "boolean" - }, - "endorserDid": { + "stack": { "type": "string" } }, "required": [ - "issuerId", "name", - "version", - "attributes" + "message" ], "type": "object", "additionalProperties": false }, - "GetCredentialDefinitionReturn": { + "W3cVerifyResult_W3cCredentialValidations_": { "properties": { - "credentialDefinition": { - "$ref": "#/components/schemas/AnonCredsCredentialDefinition" - }, - "credentialDefinitionId": { - "type": "string" + "isValid": { + "type": "boolean", + "description": "Whether the verification as a whole is valid. This means that\nall validations inside the validations object should have passed." }, - "resolutionMetadata": { - "$ref": "#/components/schemas/AnonCredsResolutionMetadata" + "validations": { + "$ref": "#/components/schemas/Partial_W3cCredentialValidations_", + "description": "Validations that have been performed" }, - "credentialDefinitionMetadata": { - "$ref": "#/components/schemas/CredoExtensible" + "error": { + "$ref": "#/components/schemas/Error", + "description": "Error that was caught during verification not related to\nany of the specific validations that are performed" } }, "required": [ - "credentialDefinitionId", - "resolutionMetadata", - "credentialDefinitionMetadata" + "isValid", + "validations" ], "type": "object", "additionalProperties": false }, - "CredentialDefinitionId": { - "type": "string", - "example": "WgWxqztrNooG92RXvxSTWv:3:CL:20:tag" + "OpenId4VcIssuanceSessionRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" }, - "RegisterCredentialDefinitionReturn": { - "properties": { - "jobId": { - "type": "string" - }, - "credentialDefinitionState": { - "anyOf": [ - { - "$ref": "#/components/schemas/RegisterCredentialDefinitionReturnStateWait" - }, - { - "$ref": "#/components/schemas/RegisterCredentialDefinitionReturnStateAction" - }, - { - "$ref": "#/components/schemas/RegisterCredentialDefinitionReturnStateFinished" - }, - { - "$ref": "#/components/schemas/RegisterCredentialDefinitionReturnStateFailed" - } - ] - }, - "credentialDefinitionMetadata": { - "$ref": "#/components/schemas/CredoExtensible" - }, - "registrationMetadata": { - "$ref": "#/components/schemas/CredoExtensible" - } - }, - "required": [ - "credentialDefinitionState", - "credentialDefinitionMetadata", - "registrationMetadata" - ], + "Record_string.boolean_": { + "properties": {}, "type": "object", - "additionalProperties": false + "description": "Construct a type with a set of properties K of type T" }, - "AgentInfo": { - "properties": { - "label": { - "type": "string" - }, - "endpoints": { - "items": { - "type": "string" + "Record_string.boolean-or-Record_string.boolean__": { + "properties": {}, + "additionalProperties": { + "anyOf": [ + { + "type": "boolean" }, - "type": "array" - }, - "isInitialized": { - "type": "boolean" - }, - "publicDid": {} + { + "$ref": "#/components/schemas/Record_string.boolean_" + } + ] }, - "required": [ - "label", - "endpoints", - "isInitialized", - "publicDid" - ], "type": "object", - "additionalProperties": false + "description": "Construct a type with a set of properties K of type T" }, - "AgentToken": { + "OpenId4VciCredentialFormatProfile": { + "enum": [ + "jwt_vc_json", + "jwt_vc_json-ld", + "ldp_vc", + "vc+sd-jwt", + "mso_mdoc" + ], + "type": "string" + }, + "SignerMethod": { + "enum": [ + "did", + "x5c" + ], + "type": "string" + }, + "OpenId4VciOfferSdJwtCredential": { "properties": { - "token": { + "type": { "type": "string" + }, + "format": { + "$ref": "#/components/schemas/OpenId4VciCredentialFormatProfile" + }, + "signerOptions": { + "properties": { + "x5c": { + "items": { + "type": "string" + }, + "type": "array" + }, + "did": { + "type": "string" + }, + "method": { + "$ref": "#/components/schemas/SignerMethod" + } + }, + "required": [ + "method" + ], + "type": "object" + }, + "payload": { + "properties": { + "vct": { + "type": "string" + } + }, + "additionalProperties": {}, + "type": "object" + }, + "disclosureFrame": { + "$ref": "#/components/schemas/Record_string.boolean-or-Record_string.boolean__" } }, "required": [ - "token" + "credentialSupportedId", + "format", + "signerOptions", + "payload" ], "type": "object", "additionalProperties": false }, - "VerifyDataOptions": { + "Partial_ValidityInfo_": { "properties": { - "signature": { - "type": "string" + "signed": { + "type": "string", + "format": "date-time" }, - "publicKeyBase58": { - "type": "string" + "validFrom": { + "type": "string", + "format": "date-time" }, - "keyType": { - "$ref": "#/components/schemas/KeyType" + "validUntil": { + "type": "string", + "format": "date-time" }, - "data": { - "type": "string" + "expectedUpdate": { + "type": "string", + "format": "date-time" } }, - "required": [ - "signature", - "publicKeyBase58", - "keyType", - "data" - ], - "type": "object" - }, - "W3cCredentialRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" + "type": "object", + "description": "Make all properties in T optional" }, - "JsonObject": { + "Record_string.Record_string.unknown__": { "properties": {}, - "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/JsonValue" - } + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "type": "object", + "description": "Construct a type with a set of properties K of type T" }, - "JsonValue": { - "anyOf": [ - { + "MdocNameSpaces": { + "$ref": "#/components/schemas/Record_string.Record_string.unknown__" + }, + "OpenId4VciOfferMdocCredential": { + "properties": { + "credentialSupportedId": { "type": "string" }, - { - "type": "number", - "format": "double" + "challenge": { + "type": "string" }, - { - "type": "boolean" + "nonce": { + "type": "string" }, - { - "$ref": "#/components/schemas/JsonObject" + "created": { + "type": "string" }, - { - "$ref": "#/components/schemas/JsonArray" - } - ], - "nullable": true - }, - "JsonArray": { - "items": { - "$ref": "#/components/schemas/JsonValue" - }, - "type": "array" - }, - "W3cIssuer": { - "properties": { - "id": { + "expires": { "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object", - "additionalProperties": false - }, - "W3cCredentialSubject": { - "properties": { - "id": { + }, + "proofValue": { "type": "string" }, - "claims": { - "$ref": "#/components/schemas/Record_string.unknown_" + "previousProof": { + "type": "string" } }, + "required": [ + "type", + "cryptosuite", + "verificationMethod", + "proofPurpose" + ], "type": "object", "additionalProperties": false }, - "SingleOrArray_W3cCredentialSubject_": { + "SingleOrArray_any-or-DataIntegrityProofOptions_": { "anyOf": [ { - "$ref": "#/components/schemas/W3cCredentialSubject" + "anyOf": [ + {}, + { + "$ref": "#/components/schemas/DataIntegrityProofOptions" + } + ] }, { "items": { - "$ref": "#/components/schemas/W3cCredentialSubject" + "anyOf": [ + {}, + { + "$ref": "#/components/schemas/DataIntegrityProofOptions" + } + ] }, "type": "array" } ] }, - "W3cCredentialSchema": { + "LinkedDataProof": { + "description": "Linked Data Proof", "properties": { - "id": { + "type": { "type": "string" }, - "type": { + "proofPurpose": { + "type": "string" + }, + "verificationMethod": { + "type": "string" + }, + "created": { + "type": "string" + }, + "domain": { + "type": "string" + }, + "challenge": { + "type": "string" + }, + "jws": { + "type": "string" + }, + "proofValue": { + "type": "string" + }, + "nonce": { "type": "string" } }, "required": [ - "id", - "type" + "type", + "proofPurpose", + "verificationMethod", + "created" ], "type": "object", "additionalProperties": false }, - "SingleOrArray_W3cCredentialSchema_": { - "anyOf": [ - { - "$ref": "#/components/schemas/W3cCredentialSchema" - }, - { - "items": { - "$ref": "#/components/schemas/W3cCredentialSchema" - }, - "type": "array" - } - ] - }, - "W3cCredentialStatus": { + "DataIntegrityProof": { + "description": "Linked Data Proof", "properties": { - "id": { - "type": "string" - }, "type": { "type": "string" + }, + "cryptosuite": { + "type": "string" + }, + "proofPurpose": { + "type": "string" + }, + "verificationMethod": { + "type": "string" + }, + "domain": { + "type": "string" + }, + "challenge": { + "type": "string" + }, + "nonce": { + "type": "string" + }, + "created": { + "type": "string" + }, + "expires": { + "type": "string" + }, + "proofValue": { + "type": "string" + }, + "previousProof": { + "type": "string" } }, "required": [ - "id", - "type" + "type", + "cryptosuite", + "proofPurpose", + "verificationMethod" ], "type": "object", "additionalProperties": false }, - "W3cCredential": { - "properties": { - "context": { + "SingleOrArray_LinkedDataProof-or-DataIntegrityProof_": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/components/schemas/LinkedDataProof" + }, + { + "$ref": "#/components/schemas/DataIntegrityProof" + } + ] + }, + { "items": { "anyOf": [ { - "type": "string" + "$ref": "#/components/schemas/LinkedDataProof" }, { - "$ref": "#/components/schemas/JsonObject" + "$ref": "#/components/schemas/DataIntegrityProof" } ] }, "type": "array" - }, + } + ] + }, + "W3cIssuer": { + "properties": { "id": { "type": "string" - }, - "type": { - "items": { - "type": "string" - }, - "type": "array" - }, - "issuer": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/W3cIssuer" - } - ] - }, - "issuanceDate": { - "type": "string" - }, - "expirationDate": { - "type": "string" - }, - "credentialSubject": { - "$ref": "#/components/schemas/SingleOrArray_W3cCredentialSubject_" - }, - "credentialSchema": { - "$ref": "#/components/schemas/SingleOrArray_W3cCredentialSchema_" - }, - "credentialStatus": { - "$ref": "#/components/schemas/W3cCredentialStatus" } }, "required": [ - "context", - "type", - "issuer", - "issuanceDate", - "credentialSubject" + "id" ], "type": "object", "additionalProperties": false }, - "Pick_W3cJsonLdSignCredentialOptions.Exclude_keyofW3cJsonLdSignCredentialOptions.format__": { + "W3cCredentialSubject": { "properties": { - "credential": { - "$ref": "#/components/schemas/W3cCredential", - "description": "The credential to be signed." + "id": { + "type": "string" }, - "proofType": { - "type": "string", - "description": "The proofType to be used for signing the credential.\n\nMust be a valid Linked Data Signature suite." + "claims": { + "$ref": "#/components/schemas/Record_string.unknown_" + } + }, + "type": "object", + "additionalProperties": false + }, + "SingleOrArray_W3cCredentialSubject_": { + "anyOf": [ + { + "$ref": "#/components/schemas/W3cCredentialSubject" }, - "proofPurpose": {}, - "created": { + { + "items": { + "$ref": "#/components/schemas/W3cCredentialSubject" + }, + "type": "array" + } + ] + }, + "W3cCredentialSchema": { + "properties": { + "id": { "type": "string" }, - "verificationMethod": { - "type": "string", - "description": "URI of the verificationMethod to be used for signing the credential.\n\nMust be a valid did url pointing to a key." + "type": { + "type": "string" } }, "required": [ - "credential", - "proofType", - "verificationMethod" + "id", + "type" ], "type": "object", - "description": "From T, pick a set of properties whose keys are in the union K" - }, - "Omit_W3cJsonLdSignCredentialOptions.format_": { - "$ref": "#/components/schemas/Pick_W3cJsonLdSignCredentialOptions.Exclude_keyofW3cJsonLdSignCredentialOptions.format__", - "description": "Construct a type with the properties of T except for those in type K." + "additionalProperties": false }, - "CustomW3cJsonLdSignCredentialOptions": { - "allOf": [ + "SingleOrArray_W3cCredentialSchema_": { + "anyOf": [ { - "$ref": "#/components/schemas/Omit_W3cJsonLdSignCredentialOptions.format_" + "$ref": "#/components/schemas/W3cCredentialSchema" }, { - "properties": {}, - "additionalProperties": {}, - "type": "object" + "items": { + "$ref": "#/components/schemas/W3cCredentialSchema" + }, + "type": "array" } ] }, - "SignDataOptions": { + "W3cCredentialStatus": { "properties": { - "method": { + "id": { "type": "string" }, - "did": { + "type": { "type": "string" + } + }, + "required": [ + "id", + "type" + ], + "type": "object", + "additionalProperties": false + }, + "W3cJsonLdVerifiableCredential": { + "properties": { + "context": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/JsonObject" + } + ] + }, + "type": "array" }, - "publicKeyBase58": { + "id": { "type": "string" }, - "keyType": { - "$ref": "#/components/schemas/KeyType" + "type": { + "items": { + "type": "string" + }, + "type": "array" }, - "data": { - "type": "string" + "input_descriptors": { + "items": { + "$ref": "#/components/schemas/InputDescriptorV2Model" + }, + "type": "array" + }, + "frame": { + "additionalProperties": false, + "type": "object" } }, "required": [ - "publicKeyBase58", - "keyType", - "data" + "id", + "input_descriptors" ], - "type": "object" - }, - "Partial_W3cCredentialValidations_": { - "properties": {}, "type": "object", - "description": "Make all properties in T optional" + "additionalProperties": false }, - "Error": { + "PresentationDefinition": { "properties": { - "name": { - "type": "string" - }, - "message": { - "type": "string" - }, - "stack": { - "type": "string" + "definition": { + "$ref": "#/components/schemas/DifPresentationExchangeDefinitionV2Model" } }, "required": [ - "name", - "message" + "definition" ], "type": "object", "additionalProperties": false }, - "W3cVerifyResult_W3cCredentialValidations_": { + "DcqlClaim": { "properties": { - "isValid": { - "type": "boolean", - "description": "Whether the verification as a whole is valid. This means that\nall validations inside the validations object should have passed." - }, - "validations": { - "$ref": "#/components/schemas/Partial_W3cCredentialValidations_", - "description": "Validations that have been performed" + "path": { + "items": { + "type": "string" + }, + "type": "array" }, - "error": { - "$ref": "#/components/schemas/Error", - "description": "Error that was caught during verification not related to\nany of the specific validations that are performed" + "intent_to_retain": { + "type": "boolean" } }, "required": [ - "isValid", - "validations" + "path" ], "type": "object", "additionalProperties": false }, - "W3cVerifyCredentialResult": { - "$ref": "#/components/schemas/W3cVerifyResult_W3cCredentialValidations_" - }, - "Pick_LinkedDataProofOptions.Exclude_keyofLinkedDataProofOptions.cryptosuite__": { + "DcqlCredential": { "properties": { - "proofPurpose": { - "type": "string" - }, - "created": { - "type": "string" - }, - "verificationMethod": { - "type": "string" - }, - "type": { - "type": "string" - }, - "domain": { + "id": { "type": "string" }, - "challenge": { + "format": { "type": "string" }, - "jws": { - "type": "string" + "meta": { + "$ref": "#/components/schemas/Record_string.any_" }, - "proofValue": { - "type": "string" + "require_cryptographic_holder_binding": { + "type": "boolean" }, - "nonce": { - "type": "string" + "claims": { + "items": { + "$ref": "#/components/schemas/DcqlClaim" + }, + "type": "array" } }, "required": [ - "proofPurpose", - "created", - "verificationMethod", - "type" + "id", + "format", + "claims" ], "type": "object", - "description": "From T, pick a set of properties whose keys are in the union K" - }, - "Omit_LinkedDataProofOptions.cryptosuite_": { - "$ref": "#/components/schemas/Pick_LinkedDataProofOptions.Exclude_keyofLinkedDataProofOptions.cryptosuite__", - "description": "Construct a type with the properties of T except for those in type K." + "additionalProperties": false }, - "DataIntegrityProofOptions": { + "DcqlQuery": { "properties": { - "type": { - "type": "string" - }, - "cryptosuite": { - "type": "string" - }, - "verificationMethod": { - "type": "string" - }, - "proofPurpose": { - "type": "string" - }, - "domain": { - "type": "string" - }, - "challenge": { - "type": "string" - }, - "nonce": { - "type": "string" - }, - "created": { - "type": "string" - }, - "expires": { - "type": "string" - }, - "proofValue": { - "type": "string" + "combine": { + "type": "string", + "enum": [ + "all", + "any" + ] }, - "previousProof": { - "type": "string" + "credentials": { + "items": { + "$ref": "#/components/schemas/DcqlCredential" + }, + "type": "array" } }, "required": [ - "type", - "cryptosuite", - "verificationMethod", - "proofPurpose" + "credentials" ], "type": "object", "additionalProperties": false }, - "SingleOrArray_Omit_LinkedDataProofOptions.cryptosuite_-or-DataIntegrityProofOptions_": { - "anyOf": [ - { - "anyOf": [ - { - "$ref": "#/components/schemas/Omit_LinkedDataProofOptions.cryptosuite_" - }, - { - "$ref": "#/components/schemas/DataIntegrityProofOptions" - } - ] - }, - { - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/Omit_LinkedDataProofOptions.cryptosuite_" - }, - { - "$ref": "#/components/schemas/DataIntegrityProofOptions" - } - ] - }, - "type": "array" - } - ] - }, - "LinkedDataProof": { - "description": "Linked Data Proof", + "DcqlDefinition": { "properties": { - "type": { - "type": "string" - }, - "proofPurpose": { - "type": "string" - }, - "verificationMethod": { - "type": "string" - }, - "created": { - "type": "string" - }, - "domain": { - "type": "string" - }, - "challenge": { - "type": "string" - }, - "jws": { - "type": "string" - }, - "proofValue": { - "type": "string" - }, - "nonce": { - "type": "string" + "query": { + "$ref": "#/components/schemas/DcqlQuery" } }, "required": [ - "type", - "proofPurpose", - "verificationMethod", - "created" + "credential", + "proof" ], "type": "object", "additionalProperties": false }, - "DataIntegrityProof": { - "description": "Linked Data Proof", + "TenantConfig": { "properties": { - "type": { - "type": "string" - }, - "cryptosuite": { - "type": "string" - }, - "proofPurpose": { - "type": "string" - }, - "verificationMethod": { - "type": "string" - }, - "domain": { - "type": "string" - }, - "challenge": { - "type": "string" - }, - "nonce": { - "type": "string" - }, - "created": { - "type": "string" - }, - "expires": { - "type": "string" - }, - "proofValue": { - "type": "string" - }, - "previousProof": { + "label": { "type": "string" } }, "required": [ - "type", - "cryptosuite", - "proofPurpose", - "verificationMethod" + "label" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "SingleOrArray_LinkedDataProof-or-DataIntegrityProof_": { - "anyOf": [ - { - "anyOf": [ - { - "$ref": "#/components/schemas/LinkedDataProof" - }, - { - "$ref": "#/components/schemas/DataIntegrityProof" - } - ] - }, - { - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/LinkedDataProof" - }, - { - "$ref": "#/components/schemas/DataIntegrityProof" - } - ] - }, - "type": "array" + "MetadataValue": { + "$ref": "#/components/schemas/Record_string.any_" + }, + "MetadataBase": { + "properties": {}, + "additionalProperties": { + "$ref": "#/components/schemas/MetadataValue" + }, + "type": "object" + }, + "Metadata____": { + "description": "Metadata access class to get, set (create and update), add (append to a record) and delete metadata on any record.\n\nset will override the previous value if it already exists\n\nnote: To add persistence to these records, you have to update the record in the correct repository", + "properties": { + "data": { + "$ref": "#/components/schemas/MetadataBase" } - ] + }, + "required": [ + "data" + ], + "type": "object", + "additionalProperties": false }, - "W3cJsonLdVerifiableCredential": { + "Pick_CustomTenantConfig.Exclude_keyofCustomTenantConfig.walletConfig__": { "properties": { - "context": { - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/JsonObject" - } - ] - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "type": { - "items": { - "type": "string" - }, - "type": "array" - }, - "issuer": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/W3cIssuer" - } - ] - }, - "issuanceDate": { + "label": { "type": "string" }, - "expirationDate": { + "connectionImageUrl": { "type": "string" - }, - "credentialSubject": { - "$ref": "#/components/schemas/SingleOrArray_W3cCredentialSubject_" - }, - "credentialSchema": { - "$ref": "#/components/schemas/SingleOrArray_W3cCredentialSchema_" - }, - "credentialStatus": { - "$ref": "#/components/schemas/W3cCredentialStatus" - }, - "proof": { - "$ref": "#/components/schemas/SingleOrArray_LinkedDataProof-or-DataIntegrityProof_" } }, "required": [ - "context", - "type", - "issuer", - "issuanceDate", - "credentialSubject", - "proof" + "label" ], "type": "object", - "additionalProperties": false + "description": "From T, pick a set of properties whose keys are in the union K" + }, + "Omit_CustomTenantConfig.walletConfig_": { + "$ref": "#/components/schemas/Pick_CustomTenantConfig.Exclude_keyofCustomTenantConfig.walletConfig__", + "description": "Construct a type with the properties of T except for those in type K." }, - "ProofPurpose": {}, - "SafeW3cJsonLdVerifyCredentialOptions": { + "CreateTenantOptions": { "properties": { - "credential": { - "$ref": "#/components/schemas/W3cJsonLdVerifiableCredential" - }, - "verifyCredentialStatus": { - "type": "boolean", - "description": "Whether to verify the credentialStatus, if present." - }, - "proofPurpose": { - "$ref": "#/components/schemas/ProofPurpose" - }, - "proof": { - "$ref": "#/components/schemas/SingleOrArray_Omit_LinkedDataProofOptions.cryptosuite_-or-DataIntegrityProofOptions_" + "config": { + "$ref": "#/components/schemas/Omit_CustomTenantConfig.walletConfig_" } }, "required": [ - "credential", - "proof" + "config" ], "type": "object", "additionalProperties": false - }, - "QuestionAnswerRole": { - "enum": [ - "questioner", - "responder" - ], - "type": "string" - }, - "QuestionAnswerState": { - "description": "QuestionAnswer states inferred from RFC 0113.", - "enum": [ - "question-sent", - "question-received", - "answer-received", - "answer-sent" - ], - "type": "string" - }, - "RecordId": { - "type": "string", - "example": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e" - }, - "ValidResponse": { - "properties": { - "text": { - "type": "string" - } - }, - "required": [ - "text" - ], - "type": "object", - "additionalProperties": false - }, - "Record_response.string_": { - "properties": { - "response": { - "type": "string" - } - }, - "required": [ - "response" - ], - "type": "object", - "description": "Construct a type with a set of properties K of type T" - }, - "ProofExchangeRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "AutoAcceptProof": { - "description": "Typing of the state for auto acceptance", - "enum": [ - "always", - "contentApproved", - "never" - ], - "type": "string" - }, - "RequestProofProposalOptions": { - "properties": { - "connectionId": { - "type": "string" - }, - "proofFormats": {}, - "goalCode": { - "type": "string" - }, - "parentThreadId": { - "type": "string" - }, - "autoAcceptProof": { - "$ref": "#/components/schemas/AutoAcceptProof" - }, - "comment": { - "type": "string" - } - }, - "required": [ - "connectionId", - "proofFormats" - ], - "type": "object", - "additionalProperties": false - }, - "AcceptProofProposal": { - "properties": { - "proofRecordId": { - "type": "string" - }, - "proofFormats": {}, - "comment": { - "type": "string" - }, - "autoAcceptProof": { - "$ref": "#/components/schemas/AutoAcceptProof" - }, - "goalCode": { - "type": "string" - }, - "willConfirm": { - "type": "boolean" - } - }, - "required": [ - "proofRecordId", - "proofFormats" - ], - "type": "object", - "additionalProperties": false - }, - "RequestProofOptions": { - "properties": { - "connectionId": { - "type": "string" - }, - "protocolVersion": { - "type": "string" - }, - "proofFormats": {}, - "comment": { - "type": "string" - }, - "autoAcceptProof": { - "$ref": "#/components/schemas/AutoAcceptProof" - }, - "goalCode": { - "type": "string" - }, - "parentThreadId": { - "type": "string" - }, - "willConfirm": { - "type": "boolean" - } - }, - "required": [ - "connectionId", - "protocolVersion", - "proofFormats", - "comment", - "autoAcceptProof" - ], - "type": "object", - "additionalProperties": false - }, - "PlaintextMessage": { - "properties": { - "@type": { - "type": "string" - }, - "@id": { - "type": "string" - }, - "~thread": { - "properties": { - "pthid": { - "type": "string" - }, - "thid": { - "type": "string" - } - }, - "type": "object" - } - }, - "required": [ - "@type", - "@id" - ], - "type": "object", - "additionalProperties": {} - }, - "CreateProofRequestOobOptions": { - "properties": { - "protocolVersion": { - "type": "string" - }, - "proofFormats": {}, - "goalCode": { - "type": "string" - }, - "parentThreadId": { - "type": "string" - }, - "willConfirm": { - "type": "boolean" - }, - "autoAcceptProof": { - "$ref": "#/components/schemas/AutoAcceptProof" - }, - "comment": { - "type": "string" - }, - "label": { - "type": "string" - }, - "imageUrl": { - "type": "string" - }, - "recipientKey": { - "type": "string" - }, - "invitationDid": { - "type": "string" - } - }, - "required": [ - "protocolVersion", - "proofFormats" - ], - "type": "object", - "additionalProperties": false - }, - "ProofFormatDataMessagePayload__40_LegacyIndyProofFormat-or-AnonCredsProofFormat-or-DifPresentationExchangeProofFormat_41_-Array.proposal_": { - "properties": {}, - "type": "object", - "description": "Get the format data payload for a specific message from a list of ProofFormat interfaces and a message\n\nFor an indy offer, this resolves to the proof request format as defined here:\nhttps://github.com/hyperledger/aries-rfcs/tree/b3a3942ef052039e73cd23d847f42947f8287da2/features/0592-indy-attachments#proof-request-format" - }, - "ProofFormatDataMessagePayload__40_LegacyIndyProofFormat-or-AnonCredsProofFormat-or-DifPresentationExchangeProofFormat_41_-Array.request_": { - "properties": {}, - "type": "object", - "description": "Get the format data payload for a specific message from a list of ProofFormat interfaces and a message\n\nFor an indy offer, this resolves to the proof request format as defined here:\nhttps://github.com/hyperledger/aries-rfcs/tree/b3a3942ef052039e73cd23d847f42947f8287da2/features/0592-indy-attachments#proof-request-format" - }, - "ProofFormatDataMessagePayload__40_LegacyIndyProofFormat-or-AnonCredsProofFormat-or-DifPresentationExchangeProofFormat_41_-Array.presentation_": { - "properties": {}, - "type": "object", - "description": "Get the format data payload for a specific message from a list of ProofFormat interfaces and a message\n\nFor an indy offer, this resolves to the proof request format as defined here:\nhttps://github.com/hyperledger/aries-rfcs/tree/b3a3942ef052039e73cd23d847f42947f8287da2/features/0592-indy-attachments#proof-request-format" - }, - "GetProofFormatDataReturn__40_LegacyIndyProofFormat-or-AnonCredsProofFormat-or-DifPresentationExchangeProofFormat_41_-Array_": { - "properties": { - "presentation": { - "$ref": "#/components/schemas/ProofFormatDataMessagePayload__40_LegacyIndyProofFormat-or-AnonCredsProofFormat-or-DifPresentationExchangeProofFormat_41_-Array.presentation_" - }, - "request": { - "$ref": "#/components/schemas/ProofFormatDataMessagePayload__40_LegacyIndyProofFormat-or-AnonCredsProofFormat-or-DifPresentationExchangeProofFormat_41_-Array.request_" - }, - "proposal": { - "$ref": "#/components/schemas/ProofFormatDataMessagePayload__40_LegacyIndyProofFormat-or-AnonCredsProofFormat-or-DifPresentationExchangeProofFormat_41_-Array.proposal_" - } - }, - "type": "object" - }, - "HandshakeProtocol": { - "description": "Enum values should be sorted based on order of preference. Values will be\nincluded in this order when creating out of band invitations.", - "enum": [ - "https://didcomm.org/didexchange/1.x", - "https://didcomm.org/connections/1.x" - ], - "type": "string" - }, - "AgentMessage": { - "$ref": "#/components/schemas/PlaintextMessage" - }, - "Routing": { - "properties": { - "endpoints": { - "items": { - "type": "string" - }, - "type": "array" - }, - "recipientKey": { - "$ref": "#/components/schemas/Key" - }, - "routingKeys": { - "items": { - "$ref": "#/components/schemas/Key" - }, - "type": "array" - }, - "mediatorId": { - "type": "string" - } - }, - "required": [ - "endpoints", - "recipientKey", - "routingKeys" - ], - "type": "object", - "additionalProperties": false - }, - "Pick_JwsGeneralFormat.Exclude_keyofJwsGeneralFormat.payload__": { - "properties": { - "header": { - "$ref": "#/components/schemas/Record_string.unknown_", - "description": "unprotected header" - }, - "signature": { - "type": "string", - "description": "Base64url encoded signature" - }, - "protected": { - "type": "string", - "description": "Base64url encoded protected header" - } - }, - "required": [ - "header", - "signature", - "protected" - ], - "type": "object", - "description": "From T, pick a set of properties whose keys are in the union K" - }, - "Omit_JwsGeneralFormat.payload_": { - "$ref": "#/components/schemas/Pick_JwsGeneralFormat.Exclude_keyofJwsGeneralFormat.payload__", - "description": "Construct a type with the properties of T except for those in type K." - }, - "JwsDetachedFormat": { - "$ref": "#/components/schemas/Omit_JwsGeneralFormat.payload_" - }, - "JwsFlattenedDetachedFormat": { - "properties": { - "signatures": { - "items": { - "$ref": "#/components/schemas/JwsDetachedFormat" - }, - "type": "array" - } - }, - "required": [ - "signatures" - ], - "type": "object", - "additionalProperties": false - }, - "AttachmentData": { - "description": "A JSON object that gives access to the actual content of the attachment", - "properties": { - "base64": { - "type": "string", - "description": "Base64-encoded data, when representing arbitrary content inline instead of via links. Optional." - }, - "json": { - "$ref": "#/components/schemas/JsonValue", - "description": "Directly embedded JSON data, when representing content inline instead of via links, and when the content is natively conveyable as JSON. Optional." - }, - "links": { - "items": { - "type": "string" - }, - "type": "array", - "description": "A list of zero or more locations at which the content may be fetched. Optional." - }, - "jws": { - "anyOf": [ - { - "$ref": "#/components/schemas/JwsDetachedFormat" - }, - { - "$ref": "#/components/schemas/JwsFlattenedDetachedFormat" - } - ], - "description": "A JSON Web Signature over the content of the attachment. Optional." - }, - "sha256": { - "type": "string", - "description": "The hash of the content. Optional." - } - }, - "type": "object", - "additionalProperties": false - }, - "Attachment": { - "description": "Represents DIDComm attachment\nhttps://github.com/hyperledger/aries-rfcs/blob/master/concepts/0017-attachments/README.md", - "properties": { - "id": { - "type": "string" - }, - "description": { - "type": "string", - "description": "An optional human-readable description of the content." - }, - "filename": { - "type": "string", - "description": "A hint about the name that might be used if this attachment is persisted as a file. It is not required, and need not be unique. If this field is present and mime-type is not, the extension on the filename may be used to infer a MIME type." - }, - "mimeType": { - "type": "string", - "description": "Describes the MIME type of the attached content. Optional but recommended." - }, - "lastmodTime": { - "type": "string", - "format": "date-time", - "description": "A hint about when the content in this attachment was last modified." - }, - "byteCount": { - "type": "number", - "format": "double", - "description": "Optional, and mostly relevant when content is included by reference instead of by value. Lets the receiver guess how expensive it will be, in time, bandwidth, and storage, to fully fetch the attachment." - }, - "data": { - "$ref": "#/components/schemas/AttachmentData" - } - }, - "required": [ - "id", - "data" - ], - "type": "object", - "additionalProperties": false - }, - "CreateInvitationOptions": { - "properties": { - "label": { - "type": "string" - }, - "alias": { - "type": "string" - }, - "imageUrl": { - "type": "string" - }, - "goalCode": { - "type": "string" - }, - "goal": { - "type": "string" - }, - "handshake": { - "type": "boolean" - }, - "handshakeProtocols": { - "items": { - "$ref": "#/components/schemas/HandshakeProtocol" - }, - "type": "array" - }, - "messages": { - "items": { - "$ref": "#/components/schemas/AgentMessage" - }, - "type": "array" - }, - "multiUseInvitation": { - "type": "boolean" - }, - "autoAcceptConnection": { - "type": "boolean" - }, - "routing": { - "$ref": "#/components/schemas/Routing" - }, - "appendedAttachments": { - "items": { - "$ref": "#/components/schemas/Attachment" - }, - "type": "array" - }, - "invitationDid": { - "type": "string" - } - }, - "type": "object", - "additionalProperties": false - }, - "RecipientKeyOption": { - "properties": { - "recipientKey": { - "type": "string" - } - }, - "type": "object", - "additionalProperties": false - }, - "Pick_CreateLegacyInvitationConfig.Exclude_keyofCreateLegacyInvitationConfig.routing__": { - "properties": { - "alias": { - "type": "string" - }, - "label": { - "type": "string" - }, - "imageUrl": { - "type": "string" - }, - "multiUseInvitation": { - "type": "boolean" - }, - "autoAcceptConnection": { - "type": "boolean" - } - }, - "type": "object", - "description": "From T, pick a set of properties whose keys are in the union K" - }, - "Omit_CreateLegacyInvitationConfig.routing_": { - "$ref": "#/components/schemas/Pick_CreateLegacyInvitationConfig.Exclude_keyofCreateLegacyInvitationConfig.routing__", - "description": "Construct a type with the properties of T except for those in type K." - }, - "OutOfBandRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "CustomHandshakeProtocol": { - "enum": [ - "https://didcomm.org/didexchange/1.1", - "https://didcomm.org/connections/1.0" - ], - "type": "string" - }, - "SingleOrArray_string-or-Record_string.unknown__": { - "anyOf": [ - { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/Record_string.unknown_" - } - ] - }, - { - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/Record_string.unknown_" - } - ] - }, - "type": "array" - } - ] - }, - "OutOfBandDidCommService": { - "properties": { - "id": { - "type": "string" - }, - "serviceEndpoint": { - "type": "string" - }, - "type": { - "type": "string" - }, - "recipientKeys": { - "items": { - "type": "string" - }, - "type": "array" - }, - "routingKeys": { - "items": { - "type": "string" - }, - "type": "array" - }, - "accept": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "id", - "serviceEndpoint", - "type", - "recipientKeys" - ], - "type": "object", - "additionalProperties": false - }, - "OutOfBandInvitationSchema": { - "properties": { - "@id": { - "type": "string" - }, - "@type": { - "type": "string" - }, - "label": { - "type": "string" - }, - "goalCode": { - "type": "string" - }, - "goal": { - "type": "string" - }, - "accept": { - "items": { - "type": "string" - }, - "type": "array" - }, - "handshake_protocols": { - "items": { - "$ref": "#/components/schemas/CustomHandshakeProtocol" - }, - "type": "array" - }, - "services": { - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OutOfBandDidCommService" - }, - { - "type": "string" - } - ] - }, - "type": "array" - }, - "imageUrl": { - "type": "string" - } - }, - "required": [ - "@type", - "label", - "services" - ], - "type": "object", - "additionalProperties": false - }, - "Pick_ReceiveOutOfBandInvitationConfig.Exclude_keyofReceiveOutOfBandInvitationConfig.routing__": { - "properties": { - "alias": { - "type": "string" - }, - "label": { - "type": "string" - }, - "imageUrl": { - "type": "string" - }, - "autoAcceptConnection": { - "type": "boolean" - }, - "autoAcceptInvitation": { - "type": "boolean" - }, - "reuseConnection": { - "type": "boolean" - }, - "acceptInvitationTimeoutMs": { - "type": "number", - "format": "double" - }, - "ourDid": { - "type": "string" - } - }, - "type": "object", - "description": "From T, pick a set of properties whose keys are in the union K" - }, - "Omit_ReceiveOutOfBandInvitationConfig.routing_": { - "$ref": "#/components/schemas/Pick_ReceiveOutOfBandInvitationConfig.Exclude_keyofReceiveOutOfBandInvitationConfig.routing__", - "description": "Construct a type with the properties of T except for those in type K." - }, - "ReceiveInvitationProps": { - "properties": { - "alias": { - "type": "string" - }, - "label": { - "type": "string" - }, - "imageUrl": { - "type": "string" - }, - "autoAcceptConnection": { - "type": "boolean" - }, - "autoAcceptInvitation": { - "type": "boolean" - }, - "reuseConnection": { - "type": "boolean" - }, - "acceptInvitationTimeoutMs": { - "type": "number", - "format": "double" - }, - "ourDid": { - "type": "string" - }, - "invitation": { - "$ref": "#/components/schemas/OutOfBandInvitationSchema" - } - }, - "required": [ - "invitation" - ], - "type": "object", - "additionalProperties": false - }, - "ReceiveInvitationByUrlProps": { - "properties": { - "alias": { - "type": "string" - }, - "label": { - "type": "string" - }, - "imageUrl": { - "type": "string" - }, - "autoAcceptConnection": { - "type": "boolean" - }, - "autoAcceptInvitation": { - "type": "boolean" - }, - "reuseConnection": { - "type": "boolean" - }, - "acceptInvitationTimeoutMs": { - "type": "number", - "format": "double" - }, - "ourDid": { - "type": "string" - }, - "invitationUrl": { - "type": "string" - } - }, - "required": [ - "invitationUrl" - ], - "type": "object", - "additionalProperties": false - }, - "AcceptInvitationConfig": { - "properties": { - "autoAcceptConnection": { - "type": "boolean" - }, - "reuseConnection": { - "type": "boolean" - }, - "label": { - "type": "string" - }, - "alias": { - "type": "string" - }, - "imageUrl": { - "type": "string" - }, - "mediatorId": { - "type": "string" - } - }, - "type": "object", - "additionalProperties": false - }, - "ThreadId": { - "type": "string", - "example": "ea4e5e69-fc04-465a-90d2-9f8ff78aa71d" - }, - "CredentialState": { - "description": "Issue Credential states as defined in RFC 0036 and RFC 0453", - "enum": [ - "proposal-sent", - "proposal-received", - "offer-sent", - "offer-received", - "declined", - "request-sent", - "request-received", - "credential-issued", - "credential-received", - "done", - "abandoned" - ], - "type": "string" - }, - "CredentialRole": { - "enum": [ - "issuer", - "holder" - ], - "type": "string" - }, - "CredentialExchangeRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "ProtocolVersion": { - "enum": [ - "v1", - "v2" - ], - "type": "string" - }, - "CredentialPreviewAttributeOptions": { - "properties": { - "name": { - "type": "string" - }, - "mimeType": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": [ - "name", - "value" - ], - "type": "object", - "additionalProperties": false - }, - "LinkedAttachment": { - "properties": { - "attributeName": { - "type": "string", - "description": "The name that will be used to generate the linked credential" - }, - "attachment": { - "$ref": "#/components/schemas/Attachment", - "description": "The attachment that needs to be linked to the credential" - } - }, - "required": [ - "attributeName", - "attachment" - ], - "type": "object", - "additionalProperties": false - }, - "Pick_AnonCredsProposeCredentialFormat.Exclude_keyofAnonCredsProposeCredentialFormat.schemaIssuerId-or-issuerId__": { - "properties": { - "schemaId": { - "type": "string" - }, - "schemaName": { - "type": "string" - }, - "schemaVersion": { - "type": "string" - }, - "credentialDefinitionId": { - "type": "string" - }, - "attributes": { - "items": { - "$ref": "#/components/schemas/CredentialPreviewAttributeOptions" - }, - "type": "array" - }, - "linkedAttachments": { - "items": { - "$ref": "#/components/schemas/LinkedAttachment" - }, - "type": "array" - }, - "schemaIssuerDid": { - "type": "string" - }, - "issuerDid": { - "type": "string" - } - }, - "type": "object", - "description": "From T, pick a set of properties whose keys are in the union K" - }, - "Omit_AnonCredsProposeCredentialFormat.schemaIssuerId-or-issuerId_": { - "$ref": "#/components/schemas/Pick_AnonCredsProposeCredentialFormat.Exclude_keyofAnonCredsProposeCredentialFormat.schemaIssuerId-or-issuerId__", - "description": "Construct a type with the properties of T except for those in type K." - }, - "LegacyIndyProposeCredentialFormat": { - "$ref": "#/components/schemas/Omit_AnonCredsProposeCredentialFormat.schemaIssuerId-or-issuerId_", - "description": "This defines the module payload for calling CredentialsApi.createProposal\nor CredentialsApi.negotiateOffer\n\nNOTE: This doesn't include the `issuerId` and `schemaIssuerId` properties that are present in the newer format." - }, - "W3cIssuerOptions": { - "description": "TODO: check how to support arbitrary data in class", - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object", - "additionalProperties": false - }, - "SingleOrArray_JsonObject_": { - "anyOf": [ - { - "$ref": "#/components/schemas/JsonObject" - }, - { - "items": { - "$ref": "#/components/schemas/JsonObject" - }, - "type": "array" - } - ] - }, - "JsonCredential": { - "properties": { - "@context": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "$ref": "#/components/schemas/JsonObject" - } - ] - }, - "id": { - "type": "string" - }, - "type": { - "items": { - "type": "string" - }, - "type": "array" - }, - "issuer": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/W3cIssuerOptions" - } - ] - }, - "issuanceDate": { - "type": "string" - }, - "expirationDate": { - "type": "string" - }, - "credentialSubject": { - "$ref": "#/components/schemas/SingleOrArray_JsonObject_" - }, - "prettyVc": {} - }, - "required": [ - "@context", - "type", - "issuer", - "issuanceDate", - "credentialSubject" - ], - "type": "object", - "additionalProperties": {} - }, - "JsonLdCredentialDetailFormat": { - "description": "Format for creating a jsonld proposal, offer or request.", - "properties": { - "credential": { - "$ref": "#/components/schemas/JsonCredential" - }, - "options": { - "properties": { - "proofType": { - "type": "string" - }, - "proofPurpose": { - "type": "string" - } - }, - "required": [ - "proofType", - "proofPurpose" - ], - "type": "object" - } - }, - "required": [ - "credential", - "options" - ], - "type": "object", - "additionalProperties": false - }, - "AnonCredsProposeCredentialFormat": { - "description": "This defines the module payload for calling CredentialsApi.createProposal\nor CredentialsApi.negotiateOffer", - "properties": { - "schemaIssuerId": { - "type": "string" - }, - "schemaId": { - "type": "string" - }, - "schemaName": { - "type": "string" - }, - "schemaVersion": { - "type": "string" - }, - "credentialDefinitionId": { - "type": "string" - }, - "issuerId": { - "type": "string" - }, - "attributes": { - "items": { - "$ref": "#/components/schemas/CredentialPreviewAttributeOptions" - }, - "type": "array" - }, - "linkedAttachments": { - "items": { - "$ref": "#/components/schemas/LinkedAttachment" - }, - "type": "array" - }, - "schemaIssuerDid": { - "type": "string" - }, - "issuerDid": { - "type": "string" - } - }, - "type": "object", - "additionalProperties": false - }, - "CredentialFormatPayload_CredentialFormatType-Array.createProposal_": { - "properties": { - "indy": { - "$ref": "#/components/schemas/LegacyIndyProposeCredentialFormat" - }, - "jsonld": { - "$ref": "#/components/schemas/JsonLdCredentialDetailFormat" - }, - "anoncreds": { - "$ref": "#/components/schemas/AnonCredsProposeCredentialFormat" - } - }, - "type": "object", - "description": "Get the payload for a specific method from a list of CredentialFormat interfaces and a method" - }, - "AutoAcceptCredential": { - "description": "Typing of the state for auto acceptance", - "enum": [ - "always", - "contentApproved", - "never" - ], - "type": "string" - }, - "ProposeCredentialOptions": { - "properties": { - "protocolVersion": { - "$ref": "#/components/schemas/ProtocolVersion" - }, - "credentialFormats": { - "$ref": "#/components/schemas/CredentialFormatPayload_CredentialFormatType-Array.createProposal_" - }, - "autoAcceptCredential": { - "$ref": "#/components/schemas/AutoAcceptCredential" - }, - "comment": { - "type": "string" - }, - "connectionId": { - "$ref": "#/components/schemas/RecordId" - } - }, - "required": [ - "protocolVersion", - "credentialFormats", - "connectionId" - ], - "type": "object", - "additionalProperties": false - }, - "AnonCredsAcceptProposalFormat": { - "description": "This defines the module payload for calling CredentialsApi.acceptProposal", - "properties": { - "credentialDefinitionId": { - "type": "string" - }, - "revocationRegistryDefinitionId": { - "type": "string" - }, - "revocationRegistryIndex": { - "type": "number", - "format": "double" - }, - "attributes": { - "items": { - "$ref": "#/components/schemas/CredentialPreviewAttributeOptions" - }, - "type": "array" - }, - "linkedAttachments": { - "items": { - "$ref": "#/components/schemas/LinkedAttachment" - }, - "type": "array" - } - }, - "type": "object", - "additionalProperties": false - }, - "Record_string.never_": { - "properties": {}, - "type": "object", - "description": "Construct a type with a set of properties K of type T" - }, - "EmptyObject": { - "$ref": "#/components/schemas/Record_string.never_" - }, - "CredentialFormatPayload_CredentialFormats.acceptProposal_": { - "properties": { - "indy": { - "$ref": "#/components/schemas/AnonCredsAcceptProposalFormat" - }, - "jsonld": { - "$ref": "#/components/schemas/EmptyObject" - }, - "anoncreds": { - "$ref": "#/components/schemas/AnonCredsAcceptProposalFormat" - } - }, - "type": "object", - "description": "Get the payload for a specific method from a list of CredentialFormat interfaces and a method" - }, - "AcceptCredentialProposalOptions": { - "properties": { - "credentialRecordId": { - "type": "string" - }, - "credentialFormats": { - "$ref": "#/components/schemas/CredentialFormatPayload_CredentialFormats.acceptProposal_" - }, - "autoAcceptCredential": { - "$ref": "#/components/schemas/AutoAcceptCredential" - }, - "comment": { - "type": "string" - } - }, - "required": [ - "credentialRecordId" - ], - "type": "object", - "additionalProperties": false - }, - "AnonCredsOfferCredentialFormat": { - "description": "This defines the module payload for calling CredentialsApi.offerCredential\nor CredentialsApi.negotiateProposal", - "properties": { - "credentialDefinitionId": { - "type": "string" - }, - "revocationRegistryDefinitionId": { - "type": "string" - }, - "revocationRegistryIndex": { - "type": "number", - "format": "double" - }, - "attributes": { - "items": { - "$ref": "#/components/schemas/CredentialPreviewAttributeOptions" - }, - "type": "array" - }, - "linkedAttachments": { - "items": { - "$ref": "#/components/schemas/LinkedAttachment" - }, - "type": "array" - } - }, - "required": [ - "credentialDefinitionId", - "attributes" - ], - "type": "object", - "additionalProperties": false - }, - "CredentialFormatPayload_CredentialFormats.createOffer_": { - "properties": { - "indy": { - "$ref": "#/components/schemas/AnonCredsOfferCredentialFormat" - }, - "jsonld": { - "$ref": "#/components/schemas/JsonLdCredentialDetailFormat" - }, - "anoncreds": { - "$ref": "#/components/schemas/AnonCredsOfferCredentialFormat" - } - }, - "type": "object", - "description": "Get the payload for a specific method from a list of CredentialFormat interfaces and a method" - }, - "CreateOfferOptions": { - "properties": { - "protocolVersion": { - "$ref": "#/components/schemas/ProtocolVersion" - }, - "connectionId": { - "$ref": "#/components/schemas/RecordId" - }, - "credentialFormats": { - "$ref": "#/components/schemas/CredentialFormatPayload_CredentialFormats.createOffer_" - }, - "autoAcceptCredential": { - "$ref": "#/components/schemas/AutoAcceptCredential" - }, - "comment": { - "type": "string" - }, - "goalCode": { - "type": "string" - }, - "goal": { - "type": "string" - } - }, - "required": [ - "protocolVersion", - "connectionId", - "credentialFormats" - ], - "type": "object", - "additionalProperties": false - }, - "CredentialFormatPayload_CredentialFormatType-Array.createOffer_": { - "properties": { - "indy": { - "$ref": "#/components/schemas/AnonCredsOfferCredentialFormat" - }, - "jsonld": { - "$ref": "#/components/schemas/JsonLdCredentialDetailFormat" - }, - "anoncreds": { - "$ref": "#/components/schemas/AnonCredsOfferCredentialFormat" - } - }, - "type": "object", - "description": "Get the payload for a specific method from a list of CredentialFormat interfaces and a method" - }, - "CreateOfferOobOptions": { - "properties": { - "protocolVersion": { - "type": "string" - }, - "credentialFormats": { - "$ref": "#/components/schemas/CredentialFormatPayload_CredentialFormatType-Array.createOffer_" - }, - "autoAcceptCredential": { - "$ref": "#/components/schemas/AutoAcceptCredential" - }, - "comment": { - "type": "string" - }, - "goalCode": { - "type": "string" - }, - "parentThreadId": { - "type": "string" - }, - "willConfirm": { - "type": "boolean" - }, - "label": { - "type": "string" - }, - "imageUrl": { - "type": "string" - }, - "recipientKey": { - "type": "string" - }, - "invitationDid": { - "type": "string" - } - }, - "required": [ - "protocolVersion", - "credentialFormats" - ], - "type": "object", - "additionalProperties": false - }, - "AnonCredsAcceptOfferFormat": { - "description": "This defines the module payload for calling CredentialsApi.acceptOffer. No options are available for this\nmethod, so it's an empty object", - "properties": { - "linkSecretId": { - "type": "string" - } - }, - "type": "object", - "additionalProperties": false - }, - "CredentialFormatPayload_CredentialFormats.acceptOffer_": { - "properties": { - "indy": { - "$ref": "#/components/schemas/AnonCredsAcceptOfferFormat" - }, - "jsonld": { - "$ref": "#/components/schemas/EmptyObject" - }, - "anoncreds": { - "$ref": "#/components/schemas/AnonCredsAcceptOfferFormat" - } - }, - "type": "object", - "description": "Get the payload for a specific method from a list of CredentialFormat interfaces and a method" - }, - "CredentialOfferOptions": { - "properties": { - "credentialRecordId": { - "$ref": "#/components/schemas/RecordId" - }, - "credentialFormats": { - "$ref": "#/components/schemas/CredentialFormatPayload_CredentialFormats.acceptOffer_" - }, - "autoAcceptCredential": { - "$ref": "#/components/schemas/AutoAcceptCredential" - }, - "comment": { - "type": "string" - } - }, - "required": [ - "credentialRecordId" - ], - "type": "object", - "additionalProperties": false - }, - "AnonCredsAcceptRequestFormat": { - "$ref": "#/components/schemas/Record_string.never_", - "description": "This defines the module payload for calling CredentialsApi.acceptRequest. No options are available for this\nmethod, so it's an empty object" - }, - "JsonLdAcceptRequestFormat": { - "description": "Format for accepting a jsonld credential request. Optionally allows the verification\nmethod to use to sign the credential.", - "properties": { - "verificationMethod": { - "type": "string" - } - }, - "type": "object", - "additionalProperties": false - }, - "CredentialFormatPayload_CredentialFormats.acceptRequest_": { - "properties": { - "indy": { - "$ref": "#/components/schemas/AnonCredsAcceptRequestFormat" - }, - "jsonld": { - "$ref": "#/components/schemas/JsonLdAcceptRequestFormat" - }, - "anoncreds": { - "$ref": "#/components/schemas/AnonCredsAcceptRequestFormat" - } - }, - "type": "object", - "description": "Get the payload for a specific method from a list of CredentialFormat interfaces and a method" - }, - "AcceptCredentialRequestOptions": { - "properties": { - "credentialRecordId": { - "$ref": "#/components/schemas/RecordId" - }, - "credentialFormats": { - "$ref": "#/components/schemas/CredentialFormatPayload_CredentialFormats.acceptRequest_" - }, - "autoAcceptCredential": { - "$ref": "#/components/schemas/AutoAcceptCredential" - }, - "comment": { - "type": "string" - } - }, - "required": [ - "credentialRecordId" - ], - "type": "object", - "additionalProperties": false - }, - "AcceptCredential": { - "properties": { - "credentialRecordId": { - "$ref": "#/components/schemas/RecordId" - } - }, - "required": [ - "credentialRecordId" - ], - "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." - }, - "DidExchangeState": { - "description": "Connection states as defined in RFC 0023.", - "enum": [ - "start", - "invitation-sent", - "invitation-received", - "request-sent", - "request-received", - "response-sent", - "response-received", - "abandoned", - "completed" - ], - "type": "string" - }, - "ConnectionRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "BasicMessageRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "Record_content.string_": { - "properties": { - "content": { - "type": "string" - } - }, - "required": [ - "content" - ], - "type": "object", - "description": "Construct a type with a set of properties K of type T" - }, - "Pick_InitConfig.label_": { - "properties": { - "label": { - "type": "string", - "description": "Agent public endpoints, sorted by priority (higher priority first)" - } - }, - "required": [ - "label" - ], - "type": "object", - "description": "From T, pick a set of properties whose keys are in the union K" - }, - "KeyDerivationMethod": { - "enum": [ - "ARGON2I_MOD", - "ARGON2I_INT", - "RAW" - ], - "type": "string" - }, - "Pick_WalletConfig.id-or-key-or-keyDerivationMethod_": { - "properties": { - "key": { - "type": "string" - }, - "id": { - "type": "string" - }, - "keyDerivationMethod": { - "$ref": "#/components/schemas/KeyDerivationMethod" - } - }, - "required": [ - "key", - "id" - ], - "type": "object", - "description": "From T, pick a set of properties whose keys are in the union K" - }, - "TenantConfig": { - "allOf": [ - { - "$ref": "#/components/schemas/Pick_InitConfig.label_" - }, - { - "properties": { - "walletConfig": { - "$ref": "#/components/schemas/Pick_WalletConfig.id-or-key-or-keyDerivationMethod_" - } - }, - "required": [ - "walletConfig" - ], - "type": "object" - } - ] - }, - "MetadataValue": { - "$ref": "#/components/schemas/Record_string.any_" - }, - "MetadataBase": { - "properties": {}, - "additionalProperties": { - "$ref": "#/components/schemas/MetadataValue" - }, - "type": "object" - }, - "Metadata____": { - "description": "Metadata access class to get, set (create and update), add (append to a record) and delete metadata on any record.\n\nset will override the previous value if it already exists\n\nnote: To add persistence to these records, you have to update the record in the correct repository", - "properties": { - "data": { - "$ref": "#/components/schemas/MetadataBase" - } - }, - "required": [ - "data" - ], - "type": "object", - "additionalProperties": false - }, - "Pick_CustomTenantConfig.Exclude_keyofCustomTenantConfig.walletConfig__": { - "properties": { - "label": { - "type": "string", - "description": "Agent public endpoints, sorted by priority (higher priority first)" - }, - "connectionImageUrl": { - "type": "string" - } - }, - "required": [ - "label" - ], - "type": "object", - "description": "From T, pick a set of properties whose keys are in the union K" - }, - "Omit_CustomTenantConfig.walletConfig_": { - "$ref": "#/components/schemas/Pick_CustomTenantConfig.Exclude_keyofCustomTenantConfig.walletConfig__", - "description": "Construct a type with the properties of T except for those in type K." - }, - "CreateTenantOptions": { - "properties": { - "config": { - "$ref": "#/components/schemas/Omit_CustomTenantConfig.walletConfig_" - } - }, - "required": [ - "config" - ], - "type": "object", - "additionalProperties": false - }, - "OpenId4VcIssuanceSessionRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "DisclosureFrame": { - "properties": { - "_sd": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object", - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/components/schemas/DisclosureFrame" - }, - { - "items": { - "type": "string" - }, - "type": "array" - } - ] - } - }, - "OpenId4VciCredentialFormatProfile": { - "enum": [ - "jwt_vc_json", - "jwt_vc_json-ld", - "ldp_vc", - "vc+sd-jwt", - "mso_mdoc" - ], - "type": "string" - }, - "SignerMethod": { - "enum": [ - "did", - "x5c" - ], - "type": "string" - }, - "OpenId4VciOfferSdJwtCredential": { - "properties": { - "credentialSupportedId": { - "type": "string" - }, - "format": { - "$ref": "#/components/schemas/OpenId4VciCredentialFormatProfile" - }, - "signerOptions": { - "properties": { - "x5c": { - "items": { - "type": "string" - }, - "type": "array" - }, - "did": { - "type": "string" - }, - "method": { - "$ref": "#/components/schemas/SignerMethod" - } - }, - "required": [ - "method" - ], - "type": "object" - }, - "payload": { - "properties": { - "vct": { - "type": "string" - } - }, - "additionalProperties": {}, - "type": "object" - }, - "disclosureFrame": { - "$ref": "#/components/schemas/DisclosureFrame" - } - }, - "required": [ - "credentialSupportedId", - "format", - "signerOptions", - "payload" - ], - "type": "object", - "additionalProperties": false - }, - "Partial_ValidityInfo_": { - "properties": { - "signed": { - "type": "string", - "format": "date-time" - }, - "validFrom": { - "type": "string", - "format": "date-time" - }, - "validUntil": { - "type": "string", - "format": "date-time" - }, - "expectedUpdate": { - "type": "string", - "format": "date-time" - } - }, - "type": "object", - "description": "Make all properties in T optional" - }, - "Record_string.Record_string.unknown__": { - "properties": {}, - "additionalProperties": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "type": "object", - "description": "Construct a type with a set of properties K of type T" - }, - "MdocNameSpaces": { - "$ref": "#/components/schemas/Record_string.Record_string.unknown__" - }, - "OpenId4VciOfferMdocCredential": { - "properties": { - "credentialSupportedId": { - "type": "string" - }, - "format": { - "$ref": "#/components/schemas/OpenId4VciCredentialFormatProfile" - }, - "signerOptions": { - "properties": { - "x5c": { - "items": { - "type": "string" - }, - "type": "array" - }, - "did": { - "type": "string" - }, - "method": { - "$ref": "#/components/schemas/SignerMethod" - } - }, - "required": [ - "method" - ], - "type": "object" - }, - "payload": { - "properties": { - "namespaces": { - "$ref": "#/components/schemas/MdocNameSpaces" - }, - "validityInfo": { - "$ref": "#/components/schemas/Partial_ValidityInfo_" - }, - "docType": { - "anyOf": [ - { - "allOf": [ - { - "type": "string" - }, - { - "properties": {}, - "type": "object" - } - ] - }, - { - "type": "string", - "enum": [ - "org.iso.18013.5.1.mDL" - ] - } - ] - } - }, - "required": [ - "namespaces", - "docType" - ], - "type": "object" - } - }, - "required": [ - "credentialSupportedId", - "format", - "signerOptions", - "payload" - ], - "type": "object", - "additionalProperties": false - }, - "OpenId4VciOfferW3cCredential": { - "properties": { - "credentialSupportedId": { - "type": "string" - }, - "format": { - "$ref": "#/components/schemas/OpenId4VciCredentialFormatProfile" - }, - "signerOptions": { - "properties": { - "x5c": { - "items": { - "type": "string" - }, - "type": "array" - }, - "did": { - "type": "string" - }, - "method": { - "$ref": "#/components/schemas/SignerMethod" - } - }, - "required": [ - "method" - ], - "type": "object" - }, - "payload": { - "properties": { - "credential": { - "$ref": "#/components/schemas/W3cCredential" - }, - "verificationMethod": { - "type": "string" - } - }, - "required": [ - "credential", - "verificationMethod" - ], - "type": "object" - } - }, - "required": [ - "credentialSupportedId", - "format", - "signerOptions", - "payload" - ], - "type": "object", - "additionalProperties": false - }, - "OpenId4VcIssuanceSessionsCreateOffer": { - "properties": { - "publicIssuerId": { - "type": "string" - }, - "credentials": { - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenId4VciOfferSdJwtCredential" - }, - { - "$ref": "#/components/schemas/OpenId4VciOfferMdocCredential" - }, - { - "$ref": "#/components/schemas/OpenId4VciOfferW3cCredential" - } - ] - }, - "type": "array" - }, - "authorizationCodeFlowConfig": { - "properties": { - "issuerState": { - "type": "string" - }, - "requirePresentationDuringIssuance": { - "type": "boolean" - }, - "authorizationServerUrl": { - "type": "string" - } - }, - "required": [ - "authorizationServerUrl" - ], - "type": "object" - }, - "preAuthorizedCodeFlowConfig": { - "properties": { - "authorizationServerUrl": { - "type": "string" - }, - "txCode": { - "properties": { - "input_mode": { - "type": "string", - "enum": [ - "numeric", - "text" - ] - }, - "length": { - "type": "number", - "format": "double" - }, - "description": { - "type": "string" - } - }, - "type": "object" - }, - "preAuthorizedCode": { - "type": "string" - } - }, - "required": [ - "authorizationServerUrl" - ], - "type": "object" - }, - "issuanceMetadata": { - "$ref": "#/components/schemas/Record_string.unknown_" - } - }, - "required": [ - "publicIssuerId", - "credentials" - ], - "type": "object", - "additionalProperties": false - }, - "OpenId4VcIssuanceSessionState": { - "enum": [ - "OfferCreated", - "OfferUriRetrieved", - "AuthorizationInitiated", - "AuthorizationGranted", - "AccessTokenRequested", - "AccessTokenCreated", - "CredentialRequestReceived", - "CredentialsPartiallyIssued", - "Completed", - "Error" - ], - "type": "string" - }, - "OpenId4VcIssuerRecord": { - "$ref": "#/components/schemas/Record_string.unknown_", - "description": "For OID4VC you need to expose metadata files. Each issuer needs to host this metadata. This is not the case for DIDComm where we can just have one /didcomm endpoint.\nSo we create a record per openid issuer/verifier that you want, and each tenant can create multiple issuers/verifiers which have different endpoints\nand metadata files" - }, - "Logo": { - "properties": { - "uri": { - "type": "string" - }, - "alt_text": { - "type": "string" - } - }, - "type": "object", - "additionalProperties": {} - }, - "CredentialDisplay": { - "properties": { - "name": { - "type": "string" - }, - "locale": { - "type": "string" - }, - "logo": { - "$ref": "#/components/schemas/Logo" - } - }, - "type": "object", - "additionalProperties": {} - }, - "AuthorizationServerClientAuth": { - "properties": { - "clientId": { - "type": "string" - }, - "clientSecret": { - "type": "string" - } - }, - "required": [ - "clientId", - "clientSecret" - ], - "type": "object", - "additionalProperties": false - }, - "AuthorizationServerConfig": { - "properties": { - "issuer": { - "type": "string" - }, - "clientAuthentication": { - "$ref": "#/components/schemas/AuthorizationServerClientAuth" - } - }, - "required": [ - "issuer" - ], - "type": "object", - "additionalProperties": false - }, - "ProofTypeConfig": { - "properties": { - "proof_signing_alg_values_supported": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "proof_signing_alg_values_supported" - ], - "type": "object", - "additionalProperties": false - }, - "Record_string.ProofTypeConfig_": { - "properties": {}, - "additionalProperties": { - "$ref": "#/components/schemas/ProofTypeConfig" - }, - "type": "object", - "description": "Construct a type with a set of properties K of type T" - }, - "CredentialDefinition": { - "properties": { - "type": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "type" - ], - "type": "object", - "additionalProperties": {} - }, - "CredentialConfigurationDisplay": { - "properties": { - "name": { - "type": "string" - }, - "locale": { - "type": "string" - }, - "logo": { - "$ref": "#/components/schemas/Logo" - }, - "description": { - "type": "string" - }, - "background_color": { - "type": "string" - }, - "background_image": { - "$ref": "#/components/schemas/Logo" - }, - "text_color": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object", - "additionalProperties": false - }, - "CredentialConfigurationSupportedWithFormats": { - "properties": { - "format": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "vc+sd-jwt", - "mso_mdoc", - "jwt_vc_json" - ] - } - ] - }, - "vct": { - "type": "string" - }, - "doctype": { - "type": "string" - }, - "scope": { - "type": "string" - }, - "claims": {}, - "cryptographic_binding_methods_supported": { - "items": { - "type": "string" - }, - "type": "array" - }, - "credential_signing_alg_values_supported": { - "items": { - "type": "string" - }, - "type": "array" - }, - "proof_types_supported": { - "$ref": "#/components/schemas/Record_string.ProofTypeConfig_" - }, - "credential_definition": { - "$ref": "#/components/schemas/CredentialDefinition" - }, - "display": { - "items": { - "$ref": "#/components/schemas/CredentialConfigurationDisplay" - }, - "type": "array" - } - }, - "required": [ - "format" - ], - "type": "object", - "additionalProperties": false - }, - "Record_string.CredentialConfigurationSupportedWithFormats_": { - "properties": {}, - "additionalProperties": { - "$ref": "#/components/schemas/CredentialConfigurationSupportedWithFormats" - }, - "type": "object", - "description": "Construct a type with a set of properties K of type T" - }, - "BatchCredentialIssuanceOptions": { - "properties": { - "batchSize": { - "type": "number", - "format": "double" - } - }, - "required": [ - "batchSize" - ], - "type": "object", - "additionalProperties": false - }, - "CreateIssuerOptions": { - "properties": { - "issuerId": { - "type": "string" - }, - "accessTokenSignerKeyType": { - "type": "string" - }, - "display": { - "items": { - "$ref": "#/components/schemas/CredentialDisplay" - }, - "type": "array" - }, - "authorizationServerConfigs": { - "items": { - "$ref": "#/components/schemas/AuthorizationServerConfig" - }, - "type": "array" - }, - "dpopSigningAlgValuesSupported": { - "items": { - "type": "string" - }, - "type": "array" - }, - "credentialConfigurationsSupported": { - "$ref": "#/components/schemas/Record_string.CredentialConfigurationSupportedWithFormats_" - }, - "batchCredentialIssuance": { - "$ref": "#/components/schemas/BatchCredentialIssuanceOptions" - } - }, - "required": [ - "credentialConfigurationsSupported" - ], - "type": "object", - "additionalProperties": false - }, - "UpdateIssuerRecordOptions": { - "properties": { - "display": { - "items": { - "$ref": "#/components/schemas/CredentialDisplay" - }, - "type": "array" - }, - "dpopSigningAlgValuesSupported": { - "items": { - "type": "string" - }, - "type": "array" - }, - "credentialConfigurationsSupported": { - "$ref": "#/components/schemas/Record_string.CredentialConfigurationSupportedWithFormats_" - }, - "batchCredentialIssuance": { - "$ref": "#/components/schemas/BatchCredentialIssuanceOptions" - } - }, - "required": [ - "credentialConfigurationsSupported" - ], - "type": "object", - "additionalProperties": false - }, - "JwtObject": { - "properties": { - "alg": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "alg" - ], - "type": "object", - "additionalProperties": false - }, - "LdpObject": { - "properties": { - "proof_type": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "proof_type" - ], - "type": "object", - "additionalProperties": false - }, - "DiObject": { - "properties": { - "proof_type": { - "items": { - "type": "string" - }, - "type": "array" - }, - "cryptosuite": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "proof_type", - "cryptosuite" - ], - "type": "object", - "additionalProperties": false - }, - "SdJwtObject": { - "properties": { - "undefined": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object", - "additionalProperties": false - }, - "MsoMdocObject": { - "properties": { - "alg": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "alg" - ], - "type": "object", - "additionalProperties": false - }, - "Format": { - "properties": { - "jwt": { - "$ref": "#/components/schemas/JwtObject" - }, - "jwt_vc": { - "$ref": "#/components/schemas/JwtObject" - }, - "jwt_vc_json": { - "$ref": "#/components/schemas/JwtObject" - }, - "jwt_vp": { - "$ref": "#/components/schemas/JwtObject" - }, - "jwt_vp_json": { - "$ref": "#/components/schemas/JwtObject" - }, - "ldp": { - "$ref": "#/components/schemas/LdpObject" - }, - "ldp_vc": { - "$ref": "#/components/schemas/LdpObject" - }, - "ldp_vp": { - "$ref": "#/components/schemas/LdpObject" - }, - "di": { - "$ref": "#/components/schemas/DiObject" - }, - "di_vc": { - "$ref": "#/components/schemas/DiObject" - }, - "di_vp": { - "$ref": "#/components/schemas/DiObject" - }, - "undefined": { - "$ref": "#/components/schemas/SdJwtObject" - }, - "mso_mdoc": { - "$ref": "#/components/schemas/MsoMdocObject" - } - }, - "type": "object", - "additionalProperties": false - }, - "Issuance": { - "properties": { - "manifest": { - "type": "string" - } - }, - "type": "object", - "additionalProperties": {} - }, - "Optionality": { - "type": "string", - "enum": [ - "required", - "preferred" - ] - }, - "Directives": { - "type": "string", - "enum": [ - "required", - "allowed", - "disallowed" - ] - }, - "PdStatus": { - "properties": { - "directive": { - "$ref": "#/components/schemas/Directives" - } - }, - "type": "object", - "additionalProperties": false - }, - "Statuses": { - "properties": { - "active": { - "$ref": "#/components/schemas/PdStatus" - }, - "suspended": { - "$ref": "#/components/schemas/PdStatus" - }, - "revoked": { - "$ref": "#/components/schemas/PdStatus" - } - }, - "type": "object", - "additionalProperties": false - }, - "OneOfNumberStringBoolean": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "number", - "format": "double" - }, - { - "type": "string" - } - ] - }, - "OneOfNumberString": { - "anyOf": [ - { - "type": "number", - "format": "double" - }, - { - "type": "string" - } - ] - }, - "FilterV2": { - "properties": { - "const": { - "$ref": "#/components/schemas/OneOfNumberStringBoolean" - }, - "enum": { - "items": { - "$ref": "#/components/schemas/OneOfNumberStringBoolean" - }, - "type": "array" - }, - "exclusiveMinimum": { - "$ref": "#/components/schemas/OneOfNumberString" - }, - "exclusiveMaximum": { - "$ref": "#/components/schemas/OneOfNumberString" - }, - "format": { - "type": "string" - }, - "formatMaximum": { - "type": "string" - }, - "formatMinimum": { - "type": "string" - }, - "formatExclusiveMaximum": { - "type": "string" - }, - "formatExclusiveMinimum": { - "type": "string" - }, - "minLength": { - "type": "number", - "format": "double" - }, - "maxLength": { - "type": "number", - "format": "double" - }, - "minimum": { - "$ref": "#/components/schemas/OneOfNumberString" - }, - "maximum": { - "$ref": "#/components/schemas/OneOfNumberString" - }, - "not": { - "additionalProperties": false, - "type": "object" - }, - "pattern": { - "type": "string" - }, - "type": { - "type": "string" - }, - "contains": { - "$ref": "#/components/schemas/FilterV2" - }, - "items": { - "$ref": "#/components/schemas/FilterV2Items" - } - }, - "type": "object", - "additionalProperties": false - }, - "FilterV2Items": { - "properties": { - "const": { - "$ref": "#/components/schemas/OneOfNumberStringBoolean" - }, - "enum": { - "items": { - "$ref": "#/components/schemas/OneOfNumberStringBoolean" - }, - "type": "array" - }, - "exclusiveMinimum": { - "$ref": "#/components/schemas/OneOfNumberString" - }, - "exclusiveMaximum": { - "$ref": "#/components/schemas/OneOfNumberString" - }, - "format": { - "type": "string" - }, - "formatMaximum": { - "type": "string" - }, - "formatMinimum": { - "type": "string" - }, - "formatExclusiveMaximum": { - "type": "string" - }, - "formatExclusiveMinimum": { - "type": "string" - }, - "minLength": { - "type": "number", - "format": "double" - }, - "maxLength": { - "type": "number", - "format": "double" - }, - "minimum": { - "$ref": "#/components/schemas/OneOfNumberString" - }, - "maximum": { - "$ref": "#/components/schemas/OneOfNumberString" - }, - "not": { - "additionalProperties": false, - "type": "object" - }, - "pattern": { - "type": "string" - }, - "type": { - "type": "string" - }, - "contains": { - "$ref": "#/components/schemas/FilterV2" - }, - "items": { - "$ref": "#/components/schemas/FilterV2Items" - } - }, - "type": "object", - "additionalProperties": false - }, - "FieldV2": { - "properties": { - "id": { - "type": "string" - }, - "path": { - "items": { - "type": "string" - }, - "type": "array" - }, - "purpose": { - "type": "string" - }, - "filter": { - "$ref": "#/components/schemas/FilterV2" - }, - "predicate": { - "$ref": "#/components/schemas/Optionality" - }, - "intent_to_retain": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "optional": { - "type": "boolean" - } - }, - "required": [ - "path" - ], - "type": "object", - "additionalProperties": false - }, - "HolderSubject": { - "properties": { - "field_id": { - "items": { - "type": "string" - }, - "type": "array" - }, - "directive": { - "$ref": "#/components/schemas/Optionality" - } - }, - "required": [ - "field_id", - "directive" - ], - "type": "object", - "additionalProperties": false - }, - "ConstraintsV2": { - "properties": { - "limit_disclosure": { - "$ref": "#/components/schemas/Optionality" - }, - "statuses": { - "$ref": "#/components/schemas/Statuses" - }, - "fields": { - "items": { - "$ref": "#/components/schemas/FieldV2" - }, - "type": "array" - }, - "subject_is_issuer": { - "$ref": "#/components/schemas/Optionality" - }, - "is_holder": { - "items": { - "$ref": "#/components/schemas/HolderSubject" - }, - "type": "array" - }, - "same_subject": { - "items": { - "$ref": "#/components/schemas/HolderSubject" - }, - "type": "array" - } - }, - "type": "object", - "additionalProperties": false - }, - "InputDescriptorV2Model": { - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "purpose": { - "type": "string" - }, - "format": { - "$ref": "#/components/schemas/Format" - }, - "group": { - "items": { - "type": "string" - }, - "type": "array" - }, - "issuance": { - "items": { - "$ref": "#/components/schemas/Issuance" - }, - "type": "array" - }, - "constraints": { - "$ref": "#/components/schemas/ConstraintsV2" - } - }, - "required": [ - "id", - "constraints" - ], - "type": "object", - "additionalProperties": false - }, - "Rules": { - "type": "string", - "enum": [ - "all", - "pick" - ] - }, - "SubmissionRequirement": { - "properties": { - "name": { - "type": "string" - }, - "purpose": { - "type": "string" - }, - "rule": { - "$ref": "#/components/schemas/Rules" - }, - "count": { - "type": "number", - "format": "double" - }, - "min": { - "type": "number", - "format": "double" - }, - "max": { - "type": "number", - "format": "double" - }, - "from": { - "type": "string" - }, - "from_nested": { - "items": { - "$ref": "#/components/schemas/SubmissionRequirement" - }, - "type": "array" - } - }, - "required": [ - "rule" - ], - "type": "object", - "additionalProperties": false - }, - "InputDescriptorV2": { - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "purpose": { - "type": "string" - }, - "format": { - "$ref": "#/components/schemas/Format" - }, - "group": { - "items": { - "type": "string" - }, - "type": "array" - }, - "issuance": { - "items": { - "$ref": "#/components/schemas/Issuance" - }, - "type": "array" - }, - "constraints": { - "$ref": "#/components/schemas/ConstraintsV2" - } - }, - "required": [ - "id", - "constraints" - ], - "type": "object", - "additionalProperties": false - }, - "PresentationDefinitionV2": { - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "purpose": { - "type": "string" - }, - "format": { - "$ref": "#/components/schemas/Format" - }, - "submission_requirements": { - "items": { - "$ref": "#/components/schemas/SubmissionRequirement" - }, - "type": "array" - }, - "input_descriptors": { - "items": { - "$ref": "#/components/schemas/InputDescriptorV2" - }, - "type": "array" - }, - "frame": { - "additionalProperties": false, - "type": "object" - } - }, - "required": [ - "id", - "input_descriptors" - ], - "type": "object", - "additionalProperties": false - }, - "DifPresentationExchangeDefinitionV2Model": { - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "purpose": { - "type": "string" - }, - "format": { - "$ref": "#/components/schemas/Format" - }, - "submission_requirements": { - "items": {}, - "type": "array" - }, - "input_descriptors": { - "items": { - "$ref": "#/components/schemas/InputDescriptorV2Model" - }, - "type": "array" - }, - "frame": { - "additionalProperties": false, - "type": "object" - } - }, - "required": [ - "id", - "input_descriptors" - ], - "type": "object", - "additionalProperties": false - }, - "PresentationDefinition": { - "properties": { - "definition": { - "$ref": "#/components/schemas/DifPresentationExchangeDefinitionV2Model" - } - }, - "required": [ - "definition" - ], - "type": "object", - "additionalProperties": false - }, - "DcqlDefinition": { - "properties": { - "query": {} - }, - "required": [ - "query" - ], - "type": "object", - "additionalProperties": false - }, - "ResponseModeEnum": { - "enum": [ - "direct_post", - "direct_post.jwt", - "dc_api", - "dc_api.jwt" - ], - "type": "string" - }, - "OpenId4VcJwtIssuerDid": { - "properties": { - "didUrl": { - "type": "string" - }, - "method": { - "type": "string", - "enum": [ - "did" - ], - "nullable": false - } - }, - "required": [ - "didUrl", - "method" - ], - "type": "object" - }, - "OpenId4VcIssuerX5c": { - "properties": { - "alg": { - "type": "string" - }, - "x5c": { - "items": { - "type": "string" - }, - "type": "array" - }, - "issuer": { - "type": "string" - }, - "method": { - "type": "string", - "enum": [ - "x5c" - ], - "nullable": false - } - }, - "required": [ - "x5c", - "method" - ], - "type": "object" - }, - "CreateAuthorizationRequest": { - "properties": { - "verifierId": { - "type": "string" - }, - "presentationExchange": { - "$ref": "#/components/schemas/PresentationDefinition" - }, - "dcql": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/DcqlDefinition" - } - ] - }, - "responseMode": { - "$ref": "#/components/schemas/ResponseModeEnum" - }, - "requestSigner": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenId4VcJwtIssuerDid" - }, - { - "$ref": "#/components/schemas/OpenId4VcIssuerX5c" - } - ] - }, - "expectedOrigins": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "verifierId", - "requestSigner" - ], - "type": "object", - "additionalProperties": false - }, - "OpenId4VcVerificationSessionRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "OpenId4VcVerificationSessionState": { - "enum": [ - "RequestCreated", - "RequestUriRetrieved", - "ResponseVerified", - "Error" - ], - "type": "string" - }, - "SdJwtVcRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "MdocRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "ResolveCredentialOfferBody": { - "properties": { - "credentialOfferUri": { - "type": "string" - } - }, - "required": [ - "credentialOfferUri" - ], - "type": "object", - "additionalProperties": false - }, - "AuthorizeRequestCredentialOffer": { - "properties": { - "credentialOfferUri": { - "type": "string" - }, - "credentialsToRequest": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "credentialOfferUri", - "credentialsToRequest" - ], - "type": "object", - "additionalProperties": false - }, - "RequestCredentialBody": { - "properties": { - "credentialOfferUri": { - "type": "string" - }, - "credentialsToRequest": { - "items": { - "type": "string" - }, - "type": "array" - }, - "authorizationCode": { - "type": "string" - }, - "codeVerifier": { - "type": "string" - }, - "txCode": { - "type": "string" - } - }, - "required": [ - "credentialOfferUri", - "credentialsToRequest" - ], - "type": "object", - "additionalProperties": false - }, - "ResolveProofRequest": { - "properties": { - "proofRequestUri": { - "type": "string" - } - }, - "required": [ - "proofRequestUri" - ], - "type": "object", - "additionalProperties": false - }, - "OpenId4VcVerifierRecord": { - "$ref": "#/components/schemas/Record_string.unknown_", - "description": "For OID4VC you need to expos metadata files. Each issuer needs to host this metadata. This is not the case for DIDComm where we can just have one /didcomm endpoint.\nSo we create a record per openid issuer/verifier that you want, and each tenant can create multiple issuers/verifiers which have different endpoints\nand metadata files" - }, - "OpenId4VcSiopVerifierClientMetadata": { - "properties": { - "client_name": { - "type": "string" - }, - "logo_uri": { - "type": "string" - } - }, - "type": "object", - "additionalProperties": false - }, - "OpenId4VcSiopCreateVerifierOptions": { - "properties": { - "verifierId": { - "type": "string" - }, - "clientMetadata": { - "$ref": "#/components/schemas/OpenId4VcSiopVerifierClientMetadata" - } - }, - "type": "object", - "additionalProperties": false - }, - "OpenId4VcUpdateVerifierRecordOptions": { - "properties": { - "verifierId": { - "type": "string" - }, - "clientMetadata": { - "$ref": "#/components/schemas/OpenId4VcSiopVerifierClientMetadata" - } - }, - "type": "object", - "additionalProperties": false - } - }, - "securitySchemes": { - "apiKey": { - "type": "apiKey", - "name": "Authorization", - "in": "header" - }, - "jwt": { - "type": "http", - "scheme": "bearer", - "bearerFormat": "JWT" - } - } - }, - "info": { - "title": "credo-controller", - "version": "2.0.0", - "description": "Rest endpoint wrapper for using your agent over HTTP", - "license": { - "name": "Apache-2.0" - }, - "contact": {} - }, - "paths": { - "/x509": { - "post": { - "operationId": "CreateX509Certificate", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "properties": { - "publicCertificateBase64": { - "type": "string" - } - }, - "required": [ - "publicCertificateBase64" - ], - "type": "object" - } - } - } - } - }, - "tags": [ - "x509" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/X509CreateCertificateOptionsDto" - } - } - } - } - } - }, - "/x509/import": { - "post": { - "operationId": "ImportX509Certificates", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "properties": { - "issuerCertficicate": { - "type": "string" - } - }, - "required": [ - "issuerCertficicate" - ], - "type": "object" - } - } - } - } - }, - "tags": [ - "x509" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/X509ImportCertificateOptionsDto" - } - } - } - } - } - }, - "/x509/trusted": { - "post": { - "operationId": "AddTrustedCertificate", - "responses": { - "204": { - "description": "No content" - } - }, - "tags": [ - "x509" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "certificate": { - "type": "string" - } - }, - "required": [ - "certificate" - ], - "type": "object" - } - } - } - } - }, - "get": { - "operationId": "GetTrustedCertificates", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "items": { - "type": "string" - }, - "type": "array" - } - } - } - } - }, - "tags": [ - "x509" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [] - } - }, - "/x509/decode": { - "post": { - "operationId": "DecodeCertificate", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/X509Certificate" - } - } - } - } - }, - "tags": [ - "x509" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "certificate": { - "type": "string" - } - }, - "required": [ - "certificate" - ], - "type": "object" - } - } - } - } - } - }, - "/polygon/create-keys": { - "post": { - "operationId": "CreateKeyPair", - "responses": { - "200": { - "description": "Secp256k1KeyPair", - "content": { - "application/json": { - "schema": { - "properties": { - "address": { - "type": "string" - }, - "publicKeyBase58": { - "type": "string" - }, - "privateKey": { - "type": "string" - } - }, - "required": [ - "address", - "publicKeyBase58", - "privateKey" - ], - "type": "object" - } - } - } - } - }, - "description": "Create Secp256k1 key pair for polygon DID", - "tags": [ - "Polygon" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated", - "Basewallet" - ] - } - ], - "parameters": [] - } - }, - "/polygon/create-schema": { - "post": { - "operationId": "CreateSchema", - "responses": { - "200": { - "description": "Schema JSON", - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "description": "Create polygon based W3C schema", - "tags": [ - "Polygon" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "schema": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "schemaName": { - "type": "string" - }, - "did": { - "type": "string" - } - }, - "required": [ - "schema", - "schemaName", - "did" - ], - "type": "object" - } - } - } - } - } - }, - "/polygon/estimate-transaction": { - "post": { - "operationId": "EstimateTransaction", - "responses": { - "200": { - "description": "Transaction Object", - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "description": "Estimate transaction", - "tags": [ - "Polygon" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated", - "Basewallet" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DidOperationOptions" - } - } - } - } - } - }, - "/polygon/{did}/{schemaId}": { - "get": { - "operationId": "GetSchemaById", - "responses": { - "200": { - "description": "Schema Object", - "content": { - "application/json": { - "schema": {} - } - } - } - }, - "description": "Fetch schema details", - "tags": [ - "Polygon" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "in": "path", - "name": "did", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "schemaId", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/anoncreds/transactions/endorse": { - "post": { - "operationId": "EndorserTransaction", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "properties": { - "signedTransaction": { - "type": "string" - } - }, - "required": [ - "signedTransaction" - ], - "type": "object" - } - } - } - } - }, - "tags": [ - "Anoncreds - EndorserTransaction" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EndorserTransaction" - } - } - } - } - } - }, - "/anoncreds/transactions/set-endorser-role": { - "post": { - "operationId": "DidNymTransaction", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DidCreateResult_DidOperationStateActionBase_" - } - } - } - } - }, - "tags": [ - "Anoncreds - EndorserTransaction" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DidNymTransaction" - } - } - } - } - } - }, - "/anoncreds/transactions/write": { - "post": { - "operationId": "WriteSchemaAndCredDefOnLedger", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/RegisterSchemaReturnStateWait" - }, - { - "$ref": "#/components/schemas/RegisterSchemaReturnStateAction" - }, - { - "$ref": "#/components/schemas/RegisterSchemaReturnStateFinished" - }, - { - "$ref": "#/components/schemas/RegisterSchemaReturnStateFailed" - }, - { - "$ref": "#/components/schemas/RegisterCredentialDefinitionReturnStateWait" - }, - { - "$ref": "#/components/schemas/RegisterCredentialDefinitionReturnStateAction" - }, - { - "$ref": "#/components/schemas/RegisterCredentialDefinitionReturnStateFinished" - }, - { - "$ref": "#/components/schemas/RegisterCredentialDefinitionReturnStateFailed" - } - ] - } - } - } - } - }, - "tags": [ - "Anoncreds - EndorserTransaction" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WriteTransaction" - } - } - } - } - } - }, - "/dids/{did}": { - "get": { - "operationId": "GetDidRecordByDid", - "responses": { - "200": { - "description": "DidResolutionResult", - "content": { - "application/json": { - "schema": { - "properties": { - "didDocumentMetadata": { - "$ref": "#/components/schemas/DIDDocumentMetadata" - }, - "didResolutionMetadata": { - "$ref": "#/components/schemas/DidResolutionMetadata" - }, - "didDocument": { - "$ref": "#/components/schemas/Record_string.any_" - } - }, - "required": [ - "didDocumentMetadata", - "didResolutionMetadata", - "didDocument" - ], - "type": "object" - }, - "examples": { - "Example 1": { - "value": { - "didDocument": { - "@context": [ - "https://w3id.org/did/v1", - "https://w3id.org/security/suites/ed25519-2018/v1", - "https://w3id.org/security/suites/x25519-2019/v1" - ], - "id": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL", - "verificationMethod": [ - { - "id": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL#z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL", - "type": "Ed25519VerificationKey2018", - "controller": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL", - "publicKeyBase58": "6fioC1zcDPyPEL19pXRS2E4iJ46zH7xP6uSgAaPdwDrx" - } - ], - "authentication": [ - "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL#z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL" - ], - "assertionMethod": [ - "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL#z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL" - ], - "capabilityInvocation": [ - "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL#z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL" - ], - "capabilityDelegation": [ - "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL#z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL" - ], - "keyAgreement": [ - { - "id": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL#z6LSrdqo4M24WRDJj1h2hXxgtDTyzjjKCiyapYVgrhwZAySn", - "type": "X25519KeyAgreementKey2019", - "controller": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL", - "publicKeyBase58": "FxfdY3DCQxVZddKGAtSjZdFW9bCCW7oRwZn1NFJ2Tbg2" - } - ] - }, - "didDocumentMetadata": {}, - "didResolutionMetadata": { - "contentType": "application/did+ld+json" - } - } - } - } - } - } - } - }, - "description": "Resolves did and returns did resolution result", - "tags": [ - "Dids" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "description": "Decentralized Identifier", - "in": "path", - "name": "did", - "required": true, - "schema": { - "$ref": "#/components/schemas/Did" - } - } - ] - } - }, - "/dids/write": { - "post": { - "operationId": "WriteDid", - "responses": { - "200": { - "description": "DidResolutionResult", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Example 1": { - "value": { - "did": "did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7", - "didDocument": { - "@context": [ - "https://w3id.org/did/v1", - "https://w3id.org/security/suites/ed25519-2018/v1" - ], - "id": "did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7", - "verificationMethod": [ - { - "id": "did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7#verkey", - "type": "Ed25519VerificationKey2018", - "controller": "did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7", - "publicKeyBase58": "BapLDK4dEY88vWcQgNbpAPVVP4r3CHs4MvShmmhqkxXM" - } - ], - "authentication": [ - "did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7#verkey" - ] - } - } - } - } - } - } - } - }, - "description": "Did nym registration", - "tags": [ - "Dids" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DidCreate" - } - } - } - } - } - }, - "/dids": { - "get": { - "operationId": "GetDids", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/DidRecord" - }, - "type": "array" - } - } - } - } - }, - "tags": [ - "Dids" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [] - } - }, - "/anoncreds/schemas/{schemaId}": { - "get": { - "operationId": "GetSchemaById", - "responses": { - "200": { - "description": "get schema by Id", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetSchemaReturn" - }, - "examples": { - "Example 1": { - "value": { - "ver": "1.0", - "id": "WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", - "name": "schema", - "version": "1.0", - "attrNames": [ - "string" - ], - "seqNo": 351936 - } - } - } - } - } - } - }, - "description": "Get schema by schemaId", - "tags": [ - "Anoncreds - Schemas" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "in": "path", - "name": "schemaId", - "required": true, - "schema": { - "$ref": "#/components/schemas/SchemaId" - } - } - ] - } - }, - "/anoncreds/schemas": { - "post": { - "operationId": "CreateSchema", - "responses": { - "200": { - "description": "get schema", - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/RegisterSchemaReturn" - }, - { - "$ref": "#/components/schemas/RegisterSchemaReturnStateFinished" - } - ] - }, - "examples": { - "Example 1": { - "value": { - "state": "finished", - "schema": { - "issuerId": "did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7", - "name": "Test Schema", - "version": "1.0.0", - "attrNames": [ - "Name", - "Age" - ] - }, - "schemaId": "LRCUFcizUL74AGgLqdJHK7:2:Test Schema:1.0.0" - } - } - } - } - } - } - }, - "description": "Create schema", - "tags": [ - "Anoncreds - Schemas" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateSchemaInput" - } - } - } - } - } - }, - "/anoncreds/credential-definitions/{credentialDefinitionId}": { - "get": { - "operationId": "GetCredentialDefinitionById", - "responses": { - "200": { - "description": "CredDef", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetCredentialDefinitionReturn" - }, - "examples": { - "Example 1": { - "value": { - "ver": "1.0", - "id": "WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - "schemaId": "351936", - "type": "CL", - "tag": "definition", - "value": { - "primary": { - "n": "string", - "s": "string", - "r": { - "master_secret": "string", - "string": "string" - }, - "rctxt": "string", - "z": "string" - }, - "revocation": { - "g": "1 string", - "g_dash": "string", - "h": "string", - "h0": "string", - "h1": "string", - "h2": "string", - "htilde": "string", - "h_cap": "string", - "u": "string", - "pk": "string", - "y": "string" - } - } - } - } - } - } - } - } - }, - "description": "Retrieve credential definition by credential definition id", - "tags": [ - "Anoncreds - Credential Definitions" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "in": "path", - "name": "credentialDefinitionId", - "required": true, - "schema": { - "$ref": "#/components/schemas/CredentialDefinitionId" - } - } - ] - } - }, - "/anoncreds/credential-definitions": { - "post": { - "operationId": "CreateCredentialDefinition", - "responses": { - "200": { - "description": "CredDef", - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/RegisterCredentialDefinitionReturn" - }, - { - "$ref": "#/components/schemas/RegisterCredentialDefinitionReturnStateFinished" - } - ] - }, - "examples": { - "Example 1": { - "value": { - "ver": "1.0", - "id": "WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - "schemaId": "351936", - "type": "CL", - "tag": "definition", - "value": { - "primary": { - "n": "string", - "s": "string", - "r": { - "master_secret": "string", - "string": "string" - }, - "rctxt": "string", - "z": "string" - }, - "revocation": { - "g": "1 string", - "g_dash": "string", - "h": "string", - "h0": "string", - "h1": "string", - "h2": "string", - "htilde": "string", - "h_cap": "string", - "u": "string", - "pk": "string", - "y": "string" - } - } - } - } - } - } - } - }, - "202": { - "description": "Wait for action to complete" - } - }, - "description": "Creates a new credential definition.", - "tags": [ - "Anoncreds - Credential Definitions" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "endorserDid": { - "type": "string" - }, - "endorse": { - "type": "boolean" - }, - "tag": { - "type": "string" - }, - "schemaId": { - "$ref": "#/components/schemas/SchemaId" - }, - "issuerId": { - "type": "string" - } - }, - "required": [ - "tag", - "schemaId", - "issuerId" - ], - "type": "object" - } - } - } - } - } - }, - "/agent": { - "get": { - "operationId": "GetAgentInfo", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentInfo" - } - } - } - } - }, - "description": "Retrieve basic agent information", - "tags": [ - "Agent" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated", - "Basewallet" - ] - } - ], - "parameters": [] - } - }, - "/agent/token": { - "post": { - "operationId": "GetAgentToken", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentToken" - } - } - } - } - }, - "description": "Retrieve agent token", - "tags": [ - "Agent" - ], - "security": [ - { - "apiKey": [] - } - ], - "parameters": [] - } - }, - "/agent/wallet": { - "delete": { - "operationId": "DeleteWallet", - "responses": { - "204": { - "description": "No content" - } - }, - "description": "Delete wallet", - "tags": [ - "Agent" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [] - } - }, - "/agent/verify": { - "post": { - "operationId": "Verify", - "responses": { - "200": { - "description": "isValidSignature - true if signature is valid, false otherwise", - "content": { - "application/json": { - "schema": { - "type": "boolean" - } - } - } - } - }, - "description": "Verify data using a key", - "tags": [ - "Agent" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VerifyDataOptions" - } - } - } - } - } - }, - "/agent/credential/sign": { - "post": { - "operationId": "SignCredential", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/Record_string.any_" - }, - { - "$ref": "#/components/schemas/W3cCredentialRecord" - } - ] - } - } - } - } - }, - "tags": [ - "Agent" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "in": "query", - "name": "storeCredential", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "dataTypeToSign", - "required": true, - "schema": { - "type": "string", - "enum": [ - "rawData", - "jsonLd" - ] - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/CustomW3cJsonLdSignCredentialOptions" - }, - { - "$ref": "#/components/schemas/SignDataOptions" - }, - {} - ] - } - } - } - } - } - }, - "/agent/credential/verify": { - "post": { - "operationId": "VerifyCredential", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/W3cVerifyCredentialResult" - } - } - } - } - }, - "tags": [ - "Agent" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/SafeW3cJsonLdVerifyCredentialOptions" - }, - {} - ] - } - } - } - } - } - }, - "/didcomm/question-answer": { - "get": { - "operationId": "GetQuestionAnswerRecords", - "responses": { - "200": { - "description": "QuestionAnswerRecord[]", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "type": "array" - } - } - } - } - }, - "description": "Retrieve question and answer records by query", - "tags": [ - "DIDComm - Question Answer" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "description": "Connection identifier", - "in": "query", - "name": "connectionId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "description": "Role of the question", - "in": "query", - "name": "role", - "required": false, - "schema": { - "$ref": "#/components/schemas/QuestionAnswerRole" - } - }, - { - "description": "State of the question", - "in": "query", - "name": "state", - "required": false, - "schema": { - "$ref": "#/components/schemas/QuestionAnswerState" - } - }, - { - "description": "Thread identifier", - "in": "query", - "name": "threadId", - "required": false, - "schema": { - "type": "string" - } - } - ] - } - }, - "/didcomm/question-answer/question/{connectionId}": { - "post": { - "operationId": "SendQuestion", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "examples": { - "Example 1": {} - } - } - } - } - }, - "description": "Send a question to a connection", - "tags": [ - "DIDComm - Question Answer" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "description": "Connection identifier", - "in": "path", - "name": "connectionId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RecordId" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "detail": { - "type": "string" - }, - "validResponses": { - "items": { - "$ref": "#/components/schemas/ValidResponse" - }, - "type": "array" - }, - "question": { - "type": "string" - } - }, - "required": [ - "validResponses", - "question" - ], - "type": "object" - } - } - } - } - } - }, - "/didcomm/question-answer/answer/{id}": { - "post": { - "operationId": "SendAnswer", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Record_string.unknown_" - } - } - } - } - }, - "description": "Send a answer to question", - "tags": [ - "DIDComm - Question Answer" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "description": "The id of the question answer record", - "in": "path", - "name": "id", - "required": true, - "schema": { - "$ref": "#/components/schemas/RecordId" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Record_response.string_" - } - } - } - } - } - }, - "/didcomm/question-answer/{id}": { - "get": { - "operationId": "GetQuestionAnswerRecordById", - "responses": { - "200": { - "description": "ConnectionRecord", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Record_string.unknown_" - } - } - } - } - }, - "description": "Retrieve question answer record by id", - "tags": [ - "DIDComm - Question Answer" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "$ref": "#/components/schemas/RecordId" - } - } - ] - } - }, - "/didcomm/proofs": { - "get": { - "operationId": "GetAllProofs", - "responses": { - "200": { - "description": "ProofRecord[]", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "type": "array" - }, - "examples": { - "Example 1": { - "value": [ - { - "metadata": {}, - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", - "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", - "protocolVersion": "v1" - } - ] - } - } - } - } - } - }, - "description": "Retrieve all proof records", - "tags": [ - "DIDComm - Proofs" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "in": "query", - "name": "threadId", - "required": false, - "schema": { - "type": "string" - } - } - ] - } - }, - "/didcomm/proofs/{proofRecordId}": { - "get": { - "operationId": "GetProofById", - "responses": { - "200": { - "description": "ProofRecord", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "examples": { - "Example 1": { - "value": { - "metadata": {}, - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", - "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", - "protocolVersion": "v1" - } - } - } - } - } - } - }, - "description": "Retrieve proof record by proof record id", - "tags": [ - "DIDComm - Proofs" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "in": "path", - "name": "proofRecordId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RecordId" - } - } - ] - } - }, - "/didcomm/proofs/propose-proof": { - "post": { - "operationId": "ProposeProof", - "responses": { - "200": { - "description": "ProofRecord", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProofExchangeRecord" - }, - "examples": { - "Example 1": { - "value": { - "metadata": {}, - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", - "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", - "protocolVersion": "v1" - } - } - } - } - } - } - }, - "description": "Initiate a new presentation exchange as prover by sending a presentation proposal request\nto the connection with the specified connection id.", - "tags": [ - "DIDComm - Proofs" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RequestProofProposalOptions" - } - } - } - } - } - }, - "/didcomm/proofs/{proofRecordId}/accept-proposal": { - "post": { - "operationId": "AcceptProposal", - "responses": { - "200": { - "description": "ProofRecord", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProofExchangeRecord" - }, - "examples": { - "Example 1": { - "value": { - "metadata": {}, - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", - "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", - "protocolVersion": "v1" - } - } - } - } - } - } - }, - "description": "Accept a presentation proposal as verifier by sending an accept proposal message\nto the connection associated with the proof record.", - "tags": [ - "DIDComm - Proofs" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AcceptProofProposal" - } - } - } - } - } - }, - "/didcomm/proofs/request-proof": { - "post": { - "operationId": "RequestProof", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProofExchangeRecord" - }, - "examples": { - "Example 1": { - "value": { - "metadata": {}, - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", - "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", - "protocolVersion": "v1" - } - } - } - } - } - } - }, - "description": "Creates a presentation request bound to existing connection", - "tags": [ - "DIDComm - Proofs" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RequestProofOptions" - } - } - } - } - } - }, - "/didcomm/proofs/create-request-oob": { - "post": { - "operationId": "CreateRequest", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "properties": { - "proofMessageId": { - "type": "string" - }, - "proofRecordThId": { - "type": "string" - }, - "invitationDid": { - "type": "string" - }, - "outOfBandRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "invitation": { - "$ref": "#/components/schemas/PlaintextMessage" - }, - "invitationUrl": { - "type": "string" - } - }, - "required": [ - "proofMessageId", - "proofRecordThId", - "invitationDid", - "outOfBandRecord", - "invitation", - "invitationUrl" - ], - "type": "object" - }, - "examples": { - "Example 1": { - "value": { - "metadata": {}, - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", - "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", - "protocolVersion": "v1" - } - } - } - } - } - } - }, - "description": "Creates a presentation request not bound to any proposal or existing connection", - "tags": [ - "DIDComm - Proofs" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateProofRequestOobOptions" - } - } - } - } - } - }, - "/didcomm/proofs/{proofRecordId}/accept-request": { - "post": { - "operationId": "AcceptRequest", - "responses": { - "200": { - "description": "ProofRecord", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "examples": { - "Example 1": { - "value": { - "metadata": {}, - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", - "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", - "protocolVersion": "v1" - } - } - } - } - } - } - }, - "description": "Accept a presentation request as prover by sending an accept request message\nto the connection associated with the proof record.", - "tags": [ - "DIDComm - Proofs" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "in": "path", - "name": "proofRecordId", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "comment": { - "type": "string" - }, - "filterByNonRevocationRequirements": { - "type": "boolean" - }, - "filterByPresentationPreview": { - "type": "boolean" - } - }, - "type": "object" - } - } - } - } - } - }, - "/didcomm/proofs/{proofRecordId}/accept-presentation": { - "post": { - "operationId": "AcceptPresentation", - "responses": { - "200": { - "description": "ProofRecord", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProofExchangeRecord" - }, - "examples": { - "Example 1": { - "value": { - "metadata": {}, - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", - "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", - "protocolVersion": "v1" - } - } - } - } - } - } - }, - "description": "Accept a presentation as prover by sending an accept presentation message\nto the connection associated with the proof record.", - "tags": [ - "DIDComm - Proofs" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "in": "path", - "name": "proofRecordId", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/didcomm/proofs/{proofRecordId}/form-data": { - "get": { - "operationId": "ProofFormData", - "responses": { - "200": { - "description": "ProofRecord", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetProofFormatDataReturn__40_LegacyIndyProofFormat-or-AnonCredsProofFormat-or-DifPresentationExchangeProofFormat_41_-Array_" - }, - "examples": { - "Example 1": { - "value": { - "metadata": {}, - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", - "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", - "protocolVersion": "v1" - } - } - } - } - } - } - }, - "description": "Return proofRecord", - "tags": [ - "DIDComm - Proofs" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "in": "path", - "name": "proofRecordId", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/didcomm/oob": { - "get": { - "operationId": "GetAllOutOfBandRecords", - "responses": { - "200": { - "description": "OutOfBandRecord[]", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "type": "array" - }, - "examples": { - "Example 1": { - "value": [ - { - "_tags": { - "invitationId": "1cbd22e4-1906-41e9-8807-83d84437f978", - "state": "await-response", - "role": "sender", - "recipientKeyFingerprints": [ - "z6MktUCPZjfRJXD4GMcYuXiqX2qZ8vBw6UAYpDFiHEUfwuLj" - ] - }, - "outOfBandInvitation": { - "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/out-of-band/1.1/invitation", - "@id": "d6472943-e5d0-4d95-8b48-790ed5a41931", - "label": "Aries Test Agent", - "accept": [ - "didcomm/aip1", - "didcomm/aip2;env=rfc19" - ], - "handshake_protocols": [ - "https://didcomm.org/didexchange/1.0", - "https://didcomm.org/connections/1.0" - ], - "services": [ - { - "id": "#inline-0", - "serviceEndpoint": "https://6b77-89-20-162-146.ngrok.io", - "type": "did-communication", - "recipientKeys": [ - "did:key:z6MkmTBHTWrvLPN8pBmUj7Ye5ww9GiacXCYMNVvpScSpf1DM" - ], - "routingKeys": [] - } - ] - }, - "metadata": {}, - "id": "42a95528-0e30-4f86-a462-0efb02178b53", - "createdAt": "2022-01-01T00:00:00.000Z", - "reusable": false - } - ] - } - } - } - } - } - }, - "description": "Retrieve all out of band records", - "tags": [ - "DIDComm - Out Of Band" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "description": "invitation identifier", - "in": "query", - "name": "invitationId", - "required": false, - "schema": { - "$ref": "#/components/schemas/RecordId" - } - } - ] - } - }, - "/didcomm/oob/{outOfBandId}": { - "get": { - "operationId": "GetOutOfBandRecordById", - "responses": { - "200": { - "description": "OutOfBandRecord", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "examples": { - "Example 1": { - "value": { - "_tags": { - "invitationId": "1cbd22e4-1906-41e9-8807-83d84437f978", - "state": "await-response", - "role": "sender", - "recipientKeyFingerprints": [ - "z6MktUCPZjfRJXD4GMcYuXiqX2qZ8vBw6UAYpDFiHEUfwuLj" - ] - }, - "outOfBandInvitation": { - "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/out-of-band/1.1/invitation", - "@id": "d6472943-e5d0-4d95-8b48-790ed5a41931", - "label": "Aries Test Agent", - "accept": [ - "didcomm/aip1", - "didcomm/aip2;env=rfc19" - ], - "handshake_protocols": [ - "https://didcomm.org/didexchange/1.0", - "https://didcomm.org/connections/1.0" - ], - "services": [ - { - "id": "#inline-0", - "serviceEndpoint": "https://6b77-89-20-162-146.ngrok.io", - "type": "did-communication", - "recipientKeys": [ - "did:key:z6MkmTBHTWrvLPN8pBmUj7Ye5ww9GiacXCYMNVvpScSpf1DM" - ], - "routingKeys": [] - } - ] - }, - "metadata": {}, - "id": "42a95528-0e30-4f86-a462-0efb02178b53", - "createdAt": "2022-01-01T00:00:00.000Z", - "reusable": false - } - } - } - } - } - } - }, - "description": "Retrieve an out of band record by id", - "tags": [ - "DIDComm - Out Of Band" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "in": "path", - "name": "outOfBandId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RecordId" - } - } - ] - }, - "delete": { - "operationId": "DeleteOutOfBandRecord", - "responses": { - "204": { - "description": "No content" - } - }, - "description": "Deletes an out of band record from the repository.", - "tags": [ - "DIDComm - Out Of Band" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "description": "Record identifier", - "in": "path", - "name": "outOfBandId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RecordId" - } - } - ] - } - }, - "/didcomm/oob/create-invitation": { - "post": { - "operationId": "CreateInvitation", - "responses": { - "200": { - "description": "Out of band record", - "content": { - "application/json": { - "schema": { - "properties": { - "invitationDid": { - "type": "string" - }, - "outOfBandRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "invitation": { - "$ref": "#/components/schemas/PlaintextMessage" - }, - "invitationUrl": { - "type": "string" - } - }, - "required": [ - "invitationDid", - "outOfBandRecord", - "invitation", - "invitationUrl" - ], - "type": "object" - }, - "examples": { - "Example 1": { - "value": { - "invitationUrl": "string", - "invitation": { - "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/out-of-band/1.1/invitation", - "@id": "d6472943-e5d0-4d95-8b48-790ed5a41931", - "label": "Aries Test Agent", - "accept": [ - "didcomm/aip1", - "didcomm/aip2;env=rfc19" - ], - "handshake_protocols": [ - "https://didcomm.org/didexchange/1.0", - "https://didcomm.org/connections/1.0" - ], - "services": [ - { - "id": "#inline-0", - "serviceEndpoint": "https://6b77-89-20-162-146.ngrok.io", - "type": "did-communication", - "recipientKeys": [ - "did:key:z6MkmTBHTWrvLPN8pBmUj7Ye5ww9GiacXCYMNVvpScSpf1DM" - ], - "routingKeys": [] - } - ] - }, - "outOfBandRecord": { - "_tags": { - "invitationId": "1cbd22e4-1906-41e9-8807-83d84437f978", - "state": "await-response", - "role": "sender", - "recipientKeyFingerprints": [ - "z6MktUCPZjfRJXD4GMcYuXiqX2qZ8vBw6UAYpDFiHEUfwuLj" - ] - }, - "outOfBandInvitation": { - "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/out-of-band/1.1/invitation", - "@id": "d6472943-e5d0-4d95-8b48-790ed5a41931", - "label": "Aries Test Agent", - "accept": [ - "didcomm/aip1", - "didcomm/aip2;env=rfc19" - ], - "handshake_protocols": [ - "https://didcomm.org/didexchange/1.0", - "https://didcomm.org/connections/1.0" - ], - "services": [ - { - "id": "#inline-0", - "serviceEndpoint": "https://6b77-89-20-162-146.ngrok.io", - "type": "did-communication", - "recipientKeys": [ - "did:key:z6MkmTBHTWrvLPN8pBmUj7Ye5ww9GiacXCYMNVvpScSpf1DM" - ], - "routingKeys": [] - } - ] - }, - "metadata": {}, - "id": "42a95528-0e30-4f86-a462-0efb02178b53", - "createdAt": "2022-01-01T00:00:00.000Z", - "reusable": false - } - } - } - } - } - } - } - }, - "description": "Creates an outbound out-of-band record containing out-of-band invitation message defined in\nAries RFC 0434: Out-of-Band Protocol 1.1.", - "tags": [ - "DIDComm - Out Of Band" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "description": "configuration of how out-of-band invitation should be created", - "required": true, - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/CreateInvitationOptions" - }, - { - "$ref": "#/components/schemas/RecipientKeyOption" - } - ], - "description": "configuration of how out-of-band invitation should be created" - } - } - } - } - } - }, - "/didcomm/oob/create-legacy-invitation": { - "post": { - "operationId": "CreateLegacyInvitation", - "responses": { - "200": { - "description": "out-of-band record and invitation", - "content": { - "application/json": { - "schema": { - "properties": { - "outOfBandRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "invitation": { - "$ref": "#/components/schemas/PlaintextMessage" - }, - "invitationUrl": { - "type": "string" - }, - "recipientKey": { - "type": "string" - } - }, - "required": [ - "outOfBandRecord", - "invitation", - "invitationUrl" - ], - "type": "object" - }, - "examples": { - "Example 1": { - "value": { - "invitation": { - "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/out-of-band/1.1/invitation", - "@id": "d6472943-e5d0-4d95-8b48-790ed5a41931", - "label": "Aries Test Agent", - "accept": [ - "didcomm/aip1", - "didcomm/aip2;env=rfc19" - ], - "handshake_protocols": [ - "https://didcomm.org/didexchange/1.0", - "https://didcomm.org/connections/1.0" - ], - "services": [ - { - "id": "#inline-0", - "serviceEndpoint": "https://6b77-89-20-162-146.ngrok.io", - "type": "did-communication", - "recipientKeys": [ - "did:key:z6MkmTBHTWrvLPN8pBmUj7Ye5ww9GiacXCYMNVvpScSpf1DM" - ], - "routingKeys": [] - } - ] - }, - "outOfBandRecord": { - "_tags": { - "invitationId": "1cbd22e4-1906-41e9-8807-83d84437f978", - "state": "await-response", - "role": "sender", - "recipientKeyFingerprints": [ - "z6MktUCPZjfRJXD4GMcYuXiqX2qZ8vBw6UAYpDFiHEUfwuLj" - ] - }, - "outOfBandInvitation": { - "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/out-of-band/1.1/invitation", - "@id": "d6472943-e5d0-4d95-8b48-790ed5a41931", - "label": "Aries Test Agent", - "accept": [ - "didcomm/aip1", - "didcomm/aip2;env=rfc19" - ], - "handshake_protocols": [ - "https://didcomm.org/didexchange/1.0", - "https://didcomm.org/connections/1.0" - ], - "services": [ - { - "id": "#inline-0", - "serviceEndpoint": "https://6b77-89-20-162-146.ngrok.io", - "type": "did-communication", - "recipientKeys": [ - "did:key:z6MkmTBHTWrvLPN8pBmUj7Ye5ww9GiacXCYMNVvpScSpf1DM" - ], - "routingKeys": [] - } - ] - }, - "metadata": {}, - "id": "42a95528-0e30-4f86-a462-0efb02178b53", - "createdAt": "2022-01-01T00:00:00.000Z", - "reusable": false - } - } - } - } - } - } - } - }, - "description": "Creates an outbound out-of-band record in the same way how `createInvitation` method does it,\nbut it also converts out-of-band invitation message to an \"legacy\" invitation message defined\nin RFC 0160: Connection Protocol and returns it together with out-of-band record.", - "tags": [ - "DIDComm - Out Of Band" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "description": "configuration of how a invitation should be created", - "required": false, - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Omit_CreateLegacyInvitationConfig.routing_" - }, - { - "$ref": "#/components/schemas/RecipientKeyOption" - } - ], - "description": "configuration of how a invitation should be created" - } - } - } - } - } - }, - "/didcomm/oob/create-legacy-connectionless-invitation": { - "post": { - "operationId": "CreateLegacyConnectionlessInvitation", - "responses": { - "200": { - "description": "a message and a invitationUrl", - "content": { - "application/json": { - "schema": { - "properties": { - "outOfBandRecord": { - "$ref": "#/components/schemas/OutOfBandRecord" - }, - "invitationUrl": { - "type": "string" - }, - "message": { - "$ref": "#/components/schemas/AgentMessage" - } - }, - "required": [ - "outOfBandRecord", - "invitationUrl", - "message" - ], - "type": "object" - }, - "examples": { - "Example 1": { - "value": { - "message": { - "@id": "eac4ff4e-b4fb-4c1d-aef3-b29c89d1cc00", - "@type": "https://didcomm.org/connections/1.0/invitation" - }, - "invitationUrl": "http://example.com/invitation_url" - } - } - } - } - } - } - }, - "description": "Creates a new connectionless legacy invitation.", - "tags": [ - "DIDComm - Out Of Band" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "description": "configuration of how a connection invitation should be created", - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "routing": { - "$ref": "#/components/schemas/Routing" - }, - "domain": { - "type": "string" - }, - "message": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "recordId": { - "type": "string" - } - }, - "required": [ - "domain", - "message", - "recordId" - ], - "type": "object", - "description": "configuration of how a connection invitation should be created" - } - } - } - } - } - }, - "/didcomm/oob/receive-invitation": { - "post": { - "operationId": "ReceiveInvitation", - "responses": { - "200": { - "description": "out-of-band record and connection record if one has been created.", - "content": { - "application/json": { - "schema": { - "properties": { - "connectionRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "outOfBandRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" - } - }, - "required": [ - "connectionRecord", - "outOfBandRecord" - ], - "type": "object" - }, - "examples": { - "Example 1": { - "value": { - "outOfBandRecord": { - "_tags": { - "invitationId": "1cbd22e4-1906-41e9-8807-83d84437f978", - "state": "await-response", - "role": "sender", - "recipientKeyFingerprints": [ - "z6MktUCPZjfRJXD4GMcYuXiqX2qZ8vBw6UAYpDFiHEUfwuLj" - ] - }, - "outOfBandInvitation": { - "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/out-of-band/1.1/invitation", - "@id": "d6472943-e5d0-4d95-8b48-790ed5a41931", - "label": "Aries Test Agent", - "accept": [ - "didcomm/aip1", - "didcomm/aip2;env=rfc19" - ], - "handshake_protocols": [ - "https://didcomm.org/didexchange/1.0", - "https://didcomm.org/connections/1.0" - ], - "services": [ - { - "id": "#inline-0", - "serviceEndpoint": "https://6b77-89-20-162-146.ngrok.io", - "type": "did-communication", - "recipientKeys": [ - "did:key:z6MkmTBHTWrvLPN8pBmUj7Ye5ww9GiacXCYMNVvpScSpf1DM" - ], - "routingKeys": [] - } - ] - }, - "metadata": {}, - "id": "42a95528-0e30-4f86-a462-0efb02178b53", - "createdAt": "2022-01-01T00:00:00.000Z", - "reusable": false - }, - "connectionRecord": { - "_tags": { - "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", - "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", - "invitationKey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz", - "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d", - "verkey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz" - }, - "metadata": {}, - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", - "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", - "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d" - } - } - } - } - } - } - } - }, - "description": "Creates inbound out-of-band record and assigns out-of-band invitation message to it if the\nmessage is valid.", - "tags": [ - "DIDComm - Out Of Band" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReceiveInvitationProps" - } - } - } - } - } - }, - "/didcomm/oob/receive-invitation-url": { - "post": { - "operationId": "ReceiveInvitationFromUrl", - "responses": { - "200": { - "description": "out-of-band record and connection record if one has been created.", - "content": { - "application/json": { - "schema": { - "properties": { - "connectionRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "outOfBandRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" - } - }, - "required": [ - "connectionRecord", - "outOfBandRecord" - ], - "type": "object" - }, - "examples": { - "Example 1": { - "value": { - "outOfBandRecord": { - "_tags": { - "invitationId": "1cbd22e4-1906-41e9-8807-83d84437f978", - "state": "await-response", - "role": "sender", - "recipientKeyFingerprints": [ - "z6MktUCPZjfRJXD4GMcYuXiqX2qZ8vBw6UAYpDFiHEUfwuLj" - ] - }, - "outOfBandInvitation": { - "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/out-of-band/1.1/invitation", - "@id": "d6472943-e5d0-4d95-8b48-790ed5a41931", - "label": "Aries Test Agent", - "accept": [ - "didcomm/aip1", - "didcomm/aip2;env=rfc19" - ], - "handshake_protocols": [ - "https://didcomm.org/didexchange/1.0", - "https://didcomm.org/connections/1.0" - ], - "services": [ - { - "id": "#inline-0", - "serviceEndpoint": "https://6b77-89-20-162-146.ngrok.io", - "type": "did-communication", - "recipientKeys": [ - "did:key:z6MkmTBHTWrvLPN8pBmUj7Ye5ww9GiacXCYMNVvpScSpf1DM" - ], - "routingKeys": [] - } - ] - }, - "metadata": {}, - "id": "42a95528-0e30-4f86-a462-0efb02178b53", - "createdAt": "2022-01-01T00:00:00.000Z", - "reusable": false - }, - "connectionRecord": { - "_tags": { - "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", - "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", - "invitationKey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz", - "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d", - "verkey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz" - }, - "metadata": {}, - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", - "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", - "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d" - } - } - } - } - } - } - } - }, - "description": "Creates inbound out-of-band record and assigns out-of-band invitation message to it if the\nmessage is valid.", - "tags": [ - "DIDComm - Out Of Band" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReceiveInvitationByUrlProps" - } - } - } - } - } - }, - "/didcomm/oob/{outOfBandId}/accept-invitation": { - "post": { - "operationId": "AcceptInvitation", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "properties": { - "connectionRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "outOfBandRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" - } - }, - "required": [ - "connectionRecord", - "outOfBandRecord" - ], - "type": "object" - }, - "examples": { - "Example 1": { - "value": { - "outOfBandRecord": { - "_tags": { - "invitationId": "1cbd22e4-1906-41e9-8807-83d84437f978", - "state": "await-response", - "role": "sender", - "recipientKeyFingerprints": [ - "z6MktUCPZjfRJXD4GMcYuXiqX2qZ8vBw6UAYpDFiHEUfwuLj" - ] - }, - "outOfBandInvitation": { - "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/out-of-band/1.1/invitation", - "@id": "d6472943-e5d0-4d95-8b48-790ed5a41931", - "label": "Aries Test Agent", - "accept": [ - "didcomm/aip1", - "didcomm/aip2;env=rfc19" - ], - "handshake_protocols": [ - "https://didcomm.org/didexchange/1.0", - "https://didcomm.org/connections/1.0" - ], - "services": [ - { - "id": "#inline-0", - "serviceEndpoint": "https://6b77-89-20-162-146.ngrok.io", - "type": "did-communication", - "recipientKeys": [ - "did:key:z6MkmTBHTWrvLPN8pBmUj7Ye5ww9GiacXCYMNVvpScSpf1DM" - ], - "routingKeys": [] - } - ] - }, - "metadata": {}, - "id": "42a95528-0e30-4f86-a462-0efb02178b53", - "createdAt": "2022-01-01T00:00:00.000Z", - "reusable": false - }, - "connectionRecord": { - "_tags": { - "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", - "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", - "invitationKey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz", - "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d", - "verkey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz" - }, - "metadata": {}, - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", - "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", - "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d" - } - } - } - } - } - } - } - }, - "description": "Accept a connection invitation as invitee (by sending a connection request message) for the connection with the specified connection id.\nThis is not needed when auto accepting of connections is enabled.", - "tags": [ - "DIDComm - Out Of Band" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "in": "path", - "name": "outOfBandId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RecordId" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AcceptInvitationConfig" - } - } - } - } - } - }, - "/didcomm/credentials": { - "get": { - "operationId": "GetAllCredentials", - "responses": { - "200": { - "description": "CredentialExchangeRecord[]", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "type": "array" - }, - "examples": { - "Example 1": { - "value": [ - { - "_tags": { - "state": "offer-sent", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" - }, - "metadata": { - "_internal/indyCredential": { - "credentialDefinitionId": "q7ATwTYbQDgiigVijUAej:3:CL:318187:latest", - "schemaId": "q7ATwTYbQDgiigVijUAej:2:Employee Badge:1.0" - } - }, - "credentials": [], - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "credentialAttributes": [], - "protocolVersion": "v1" - } - ] - } - } - } - } - } - }, - "description": "Retrieve all credential exchange records", - "tags": [ - "DIDComm - Credentials" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "in": "query", - "name": "threadId", - "required": false, - "schema": { - "$ref": "#/components/schemas/ThreadId" - } - }, - { - "in": "query", - "name": "parentThreadId", - "required": false, - "schema": { - "$ref": "#/components/schemas/ThreadId" - } - }, - { - "in": "query", - "name": "connectionId", - "required": false, - "schema": { - "$ref": "#/components/schemas/RecordId" - } - }, - { - "in": "query", - "name": "state", - "required": false, - "schema": { - "$ref": "#/components/schemas/CredentialState" - } - }, - { - "in": "query", - "name": "role", - "required": false, - "schema": { - "$ref": "#/components/schemas/CredentialRole" - } - } - ] - } - }, - "/didcomm/credentials/w3c": { - "get": { - "operationId": "GetAllW3c", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/W3cCredentialRecord" - }, - "type": "array" - } - } - } - } - }, - "tags": [ - "DIDComm - Credentials" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [] - } - }, - "/didcomm/credentials/w3c/{id}": { - "get": { - "operationId": "GetW3cById", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/W3cCredentialRecord" - } - } - } - } - }, - "tags": [ - "DIDComm - Credentials" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/didcomm/credentials/{credentialRecordId}": { - "get": { - "operationId": "GetCredentialById", - "responses": { - "200": { - "description": "CredentialExchangeRecord", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "examples": { - "Example 1": { - "value": { - "_tags": { - "state": "offer-sent", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" - }, - "metadata": { - "_internal/indyCredential": { - "credentialDefinitionId": "q7ATwTYbQDgiigVijUAej:3:CL:318187:latest", - "schemaId": "q7ATwTYbQDgiigVijUAej:2:Employee Badge:1.0" - } - }, - "credentials": [], - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "credentialAttributes": [], - "protocolVersion": "v1" - } - } - } - } - } - } - }, - "description": "Retrieve credential exchange record by credential record id", - "tags": [ - "DIDComm - Credentials" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "in": "path", - "name": "credentialRecordId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RecordId" - } - } - ] - } - }, - "/didcomm/credentials/propose-credential": { - "post": { - "operationId": "ProposeCredential", - "responses": { - "200": { - "description": "CredentialExchangeRecord", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CredentialExchangeRecord" - }, - "examples": { - "Example 1": { - "value": { - "_tags": { - "state": "offer-sent", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" - }, - "metadata": { - "_internal/indyCredential": { - "credentialDefinitionId": "q7ATwTYbQDgiigVijUAej:3:CL:318187:latest", - "schemaId": "q7ATwTYbQDgiigVijUAej:2:Employee Badge:1.0" - } - }, - "credentials": [], - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "credentialAttributes": [], - "protocolVersion": "v1" - } - } - } - } - } - } - }, - "description": "Initiate a new credential exchange as holder by sending a propose credential message\nto the connection with a specified connection id.", - "tags": [ - "DIDComm - Credentials" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProposeCredentialOptions" - } - } - } - } - } - }, - "/didcomm/credentials/accept-proposal": { - "post": { - "operationId": "AcceptProposal", - "responses": { - "200": { - "description": "CredentialExchangeRecord", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CredentialExchangeRecord" - }, - "examples": { - "Example 1": { - "value": { - "_tags": { - "state": "offer-sent", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" - }, - "metadata": { - "_internal/indyCredential": { - "credentialDefinitionId": "q7ATwTYbQDgiigVijUAej:3:CL:318187:latest", - "schemaId": "q7ATwTYbQDgiigVijUAej:2:Employee Badge:1.0" - } - }, - "credentials": [], - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "credentialAttributes": [], - "protocolVersion": "v1" - } - } - } - } - } - } - }, - "description": "Accept a credential proposal as issuer by sending an accept proposal message\nto the connection associated with the credential exchange record.", - "tags": [ - "DIDComm - Credentials" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AcceptCredentialProposalOptions" - } - } - } - } - } - }, - "/didcomm/credentials/create-offer": { - "post": { - "operationId": "CreateOffer", - "responses": { - "200": { - "description": "AgentMessage, CredentialExchangeRecord", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CredentialExchangeRecord" - }, - "examples": { - "Example 1": { - "value": { - "_tags": { - "state": "offer-sent", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" - }, - "metadata": { - "_internal/indyCredential": { - "credentialDefinitionId": "q7ATwTYbQDgiigVijUAej:3:CL:318187:latest", - "schemaId": "q7ATwTYbQDgiigVijUAej:2:Employee Badge:1.0" - } - }, - "credentials": [], - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "credentialAttributes": [], - "protocolVersion": "v1" - } - } - } - } - } - } - }, - "description": "Initiate a new credential exchange as issuer by creating a credential offer\nwithout specifying a connection id", - "tags": [ - "DIDComm - Credentials" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateOfferOptions" - } - } - } - } - } - }, - "/didcomm/credentials/create-offer-oob": { - "post": { - "operationId": "CreateOfferOob", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "properties": { - "invitationDid": { - "type": "string" - }, - "credentialRequestThId": { - "type": "string" - }, - "outOfBandRecordId": { - "type": "string" - }, - "outOfBandRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "invitation": { - "$ref": "#/components/schemas/PlaintextMessage" - }, - "invitationUrl": { - "type": "string" - } - }, - "required": [ - "invitationDid", - "credentialRequestThId", - "outOfBandRecordId", - "outOfBandRecord", - "invitation", - "invitationUrl" - ], - "type": "object" - } - } - } - } - }, - "tags": [ - "DIDComm - Credentials" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateOfferOobOptions" - } - } - } - } - } - }, - "/didcomm/credentials/accept-offer": { - "post": { - "operationId": "AcceptOffer", - "responses": { - "200": { - "description": "CredentialExchangeRecord", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CredentialExchangeRecord" - }, - "examples": { - "Example 1": { - "value": { - "_tags": { - "state": "offer-sent", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" - }, - "metadata": { - "_internal/indyCredential": { - "credentialDefinitionId": "q7ATwTYbQDgiigVijUAej:3:CL:318187:latest", - "schemaId": "q7ATwTYbQDgiigVijUAej:2:Employee Badge:1.0" - } - }, - "credentials": [], - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "credentialAttributes": [], - "protocolVersion": "v1" - } - } - } - } - } - } - }, - "description": "Accept a credential offer as holder by sending an accept offer message\nto the connection associated with the credential exchange record.", - "tags": [ - "DIDComm - Credentials" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CredentialOfferOptions" - } - } - } - } - } - }, - "/didcomm/credentials/accept-request": { - "post": { - "operationId": "AcceptRequest", - "responses": { - "200": { - "description": "CredentialExchangeRecord", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CredentialExchangeRecord" - }, - "examples": { - "Example 1": { - "value": { - "_tags": { - "state": "offer-sent", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" - }, - "metadata": { - "_internal/indyCredential": { - "credentialDefinitionId": "q7ATwTYbQDgiigVijUAej:3:CL:318187:latest", - "schemaId": "q7ATwTYbQDgiigVijUAej:2:Employee Badge:1.0" - } - }, - "credentials": [], - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "credentialAttributes": [], - "protocolVersion": "v1" - } - } - } - } - } - } - }, - "description": "Accept a credential request as issuer by sending an accept request message\nto the connection associated with the credential exchange record.", - "tags": [ - "DIDComm - Credentials" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AcceptCredentialRequestOptions" - } - } - } - } - } - }, - "/didcomm/credentials/accept-credential": { - "post": { - "operationId": "AcceptCredential", - "responses": { - "200": { - "description": "CredentialExchangeRecord", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CredentialExchangeRecord" - }, - "examples": { - "Example 1": { - "value": { - "_tags": { - "state": "offer-sent", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" - }, - "metadata": { - "_internal/indyCredential": { - "credentialDefinitionId": "q7ATwTYbQDgiigVijUAej:3:CL:318187:latest", - "schemaId": "q7ATwTYbQDgiigVijUAej:2:Employee Badge:1.0" - } - }, - "credentials": [], - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "credentialAttributes": [], - "protocolVersion": "v1" - } - } - } - } - } - } - }, - "description": "Accept a credential as holder by sending an accept credential message\nto the connection associated with the credential exchange record.", - "tags": [ - "DIDComm - Credentials" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AcceptCredential" - } - } - } - } - } - }, - "/didcomm/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": [ - "DIDComm - Credentials" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "in": "path", - "name": "credentialRecordId", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/didcomm/connections": { - "get": { - "operationId": "GetAllConnections", - "responses": { - "200": { - "description": "ConnectionRecord[]", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "type": "array" - }, - "examples": { - "Example 1": { - "value": [ - { - "_tags": { - "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", - "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", - "invitationKey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz", - "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d", - "verkey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz" - }, - "metadata": {}, - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", - "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", - "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d" - } - ] - } - } - } - } - } - }, - "description": "Retrieve all connections records", - "tags": [ - "DIDComm - Connections" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "in": "query", - "name": "outOfBandId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "description": "Alias", - "in": "query", - "name": "alias", - "required": false, - "schema": { - "type": "string" - } - }, - { - "description": "Connection state", - "in": "query", - "name": "state", - "required": false, - "schema": { - "$ref": "#/components/schemas/DidExchangeState" - } - }, - { - "description": "My DID", - "in": "query", - "name": "myDid", - "required": false, - "schema": { - "type": "string" - } - }, - { - "description": "Their DID", - "in": "query", - "name": "theirDid", - "required": false, - "schema": { - "type": "string" - } - }, - { - "description": "Their label", - "in": "query", - "name": "theirLabel", - "required": false, - "schema": { - "type": "string" - } - } - ] - } - }, - "/didcomm/connections/{connectionId}": { - "get": { - "operationId": "GetConnectionById", - "responses": { - "200": { - "description": "ConnectionRecord", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "examples": { - "Example 1": { - "value": { - "_tags": { - "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", - "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", - "invitationKey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz", - "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d", - "verkey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz" - }, - "metadata": {}, - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", - "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", - "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d" - } - } - } - } - } - } - }, - "description": "Retrieve connection record by connection id", - "tags": [ - "DIDComm - Connections" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "description": "Connection identifier", - "in": "path", - "name": "connectionId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RecordId" - } - } - ] - }, - "delete": { - "operationId": "DeleteConnection", - "responses": { - "204": { - "description": "No content" - } - }, - "description": "Deletes a connection record from the connection repository.", - "tags": [ - "DIDComm - Connections" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "description": "Connection identifier", - "in": "path", - "name": "connectionId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RecordId" - } - } - ] - } - }, - "/didcomm/connections/{connectionId}/accept-request": { - "post": { - "operationId": "AcceptRequest", - "responses": { - "200": { - "description": "ConnectionRecord", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "examples": { - "Example 1": { - "value": { - "_tags": { - "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", - "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", - "invitationKey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz", - "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d", - "verkey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz" - }, - "metadata": {}, - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", - "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", - "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d" - } - } - } - } - } - } - }, - "description": "Accept a connection request as inviter by sending a connection response message\nfor the connection with the specified connection id.\n\nThis is not needed when auto accepting of connection is enabled.", - "tags": [ - "DIDComm - Connections" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "description": "Connection identifier", - "in": "path", - "name": "connectionId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RecordId" - } - } - ] - } - }, - "/didcomm/connections/{connectionId}/accept-response": { - "post": { - "operationId": "AcceptResponse", - "responses": { - "200": { - "description": "ConnectionRecord", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "examples": { - "Example 1": { - "value": { - "_tags": { - "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", - "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", - "invitationKey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz", - "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d", - "verkey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz" - }, - "metadata": {}, - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", - "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", - "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d" - } - } - } - } - } - } - }, - "description": "Accept a connection response as invitee by sending a trust ping message\nfor the connection with the specified connection id.\n\nThis is not needed when auto accepting of connection is enabled.", - "tags": [ - "DIDComm - Connections" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "description": "Connection identifier", - "in": "path", - "name": "connectionId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RecordId" - } - } - ] } }, - "/didcomm/url/{invitationId}": { - "get": { - "operationId": "GetInvitation", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/ConnectionRecord" - }, - "type": "array" - } - } - } - } - }, - "tags": [ - "DIDComm - Connections" - ], - "security": [], - "parameters": [ - { - "in": "path", - "name": "invitationId", - "required": true, - "schema": { - "type": "string" - } - } - ] + "securitySchemes": { + "apiKey": { + "type": "apiKey", + "name": "Authorization", + "in": "header" + }, + "jwt": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT" } + } + }, + "info": { + "title": "credo-controller", + "version": "2.0.0", + "description": "Rest endpoint wrapper for using your agent over HTTP", + "license": { + "name": "Apache-2.0" }, - "/didcomm/basic-messages/{connectionId}": { + "contact": {} + }, + "paths": { + "/didcomm/question-answer": { "get": { - "operationId": "GetBasicMessages", + "operationId": "GetQuestionAnswerRecords", "responses": { "200": { - "description": "BasicMessageRecord[]", + "description": "QuestionAnswerRecord[]", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/BasicMessageRecord" - }, + "items": {}, "type": "array" - }, - "examples": { - "Example 1": { - "value": [ - { - "_tags": { - "role": "sender", - "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834" - }, - "metadata": {}, - "id": "74bcf865-1fdc-45b4-b517-9def02dfd25f", - "createdAt": "2022-08-18T08:38:40.216Z", - "content": "string", - "sentTime": "2022-08-18T08:38:40.216Z", - "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834" - } - ] - } } } } } }, - "description": "Retrieve basic messages by connection id", + "description": "Retrieve question and answer records by query", "tags": [ - "DIDComm - Basic Messages" + "DIDComm - Question Answer" ], "security": [ { @@ -9192,48 +1493,64 @@ "parameters": [ { "description": "Connection identifier", - "in": "path", + "in": "query", "name": "connectionId", - "required": true, + "required": false, "schema": { - "$ref": "#/components/schemas/RecordId" + "type": "string" + } + }, + { + "description": "Role of the question", + "in": "query", + "name": "role", + "required": false, + "schema": { + "$ref": "#/components/schemas/QuestionAnswerRole" + } + }, + { + "description": "State of the question", + "in": "query", + "name": "state", + "required": false, + "schema": { + "$ref": "#/components/schemas/QuestionAnswerState" + } + }, + { + "description": "Thread identifier", + "in": "query", + "name": "threadId", + "required": false, + "schema": { + "type": "string" } } ] - }, + } + }, + "/didcomm/question-answer/question/{connectionId}": { "post": { - "operationId": "SendMessage", + "operationId": "SendQuestion", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BasicMessageRecord" + "$ref": "#/components/schemas/Record_string.unknown_" }, "examples": { - "Example 1": { - "value": { - "_tags": { - "role": "sender", - "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834" - }, - "metadata": {}, - "id": "74bcf865-1fdc-45b4-b517-9def02dfd25f", - "createdAt": "2022-08-18T08:38:40.216Z", - "content": "string", - "sentTime": "2022-08-18T08:38:40.216Z", - "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834" - } - } + "Example 1": {} } } } } }, - "description": "Send a basic message to a connection", + "description": "Send a question to a connection", "tags": [ - "DIDComm - Basic Messages" + "DIDComm - Question Answer" ], "security": [ { @@ -9259,331 +1576,424 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Record_content.string_" + "properties": { + "detail": { + "type": "string" + }, + "validResponses": { + "items": { + "$ref": "#/components/schemas/ValidResponse" + }, + "type": "array" + }, + "question": { + "type": "string" + } + }, + "required": [ + "validResponses", + "question" + ], + "type": "object" } } } } } }, - "/multi-tenancy/create-tenant": { + "/didcomm/question-answer/answer/{id}": { "post": { - "operationId": "CreateTenant", + "operationId": "SendAnswer", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "properties": { - "token": {}, - "metadata": { - "$ref": "#/components/schemas/Metadata____" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "id": { - "type": "string" - }, - "storageVersion": { - "type": "string" - }, - "config": { - "$ref": "#/components/schemas/TenantConfig" - }, - "type": { - "type": "string", - "enum": [ - "TenantRecord" - ], - "nullable": false - } - }, - "required": [ - "token", - "metadata", - "createdAt", - "id", - "storageVersion", - "config", - "type" - ], - "type": "object" + "$ref": "#/components/schemas/Record_string.unknown_" } } } } }, + "description": "Send a answer to question", "tags": [ - "MultiTenancy" + "DIDComm - Question Answer" ], "security": [ { "jwt": [ - "Basewallet" + "tenant", + "dedicated" ] } ], - "parameters": [], + "parameters": [ + { + "description": "The id of the question answer record", + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/RecordId" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateTenantOptions" + "$ref": "#/components/schemas/Record_response.string_" } } } } } }, - "/multi-tenancy/get-token/{tenantId}": { - "post": { - "operationId": "GetTenantToken", + "/didcomm/question-answer/{id}": { + "get": { + "operationId": "GetQuestionAnswerRecordById", "responses": { "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } - }, - "404": { - "description": "", + "description": "ConnectionRecord", "content": { "application/json": { "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" + "$ref": "#/components/schemas/Record_string.unknown_" } } } - }, - "500": { - "description": "", + } + }, + "description": "Retrieve question answer record by id", + "tags": [ + "DIDComm - Question Answer" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/RecordId" + } + } + ] + } + }, + "/didcomm/oob": { + "get": { + "operationId": "GetAllOutOfBandRecords", + "responses": { + "200": { + "description": "OutOfBandRecord[]", "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" + "items": {}, + "type": "array" + }, + "examples": { + "Example 1": { + "value": [ + { + "_tags": { + "invitationId": "1cbd22e4-1906-41e9-8807-83d84437f978", + "state": "await-response", + "role": "sender", + "recipientKeyFingerprints": [ + "z6MktUCPZjfRJXD4GMcYuXiqX2qZ8vBw6UAYpDFiHEUfwuLj" + ] + }, + "outOfBandInvitation": { + "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/out-of-band/1.1/invitation", + "@id": "d6472943-e5d0-4d95-8b48-790ed5a41931", + "label": "Aries Test Agent", + "accept": [ + "didcomm/aip1", + "didcomm/aip2;env=rfc19" + ], + "handshake_protocols": [ + "https://didcomm.org/didexchange/1.0", + "https://didcomm.org/connections/1.0" + ], + "services": [ + { + "id": "#inline-0", + "serviceEndpoint": "https://6b77-89-20-162-146.ngrok.io", + "type": "did-communication", + "recipientKeys": [ + "did:key:z6MkmTBHTWrvLPN8pBmUj7Ye5ww9GiacXCYMNVvpScSpf1DM" + ], + "routingKeys": [] + } + ] + }, + "metadata": {}, + "id": "42a95528-0e30-4f86-a462-0efb02178b53", + "createdAt": "2022-01-01T00:00:00.000Z", + "reusable": false + } + ] + } } } } } }, + "description": "Retrieve all out of band records", "tags": [ - "MultiTenancy" + "DIDComm - Out Of Band" ], "security": [ { "jwt": [ - "Basewallet" + "tenant", + "dedicated" ] } ], "parameters": [ { - "in": "path", - "name": "tenantId", - "required": true, + "description": "invitation identifier", + "in": "query", + "name": "invitationId", + "required": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/RecordId" } } ] } }, - "/multi-tenancy/{tenantId}": { + "/didcomm/oob/{outOfBandId}": { "get": { - "operationId": "GetTenantById", + "operationId": "GetOutOfBandRecordById", "responses": { "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", + "description": "OutOfBandRecord", "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string" + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "examples": { + "Example 1": { + "value": { + "_tags": { + "invitationId": "1cbd22e4-1906-41e9-8807-83d84437f978", + "state": "await-response", + "role": "sender", + "recipientKeyFingerprints": [ + "z6MktUCPZjfRJXD4GMcYuXiqX2qZ8vBw6UAYpDFiHEUfwuLj" + ] + }, + "outOfBandInvitation": { + "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/out-of-band/1.1/invitation", + "@id": "d6472943-e5d0-4d95-8b48-790ed5a41931", + "label": "Aries Test Agent", + "accept": [ + "didcomm/aip1", + "didcomm/aip2;env=rfc19" + ], + "handshake_protocols": [ + "https://didcomm.org/didexchange/1.0", + "https://didcomm.org/connections/1.0" + ], + "services": [ + { + "id": "#inline-0", + "serviceEndpoint": "https://6b77-89-20-162-146.ngrok.io", + "type": "did-communication", + "recipientKeys": [ + "did:key:z6MkmTBHTWrvLPN8pBmUj7Ye5ww9GiacXCYMNVvpScSpf1DM" + ], + "routingKeys": [] + } + ] + }, + "metadata": {}, + "id": "42a95528-0e30-4f86-a462-0efb02178b53", + "createdAt": "2022-01-01T00:00:00.000Z", + "reusable": false } - }, - "required": [ - "message" - ], - "type": "object" + } } } } } }, + "description": "Retrieve an out of band record by id", "tags": [ - "MultiTenancy" + "DIDComm - Out Of Band" ], "security": [ { "jwt": [ - "Basewallet" + "tenant", + "dedicated" ] } ], "parameters": [ { "in": "path", - "name": "tenantId", + "name": "outOfBandId", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/RecordId" } } ] }, "delete": { - "operationId": "DeleteTenantById", + "operationId": "DeleteOutOfBandRecord", "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } + "204": { + "description": "No content" } }, + "description": "Deletes an out of band record from the repository.", "tags": [ - "MultiTenancy" + "DIDComm - Out Of Band" ], "security": [ { "jwt": [ - "Basewallet" + "tenant", + "dedicated" ] } ], "parameters": [ { + "description": "Record identifier", "in": "path", - "name": "tenantId", + "name": "outOfBandId", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/RecordId" } } ] } }, - "/openid4vc/issuance-sessions/create-credential-offer": { + "/didcomm/oob/create-invitation": { "post": { - "operationId": "CreateCredentialOffer", + "operationId": "CreateInvitation", "responses": { "200": { - "description": "Ok", + "description": "Out of band record", "content": { "application/json": { "schema": { "properties": { - "issuanceSession": { - "$ref": "#/components/schemas/OpenId4VcIssuanceSessionRecord" + "invitationDid": { + "type": "string" + }, + "outOfBandRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "invitation": { + "$ref": "#/components/schemas/DidCommPlaintextMessage" }, - "credentialOffer": { + "invitationUrl": { "type": "string" } }, "required": [ - "issuanceSession", - "credentialOffer" + "invitationDid", + "outOfBandRecord", + "invitation", + "invitationUrl" ], "type": "object" + }, + "examples": { + "Example 1": { + "value": { + "invitationUrl": "string", + "invitation": { + "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/out-of-band/1.1/invitation", + "@id": "d6472943-e5d0-4d95-8b48-790ed5a41931", + "label": "Aries Test Agent", + "accept": [ + "didcomm/aip1", + "didcomm/aip2;env=rfc19" + ], + "handshake_protocols": [ + "https://didcomm.org/didexchange/1.0", + "https://didcomm.org/connections/1.0" + ], + "services": [ + { + "id": "#inline-0", + "serviceEndpoint": "https://6b77-89-20-162-146.ngrok.io", + "type": "did-communication", + "recipientKeys": [ + "did:key:z6MkmTBHTWrvLPN8pBmUj7Ye5ww9GiacXCYMNVvpScSpf1DM" + ], + "routingKeys": [] + } + ] + }, + "outOfBandRecord": { + "_tags": { + "invitationId": "1cbd22e4-1906-41e9-8807-83d84437f978", + "state": "await-response", + "role": "sender", + "recipientKeyFingerprints": [ + "z6MktUCPZjfRJXD4GMcYuXiqX2qZ8vBw6UAYpDFiHEUfwuLj" + ] + }, + "outOfBandInvitation": { + "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/out-of-band/1.1/invitation", + "@id": "d6472943-e5d0-4d95-8b48-790ed5a41931", + "label": "Aries Test Agent", + "accept": [ + "didcomm/aip1", + "didcomm/aip2;env=rfc19" + ], + "handshake_protocols": [ + "https://didcomm.org/didexchange/1.0", + "https://didcomm.org/connections/1.0" + ], + "services": [ + { + "id": "#inline-0", + "serviceEndpoint": "https://6b77-89-20-162-146.ngrok.io", + "type": "did-communication", + "recipientKeys": [ + "did:key:z6MkmTBHTWrvLPN8pBmUj7Ye5ww9GiacXCYMNVvpScSpf1DM" + ], + "routingKeys": [] + } + ] + }, + "metadata": {}, + "id": "42a95528-0e30-4f86-a462-0efb02178b53", + "createdAt": "2022-01-01T00:00:00.000Z", + "reusable": false + } + } + } } } } } }, - "description": "Creates a credential offer with the specified credential configurations and authorization type.", + "description": "Creates an outbound out-of-band record containing out-of-band invitation message defined in\nAries RFC 0434: Out-of-Band Protocol 1.1.", "tags": [ - "oid4vc issuance sessions" + "DIDComm - Out Of Band" ], "security": [ { @@ -9595,72 +2005,71 @@ ], "parameters": [], "requestBody": { + "description": "configuration of how out-of-band invitation should be created", "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenId4VcIssuanceSessionsCreateOffer" + "allOf": [ + { + "$ref": "#/components/schemas/CreateInvitationOptions" + }, + { + "$ref": "#/components/schemas/RecipientKeyOption" + } + ], + "description": "configuration of how out-of-band invitation should be created" } } } } } }, - "/openid4vc/issuance-sessions/{issuanceSessionId}": { - "get": { - "operationId": "GetIssuanceSessionsById", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenId4VcIssuanceSessionRecord" - } - } - } - } - }, - "description": "Get issuance details by issuance SessionId", - "tags": [ - "oid4vc issuance sessions" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "in": "path", - "name": "issuanceSessionId", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "put": { - "operationId": "UpdateSessionById", + "/didcomm/oob/create-legacy-connectionless-invitation": { + "post": { + "operationId": "CreateLegacyConnectionlessInvitation", "responses": { "200": { - "description": "Ok", + "description": "a message and a invitationUrl", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenId4VcIssuanceSessionRecord" + "properties": { + "outOfBandRecord": { + "$ref": "#/components/schemas/DidCommOutOfBandRecord" + }, + "invitationUrl": { + "type": "string" + }, + "message": { + "$ref": "#/components/schemas/DidCommMessage" + } + }, + "required": [ + "outOfBandRecord", + "invitationUrl", + "message" + ], + "type": "object" + }, + "examples": { + "Example 1": { + "value": { + "message": { + "@id": "eac4ff4e-b4fb-4c1d-aef3-b29c89d1cc00", + "@type": "https://didcomm.org/connections/1.0/invitation" + }, + "invitationUrl": "http://example.com/invitation_url" + } + } } } } } }, - "description": "Update issuance session metadata by session ID", + "description": "Creates a new connectionless legacy invitation.", "tags": [ - "oid4vc issuance sessions" + "DIDComm - Out Of Band" ], "security": [ { @@ -9670,443 +2079,118 @@ ] } ], - "parameters": [ - { - "in": "path", - "name": "issuanceSessionId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "parameters": [], "requestBody": { + "description": "configuration of how a connection invitation should be created", "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Record_string.unknown_" - } - } - } - } - }, - "delete": { - "operationId": "DeleteIssuanceSessionById", - "responses": { - "204": { - "description": "No content" - } - }, - "description": "Delete issuance session by session ID", - "tags": [ - "oid4vc issuance sessions" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "in": "path", - "name": "issuanceSessionId", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/openid4vc/issuance-sessions": { - "get": { - "operationId": "GetIssuanceSessionsByQuery", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/OpenId4VcIssuanceSessionRecord" + "properties": { + "routing": { + "$ref": "#/components/schemas/DidCommRouting" }, - "type": "array" - } + "domain": { + "type": "string" + }, + "message": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "recordId": { + "type": "string" + } + }, + "required": [ + "domain", + "message", + "recordId" + ], + "type": "object", + "description": "configuration of how a connection invitation should be created" } } } - }, - "description": "Fetch all issuance sessions by query", - "tags": [ - "oid4vc issuance sessions" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "in": "query", - "name": "cNonce", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "publicIssuerId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "preAuthorizedCode", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "state", - "required": false, - "schema": { - "$ref": "#/components/schemas/OpenId4VcIssuanceSessionState" - } - }, - { - "in": "query", - "name": "credentialOfferUri", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "authorizationCode", - "required": false, - "schema": { - "type": "string" - } - } - ] + } } }, - "/openid4vc/issuer": { + "/didcomm/oob/receive-invitation": { "post": { - "operationId": "CreateIssuer", + "operationId": "ReceiveInvitation", "responses": { "200": { - "description": "Ok", + "description": "out-of-band record and connection record if one has been created.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenId4VcIssuerRecord" + "properties": { + "connectionRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "outOfBandRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + } + }, + "required": [ + "connectionRecord", + "outOfBandRecord" + ], + "type": "object" }, "examples": { "Example 1": { "value": { - "issuerId": "abc-gov", - "accessTokenSignerKeyType": "ed25519", - "display": [ - { - "name": "ABC Gov", - "locale": "en", - "logo": { - "uri": "https://upload.wikimedia.org/wikipedia/commons/2/2f/ABC-2021-LOGO.svg", - "alt_text": "abc_logo" - } - } - ], - "dpopSigningAlgValuesSupported": [ - "RS256", - "ES256" - ], - "credentialConfigurationsSupported": { - "VaccinationCredential-sdjwt": { - "format": "vc+sd-jwt", - "vct": "VaccinationCredential", - "scope": "openid4vc:credential:VaccinationCredential-sdjwt", - "claims": { - "name": { - "mandatory": true, - "value_type": "string", - "display": { - "name": "Full Name", - "locale": "en" - } - }, - "vaccine": { - "mandatory": true, - "value_type": "string", - "display": { - "name": "Vaccine Type", - "locale": "en" - } - }, - "lotNumber": { - "value_type": "string", - "display": { - "name": "Batch Number", - "locale": "en" - } - }, - "performer": { - "value_type": "string", - "display": { - "name": "Healthcare Provider", - "locale": "en" - } - }, - "doseDate": { - "value_type": "date", - "display": { - "name": "Date of Dose", - "locale": "en" - } - } - }, - "credential_signing_alg_values_supported": [ - "ES256" - ], - "cryptographic_binding_methods_supported": [ - "did:key" - ], - "display": [ - { - "name": "COVID-19 Vaccination Certificate", - "description": "Proof of vaccination against COVID-19", - "locale": "en" - } - ] - }, - "NationalIDCredential-mdoc": { - "format": "mso_mdoc", - "doctype": "org.iso.18013.5.1", - "scope": "openid4vc:credential:NationalIDCredential-mdoc", - "claims": { - "family_name": { - "mandatory": true, - "value_type": "string", - "display": { - "name": "Last Name", - "locale": "en" - } - }, - "given_name": { - "mandatory": true, - "value_type": "string", - "display": { - "name": "First Name", - "locale": "en" - } - }, - "birth_date": { - "value_type": "date", - "display": { - "name": "Date of Birth", - "locale": "en" - } - }, - "gender": { - "value_type": "string", - "display": { - "name": "Gender", - "locale": "en" - } - }, - "nationality": { - "value_type": "string", - "display": { - "name": "Nationality", - "locale": "en" - } - }, - "document_number": { - "mandatory": true, - "value_type": "string", - "display": { - "name": "Document Number", - "locale": "en" - } - }, - "issuing_authority": { - "value_type": "string", - "display": { - "name": "Issuing Authority", - "locale": "en" - } - }, - "expiry_date": { - "value_type": "date", - "display": { - "name": "Expiry Date", - "locale": "en" - } - } - }, - "credential_signing_alg_values_supported": [ - "ES256" - ], - "cryptographic_binding_methods_supported": [ - "did:key" - ], - "display": [ - { - "name": "National ID", - "description": "Digital government-issued identity credential", - "locale": "en" - } + "outOfBandRecord": { + "_tags": { + "invitationId": "1cbd22e4-1906-41e9-8807-83d84437f978", + "state": "await-response", + "role": "sender", + "recipientKeyFingerprints": [ + "z6MktUCPZjfRJXD4GMcYuXiqX2qZ8vBw6UAYpDFiHEUfwuLj" ] }, - "UniversityDegreeCredential-sdjwt": { - "format": "vc+sd-jwt", - "vct": "UniversityDegreeCredential", - "scope": "openid4vc:credential:UniversityDegreeCredential-sdjwt", - "claims": { - "full_name": { - "mandatory": true, - "value_type": "string", - "display": { - "name": "Full Name", - "locale": "en" - } - }, - "diploma_name": { - "mandatory": true, - "value_type": "string", - "display": { - "name": "Degree Title", - "locale": "en" - } - }, - "college_name": { - "value_type": "string", - "display": { - "name": "College/University", - "locale": "en" - } - }, - "graduation_date": { - "value_type": "date", - "display": { - "name": "Graduation Date", - "locale": "en" - } - }, - "awarded_date": { - "value_type": "date", - "display": { - "name": "Award Date", - "locale": "en" - } - } - }, - "credential_signing_alg_values_supported": [ - "ES256", - "EdDSA" + "outOfBandInvitation": { + "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/out-of-band/1.1/invitation", + "@id": "d6472943-e5d0-4d95-8b48-790ed5a41931", + "label": "Aries Test Agent", + "accept": [ + "didcomm/aip1", + "didcomm/aip2;env=rfc19" ], - "cryptographic_binding_methods_supported": [ - "did:key" + "handshake_protocols": [ + "https://didcomm.org/didexchange/1.0", + "https://didcomm.org/connections/1.0" ], - "display": [ + "services": [ { - "name": "University Degree Credential", - "description": "Issued by a recognized educational institution", - "locale": "en" + "id": "#inline-0", + "serviceEndpoint": "https://6b77-89-20-162-146.ngrok.io", + "type": "did-communication", + "recipientKeys": [ + "did:key:z6MkmTBHTWrvLPN8pBmUj7Ye5ww9GiacXCYMNVvpScSpf1DM" + ], + "routingKeys": [] } ] }, - "DrivingLicenseCredential-mdoc": { - "format": "mso_mdoc", - "doctype": "org.iso.18013.5.1", - "scope": "openid4vc:credential:DrivingLicenseCredential-mdoc", - "claims": { - "family_name": { - "mandatory": true, - "value_type": "string", - "display": { - "name": "Surname", - "locale": "en" - } - }, - "given_name": { - "mandatory": true, - "value_type": "string", - "display": { - "name": "Given Name", - "locale": "en" - } - }, - "birth_date": { - "value_type": "date", - "display": { - "name": "Date of Birth", - "locale": "en" - } - }, - "issue_date": { - "value_type": "date", - "display": { - "name": "Issued On", - "locale": "en" - } - }, - "expiry_date": { - "value_type": "date", - "display": { - "name": "Expires On", - "locale": "en" - } - }, - "issuing_country": { - "value_type": "string", - "display": { - "name": "Issuing Country", - "locale": "en" - } - }, - "license_number": { - "value_type": "string", - "display": { - "name": "License Number", - "locale": "en" - } - }, - "categories_of_vehicles": { - "value_type": "string", - "display": { - "name": "Authorized Vehicle Types", - "locale": "en" - } - } - }, - "credential_signing_alg_values_supported": [ - "ES256" - ], - "cryptographic_binding_methods_supported": [ - "did:key" - ], - "display": [ - { - "name": "Driving License", - "description": "ISO-compliant mobile driving license", - "locale": "en" - } - ] - } + "metadata": {}, + "id": "42a95528-0e30-4f86-a462-0efb02178b53", + "createdAt": "2022-01-01T00:00:00.000Z", + "reusable": false + }, + "connectionRecord": { + "_tags": { + "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", + "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", + "invitationKey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz", + "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d", + "verkey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz" + }, + "metadata": {}, + "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", + "createdAt": "2022-01-01T00:00:00.000Z", + "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", + "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", + "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d" } } } @@ -10115,9 +2199,9 @@ } } }, - "description": "Creates an issuer with issuer metadata.", + "description": "Creates inbound out-of-band record and assigns out-of-band invitation message to it if the\nmessage is valid.", "tags": [ - "oid4vc issuers" + "DIDComm - Out Of Band" ], "security": [ { @@ -10133,71 +2217,102 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateIssuerOptions" + "$ref": "#/components/schemas/ReceiveInvitationProps" } } } } - }, - "get": { - "operationId": "GetIssuersByQuery", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/OpenId4VcIssuerRecord" - }, - "type": "array" - } - } - } - } - }, - "description": "Query issuers by optional publicIssuerId.", - "tags": [ - "oid4vc issuers" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "in": "query", - "name": "publicIssuerId", - "required": false, - "schema": { - "type": "string" - } - } - ] } }, - "/openid4vc/issuer/{publicIssuerId}": { - "put": { - "operationId": "UpdateIssuerMetadata", + "/didcomm/oob/receive-invitation-url": { + "post": { + "operationId": "ReceiveInvitationFromUrl", "responses": { "200": { - "description": "Ok", + "description": "out-of-band record and connection record if one has been created.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenId4VcIssuerRecord" + "properties": { + "connectionRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "outOfBandRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + } + }, + "required": [ + "connectionRecord", + "outOfBandRecord" + ], + "type": "object" + }, + "examples": { + "Example 1": { + "value": { + "outOfBandRecord": { + "_tags": { + "invitationId": "1cbd22e4-1906-41e9-8807-83d84437f978", + "state": "await-response", + "role": "sender", + "recipientKeyFingerprints": [ + "z6MktUCPZjfRJXD4GMcYuXiqX2qZ8vBw6UAYpDFiHEUfwuLj" + ] + }, + "outOfBandInvitation": { + "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/out-of-band/1.1/invitation", + "@id": "d6472943-e5d0-4d95-8b48-790ed5a41931", + "label": "Aries Test Agent", + "accept": [ + "didcomm/aip1", + "didcomm/aip2;env=rfc19" + ], + "handshake_protocols": [ + "https://didcomm.org/didexchange/1.0", + "https://didcomm.org/connections/1.0" + ], + "services": [ + { + "id": "#inline-0", + "serviceEndpoint": "https://6b77-89-20-162-146.ngrok.io", + "type": "did-communication", + "recipientKeys": [ + "did:key:z6MkmTBHTWrvLPN8pBmUj7Ye5ww9GiacXCYMNVvpScSpf1DM" + ], + "routingKeys": [] + } + ] + }, + "metadata": {}, + "id": "42a95528-0e30-4f86-a462-0efb02178b53", + "createdAt": "2022-01-01T00:00:00.000Z", + "reusable": false + }, + "connectionRecord": { + "_tags": { + "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", + "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", + "invitationKey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz", + "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d", + "verkey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz" + }, + "metadata": {}, + "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", + "createdAt": "2022-01-01T00:00:00.000Z", + "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", + "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", + "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d" + } + } + } } } } } }, - "description": "Updates issuer metadata for a given publicIssuerId.", + "description": "Creates inbound out-of-band record and assigns out-of-band invitation message to it if the\nmessage is valid.", "tags": [ - "oid4vc issuers" + "DIDComm - Out Of Band" ], "security": [ { @@ -10207,116 +2322,108 @@ ] } ], - "parameters": [ - { - "in": "path", - "name": "publicIssuerId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateIssuerRecordOptions" + "$ref": "#/components/schemas/ReceiveInvitationByUrlProps" } } } } - }, - "get": { - "operationId": "GetIssuer", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenId4VcIssuerRecord" - } - } - } - } - }, - "description": "Returns a specific issuer by publicIssuerId.", - "tags": [ - "oid4vc issuers" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "in": "path", - "name": "publicIssuerId", - "required": true, - "schema": { - "type": "string" - } - } - ] } }, - "/openid4vc/issuer/{issuerId}/metadata": { - "get": { - "operationId": "GetIssuerAgentMetaData", + "/didcomm/oob/{outOfBandId}/accept-invitation": { + "post": { + "operationId": "AcceptInvitation", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "type": "number", - "format": "double" + "properties": { + "connectionRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "outOfBandRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + } + }, + "required": [ + "connectionRecord", + "outOfBandRecord" + ], + "type": "object" + }, + "examples": { + "Example 1": { + "value": { + "outOfBandRecord": { + "_tags": { + "invitationId": "1cbd22e4-1906-41e9-8807-83d84437f978", + "state": "await-response", + "role": "sender", + "recipientKeyFingerprints": [ + "z6MktUCPZjfRJXD4GMcYuXiqX2qZ8vBw6UAYpDFiHEUfwuLj" + ] + }, + "outOfBandInvitation": { + "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/out-of-band/1.1/invitation", + "@id": "d6472943-e5d0-4d95-8b48-790ed5a41931", + "label": "Aries Test Agent", + "accept": [ + "didcomm/aip1", + "didcomm/aip2;env=rfc19" + ], + "handshake_protocols": [ + "https://didcomm.org/didexchange/1.0", + "https://didcomm.org/connections/1.0" + ], + "services": [ + { + "id": "#inline-0", + "serviceEndpoint": "https://6b77-89-20-162-146.ngrok.io", + "type": "did-communication", + "recipientKeys": [ + "did:key:z6MkmTBHTWrvLPN8pBmUj7Ye5ww9GiacXCYMNVvpScSpf1DM" + ], + "routingKeys": [] + } + ] + }, + "metadata": {}, + "id": "42a95528-0e30-4f86-a462-0efb02178b53", + "createdAt": "2022-01-01T00:00:00.000Z", + "reusable": false + }, + "connectionRecord": { + "_tags": { + "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", + "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", + "invitationKey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz", + "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d", + "verkey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz" + }, + "metadata": {}, + "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", + "createdAt": "2022-01-01T00:00:00.000Z", + "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", + "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", + "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d" + } + } + } } } } } }, - "description": "Returns metadata for a specific issuer.", - "tags": [ - "oid4vc issuers" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "in": "path", - "name": "issuerId", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/openid4vc/issuer/{id}": { - "delete": { - "operationId": "DeleteIssuer", - "responses": { - "204": { - "description": "No content" - } - }, - "description": "Deletes a specific issuer by record id.", + "description": "Accept a connection invitation as invitee (by sending a connection request message) for the connection with the specified connection id.\nThis is not needed when auto accepting of connections is enabled.", "tags": [ - "oid4vc issuers" + "DIDComm - Out Of Band" ], "security": [ { @@ -10329,74 +2436,67 @@ "parameters": [ { "in": "path", - "name": "id", + "name": "outOfBandId", "required": true, "schema": { - "type": "string" - } - } - ] - } - }, - "/openid4vc/verification-sessions/create-presentation-request": { - "post": { - "operationId": "CreateProofRequest", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": {} - } + "$ref": "#/components/schemas/RecordId" } } - }, - "description": "Create an authorization request, acting as a Relying Party (RP)", - "tags": [ - "oid4vc verification sessions" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } ], - "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateAuthorizationRequest" + "$ref": "#/components/schemas/AcceptInvitationConfig" } } } } } }, - "/openid4vc/verification-sessions": { + "/didcomm/connections": { "get": { - "operationId": "GetAllVerificationSessions", + "operationId": "GetAllConnections", "responses": { "200": { - "description": "Ok", + "description": "ConnectionRecord[]", "content": { "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/OpenId4VcVerificationSessionRecord" + "$ref": "#/components/schemas/Record_string.unknown_" }, "type": "array" + }, + "examples": { + "Example 1": { + "value": [ + { + "_tags": { + "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", + "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", + "invitationKey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz", + "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d", + "verkey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz" + }, + "metadata": {}, + "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", + "createdAt": "2022-01-01T00:00:00.000Z", + "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", + "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", + "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d" + } + ] + } } } } } }, - "description": "Retrieve all verification session records", + "description": "Retrieve all connections records", "tags": [ - "oid4vc verification sessions" + "DIDComm - Connections" ], "security": [ { @@ -10409,39 +2509,52 @@ "parameters": [ { "in": "query", - "name": "publicVerifierId", + "name": "outOfBandId", "required": false, "schema": { "type": "string" } }, { + "description": "Alias", "in": "query", - "name": "payloadState", + "name": "alias", "required": false, "schema": { "type": "string" } }, { + "description": "Connection state", "in": "query", "name": "state", "required": false, "schema": { - "$ref": "#/components/schemas/OpenId4VcVerificationSessionState" + "$ref": "#/components/schemas/DidCommDidExchangeState" + } + }, + { + "description": "My DID", + "in": "query", + "name": "myDid", + "required": false, + "schema": { + "type": "string" } }, { + "description": "Their DID", "in": "query", - "name": "authorizationRequestUri", + "name": "theirDid", "required": false, "schema": { "type": "string" } }, { + "description": "Their label", "in": "query", - "name": "nonce", + "name": "theirLabel", "required": false, "schema": { "type": "string" @@ -10450,24 +2563,43 @@ ] } }, - "/openid4vc/verification-sessions/{verificationSessionId}": { + "/didcomm/connections/{connectionId}": { "get": { - "operationId": "GetVerificationSessionsById", + "operationId": "GetConnectionById", "responses": { "200": { - "description": "Ok", + "description": "ConnectionRecord", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenId4VcVerificationSessionRecord" + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "examples": { + "Example 1": { + "value": { + "_tags": { + "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", + "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", + "invitationKey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz", + "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d", + "verkey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz" + }, + "metadata": {}, + "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", + "createdAt": "2022-01-01T00:00:00.000Z", + "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", + "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", + "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d" + } + } } } } } }, - "description": "Get verification session by ID", + "description": "Retrieve connection record by connection id", "tags": [ - "oid4vc verification sessions" + "DIDComm - Connections" ], "security": [ { @@ -10479,31 +2611,26 @@ ], "parameters": [ { + "description": "Connection identifier", "in": "path", - "name": "verificationSessionId", + "name": "connectionId", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/RecordId" } } ] - } - }, - "/openid4vc/verification-sessions/response/{verificationSessionId}": { - "get": { - "operationId": "GetVerifiedAuthorizationResponse", + }, + "delete": { + "operationId": "DeleteConnection", "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } + "204": { + "description": "No content" } }, + "description": "Deletes a connection record from the connection repository.", "tags": [ - "oid4vc verification sessions" + "DIDComm - Connections" ], "security": [ { @@ -10515,37 +2642,54 @@ ], "parameters": [ { + "description": "Connection identifier", "in": "path", - "name": "verificationSessionId", + "name": "connectionId", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/RecordId" } } ] } }, - "/openid4vc/holder/sd-jwt-vcs": { - "get": { - "operationId": "GetSdJwtCredentials", + "/didcomm/connections/{connectionId}/accept-request": { + "post": { + "operationId": "AcceptRequest", "responses": { "200": { - "description": "Ok", + "description": "ConnectionRecord", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/SdJwtVcRecord" - }, - "type": "array" + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "examples": { + "Example 1": { + "value": { + "_tags": { + "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", + "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", + "invitationKey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz", + "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d", + "verkey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz" + }, + "metadata": {}, + "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", + "createdAt": "2022-01-01T00:00:00.000Z", + "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", + "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", + "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d" + } + } } } } } }, - "description": "Get SdJwt type of credentials", + "description": "Accept a connection request as inviter by sending a connection response message\nfor the connection with the specified connection id.\n\nThis is not needed when auto accepting of connection is enabled.", "tags": [ - "oid4vc holders" + "DIDComm - Connections" ], "security": [ { @@ -10555,58 +2699,56 @@ ] } ], - "parameters": [] - } - }, - "/openid4vc/holder/mdoc-vcs": { - "get": { - "operationId": "GetMdocCredentials", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/MdocRecord" - }, - "type": "array" - } - } - } - } - }, - "description": "Fetch all mso mdoc credentials in wallet", - "tags": [ - "oid4vc holders" - ], - "security": [ + "parameters": [ { - "jwt": [ - "tenant", - "dedicated" - ] + "description": "Connection identifier", + "in": "path", + "name": "connectionId", + "required": true, + "schema": { + "$ref": "#/components/schemas/RecordId" + } } - ], - "parameters": [] + ] } }, - "/openid4vc/holder/mdoc-vcs/decode": { + "/didcomm/connections/{connectionId}/accept-response": { "post": { - "operationId": "DecodeMdocCredential", + "operationId": "AcceptResponse", "responses": { "200": { - "description": "Ok", + "description": "ConnectionRecord", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "examples": { + "Example 1": { + "value": { + "_tags": { + "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", + "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", + "invitationKey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz", + "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d", + "verkey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz" + }, + "metadata": {}, + "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", + "createdAt": "2022-01-01T00:00:00.000Z", + "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", + "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", + "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d" + } + } + } } } } }, - "description": "Decode mso mdoc credential in wallet", + "description": "Accept a connection response as invitee by sending a trust ping message\nfor the connection with the specified connection id.\n\nThis is not needed when auto accepting of connection is enabled.", "tags": [ - "oid4vc holders" + "DIDComm - Connections" ], "security": [ { @@ -10616,80 +2758,133 @@ ] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "base64Url": { - "type": "string" - } - }, - "required": [ - "base64Url" - ], - "type": "object" - } + "parameters": [ + { + "description": "Connection identifier", + "in": "path", + "name": "connectionId", + "required": true, + "schema": { + "$ref": "#/components/schemas/RecordId" } } - } + ] } }, - "/openid4vc/holder/resolve-credential-offer": { - "post": { - "operationId": "ResolveCredOffer", + "/didcomm/url/{invitationId}": { + "get": { + "operationId": "GetInvitation", "responses": { "200": { "description": "Ok", "content": { "application/json": { - "schema": {} + "schema": { + "items": { + "$ref": "#/components/schemas/DidCommConnectionRecord" + }, + "type": "array" + } } } } }, - "description": "Resolve a credential offer", "tags": [ - "oid4vc holders" + "DIDComm - Connections" ], - "security": [ + "security": [], + "parameters": [ { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResolveCredentialOfferBody" - } + "in": "path", + "name": "invitationId", + "required": true, + "schema": { + "type": "string" } } - } + ] } }, - "/openid4vc/holder/authorization-request": { - "post": { - "operationId": "RequestAuthorizationForCredential", + "/dids/{did}": { + "get": { + "operationId": "GetDidRecordByDid", "responses": { "200": { - "description": "Ok", + "description": "DidResolutionResult", "content": { "application/json": { - "schema": {} + "schema": { + "properties": { + "didDocumentMetadata": { + "$ref": "#/components/schemas/DIDDocumentMetadata" + }, + "didResolutionMetadata": { + "$ref": "#/components/schemas/DidResolutionMetadata" + }, + "didDocument": { + "$ref": "#/components/schemas/Record_string.any_" + } + }, + "required": [ + "didDocumentMetadata", + "didResolutionMetadata", + "didDocument" + ], + "type": "object" + }, + "examples": { + "Example 1": { + "value": { + "didDocument": { + "@context": [ + "https://w3id.org/did/v1", + "https://w3id.org/security/suites/ed25519-2018/v1", + "https://w3id.org/security/suites/x25519-2019/v1" + ], + "id": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL", + "verificationMethod": [ + { + "id": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL#z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL", + "type": "Ed25519VerificationKey2018", + "controller": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL", + "publicKeyBase58": "6fioC1zcDPyPEL19pXRS2E4iJ46zH7xP6uSgAaPdwDrx" + } + ], + "authentication": [ + "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL#z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL" + ], + "assertionMethod": [ + "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL#z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL" + ], + "capabilityInvocation": [ + "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL#z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL" + ], + "capabilityDelegation": [ + "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL#z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL" + ], + "keyAgreement": [ + { + "id": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL#z6LSrdqo4M24WRDJj1h2hXxgtDTyzjjKCiyapYVgrhwZAySn", + "type": "X25519KeyAgreementKey2019", + "controller": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL", + "publicKeyBase58": "FxfdY3DCQxVZddKGAtSjZdFW9bCCW7oRwZn1NFJ2Tbg2" + } + ] + }, + "didDocumentMetadata": {}, + "didResolutionMetadata": { + "contentType": "application/did+ld+json" + } + } + } + } } } } }, + "description": "Resolves did and returns did resolution result", "tags": [ - "oid4vc holders" + "Dids" ], "security": [ { @@ -10699,35 +2894,60 @@ ] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthorizeRequestCredentialOffer" - } + "parameters": [ + { + "description": "Decentralized Identifier", + "in": "path", + "name": "did", + "required": true, + "schema": { + "$ref": "#/components/schemas/Did" } } - } + ] } }, - "/openid4vc/holder/request-credential": { + "/dids/write": { "post": { - "operationId": "RequestCredential", + "operationId": "WriteDid", "responses": { "200": { - "description": "Ok", + "description": "DidResolutionResult", "content": { "application/json": { - "schema": {} + "schema": {}, + "examples": { + "Example 1": { + "value": { + "did": "did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7", + "didDocument": { + "@context": [ + "https://w3id.org/did/v1", + "https://w3id.org/security/suites/ed25519-2018/v1" + ], + "id": "did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7", + "verificationMethod": [ + { + "id": "did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7#verkey", + "type": "Ed25519VerificationKey2018", + "controller": "did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7", + "publicKeyBase58": "BapLDK4dEY88vWcQgNbpAPVVP4r3CHs4MvShmmhqkxXM" + } + ], + "authentication": [ + "did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7#verkey" + ] + } + } + } + } } } } }, - "description": "Initiates a token request, then requests credentials from issuer", + "description": "Did nym registration", "tags": [ - "oid4vc holders" + "Dids" ], "security": [ { @@ -10743,29 +2963,33 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RequestCredentialBody" + "$ref": "#/components/schemas/DidCreate" } } } } } }, - "/openid4vc/holder/resolve-proof-request": { - "post": { - "operationId": "ResolveProofRequest", + "/dids": { + "get": { + "operationId": "GetDids", "responses": { "200": { "description": "Ok", "content": { "application/json": { - "schema": {} + "schema": { + "items": { + "$ref": "#/components/schemas/DidRecord" + }, + "type": "array" + } } } } }, - "description": "Resolve a proof request", "tags": [ - "oid4vc holders" + "Dids" ], "security": [ { @@ -10775,114 +2999,84 @@ ] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResolveProofRequest" - } - } - } - } + "parameters": [] } }, - "/openid4vc/holder/accept-proof-request": { - "post": { - "operationId": "AcceptProofRequest", + "/agent": { + "get": { + "operationId": "GetAgentInfo", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "anyOf": [ - { - "properties": { - "body": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/Record_string.unknown_" - } - ] - }, - "status": { - "type": "number", - "format": "double" - } - }, - "required": [ - "body", - "status" - ], - "type": "object" - }, - { - "properties": { - "body": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "status": { - "type": "number", - "format": "double" - } - }, - "required": [ - "body", - "status" - ], - "type": "object" - } - ] + "$ref": "#/components/schemas/AgentInfo" } } } } }, - "description": "Accept a proof request", + "description": "Retrieve basic agent information", "tags": [ - "oid4vc holders" + "Agent" ], "security": [ { "jwt": [ "tenant", - "dedicated" + "dedicated", + "Basewallet" ] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResolveProofRequest" + "parameters": [] + } + }, + "/agent/token": { + "post": { + "operationId": "GetAgentToken", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentToken" + } } } } - } + }, + "description": "Retrieve agent token", + "tags": [ + "Agent" + ], + "security": [ + { + "apiKey": [] + } + ], + "parameters": [] } }, - "/openid4vc/holder/decode-sdjwt": { + "/agent/credential/verify": { "post": { - "operationId": "DecodeSdJwt", + "operationId": "VerifyCredential", "responses": { "200": { "description": "Ok", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/W3cVerifyCredentialResult" + } } } } }, "tags": [ - "oid4vc holders" + "Agent" ], "security": [ { @@ -10898,45 +3092,83 @@ "content": { "application/json": { "schema": { - "properties": { - "jwt": { - "type": "string" - } - }, - "required": [ - "jwt" - ], - "type": "object" + "anyOf": [ + { + "$ref": "#/components/schemas/SafeW3cJsonLdVerifyCredentialOptions" + }, + {} + ] } } } } } }, - "/openid4vc/verifier": { + "/multi-tenancy/create-tenant": { "post": { - "operationId": "CreateVerifier", + "operationId": "CreateTenant", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenId4VcVerifierRecord" + "properties": { + "token": {}, + "metadata": { + "$ref": "#/components/schemas/Metadata____" + }, + "allowCache": { + "type": "boolean" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "id": { + "type": "string" + }, + "storageVersion": { + "type": "string" + }, + "config": { + "$ref": "#/components/schemas/TenantConfig" + }, + "type": { + "type": "string", + "enum": [ + "TenantRecord" + ], + "nullable": false + } + }, + "required": [ + "token", + "metadata", + "allowCache", + "createdAt", + "id", + "storageVersion", + "config", + "type" + ], + "type": "object" } } } } }, - "description": "Create a new verifier and store the verifier record", "tags": [ - "oid4vc verifiers" + "MultiTenancy" ], "security": [ { "jwt": [ - "tenant", - "dedicated" + "Basewallet" ] } ], @@ -10946,46 +3178,77 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenId4VcSiopCreateVerifierOptions" + "$ref": "#/components/schemas/CreateTenantOptions" } } } } - }, - "get": { - "operationId": "GetVerifiersByQuery", + } + }, + "/multi-tenancy/get-token/{tenantId}": { + "post": { + "operationId": "GetTenantToken", "responses": { "200": { "description": "Ok", + "content": { + "application/json": { + "schema": {} + } + } + }, + "404": { + "description": "", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/OpenId4VcVerifierRecord" + "properties": { + "reason": { + "type": "string" + } }, - "type": "array" + "required": [ + "reason" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" } } } } }, - "description": "Get verifiers by query", "tags": [ - "oid4vc verifiers" + "MultiTenancy" ], "security": [ { "jwt": [ - "tenant", - "dedicated" + "Basewallet" ] } ], "parameters": [ { - "in": "query", - "name": "publicVerifierId", - "required": false, + "in": "path", + "name": "tenantId", + "required": true, "schema": { "type": "string" } @@ -10993,116 +3256,138 @@ ] } }, - "/openid4vc/verifier/{publicVerifierId}": { - "put": { - "operationId": "UpdateVerifierMetadata", + "/multi-tenancy/{tenantId}": { + "get": { + "operationId": "GetTenantById", "responses": { "200": { "description": "Ok", + "content": { + "application/json": { + "schema": {} + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "properties": { + "reason": { + "type": "string" + } + }, + "required": [ + "reason" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenId4VcVerifierRecord" + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" } } } } }, - "description": "Update verifier metadata", "tags": [ - "oid4vc verifiers" + "MultiTenancy" ], "security": [ { "jwt": [ - "tenant", - "dedicated" + "Basewallet" ] } ], "parameters": [ { "in": "path", - "name": "publicVerifierId", + "name": "tenantId", "required": true, "schema": { "type": "string" } } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenId4VcUpdateVerifierRecordOptions" - } - } - } - } + ] }, - "get": { - "operationId": "GetVerifier", + "delete": { + "operationId": "DeleteTenantById", "responses": { "200": { "description": "Ok", + "content": { + "application/json": { + "schema": {} + } + } + }, + "404": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenId4VcVerifierRecord" + "properties": { + "reason": { + "type": "string" + } + }, + "required": [ + "reason" + ], + "type": "object" } } } - } - }, - "description": "Get single verifier by ID", - "tags": [ - "oid4vc verifiers" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "in": "path", - "name": "publicVerifierId", - "required": true, - "schema": { - "type": "string" + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } } } - ] - } - }, - "/openid4vc/verifier/{verifierId}": { - "delete": { - "operationId": "DeleteVerifier", - "responses": { - "204": { - "description": "No content" - } }, - "description": "Delete verifier by ID", "tags": [ - "oid4vc verifiers" + "MultiTenancy" ], "security": [ { "jwt": [ - "tenant", - "dedicated" + "Basewallet" ] } ], "parameters": [ { "in": "path", - "name": "verifierId", + "name": "tenantId", "required": true, "schema": { "type": "string" From 6a53e4b47a0eb4d7c7e49b095704bdb4d5b3d3e0 Mon Sep 17 00:00:00 2001 From: Krishna Waske Date: Mon, 15 Dec 2025 19:10:20 +0530 Subject: [PATCH 13/38] fix: cliagent issues Signed-off-by: Krishna Waske --- src/cliAgent.ts | 9 ++++++--- yarn.lock | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/cliAgent.ts b/src/cliAgent.ts index edaa9248..516dddfc 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -1,3 +1,6 @@ +// Note: For now we need to import askar-nodejs at the top to handle the undefined askar issue +// Refer from: https://github.com/credebl/mobile-sdk/blob/main/packages/ssi/src/wallet/wallet.ts +import '@openwallet-foundation/askar-nodejs' import type { InitConfig } from '@credo-ts/core' import type { IndyVdrPoolConfig } from '@credo-ts/indy-vdr' @@ -181,9 +184,10 @@ const getModules = ( registries: [new IndyVdrAnonCredsRegistry()], anoncreds, }), - oob: true, mediationRecipient: true, messagePickup: true, + mediator: false, + basicMessages: true, connections: { autoAcceptConnections: autoAcceptConnections || true, @@ -198,7 +202,7 @@ const getModules = ( proofFormats: [legacyIndyProofFormat, anonCredsProofFormatService, presentationExchangeProofFormatService], }), ], - }, + }, credentials: { autoAcceptCredentials: autoAcceptCredentials || DidCommAutoAcceptCredential.Always, credentialProtocols: [ @@ -211,7 +215,6 @@ const getModules = ( ], }, }), - discovery: new DidCommDiscoverFeaturesModule(), cache: new CacheModule({ cache: new InMemoryLruCache({ limit: Number(process.env.INMEMORY_LRU_CACHE_LIMIT) || Infinity }), }), diff --git a/yarn.lock b/yarn.lock index f9bc587c..f4ef7485 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2102,7 +2102,7 @@ ref-array-di "^1.2.2" ref-struct-di "^1.1.1" -"@openwallet-foundation/askar-shared@0.4.3", "@openwallet-foundation/askar-shared@^0.4.3": +"@openwallet-foundation/askar-shared@0.4.3": version "0.4.3" resolved "https://registry.yarnpkg.com/@openwallet-foundation/askar-shared/-/askar-shared-0.4.3.tgz#e1e4576e347c922c18a3a6abd452945060bb1520" integrity sha512-Zt9zlvjJxNs8UWlnRydZH594Lak15YPHY72VT1+iDbXh0OjTdyq6Bf0FIsh9sfFnRYIgh2zd8+VoXxZ07GjADA== @@ -8165,7 +8165,7 @@ tsoa@^6.0.1: "@tsoa/cli" "^6.6.0" "@tsoa/runtime" "^6.6.0" -tsyringe@^4.10.0, tsyringe@^4.6.0, tsyringe@^4.8.0: +tsyringe@^4.10.0, tsyringe@^4.6.0: version "4.10.0" resolved "https://registry.yarnpkg.com/tsyringe/-/tsyringe-4.10.0.tgz#d0c95815d584464214060285eaaadd94aa03299c" integrity sha512-axr3IdNuVIxnaK5XGEUFTu3YmAQ6lllgrvqfEoR16g/HGnYY/6We4oWENtAnzK6/LpJ2ur9PAb80RBt7/U4ugw== From a5e1a317d5d63fce3eb92624f1bb60bab97411b9 Mon Sep 17 00:00:00 2001 From: Krishna Waske Date: Tue, 23 Dec 2025 17:53:38 +0530 Subject: [PATCH 14/38] fix: x509 controller (#338) * fix: x509 controller Signed-off-by: Krishna Waske * fix: x509 import fix Signed-off-by: Krishna Waske * fix/added dynamic implementation for keyType of x509 Signed-off-by: sujitaw * fix/sonarqube issue Signed-off-by: sujitaw * fix/sonarqube issue Signed-off-by: sujitaw * fix/sonar cube issue Signed-off-by: sujitaw * fix/code rabbit comments Signed-off-by: sujitaw * fix/pr comments Signed-off-by: sujitaw --------- Signed-off-by: Krishna Waske Signed-off-by: sujitaw Co-authored-by: sujitaw --- src/controllers/did/DidController.ts | 93 ++-- src/controllers/x509/x509.Controller.ts | 144 +++--- src/controllers/x509/x509.service.ts | 463 +++++++++--------- src/controllers/x509/x509.types.ts | 64 ++- src/enums/enum.ts | 11 +- src/routes/routes.ts | 0 src/routes/swagger.json | 623 +++++++++++++++++++++++- src/utils/constant.ts | 23 + src/utils/helpers.ts | 41 +- 9 files changed, 1086 insertions(+), 376 deletions(-) delete mode 100644 src/routes/routes.ts diff --git a/src/controllers/did/DidController.ts b/src/controllers/did/DidController.ts index 193ee075..1bc214ea 100644 --- a/src/controllers/did/DidController.ts +++ b/src/controllers/did/DidController.ts @@ -1,7 +1,9 @@ + import type { DidResolutionResultProps } from '../types' import type { PolygonDidCreateOptions } from '@ayanworks/credo-polygon-w3c-module/build/dids' import type { DidDocument, KeyDidCreateOptions, PeerDidNumAlgo2CreateOptions } from '@credo-ts/core' +import { transformPrivateKeyToPrivateJwk, transformSeedToPrivateJwk } from '@credo-ts/askar' import { TypedArrayEncoder, DidDocumentBuilder, @@ -10,20 +12,27 @@ import { PeerDidNumAlgo, Kms, Hasher, + LogLevel, + Agent, } from '@credo-ts/core' +import { Key, KeyAlgorithm,askar } from '@openwallet-foundation/askar-nodejs' import axios from 'axios' import { Request as Req } from 'express' import { Body, Controller, Example, Get, Path, Post, Route, Tags, Security, Request } from 'tsoa' import { injectable } from 'tsyringe' -import { DidMethod, Network, Role, SCOPES } from '../../enums' +import { DidMethod, KeyAlgorithmCurve, Network, Role, SCOPES } from '../../enums' import ErrorHandlingService from '../../errorHandlingService' import { BadRequestError, InternalServerError } from '../../errors' import { AgentType } from '../../types' +import { keyAlgorithmToCurve, p521, verkey } from '../../utils/constant' +import { getTypeFromCurve } from '../../utils/helpers' import { CreateDidResponse, Did, DidRecordExample } from '../examples' import { DidCreate } from '../types' -import { KeyAlgorithm,askar } from '@openwallet-foundation/askar-nodejs' -import { transformPrivateKeyToPrivateJwk, transformSeedToPrivateJwk } from '@credo-ts/askar' +import { supportedKeyTypesDID } from '../x509/x509.types' +import { container } from 'tsyringe' +import { RestMultiTenantAgentModules } from '../../cliAgent' + @Tags('Dids') @@ -36,6 +45,8 @@ export class DidController extends Controller { * @param did Decentralized Identifier * @returns DidResolutionResult */ + private agent = container.resolve(Agent) + @Example(DidRecordExample) @Get('/:did') public async getDidRecordByDid(@Request() request: Req, @Path('did') did: Did) { @@ -66,7 +77,7 @@ export class DidController extends Controller { public async writeDid(@Request() request: Req, @Body() createDidOptions: DidCreate) { let didRes - console.log("dsajsa", askar.version()) + this.agent.config.logger.info(`askar version ${askar.version()}`) try { if (!createDidOptions.method) { throw new BadRequestError('Method is required') @@ -324,7 +335,6 @@ export class DidController extends Controller { const buffer = Hasher.hash(verificationKey.publicKey.publicKey, 'sha-256') const did = TypedArrayEncoder.toBase58(buffer.slice(0, 16)) - // const did = `did:indy:${endorserNamespace}:${namespaceIdentifier let body if (createDidOptions.network === Network.Indicio_Testnet) { @@ -369,13 +379,14 @@ export class DidController extends Controller { const key = await agent.kms.importKey({ privateJwk }) const publicJwk = Kms.PublicJwk.fromPublicJwk(key.publicJwk) + const completeDid = `${didMethod}:${did}` await agent.dids.import({ - did, + did: completeDid, keys: [ { kmsKeyId: key.keyId, - // TODO: Find what to add here - didDocumentRelativeKeyId: '' + didDocumentRelativeKeyId: verkey, + } ] }) @@ -395,72 +406,34 @@ export class DidController extends Controller { if (didOptions.keyType === KeyAlgorithm.Bls12381G2) { throw new BadRequestError('didOptions.keyType for type "bls12381g2" has been deprecated') } - if (didOptions.keyType !== KeyAlgorithm.Ed25519) { - throw new BadRequestError('Only ed25519 and bls12381g2 key type supported') + if (didOptions.keyType === p521 as KeyAlgorithm) { + throw new BadRequestError('didOptions.keyType for type p521 is not supported') + } + const normalizedCurve = keyAlgorithmToCurve[didOptions.keyType as KeyAlgorithm] + if (!(normalizedCurve && supportedKeyTypesDID[DidMethod.Key]?.some(kt => kt.crv === normalizedCurve))) { + throw new BadRequestError(`Invalid keyType: ${didOptions.keyType}`) } + if (!didOptions.did) { - console.log("This is inside if") - // Transform seed to private JWK and - // const { privateJwk } = transformSeedToPrivateJwk({ - // type: { - // kty: 'OKP', - // crv: 'Ed25519', - // }, - // seed: TypedArrayEncoder.fromString(didOptions.seed), - // }) - // console.log("This is privateJwk::::::", JSON.stringify(privateJwk)) - - // // Import the key using KMS - // const { keyId } = await agent.kms.importKey({ privateJwk }) - // console.log("This is keyId", keyId) - - // // Create DID using the imported key - // const didResponse = await agent.dids.create({ - // method: 'key', - // options: { - // keyId, - // }, - // }) const privateJwk = transformPrivateKeyToPrivateJwk({ - privateKey: TypedArrayEncoder.fromString('96213c3d7fc8d4d6754c7a0fd969598e'), - type: { - kty: 'OKP', - crv: 'Ed25519', - }, + privateKey: TypedArrayEncoder.fromString(didOptions.seed), + type: getTypeFromCurve(didOptions.keyType ?? KeyAlgorithm.Ed25519), }).privateJwk - const { keyId } = await agent.kms.importKey({ privateJwk, }) - + this.agent.config.logger.info(`This is keyId:::::: ${keyId}`) const didResponse = await agent.dids.create({ - method: 'key', + method: DidMethod.Key, options: { keyId, }, }) - console.log("This is didResponse::::::", JSON.stringify(didResponse)) + this.agent.config.logger.info(`This is didResponse:::::: ${JSON.stringify(didResponse)}`) did = `${didResponse.didState.did}` didDocument = didResponse.didState.didDocument - - // await agent.kms.createKey({ - // keyType: didOptions.keyType, - // seed: TypedArrayEncoder.fromString(didOptions.seed), - // }) - - // didResponse = await agent.dids.create({ - // method: DidMethod.Key, - // options: { - // keyType: KeyAlgorithm.Ed25519, - // }, - // secret: { - // privateKey: TypedArrayEncoder.fromString(didOptions.seed), - // }, - // }) - // did = `${didResponse.didState.did}` - // didDocument = didResponse.didState.didDocument } else { did = didOptions.did const createdDid = await agent.dids.getCreatedDids({ @@ -470,8 +443,8 @@ export class DidController extends Controller { didDocument = createdDid[0]?.didDocument } - console.log('This is did', did) - console.log('This is didDocument', didDocument) + this.agent.config.logger.info(`This is did ${did}` ) + this.agent.config.logger.info(`This is didDocument ${didDocument}` ) await agent.dids.import({ did, diff --git a/src/controllers/x509/x509.Controller.ts b/src/controllers/x509/x509.Controller.ts index a8e3e4bb..61a412eb 100644 --- a/src/controllers/x509/x509.Controller.ts +++ b/src/controllers/x509/x509.Controller.ts @@ -1,78 +1,78 @@ -// import { injectable } from '@credo-ts/core' -// import { Request as Req } from 'express' -// import { Body, Controller, Post, Route, Tags, Security, Request, Get } from 'tsoa' +import { injectable } from '@credo-ts/core' +import { Request as Req } from 'express' +import { Body, Controller, Post, Route, Tags, Security, Request, Get } from 'tsoa' -// import { SCOPES } from '../../enums' -// import ErrorHandlingService from '../../errorHandlingService' -// import { X509ImportCertificateOptionsDto } from '../types' -// import { x509ServiceT } from './x509.service' -// import { X509CreateCertificateOptionsDto } from './x509.types' +import { SCOPES } from '../../enums' +import ErrorHandlingService from '../../errorHandlingService' +import { X509ImportCertificateOptionsDto } from '../types' +import { x509ServiceT } from './x509.service' +import { X509CreateCertificateOptionsDto } from './x509.types' -// @Tags('x509') -// @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) -// @Route('/x509') -// @injectable() -// export class X509Controller extends Controller { -// @Post('/') -// public async createX509Certificate( -// @Request() request: Req, -// @Body() createX509Options: X509CreateCertificateOptionsDto, -// ) { -// try { -// return await x509ServiceT.createCertificate(request, createX509Options) -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } +@Tags('x509') +@Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) +@Route('/x509') +@injectable() +export class X509Controller extends Controller { + @Post('/') + public async createX509Certificate( + @Request() request: Req, + @Body() createX509Options: X509CreateCertificateOptionsDto, + ) { + try { + return await x509ServiceT.createCertificate(request, createX509Options) + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } -// @Post('/import') -// public async ImportX509Certificates( -// @Request() request: Req, -// @Body() importX509Options: X509ImportCertificateOptionsDto, -// ) { -// try { -// return await x509ServiceT.ImportX509Certificates(request, importX509Options) -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } + @Post('/import') + public async ImportX509Certificates( + @Request() request: Req, + @Body() importX509Options: X509ImportCertificateOptionsDto, + ) { + try { + return await x509ServiceT.ImportX509Certificates(request, importX509Options) + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } -// @Post('/trusted') -// public async addTrustedCertificate( -// @Request() request: Req, -// @Body() -// options: { -// certificate: string -// }, -// ) { -// try { -// return await x509ServiceT.addTrustedCertificate(request, options) -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } + @Post('/trusted') + public async addTrustedCertificate( + @Request() request: Req, + @Body() + options: { + certificate: string + }, + ) { + try { + return await x509ServiceT.addTrustedCertificate(request, options) + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } -// @Get('/trusted') -// public async getTrustedCertificates(@Request() request: Req) { -// try { -// return await x509ServiceT.getTrustedCertificates(request) -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } + @Get('/trusted') + public async getTrustedCertificates(@Request() request: Req) { + try { + return await x509ServiceT.getTrustedCertificates(request) + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } -// @Post('/decode') -// public async decodeCertificate( -// @Request() request: Req, -// @Body() -// options: { -// certificate: string -// }, -// ) { -// try { -// return await x509ServiceT.decodeCertificate(request, options) -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } -// } + @Post('/decode') + public async decodeCertificate( + @Request() request: Req, + @Body() + options: { + certificate: string + }, + ) { + try { + return await x509ServiceT.decodeCertificate(request, options) + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } +} diff --git a/src/controllers/x509/x509.service.ts b/src/controllers/x509/x509.service.ts index 6bdef914..8e0ca051 100644 --- a/src/controllers/x509/x509.service.ts +++ b/src/controllers/x509/x509.service.ts @@ -1,219 +1,244 @@ -// import type { X509CreateCertificateOptionsDto } from './x509.types' -// import type { BasicX509CreateCertificateConfig, X509ImportCertificateOptionsDto } from '../types' -// import type { CredoError } from '@credo-ts/core' -// import type { Request as Req } from 'express' - -// import { -// TypedArrayEncoder, -// X509Certificate, -// X509ExtendedKeyUsage, -// X509KeyUsage, -// X509ModuleConfig, -// X509Service, -// type Agent, -// } from '@credo-ts/core' - -// import { generateSecretKey, getCertificateValidityForSystem } from '../../utils/helpers' - -// import { pemToRawEd25519PrivateKey } from './crypto-util' -// import { KeyAlgorithm } from '@openwallet-foundation/askar-nodejs' - -// class x509Service { -// public async createSelfSignedDCS(createX509Options: BasicX509CreateCertificateConfig, agentReq: Req) { -// const agent = agentReq.agent - -// const authorityKey = await createKey(agent as Agent, createX509Options.keyType) -// const AGENT_HOST = createX509Options.issuerAlternativeNameURL -// const AGENT_DNS = AGENT_HOST.replace('https://', '') -// const selfSignedx509certificate = await X509Service.createCertificate(agent.context, { -// authorityKey: authorityKey, //createX509Options.subjectKey, -// issuer: { countryName: createX509Options.countryName, commonName: createX509Options.commonName }, -// validity: getCertificateValidityForSystem(false), -// extensions: { -// subjectKeyIdentifier: { -// include: true, -// }, -// keyUsage: { -// usages: [X509KeyUsage.KeyCertSign, X509KeyUsage.CrlSign, X509KeyUsage.DigitalSignature], -// markAsCritical: true, -// }, -// subjectAlternativeName: { -// name: [ -// { type: 'dns', value: AGENT_DNS }, -// { type: 'url', value: AGENT_HOST }, -// ], -// }, -// issuerAlternativeName: { -// // biome-ignore lint/style/noNonNullAssertion: -// //name: rootCertificate.issuerAlternativeNames!, -// name: [ -// { type: 'dns', value: AGENT_DNS }, -// { type: 'url', value: AGENT_HOST }, -// ], -// }, -// extendedKeyUsage: { -// usages: [X509ExtendedKeyUsage.MdlDs], -// markAsCritical: true, -// }, -// basicConstraints: { -// ca: true, -// pathLenConstraint: 0, -// markAsCritical: true, -// }, -// // TODO: Create revocation list and add URL here - store this in platform -// // crlDistributionPoints: { -// // urls: [`${"AGENT_HOST"}/crl`], -// // }, -// }, -// }) - -// agent.config.logger.info('======= X.509 IACA Self Signed Certificate ===========') -// const selfSignedx509certificateBase64 = selfSignedx509certificate.toString('base64') -// agent.config.logger.debug('selfSignedx509certificateBase64', { selfSignedx509certificateBase64 }) -// return { publicCertificateBase64: selfSignedx509certificateBase64 } -// } - -// public async createCertificate(agentReq: Req, options: X509CreateCertificateOptionsDto) { -// const agent = agentReq.agent - -// let authorityKeyID, subjectPublicKeyID - -// agent.config.logger.debug(`createCertificate options:`, options) - -// if (options.authorityKey && options?.authorityKey?.seed) { -// authorityKeyID = await agent.context.wallet.createKey({ -// keyType: options.authorityKey.keyType ?? KeyAlgorithm.EcSecp256r1, -// seed: TypedArrayEncoder.fromString(options.authorityKey.seed), -// }) -// } else { -// authorityKeyID = await agent.context.wallet.createKey({ -// keyType: KeyAlgorithm.EcSecp256r1, -// }) -// } - -// if (options.subjectPublicKey) { -// if (options?.subjectPublicKey?.seed) { -// subjectPublicKeyID = await agent.context.wallet.createKey({ -// keyType: options.subjectPublicKey.keyType ?? KeyAlgorithm.EcSecp256r1, -// seed: TypedArrayEncoder.fromString(options.subjectPublicKey.seed), -// }) -// } else { -// subjectPublicKeyID = await agent.context.wallet.createKey({ -// keyType: KeyAlgorithm.EcSecp256r1, -// }) -// } -// } - -// const certificate = await agent.x509.createCertificate({ -// authorityKey: authorityKeyID as Key, -// subjectPublicKey: (subjectPublicKeyID as Key) ?? undefined, -// serialNumber: options.serialNumber, -// issuer: options.issuer, -// extensions: options.extensions, -// subject: options.subject, -// validity: options.validity, -// }) - -// const issuerCertificate = certificate.toString('base64') -// return { publicCertificateBase64: issuerCertificate } -// } - -// public async ImportX509Certificates(agentReq: Req, options: X509ImportCertificateOptionsDto) { -// const agent = agentReq.agent -// agent.config.logger.debug(`Start validating keys`) -// const secretHexKey = await pemToRawEd25519PrivateKey(options.privateKey ?? '') -// const privateKey = TypedArrayEncoder.fromHex(secretHexKey) - -// agent.config.logger.debug(`Decode certificate`) -// const parsedCertificate = X509Service.parseCertificate(agent.context, { -// encodedCertificate: options.certificate, -// }) -// const issuerCertficicate = parsedCertificate.toString('base64') - -// try { -// const documentSignerKey = await agent.wallet.createKey({ -// privateKey: privateKey, -// keyType: options.keyType, -// }) - -// if ( -// parsedCertificate.publicKey.keyType !== options.keyType || -// !Buffer.from(parsedCertificate.publicKey.publicKey).equals(Buffer.from(documentSignerKey.publicKey)) -// ) { -// throw new Error(`Key mismatched in provided X509_CERTIFICATE to import`) -// } -// console.log(`Keys matched with certificate`) -// } catch (error) { -// // If the key already exists, we assume the self-signed certificate is already created -// if (error instanceof WalletKeyExistsError) { -// console.error( -// `key already exists while importing certificate ${JSON.stringify(parsedCertificate.privateKey)}`, -// parsedCertificate.privateKey, -// ) -// } else { -// agent.config.logger.error(`${JSON.stringify(error)}`) -// throw error -// } -// } - -// return { issuerCertficicate } -// } - -// public addTrustedCertificate( -// agentReq: Req, -// options: { -// certificate: string -// }, -// ) { -// const agent = agentReq.agent -// return agent.x509.addTrustedCertificate(options.certificate) -// } - -// public getTrustedCertificates(agentReq: Req) { -// const trustedCertificates = agentReq.agent.context.dependencyManager -// .resolve(X509ModuleConfig) -// .trustedCertificates?.map((cert) => X509Certificate.fromEncodedCertificate(cert).toString('base64')) // as [string, ...string[]] - -// return trustedCertificates -// } - -// /** -// * Parses a base64-encoded X.509 certificate into a X509Certificate -// * -// * @param issuerAgent {Agent} -// * @param options {x509Input} -// * @returns -// */ -// public decodeCertificate( -// agentReq: Req, -// options: { -// certificate: string -// }, -// ) { -// const parsedCertificate = X509Service.parseCertificate(agentReq.agent.context, { -// encodedCertificate: options.certificate, -// }) - -// return parsedCertificate -// } -// } - -// export const x509ServiceT = new x509Service() - -// export async function createKey(agent: Agent, keyType: KeyAlgorithm) { -// try { -// const seed = await generateSecretKey(keyType === KeyAlgorithm.EcSecp256r1 ? 64 : 32) - -// agent.config.logger.debug(`createKey: got seed ${seed}`) - -// const authorityKey = await agent.kms.createKey({ -// algorithm: keyType, -// seed: TypedArrayEncoder.fromString(seed), -// }) - -// return authorityKey -// } catch (error) { -// agent.config.logger.debug(`Error while creating authorityKey`, { message: (error as CredoError).message }) -// throw error -// } -// } + +import type { BasicX509CreateCertificateConfig, X509ImportCertificateOptionsDto } from '../types' +import type { CredoError } from '@credo-ts/core' +import type { Request as Req } from 'express' + +import { transformPrivateKeyToPrivateJwk, transformSeedToPrivateJwk } from '@credo-ts/askar' +import { + Kms, + TypedArrayEncoder, + X509Certificate, + X509ExtendedKeyUsage, + X509KeyUsage, + X509ModuleConfig, + X509Service, + type Agent, +} from '@credo-ts/core' +import { KeyAlgorithm } from '@openwallet-foundation/askar-nodejs' + +import { keyAlgorithmToCurve } from '../../utils/constant' +import { generateSecretKey, getCertificateValidityForSystem, getTypeFromCurve } from '../../utils/helpers' + +import { pemToRawEd25519PrivateKey } from './crypto-util' +import { type X509CreateCertificateOptionsDto } from './x509.types' +import { error } from 'console' + +class x509Service { + public async createSelfSignedDCS(createX509Options: BasicX509CreateCertificateConfig, agentReq: Req) { + const agent = agentReq.agent + + const authorityKey = await createKey(agent as Agent, createX509Options.keyType) + const AGENT_HOST = createX509Options.issuerAlternativeNameURL + const AGENT_DNS = AGENT_HOST.replace('https://', '') + const selfSignedx509certificate = await X509Service.createCertificate(agent.context, { + authorityKey: Kms.PublicJwk.fromPublicJwk(authorityKey.publicJwk), //createX509Options.subjectKey, + issuer: { countryName: createX509Options.countryName, commonName: createX509Options.commonName }, + validity: getCertificateValidityForSystem(false), + extensions: { + subjectKeyIdentifier: { + include: true, + }, + keyUsage: { + usages: [X509KeyUsage.KeyCertSign, X509KeyUsage.CrlSign, X509KeyUsage.DigitalSignature], + markAsCritical: true, + }, + subjectAlternativeName: { + name: [ + { type: 'dns', value: AGENT_DNS }, + { type: 'url', value: AGENT_HOST }, + ], + }, + issuerAlternativeName: { + name: [ + { type: 'dns', value: AGENT_DNS }, + { type: 'url', value: AGENT_HOST }, + ], + }, + extendedKeyUsage: { + usages: [X509ExtendedKeyUsage.MdlDs], + markAsCritical: true, + }, + basicConstraints: { + ca: true, + pathLenConstraint: 0, + markAsCritical: true, + }, + // TODO: Create revocation list and add URL here - store this in platform + // crlDistributionPoints: { + // urls: [`${"AGENT_HOST"}/crl`], + // }, + }, + }) + + agent.config.logger.info('======= X.509 IACA Self Signed Certificate ===========') + const selfSignedx509certificateBase64 = selfSignedx509certificate.toString('base64') + agent.config.logger.debug('selfSignedx509certificateBase64', { selfSignedx509certificateBase64 }) + return { publicCertificateBase64: selfSignedx509certificateBase64 } + } + + public async createCertificate(agentReq: Req, options: X509CreateCertificateOptionsDto) { + const agent = agentReq.agent + + let authorityKeyID, subjectPublicKeyID + + agent.config.logger.debug(`createCertificate options:`, options) + + + if (options.authorityKey && options?.authorityKey?.seed) { + const { privateJwk } = transformSeedToPrivateJwk({ + type: getTypeFromCurve(options.authorityKey.keyType ?? 'P-256'), + seed: TypedArrayEncoder.fromString(options.authorityKey!.seed!), + }) + + const { publicJwk } = await agent.kms.importKey({ privateJwk }) + authorityKeyID = publicJwk + } else { + const { publicJwk } = await agent.kms.createKey({ + type: getTypeFromCurve(options.authorityKey?.keyType ?? 'P-256') + }) + authorityKeyID = publicJwk + } + + if (options.subjectPublicKey) { + if (options?.subjectPublicKey?.seed) { + const importedKey = await agentReq.agent.kms.importKey({ + privateJwk: transformSeedToPrivateJwk({ + seed: TypedArrayEncoder.fromString(options.subjectPublicKey.seed), + type: getTypeFromCurve(options.subjectPublicKey?.keyType ?? 'P-256'), + }).privateJwk, + }) + + subjectPublicKeyID = importedKey.publicJwk + + } else { + const { keyId, publicJwk } = await agent.kms.createKey({ + type: getTypeFromCurve(options.subjectPublicKey?.keyType ?? 'P-256') + }) + subjectPublicKeyID = publicJwk + } + } + + agent.config.logger.info('This is subjectPublicKeyID', subjectPublicKeyID) + + const certificate = await agent.x509.createCertificate({ + // authorityKey: authorityKeyID as Key, + authorityKey: Kms.PublicJwk.fromPublicJwk(authorityKeyID), + // subjectPublicKey: Kms.PublicJwk.fromPublicJwk(subjectPublicKeyID!), + serialNumber: options.serialNumber, + issuer: options.issuer, + extensions: options.extensions, + subject: options.subject, + validity: options.validity, + }) + agent.config.logger.info("Result") + + const issuerCertificate = certificate.toString('base64') + return { publicCertificateBase64: issuerCertificate } + } + + public async ImportX509Certificates(agentReq: Req, options: X509ImportCertificateOptionsDto) { + const agent = agentReq.agent + agent.config.logger.debug(`Start validating keys`) + const secretHexKey = await pemToRawEd25519PrivateKey(options.privateKey ?? '') + const privateKey = TypedArrayEncoder.fromHex(secretHexKey) + + agent.config.logger.debug(`Decode certificate`) + const parsedCertificate = X509Service.parseCertificate(agent.context, { + encodedCertificate: options.certificate, + }) + const issuerCertificate = parsedCertificate.toString('base64') + + try { + const keyTypeInfo = getTypeFromCurve(options.keyType) + const { privateJwk } = transformPrivateKeyToPrivateJwk({ + type: keyTypeInfo, + privateKey, + }) + + const key = await agent.kms.importKey({ + privateJwk, + }) + if ( + parsedCertificate.publicJwk.publicKey.kty !== keyTypeInfo.kty || + !parsedCertificate.publicJwk.equals(Kms.PublicJwk.fromPublicJwk(key.publicJwk)) + ) { + throw new Error(`Key mismatched in provided X509_CERTIFICATE to import`) + } + agent.config.logger.info(`Keys matched with certificate`) + } catch (error) { + agent.config.logger.error(`Error caught`) + + // If the key already exists, we assume the self-signed certificate is already created + if (error instanceof Kms.KeyManagementKeyExistsError) { + console.error( 'key already exists while importing certificate') + } else { + agent.config.logger.error(`${JSON.stringify(error)}`) + throw error + } + } + + return { issuerCertificate } + } + + public addTrustedCertificate( + agentReq: Req, + options: { + certificate: string + }, + ) { + const agent = agentReq.agent + return agent.x509.config.addTrustedCertificate(options.certificate) + } + + public getTrustedCertificates(agentReq: Req) { + const trustedCertificates = agentReq.agent.context.dependencyManager + .resolve(X509ModuleConfig) + .trustedCertificates?.map((cert) => X509Certificate.fromEncodedCertificate(cert).toString('base64')) // as [string, ...string[]] + + return trustedCertificates + } + + /** + * Parses a base64-encoded X.509 certificate into a X509Certificate + * + * @param issuerAgent {Agent} + * @param options {x509Input} + * @returns + */ + public decodeCertificate( + agentReq: Req, + options: { + certificate: string + }, + ) { + const parsedCertificate = X509Service.parseCertificate(agentReq.agent.context, { + encodedCertificate: options.certificate, + }) + + return parsedCertificate + } +} + +export const x509ServiceT = new x509Service() + +export async function createKey(agent: Agent, keyType: KeyAlgorithm) { + try { + const seed = await generateSecretKey(keyType === KeyAlgorithm.EcSecp256r1 ? 64 : 32) + + agent.config.logger.debug(`createKey: got seed ${seed}`) + + const normalizedCurve = keyAlgorithmToCurve[keyType] + if (!normalizedCurve) throw new Error('Unspported key type for method importKey') + const importedKey = await agent.kms.importKey({ + privateJwk: transformSeedToPrivateJwk({ + seed: TypedArrayEncoder.fromString(seed), + type: getTypeFromCurve(normalizedCurve), + }).privateJwk, + }) + + return importedKey + } catch (error) { + agent.config.logger.debug(`Error while creating authorityKey`, { message: (error as CredoError).message }) + throw error + } +} diff --git a/src/controllers/x509/x509.types.ts b/src/controllers/x509/x509.types.ts index 9a0f2f9e..311f6697 100644 --- a/src/controllers/x509/x509.types.ts +++ b/src/controllers/x509/x509.types.ts @@ -1,8 +1,10 @@ import type { X509ExtendedKeyUsage, X509KeyUsage } from '@credo-ts/core' -import { KeyAlgorithm } from '@openwallet-foundation/askar-nodejs' +import type { KeyAlgorithm } from '@openwallet-foundation/askar-nodejs' import { Extension, Example } from 'tsoa' +import { DidMethod } from '../../enums/enum' + // Enum remains the same export enum GeneralNameType { DNS = 'dns', @@ -33,7 +35,7 @@ export interface AuthorityAndSubjectKeyDto { * @description Type of the key used for signing the X.509 Certificate (default is p256) */ // FIXME: Check type - keyType?: KeyAlgorithm + keyType?: Curve } export interface NameDto { @@ -204,3 +206,61 @@ export interface X509CreateCertificateOptionsDto { validity?: ValidityDto extensions?: X509CertificateExtensionsOptionsDto } + +export type OkpCurve = 'Ed25519' | 'X25519' +export type EcCurve = 'P-256' | 'P-384' | 'P-521' | 'secp256k1' + +export type OkpType = { + kty: 'OKP' + crv: 'Ed25519' | 'X25519' +} + +export type EcType = { + kty: 'EC' + crv: 'P-256' | 'P-384' | 'P-521' | 'secp256k1' +} + +export type Curve = 'Ed25519' | 'X25519' | 'P-256' | 'P-384' | 'P-521' | 'secp256k1' + +export enum RsaModulusLength { + RSA_2048 = 2048, + RSA_3072 = 3072, + RSA_4096 = 4096, +} + +export type KmsCreateKeyTypeAssymetric = + | { + kty: 'OKP' + crv: 'Ed25519' | 'X25519' + } + | { + kty: 'EC' + crv: 'P-256' | 'P-384' | 'P-521' | 'secp256k1' + } + +export const supportedKeyTypesDID: Record = { + [DidMethod.Indy]: [{ kty: 'OKP', crv: 'Ed25519' }], + + [DidMethod.Peer]: [ + { kty: 'OKP', crv: 'Ed25519' }, + { kty: 'OKP', crv: 'X25519' }, + ], + + [DidMethod.Key]: [ + { kty: 'OKP', crv: 'Ed25519' }, + { kty: 'OKP', crv: 'X25519' }, + { kty: 'EC', crv: 'P-256' }, + { kty: 'EC', crv: 'P-384' }, + { kty: 'EC', crv: 'P-521' }, + { kty: 'EC', crv: 'secp256k1' }, + ], + + [DidMethod.Web]: [ + { kty: 'OKP', crv: 'Ed25519' }, + { kty: 'OKP', crv: 'X25519' }, + { kty: 'EC', crv: 'P-256' }, + { kty: 'EC', crv: 'secp256k1' }, + ], + + [DidMethod.Polygon]: [{ kty: 'EC', crv: 'secp256k1' }], +} diff --git a/src/enums/enum.ts b/src/enums/enum.ts index 16ee0de1..b58196a2 100644 --- a/src/enums/enum.ts +++ b/src/enums/enum.ts @@ -97,4 +97,13 @@ export enum SCOPES { export enum SignerMethod { Did = 'did', X5c = 'x5c', -} \ No newline at end of file +} +export enum KeyAlgorithmCurve { + Ed25519 = 'Ed25519', + X25519 = 'X25519', + P256 = 'P-256', + P384 = 'P-384', + P521 = 'P-521', + secp256k1 = 'secp256k1', + Bls12381G2 = 'bls12381g2', +} diff --git a/src/routes/routes.ts b/src/routes/routes.ts deleted file mode 100644 index e69de29b..00000000 diff --git a/src/routes/swagger.json b/src/routes/swagger.json index 5f991327..1525c153 100644 --- a/src/routes/swagger.json +++ b/src/routes/swagger.json @@ -7,6 +7,398 @@ "requestBodies": {}, "responses": {}, "schemas": { + "KeyAlgorithm": { + "enum": [ + "a128gcm", + "a256gcm", + "a128cbchs256", + "a256cbchs512", + "a128kw", + "a256kw", + "bls12381g1", + "bls12381g2", + "c20p", + "xc20p", + "ed25519", + "x25519", + "k256", + "p256", + "p384" + ], + "type": "string" + }, + "AuthorityAndSubjectKeyDto": { + "properties": { + "seed": { + "type": "string", + "example": "my-seed-12345" + }, + "publicKeyBase58": { + "type": "string", + "example": "3yPQbnk6WwLgX8K3JZ4t7vBnJ8XqY2mMpRcD9fNvGtHw" + }, + "keyType": { + "$ref": "#/components/schemas/KeyAlgorithm", + "example": "p256" + } + }, + "type": "object", + "additionalProperties": false + }, + "X509CertificateIssuerAndSubjectOptionsDto": { + "properties": { + "countryName": { + "type": "string", + "example": "US" + }, + "stateOrProvinceName": { + "type": "string", + "example": "California" + }, + "organizationalUnit": { + "type": "string", + "example": "IT Department" + }, + "commonName": { + "type": "string", + "example": "Example Corporation" + } + }, + "type": "object", + "additionalProperties": false + }, + "ValidityDto": { + "properties": { + "notBefore": { + "type": "string", + "format": "date-time", + "example": "2024-01-01T00:00:00.000Z" + }, + "notAfter": { + "type": "string", + "format": "date-time", + "example": "2025-01-01T00:00:00.000Z" + } + }, + "type": "object", + "additionalProperties": false + }, + "X509KeyUsage": { + "enum": [ + 1, + 2, + 4, + 8, + 16, + 32, + 64, + 128, + 256 + ], + "type": "number" + }, + "KeyUsageDto": { + "properties": { + "usages": { + "items": { + "$ref": "#/components/schemas/X509KeyUsage" + }, + "type": "array", + "example": [ + "digitalSignature", + "keyEncipherment", + "crlSign" + ] + }, + "markAsCritical": { + "type": "boolean", + "example": true + } + }, + "required": [ + "usages" + ], + "type": "object", + "additionalProperties": false + }, + "X509ExtendedKeyUsage": { + "enum": [ + "1.3.6.1.5.5.7.3.1", + "1.3.6.1.5.5.7.3.2", + "1.3.6.1.5.5.7.3.3", + "1.3.6.1.5.5.7.3.4", + "1.3.6.1.5.5.7.3.8", + "1.3.6.1.5.5.7.3.9", + "1.0.18013.5.1.2" + ], + "type": "string" + }, + "ExtendedKeyUsageDto": { + "properties": { + "usages": { + "items": { + "$ref": "#/components/schemas/X509ExtendedKeyUsage" + }, + "type": "array", + "example": [ + "MdlDs", + "ServerAuth", + "ClientAuth" + ] + }, + "markAsCritical": { + "type": "boolean", + "example": true + } + }, + "required": [ + "usages" + ], + "type": "object", + "additionalProperties": false + }, + "AuthorityAndSubjectKeyIdentifierDto": { + "properties": { + "include": { + "type": "boolean", + "example": true + }, + "markAsCritical": { + "type": "boolean", + "example": true + } + }, + "required": [ + "include" + ], + "type": "object", + "additionalProperties": false + }, + "GeneralNameType": { + "enum": [ + "dns", + "dn", + "email", + "guid", + "ip", + "url", + "upn", + "id" + ], + "type": "string" + }, + "NameDto": { + "properties": { + "type": { + "$ref": "#/components/schemas/GeneralNameType", + "example": "dns" + }, + "value": { + "type": "string", + "example": "example.com" + } + }, + "required": [ + "type", + "value" + ], + "type": "object", + "additionalProperties": false + }, + "NameListDto": { + "properties": { + "name": { + "items": { + "$ref": "#/components/schemas/NameDto" + }, + "type": "array", + "example": [ + { + "type": "dns", + "value": "example.com" + }, + { + "type": "email", + "value": "admin@example.com" + } + ] + }, + "markAsCritical": { + "type": "boolean", + "example": true + } + }, + "required": [ + "name" + ], + "type": "object", + "additionalProperties": false + }, + "BasicConstraintsDto": { + "properties": { + "ca": { + "type": "boolean", + "example": false + }, + "pathLenConstraint": { + "type": "number", + "format": "double", + "example": 0 + }, + "markAsCritical": { + "type": "boolean", + "example": true + } + }, + "required": [ + "ca" + ], + "type": "object", + "additionalProperties": false + }, + "CrlDistributionPointsDto": { + "properties": { + "urls": { + "items": { + "type": "string" + }, + "type": "array", + "example": [ + "http://crl.example.com/ca.crl" + ] + }, + "markAsCritical": { + "type": "boolean", + "example": true + } + }, + "required": [ + "urls" + ], + "type": "object", + "additionalProperties": false + }, + "X509CertificateExtensionsOptionsDto": { + "properties": { + "keyUsage": { + "$ref": "#/components/schemas/KeyUsageDto" + }, + "extendedKeyUsage": { + "$ref": "#/components/schemas/ExtendedKeyUsageDto" + }, + "authorityKeyIdentifier": { + "$ref": "#/components/schemas/AuthorityAndSubjectKeyIdentifierDto" + }, + "subjectKeyIdentifier": { + "$ref": "#/components/schemas/AuthorityAndSubjectKeyIdentifierDto" + }, + "issuerAlternativeName": { + "$ref": "#/components/schemas/NameListDto" + }, + "subjectAlternativeName": { + "$ref": "#/components/schemas/NameListDto" + }, + "basicConstraints": { + "$ref": "#/components/schemas/BasicConstraintsDto" + }, + "crlDistributionPoints": { + "$ref": "#/components/schemas/CrlDistributionPointsDto" + } + }, + "type": "object", + "additionalProperties": false + }, + "X509CreateCertificateOptionsDto": { + "properties": { + "authorityKey": { + "$ref": "#/components/schemas/AuthorityAndSubjectKeyDto" + }, + "subjectPublicKey": { + "$ref": "#/components/schemas/AuthorityAndSubjectKeyDto" + }, + "serialNumber": { + "type": "string", + "example": "1234567890" + }, + "issuer": { + "anyOf": [ + { + "$ref": "#/components/schemas/X509CertificateIssuerAndSubjectOptionsDto" + }, + { + "type": "string" + } + ] + }, + "subject": { + "anyOf": [ + { + "$ref": "#/components/schemas/X509CertificateIssuerAndSubjectOptionsDto" + }, + { + "type": "string" + } + ] + }, + "validity": { + "$ref": "#/components/schemas/ValidityDto" + }, + "extensions": { + "$ref": "#/components/schemas/X509CertificateExtensionsOptionsDto" + } + }, + "required": [ + "issuer" + ], + "type": "object", + "additionalProperties": false + }, + "X509ImportCertificateOptionsDto": { + "properties": { + "certificate": { + "type": "string" + }, + "privateKey": { + "type": "string" + }, + "keyType": {} + }, + "required": [ + "certificate", + "keyType" + ], + "type": "object", + "additionalProperties": false + }, + "PublicJwk": { + "properties": {}, + "type": "object", + "additionalProperties": false + }, + "Uint8Array": { + "description": "A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the\nrequested number of bytes could not be allocated an exception is raised.", + "properties": {}, + "type": "object", + "additionalProperties": false + }, + "AnyUint8Array": { + "$ref": "#/components/schemas/Uint8Array" + }, + "X509Certificate": { + "properties": { + "publicJwk": { + "$ref": "#/components/schemas/PublicJwk" + }, + "privateKey": { + "$ref": "#/components/schemas/AnyUint8Array" + } + }, + "required": [ + "publicJwk" + ], + "type": "object", + "additionalProperties": false + }, "QuestionAnswerRole": { "enum": [ "questioner", @@ -712,26 +1104,6 @@ "type": "string", "example": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL" }, - "KeyAlgorithm": { - "enum": [ - "a128gcm", - "a256gcm", - "a128cbchs256", - "a256cbchs512", - "a128kw", - "a256kw", - "bls12381g1", - "bls12381g2", - "c20p", - "xc20p", - "ed25519", - "x25519", - "k256", - "p256", - "p384" - ], - "type": "string" - }, "DidDocument": { "$ref": "#/components/schemas/Record_string.any_" }, @@ -1462,6 +1834,217 @@ "contact": {} }, "paths": { + "/x509": { + "post": { + "operationId": "CreateX509Certificate", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "properties": { + "publicCertificateBase64": { + "type": "string" + } + }, + "required": [ + "publicCertificateBase64" + ], + "type": "object" + } + } + } + } + }, + "tags": [ + "x509" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/X509CreateCertificateOptionsDto" + } + } + } + } + } + }, + "/x509/import": { + "post": { + "operationId": "ImportX509Certificates", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "properties": { + "issuerCertficicate": { + "type": "string" + } + }, + "required": [ + "issuerCertficicate" + ], + "type": "object" + } + } + } + } + }, + "tags": [ + "x509" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/X509ImportCertificateOptionsDto" + } + } + } + } + } + }, + "/x509/trusted": { + "post": { + "operationId": "AddTrustedCertificate", + "responses": { + "204": { + "description": "No content" + } + }, + "tags": [ + "x509" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "certificate": { + "type": "string" + } + }, + "required": [ + "certificate" + ], + "type": "object" + } + } + } + } + }, + "get": { + "operationId": "GetTrustedCertificates", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + } + } + } + }, + "tags": [ + "x509" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [] + } + }, + "/x509/decode": { + "post": { + "operationId": "DecodeCertificate", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/X509Certificate" + } + } + } + } + }, + "tags": [ + "x509" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "certificate": { + "type": "string" + } + }, + "required": [ + "certificate" + ], + "type": "object" + } + } + } + } + } + }, "/didcomm/question-answer": { "get": { "operationId": "GetQuestionAnswerRecords", diff --git a/src/utils/constant.ts b/src/utils/constant.ts index 03741d0a..cfb07dba 100644 --- a/src/utils/constant.ts +++ b/src/utils/constant.ts @@ -1 +1,24 @@ +import type { Curve } from '../controllers/x509/x509.types' + +import { KeyAlgorithm } from '@openwallet-foundation/askar-nodejs' + export const X509_CERTIFICATE_RECORD = 'X509_CERTIFICATE' +export const keyAlgorithmToCurve: Partial> = { + [KeyAlgorithm.Ed25519]: 'Ed25519', + [KeyAlgorithm.X25519]: 'X25519', + + [KeyAlgorithm.EcSecp256r1]: 'P-256', + [KeyAlgorithm.EcSecp384r1]: 'P-384', + [KeyAlgorithm.EcSecp256k1]: 'secp256k1', +} +export const curveToKty = { + Ed25519: 'OKP', + X25519: 'OKP', + 'P-256': 'EC', + 'P-384': 'EC', + 'P-521': 'EC', + secp256k1: 'EC', +} as const + +export const verkey = '#verkey' +export const p521 = 'p521' diff --git a/src/utils/helpers.ts b/src/utils/helpers.ts index fdee31ae..464125db 100644 --- a/src/utils/helpers.ts +++ b/src/utils/helpers.ts @@ -1,6 +1,12 @@ +import type { Curve, EcCurve, EcType, OkpCurve, OkpType } from '../controllers/x509/x509.types' +import type { KeyAlgorithm } from '@openwallet-foundation/askar-nodejs' + import { JsonEncoder, JsonTransformer } from '@credo-ts/core' import { randomBytes } from 'crypto' +import { curveToKty, keyAlgorithmToCurve } from './constant' + + export function objectToJson(result: T) { const serialized = JsonTransformer.serialize(result) return JsonEncoder.fromString(serialized) @@ -24,7 +30,6 @@ export async function generateSecretKey(length: number = 32): Promise { return secretKey } - export function getCertificateValidityForSystem(IsRootCA = false) { let options: { validityYears?: number, startFromCurrentMonth?: boolean }; if (IsRootCA) { @@ -64,4 +69,36 @@ export function getCertificateValidity(options?: { const notAfter = new Date(Date.UTC(startYear + validityYears, startMonth, startDay, 0, 0, 0)) return { notBefore, notAfter } -} \ No newline at end of file +} + +function normalizeToCurve(input: Curve | KeyAlgorithm): Curve | undefined { + // Already a Curve + if (input in curveToKty) { + return input as Curve + } + + // Try mapping from KeyAlgorithm + return keyAlgorithmToCurve[input as KeyAlgorithm] +} + +export function getTypeFromCurve(key: Curve | KeyAlgorithm): OkpType | EcType { + let keyTypeInfo: OkpType | EcType + const normalizedCurve = normalizeToCurve(key) + if (normalizedCurve && curveToKty[normalizedCurve] === 'OKP') { + keyTypeInfo = { + kty: 'OKP', + crv: normalizedCurve as OkpCurve, + } + } else if (normalizedCurve && curveToKty[normalizedCurve] === 'EC') { + keyTypeInfo = { + kty: 'EC', + crv: normalizedCurve as EcCurve, + } + } else { + keyTypeInfo = { + kty: 'EC', + crv: 'P-256', + } + } + return keyTypeInfo +} From b6e3043cd20463bd477536591ec8a256f942291d Mon Sep 17 00:00:00 2001 From: shitrerohit Date: Tue, 16 Dec 2025 11:57:54 +0530 Subject: [PATCH 15/38] WIP: bug fixing from issuer and verifier session Signed-off-by: shitrerohit --- package.json | 1 + src/cliAgent.ts | 122 +- .../issuance-sessions.Controller.ts | 198 +-- .../issuance-sessions.service.ts | 287 +++-- .../verification-sessions.Controller.ts | 167 +-- .../verification-sessions.service.ts | 415 +++--- src/routes/swagger.json | 1133 +++++++++++++++-- 7 files changed, 1625 insertions(+), 698 deletions(-) diff --git a/package.json b/package.json index c088b28e..7fece3bc 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "@credo-ts/anoncreds": "0.6.1", "@credo-ts/askar": "0.6.1", "@credo-ts/core": "0.6.1", + "@credo-ts/didcomm": "0.6.1", "@credo-ts/indy-vdr": "0.6.1", "@credo-ts/node": "0.6.1", "@credo-ts/openid4vc": "0.6.1", diff --git a/src/cliAgent.ts b/src/cliAgent.ts index 516dddfc..2d350f6b 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -14,7 +14,7 @@ import { DidCommCredentialV1Protocol, DidCommProofV1Protocol, } from '@credo-ts/anoncreds' -import { AskarModule, AskarModuleConfigStoreOptions, AskarMultiWalletDatabaseScheme } from '@credo-ts/askar' +import { AskarModule, AskarMultiWalletDatabaseScheme } from '@credo-ts/askar' import { DidsModule, W3cCredentialsModule, @@ -46,26 +46,27 @@ import { IndyVdrIndyDidRegistrar, } from '@credo-ts/indy-vdr' import { agentDependencies, DidCommHttpInboundTransport, DidCommWsInboundTransport } from '@credo-ts/node' +import { + // OpenId4VcHolderModule, + // OpenId4VcIssuerModule, + OpenId4VcModule, + // OpenId4VcVerifierModule, +} from '@credo-ts/openid4vc' import { QuestionAnswerModule } from '@credo-ts/question-answer' import { TenantsModule } from '@credo-ts/tenants' import { anoncreds } from '@hyperledger/anoncreds-nodejs' -import { askar } from '@openwallet-foundation/askar-nodejs' import { indyVdr } from '@hyperledger/indy-vdr-nodejs' +import { askar } from '@openwallet-foundation/askar-nodejs' import axios from 'axios' +import bodyParser from 'body-parser' +import express from 'express' import { readFile } from 'fs/promises' import { IndicioAcceptanceMechanism, IndicioTransactionAuthorAgreement, Network, NetworkName } from './enums' import { setupServer } from './server' import { generateSecretKey } from './utils/helpers' import { TsLogger } from './utils/logger' -import { OpenId4VcHolderModule, OpenId4VcIssuerModule, OpenId4VcVerifierModule } from '@credo-ts/openid4vc' -import { - getCredentialRequestToCredentialMapper, - getTrustedCerts, -} from './utils/oid4vc-agent' -import bodyParser from 'body-parser' - -import express from 'express' +import { getCredentialRequestToCredentialMapper, getTrustedCerts } from './utils/oid4vc-agent' const openId4VpApp = express() const openId4VcApp = express() @@ -141,7 +142,7 @@ const getModules = ( autoAcceptCredentials: DidCommAutoAcceptCredential, autoAcceptProofs: DidCommAutoAcceptProof, walletScheme: AskarMultiWalletDatabaseScheme, - storeOptions: AskarModuleConfigStoreOptions + storeOptions: AskarModuleConfigStoreOptions, ) => { const legacyIndyCredentialFormat = new LegacyIndyDidCommCredentialFormatService() const legacyIndyProofFormat = new LegacyIndyDidCommProofFormatService() @@ -153,10 +154,9 @@ const getModules = ( askar: new AskarModule({ askar, store: { - ...storeOptions + ...storeOptions, }, multiWalletDatabaseScheme: walletScheme || AskarMultiWalletDatabaseScheme.ProfilePerWallet, - }), indyVdr: new IndyVdrModule({ @@ -165,10 +165,15 @@ const getModules = ( }), dids: new DidsModule({ - registrars: [new IndyVdrIndyDidRegistrar(), new KeyDidRegistrar() + registrars: [ + new IndyVdrIndyDidRegistrar(), + new KeyDidRegistrar(), // , new PolygonDidRegistrar() ], - resolvers: [new IndyVdrIndyDidResolver(), new KeyDidResolver(), new WebDidResolver() + resolvers: [ + new IndyVdrIndyDidResolver(), + new KeyDidResolver(), + new WebDidResolver(), // , new PolygonDidResolver() ], }), @@ -210,7 +215,11 @@ const getModules = ( indyCredentialFormat: legacyIndyCredentialFormat, }), new DidCommCredentialV2Protocol({ - credentialFormats: [legacyIndyCredentialFormat, jsonLdCredentialFormatService, anonCredsCredentialFormatService], + credentialFormats: [ + legacyIndyCredentialFormat, + jsonLdCredentialFormatService, + anonCredsCredentialFormatService, + ], }), ], }, @@ -220,6 +229,7 @@ const getModules = ( }), questionAnswer: new QuestionAnswerModule(), + openid4vc: new OpenId4VcModule({}), // polygon: new PolygonModule({ // didContractAddress: didRegistryContractAddress // ? didRegistryContractAddress @@ -230,28 +240,52 @@ const getModules = ( // rpcUrl: rpcUrl ? rpcUrl : (process.env.RPC_URL as string), // serverUrl: fileServerUrl ? fileServerUrl : (process.env.SERVER_URL as string), // }), - openId4VcVerifier: new OpenId4VcVerifierModule({ - baseUrl: - process.env.NODE_ENV === 'PROD' - ? `https://${process.env.APP_URL}/oid4vp` - : `${process.env.AGENT_HTTP_URL}/oid4vp`, - app: openId4VpApp, - authorizationRequestExpirationInSeconds: Number(process.env.OID4VP_AUTH_REQUEST_PROOF_REQUEST_EXPIRY) || 3600, - }), - openId4VcIssuer: new OpenId4VcIssuerModule({ - baseUrl: - process.env.NODE_ENV === 'PROD' - ? `https://${process.env.APP_URL}/oid4vci` - : `${process.env.AGENT_HTTP_URL}/oid4vci`, - app: openId4VcApp, - statefulCredentialOfferExpirationInSeconds: Number(process.env.OID4VCI_CRED_OFFER_EXPIRY) || 3600, - accessTokenExpiresInSeconds: Number(process.env.OID4VCI_ACCESS_TOKEN_EXPIRY) || 3600, - authorizationCodeExpiresInSeconds: Number(process.env.OID4VCI_AUTH_CODE_EXPIRY) || 3600, - cNonceExpiresInSeconds: Number(process.env.OID4VCI_CNONCE_EXPIRY) || 3600, - dpopRequired: false, - credentialRequestToCredentialMapper: (...args) => getCredentialRequestToCredentialMapper()(...args), - }), - openId4VcHolderModule: new OpenId4VcHolderModule(), + // openid4vc: new OpenId4VcModule({ + // // app: openId4VcApp, + // issuer: { + // baseUrl: + // process.env.NODE_ENV === 'PROD' + // ? `https://${process.env.APP_URL}/oid4vci` + // : `${process.env.AGENT_HTTP_URL}/oid4vci`, + // app: openId4VcApp, + // statefulCredentialOfferExpirationInSeconds: Number(process.env.OID4VCI_CRED_OFFER_EXPIRY) || 3600, + // accessTokenExpiresInSeconds: Number(process.env.OID4VCI_ACCESS_TOKEN_EXPIRY) || 3600, + // authorizationCodeExpiresInSeconds: Number(process.env.OID4VCI_AUTH_CODE_EXPIRY) || 3600, + // cNonceExpiresInSeconds: Number(process.env.OID4VCI_CNONCE_EXPIRY) || 3600, + // dpopRequired: false, + // credentialRequestToCredentialMapper: (...args) => getCredentialRequestToCredentialMapper()(...args), + // }, + // verifier: { + // baseUrl: + // process.env.NODE_ENV === 'PROD' + // ? `https://${process.env.APP_URL}/oid4vp` + // : `${process.env.AGENT_HTTP_URL}/oid4vp`, + // app: openId4VpApp, + // authorizationRequestExpirationInSeconds: Number(process.env.OID4VP_AUTH_REQUEST_PROOF_REQUEST_EXPIRY) || 3600, + // }, + // }), + // openId4VcVerifier: new OpenId4VcVerifierModule({ + // baseUrl: + // process.env.NODE_ENV === 'PROD' + // ? `https://${process.env.APP_URL}/oid4vp` + // : `${process.env.AGENT_HTTP_URL}/oid4vp`, + // app: openId4VpApp, + // authorizationRequestExpirationInSeconds: Number(process.env.OID4VP_AUTH_REQUEST_PROOF_REQUEST_EXPIRY) || 3600, + // }), + // openId4VcIssuer: new OpenId4VcIssuerModule({ + // baseUrl: + // process.env.NODE_ENV === 'PROD' + // ? `https://${process.env.APP_URL}/oid4vci` + // : `${process.env.AGENT_HTTP_URL}/oid4vci`, + // app: openId4VcApp, + // statefulCredentialOfferExpirationInSeconds: Number(process.env.OID4VCI_CRED_OFFER_EXPIRY) || 3600, + // accessTokenExpiresInSeconds: Number(process.env.OID4VCI_ACCESS_TOKEN_EXPIRY) || 3600, + // authorizationCodeExpiresInSeconds: Number(process.env.OID4VCI_AUTH_CODE_EXPIRY) || 3600, + // cNonceExpiresInSeconds: Number(process.env.OID4VCI_CNONCE_EXPIRY) || 3600, + // dpopRequired: false, + // credentialRequestToCredentialMapper: (...args) => getCredentialRequestToCredentialMapper()(...args), + // }), + // openId4VcHolderModule: new OpenId4VcHolderModule(), x509: new X509Module({ getTrustedCertificatesForVerification: async (_agentContext, { certificateChain, verification }) => { //TODO: We need to trust the certificate tenant wise, for that we need to fetch those details from platform @@ -275,7 +309,7 @@ const getWithTenantModules = ( autoAcceptCredentials: DidCommAutoAcceptCredential, autoAcceptProofs: DidCommAutoAcceptProof, walletScheme: AskarMultiWalletDatabaseScheme, - walletConfig: AskarModuleConfigStoreOptions + walletConfig: AskarModuleConfigStoreOptions, ) => { const modules = getModules( networkConfig, @@ -288,7 +322,7 @@ const getWithTenantModules = ( autoAcceptCredentials, autoAcceptProofs, walletScheme, - walletConfig + walletConfig, ) return { tenants: new TenantsModule({ @@ -418,7 +452,7 @@ export async function runRestAgent(restConfig: AriesRestConfig) { autoAcceptCredentials || DidCommAutoAcceptCredential.Always, autoAcceptProofs || DidCommAutoAcceptProof.ContentApproved, walletScheme || AskarMultiWalletDatabaseScheme.ProfilePerWallet, - walletConfig + walletConfig, ) const modules = getModules( networkConfig, @@ -431,7 +465,7 @@ export async function runRestAgent(restConfig: AriesRestConfig) { autoAcceptCredentials || DidCommAutoAcceptCredential.Always, autoAcceptProofs || DidCommAutoAcceptProof.ContentApproved, walletScheme || AskarMultiWalletDatabaseScheme.ProfilePerWallet, - walletConfig + walletConfig, ) const agent = new Agent({ config: agentConfig, @@ -468,8 +502,8 @@ export async function runRestAgent(restConfig: AriesRestConfig) { ) transport.app.use(bodyParser.json({ limit: process.env.APP_JSON_BODY_SIZE ?? '5mb' })) - transport.app.use('/oid4vci', modules.openId4VcIssuer.config.app) - transport.app.use('/oid4vp', modules.openId4VcVerifier.config.app) + transport.app.use('/oid4vci', modules.openid4vc.issuer?.config.app ?? express.Router()) + transport.app.use('/oid4vp', modules.openid4vc.verifier?.config.app ?? express.Router()) } } diff --git a/src/controllers/openid4vc/issuance-sessions/issuance-sessions.Controller.ts b/src/controllers/openid4vc/issuance-sessions/issuance-sessions.Controller.ts index f49e3d0f..792e58b4 100644 --- a/src/controllers/openid4vc/issuance-sessions/issuance-sessions.Controller.ts +++ b/src/controllers/openid4vc/issuance-sessions/issuance-sessions.Controller.ts @@ -1,107 +1,107 @@ -// import { OpenId4VcIssuanceSessionState } from '@credo-ts/openid4vc' -// import { Request as Req } from 'express' -// import { Body, Controller, Delete, Get, Path, Post, Put, Query, Request, Route, Tags, Security } from 'tsoa' -// import { injectable } from 'tsyringe' +import { OpenId4VcIssuanceSessionState } from '@credo-ts/openid4vc' +import { Request as Req } from 'express' +import { Body, Controller, Delete, Get, Path, Post, Put, Query, Request, Route, Tags, Security } from 'tsoa' +import { injectable } from 'tsyringe' -// import { SCOPES } from '../../../enums' -// // eslint-disable-next-line import/order -// import ErrorHandlingService from '../../../errorHandlingService' +import { SCOPES } from '../../../enums' +// eslint-disable-next-line import/order +import ErrorHandlingService from '../../../errorHandlingService' -// // import { AgentWithRootOrTenant } from '../../types/agent' -// import { OpenId4VcIssuanceSessionsCreateOffer } from '../types/issuer.types' +// import { AgentWithRootOrTenant } from '../../types/agent' +import { OpenId4VcIssuanceSessionsCreateOffer } from '../types/issuer.types' -// import { issuanceSessionService } from './issuance-sessions.service' +import { issuanceSessionService } from './issuance-sessions.service' -// /** -// * Controller for managing OpenID4VC issuance sessions. -// * Provides endpoints to create credential offers, retrieve issuance sessions, -// * update session metadata, and delete sessions. -// */ -// @Tags('oid4vc issuance sessions') -// @Route('/openid4vc/issuance-sessions') -// @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) -// @injectable() -// export class IssuanceSessionsController extends Controller { -// /** -// * Creates a credential offer with the specified credential configurations and authorization type. -// */ -// @Post('/create-credential-offer') -// public async createCredentialOffer(@Request() request: Req, @Body() options: OpenId4VcIssuanceSessionsCreateOffer) { -// try { -// return await issuanceSessionService.createCredentialOffer(options, request) -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } +/** + * Controller for managing OpenID4VC issuance sessions. + * Provides endpoints to create credential offers, retrieve issuance sessions, + * update session metadata, and delete sessions. + */ +@Tags('oid4vc issuance sessions') +@Route('/openid4vc/issuance-sessions') +@Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) +@injectable() +export class IssuanceSessionsController extends Controller { + /** + * Creates a credential offer with the specified credential configurations and authorization type. + */ + @Post('/create-credential-offer') + public async createCredentialOffer(@Request() request: Req, @Body() options: OpenId4VcIssuanceSessionsCreateOffer) { + try { + return await issuanceSessionService.createCredentialOffer(options, request) + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } -// /** -// * Get issuance details by issuance SessionId -// */ -// @Get('/:issuanceSessionId') -// public async getIssuanceSessionsById(@Request() request: Req, @Path('issuanceSessionId') issuanceSessionId: string) { -// try { -// return await issuanceSessionService.getIssuanceSessionsById(request, issuanceSessionId) -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } + /** + * Get issuance details by issuance SessionId + */ + @Get('/:issuanceSessionId') + public async getIssuanceSessionsById(@Request() request: Req, @Path('issuanceSessionId') issuanceSessionId: string) { + try { + return await issuanceSessionService.getIssuanceSessionsById(request, issuanceSessionId) + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } -// /** -// * Fetch all issuance sessions by query -// */ -// @Get('/') -// public async getIssuanceSessionsByQuery( -// @Request() request: Req, -// @Query() cNonce?: string, -// @Query() publicIssuerId?: string, -// @Query() preAuthorizedCode?: string, -// @Query() state?: OpenId4VcIssuanceSessionState, -// @Query() credentialOfferUri?: string, -// @Query() authorizationCode?: string, -// ) { -// try { -// return await issuanceSessionService.getIssuanceSessionsByQuery( -// request, -// cNonce, -// publicIssuerId, -// preAuthorizedCode, -// state, -// credentialOfferUri, -// authorizationCode, -// ) -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } + /** + * Fetch all issuance sessions by query + */ + @Get('/') + public async getIssuanceSessionsByQuery( + @Request() request: Req, + @Query() cNonce?: string, + @Query() publicIssuerId?: string, + @Query() preAuthorizedCode?: string, + @Query() state?: OpenId4VcIssuanceSessionState, + @Query() credentialOfferUri?: string, + @Query() authorizationCode?: string, + ) { + try { + return await issuanceSessionService.getIssuanceSessionsByQuery( + request, + cNonce, + publicIssuerId, + preAuthorizedCode, + state, + credentialOfferUri, + authorizationCode, + ) + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } -// /** -// * Update issuance session metadata by session ID -// */ -// @Put('/:issuanceSessionId') -// public async updateSessionById( -// @Request() request: Req, -// @Path('issuanceSessionId') issuanceSessionId: string, -// @Body() metadata: Record, -// ) { -// try { -// return await issuanceSessionService.updateSessionIssuanceMetadataById(request, issuanceSessionId, metadata) -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } + /** + * Update issuance session metadata by session ID + */ + @Put('/:issuanceSessionId') + public async updateSessionById( + @Request() request: Req, + @Path('issuanceSessionId') issuanceSessionId: string, + @Body() metadata: Record, + ) { + try { + return await issuanceSessionService.updateSessionIssuanceMetadataById(request, issuanceSessionId, metadata) + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } -// /** -// * Delete issuance session by session ID -// */ -// @Delete('/:issuanceSessionId') -// public async deleteIssuanceSessionById( -// @Request() request: Req, -// @Path('issuanceSessionId') issuanceSessionId: string, -// ) { -// try { -// await issuanceSessionService.deleteById(request, issuanceSessionId) -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } -// } + /** + * Delete issuance session by session ID + */ + @Delete('/:issuanceSessionId') + public async deleteIssuanceSessionById( + @Request() request: Req, + @Path('issuanceSessionId') issuanceSessionId: string, + ) { + try { + await issuanceSessionService.deleteById(request, issuanceSessionId) + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } +} diff --git a/src/controllers/openid4vc/issuance-sessions/issuance-sessions.service.ts b/src/controllers/openid4vc/issuance-sessions/issuance-sessions.service.ts index ffd2cf17..772cbfff 100644 --- a/src/controllers/openid4vc/issuance-sessions/issuance-sessions.service.ts +++ b/src/controllers/openid4vc/issuance-sessions/issuance-sessions.service.ts @@ -1,138 +1,149 @@ -// import type { OpenId4VcIssuanceSessionsCreateOffer } from '../types/issuer.types' -// import type { Request as Req } from 'express' - -// import { type OpenId4VcIssuanceSessionState } from '@credo-ts/openid4vc' -// import { OpenId4VcIssuanceSessionRepository } from '@credo-ts/openid4vc' - -// import { SignerMethod } from '../../../enums/enum' -// import { BadRequestError, NotFoundError } from '../../../errors/errors' - -// class IssuanceSessionsService { -// public async createCredentialOffer(options: OpenId4VcIssuanceSessionsCreateOffer, agentReq: Req) { -// const { credentials, publicIssuerId } = options - -// const issuer = await agentReq.agent.modules.openId4VcIssuer.getIssuerByIssuerId(publicIssuerId) - -// const mappedCredentials = credentials.map((cred) => { -// const supported = issuer.credentialConfigurationsSupported[cred.credentialSupportedId] -// if (!supported) { -// throw new Error(`CredentialSupportedId '${cred.credentialSupportedId}' is not supported by issuer`) -// } -// if (supported.format !== cred.format) { -// throw new Error( -// `Format mismatch for '${cred.credentialSupportedId}': expected '${supported.format}', got '${cred.format}'`, -// ) -// } - -// // must have signing options -// if (!cred.signerOptions?.method) { -// throw new BadRequestError( -// `signerOptions must be provided and allowed methods are ${Object.values(SignerMethod).join(', ')}`, -// ) -// } - -// if (cred.signerOptions.method == SignerMethod.Did && !cred.signerOptions.did) { -// throw new BadRequestError( -// `For ${cred.credentialSupportedId} : did must be present inside signerOptions if SignerMethod is 'did' `, -// ) -// } - -// if (cred.signerOptions.method === SignerMethod.X5c && !cred.signerOptions.x5c) { -// throw new BadRequestError( -// `For ${cred.credentialSupportedId} : x5c must be present inside signerOptions if SignerMethod is 'x5c' `, -// ) -// } - -// const currentVct = cred.payload && 'vct' in cred.payload ? cred.payload.vct : undefined -// return { -// ...cred, -// payload: { -// ...cred.payload, -// vct: currentVct ?? (typeof supported.vct === 'string' ? supported.vct : undefined), -// }, -// } -// }) - -// options.issuanceMetadata ||= {} - -// options.issuanceMetadata.credentials = mappedCredentials - -// const { credentialOffer, issuanceSession } = await agentReq.agent.modules.openId4VcIssuer.createCredentialOffer({ -// issuerId: publicIssuerId, -// issuanceMetadata: options.issuanceMetadata, -// offeredCredentials: credentials.map((c) => c.credentialSupportedId), -// preAuthorizedCodeFlowConfig: options.preAuthorizedCodeFlowConfig, -// authorizationCodeFlowConfig: options.authorizationCodeFlowConfig, -// }) - -// return { credentialOffer, issuanceSession } -// } - -// public async getIssuanceSessionsById(agentReq: Req, sessionId: string) { -// return agentReq.agent.modules.openId4VcIssuer.getIssuanceSessionById(sessionId) -// } - -// public async getIssuanceSessionsByQuery( -// agentReq: Req, -// cNonce?: string, -// publicIssuerId?: string, -// preAuthorizedCode?: string, -// state?: OpenId4VcIssuanceSessionState, -// credentialOfferUri?: string, -// authorizationCode?: string, -// ) { -// const issuanceSessionRepository = agentReq.agent.dependencyManager.resolve(OpenId4VcIssuanceSessionRepository) -// const issuanceSessions = await issuanceSessionRepository.findByQuery(agentReq.agent.context, { -// cNonce, -// issuerId: publicIssuerId, -// preAuthorizedCode, -// state, -// credentialOfferUri, -// authorizationCode, -// }) - -// return issuanceSessions -// } - -// /** -// * update an existing issuance session metadata, useful for mobile edge -// * agents that will scan QR codes to notify the system of their -// * wallet user id -// * -// * @param issuerAgent -// * @param sessionId -// * @param metadata -// * @returns the updated issuance session record -// */ -// public async updateSessionIssuanceMetadataById(agentReq: Req, sessionId: string, metadata: Record) { -// const issuanceSessionRepository = agentReq.agent.dependencyManager.resolve(OpenId4VcIssuanceSessionRepository) - -// const record = await issuanceSessionRepository.findById(agentReq.agent.context, sessionId) - -// if (!record) { -// throw new NotFoundError(`Issuance session with id ${sessionId} not found`) -// } - -// record.issuanceMetadata = { -// ...record.issuanceMetadata, -// ...metadata, -// } - -// await issuanceSessionRepository.update(agentReq.agent.context, record) - -// return record -// } - -// /** -// * deletes ann issuance session by id -// * -// * @param sessionId -// * @param issuerAgent -// */ -// public async deleteById(agentReq: Req, sessionId: string): Promise { -// const issuanceSessionRepository = agentReq.agent.dependencyManager.resolve(OpenId4VcIssuanceSessionRepository) -// await issuanceSessionRepository.deleteById(agentReq.agent.context, sessionId) -// } -// } - -// export const issuanceSessionService = new IssuanceSessionsService() +import type { OpenId4VcIssuanceSessionsCreateOffer } from '../types/issuer.types' +import type { Request as Req } from 'express' + +import { type OpenId4VcIssuanceSessionState } from '@credo-ts/openid4vc' +import { OpenId4VcIssuanceSessionRepository } from '@credo-ts/openid4vc' + +import { SignerMethod } from '../../../enums/enum' +import { BadRequestError, NotFoundError } from '../../../errors/errors' + +class IssuanceSessionsService { + public async createCredentialOffer(options: OpenId4VcIssuanceSessionsCreateOffer, agentReq: Req) { + const { credentials, publicIssuerId } = options + + const issuer = await agentReq.agent.modules.openid4vc.issuer?.getIssuerByIssuerId(publicIssuerId) + + const mappedCredentials = credentials.map((cred) => { + const supported = issuer?.credentialConfigurationsSupported[cred.credentialSupportedId] + if (!supported) { + throw new Error(`CredentialSupportedId '${cred.credentialSupportedId}' is not supported by issuer`) + } + if (supported.format !== cred.format) { + throw new Error( + `Format mismatch for '${cred.credentialSupportedId}': expected '${supported.format}', got '${cred.format}'`, + ) + } + + // must have signing options + if (!cred.signerOptions?.method) { + throw new BadRequestError( + `signerOptions must be provided and allowed methods are ${Object.values(SignerMethod).join(', ')}`, + ) + } + + if (cred.signerOptions.method == SignerMethod.Did && !cred.signerOptions.did) { + throw new BadRequestError( + `For ${cred.credentialSupportedId} : did must be present inside signerOptions if SignerMethod is 'did' `, + ) + } + + if (cred.signerOptions.method === SignerMethod.X5c && !cred.signerOptions.x5c) { + throw new BadRequestError( + `For ${cred.credentialSupportedId} : x5c must be present inside signerOptions if SignerMethod is 'x5c' `, + ) + } + + const currentVct = cred.payload && 'vct' in cred.payload ? cred.payload.vct : undefined + return { + ...cred, + payload: { + ...cred.payload, + vct: currentVct ?? (typeof supported.vct === 'string' ? supported.vct : undefined), + }, + } + }) + + options.issuanceMetadata ||= {} + + options.issuanceMetadata.credentials = mappedCredentials + + // const { credentialOffer, issuanceSession } = await agentReq.agent.modules.openId4VcIssuer.createCredentialOffer({ + // issuerId: publicIssuerId, + // issuanceMetadata: options.issuanceMetadata, + // offeredCredentials: credentials.map((c) => c.credentialSupportedId), + // preAuthorizedCodeFlowConfig: options.preAuthorizedCodeFlowConfig, + // authorizationCodeFlowConfig: options.authorizationCodeFlowConfig, + // }) + + const { credentialOffer, issuanceSession } = (await agentReq.agent.modules.openid4vc.issuer?.createCredentialOffer({ + issuerId: publicIssuerId, + issuanceMetadata: options.issuanceMetadata, + credentialConfigurationIds: credentials.map((c) => c.credentialSupportedId), + preAuthorizedCodeFlowConfig: options.preAuthorizedCodeFlowConfig, + authorizationCodeFlowConfig: options.authorizationCodeFlowConfig, + })) as { + credentialOffer: unknown + issuanceSession: unknown + } + + return { credentialOffer, issuanceSession } + } + + public async getIssuanceSessionsById(agentReq: Req, sessionId: string) { + return agentReq.agent.modules.openid4vc.issuer?.getIssuanceSessionById(sessionId) + } + + public async getIssuanceSessionsByQuery( + agentReq: Req, + cNonce?: string, + publicIssuerId?: string, + preAuthorizedCode?: string, + state?: OpenId4VcIssuanceSessionState, + credentialOfferUri?: string, + authorizationCode?: string, + ) { + const issuanceSessionRepository = agentReq.agent.dependencyManager.resolve(OpenId4VcIssuanceSessionRepository) + const issuanceSessions = await issuanceSessionRepository.findByQuery(agentReq.agent.context, { + cNonce, + issuerId: publicIssuerId, + preAuthorizedCode, + state, + credentialOfferUri, + authorizationCode, + }) + + return issuanceSessions + } + + /** + * update an existing issuance session metadata, useful for mobile edge + * agents that will scan QR codes to notify the system of their + * wallet user id + * + * @param issuerAgent + * @param sessionId + * @param metadata + * @returns the updated issuance session record + */ + public async updateSessionIssuanceMetadataById(agentReq: Req, sessionId: string, metadata: Record) { + const issuanceSessionRepository = agentReq.agent.dependencyManager.resolve(OpenId4VcIssuanceSessionRepository) + + const record = await issuanceSessionRepository.findById(agentReq.agent.context, sessionId) + + if (!record) { + throw new NotFoundError(`Issuance session with id ${sessionId} not found`) + } + + record.issuanceMetadata = { + ...record.issuanceMetadata, + ...metadata, + } + + await issuanceSessionRepository.update(agentReq.agent.context, record) + + return record + } + + /** + * deletes ann issuance session by id + * + * @param sessionId + * @param issuerAgent + */ + public async deleteById(agentReq: Req, sessionId: string): Promise { + const issuanceSessionRepository = agentReq.agent.dependencyManager.resolve(OpenId4VcIssuanceSessionRepository) + await issuanceSessionRepository.deleteById(agentReq.agent.context, sessionId) + } +} + +export const issuanceSessionService = new IssuanceSessionsService() diff --git a/src/controllers/openid4vc/verifier-sessions/verification-sessions.Controller.ts b/src/controllers/openid4vc/verifier-sessions/verification-sessions.Controller.ts index 83dd01c6..603cd542 100644 --- a/src/controllers/openid4vc/verifier-sessions/verification-sessions.Controller.ts +++ b/src/controllers/openid4vc/verifier-sessions/verification-sessions.Controller.ts @@ -1,87 +1,88 @@ -// import { Agent } from '@credo-ts/core' -// import { OpenId4VcVerificationSessionState } from '@credo-ts/openid4vc' -// import { Controller, Get, Path, Query, Route, Request, Security, Tags, Post, Body } from 'tsoa' -// import { injectable } from 'tsyringe' -// import ErrorHandlingService from '../../../errorHandlingService' +import { Agent } from '@credo-ts/core' +import { OpenId4VcVerificationSessionState } from '@credo-ts/openid4vc' +import { Request as Req } from 'express' +import { Controller, Get, Path, Query, Route, Request, Security, Tags, Post, Body } from 'tsoa' +import { injectable } from 'tsyringe' -// import { verificationSessionService } from './verification-sessions.service' -// import { SCOPES } from '../../../enums' -// import { Request as Req } from 'express' -// import { CreateAuthorizationRequest } from '../types/verifier.types' +import { SCOPES } from '../../../enums' +import ErrorHandlingService from '../../../errorHandlingService' +import { CreateAuthorizationRequest } from '../types/verifier.types' -// @Tags('oid4vc verification sessions') -// @Route('/openid4vc/verification-sessions') -// @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) -// @injectable() -// export class VerificationSessionsController extends Controller { -// /** -// * Create an authorization request, acting as a Relying Party (RP) -// */ -// @Post('/create-presentation-request') -// public async createProofRequest( -// @Request() request: Req, -// @Body() createAuthorizationRequest: CreateAuthorizationRequest, -// ) { -// try { -// return await verificationSessionService.createProofRequest(request, createAuthorizationRequest) -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } +import { verificationSessionService } from './verification-sessions.service' -// /** -// * Retrieve all verification session records -// */ -// @Get('/') -// public async getAllVerificationSessions( -// @Request() request: Req, -// @Query('publicVerifierId') publicVerifierId?: string, -// @Query('payloadState') payloadState?: string, -// @Query('state') state?: OpenId4VcVerificationSessionState, -// @Query('authorizationRequestUri') authorizationRequestUri?: string, -// @Query('nonce') nonce?: string, -// ) { -// try { -// return await verificationSessionService.findVerificationSessionsByQuery( -// request, -// publicVerifierId, -// payloadState, -// state, -// authorizationRequestUri, -// nonce, -// ) -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } +@Tags('oid4vc verification sessions') +@Route('/openid4vc/verification-sessions') +@Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) +@injectable() +export class VerificationSessionsController extends Controller { + /** + * Create an authorization request, acting as a Relying Party (RP) + */ + @Post('/create-presentation-request') + public async createProofRequest( + @Request() request: Req, + @Body() createAuthorizationRequest: CreateAuthorizationRequest, + ) { + try { + return await verificationSessionService.createProofRequest(request, createAuthorizationRequest) + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } -// /** -// * Get verification session by ID -// */ -// @Get('/:verificationSessionId') -// public async getVerificationSessionsById( -// @Request() request: Req, -// @Path('verificationSessionId') verificationSessionId: string, -// ) { -// try { -// return await verificationSessionService.getVerificationSessionsById(request, verificationSessionId) -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } -// // TODO: Uncomment when the method is implemented: There was a problem resolving type of 'IDTokenPayload'. -// // /** -// // * Get verification response by verification Session ID -// // */ -// @Get('/response/:verificationSessionId') -// public async getVerifiedAuthorizationResponse( -// @Request() request: Req, -// @Path('verificationSessionId') verificationSessionId: string, -// ) { -// try { -// return await verificationSessionService.getVerifiedAuthorizationResponse(request, verificationSessionId) -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } -// } + /** + * Retrieve all verification session records + */ + @Get('/') + public async getAllVerificationSessions( + @Request() request: Req, + @Query('publicVerifierId') publicVerifierId?: string, + @Query('payloadState') payloadState?: string, + @Query('state') state?: OpenId4VcVerificationSessionState, + @Query('authorizationRequestUri') authorizationRequestUri?: string, + @Query('nonce') nonce?: string, + ) { + try { + return await verificationSessionService.findVerificationSessionsByQuery( + request, + publicVerifierId, + payloadState, + state, + authorizationRequestUri, + nonce, + ) + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } + + /** + * Get verification session by ID + */ + @Get('/:verificationSessionId') + public async getVerificationSessionsById( + @Request() request: Req, + @Path('verificationSessionId') verificationSessionId: string, + ) { + try { + return await verificationSessionService.getVerificationSessionsById(request, verificationSessionId) + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } + // TODO: Uncomment when the method is implemented: There was a problem resolving type of 'IDTokenPayload'. + // /** + // * Get verification response by verification Session ID + // */ + @Get('/response/:verificationSessionId') + public async getVerifiedAuthorizationResponse( + @Request() request: Req, + @Path('verificationSessionId') verificationSessionId: string, + ) { + try { + return await verificationSessionService.getVerifiedAuthorizationResponse(request, verificationSessionId) + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } +} diff --git a/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts b/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts index 1a648246..b5cd628c 100644 --- a/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts +++ b/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts @@ -1,209 +1,206 @@ -// import type { RestAgentModules, RestMultiTenantAgentModules } from '../../../cliAgent' - -// import { -// Agent, -// ClaimFormat, -// DidKey, -// JsonEncoder, -// JsonTransformer, -// Jwt, -// Mdoc, -// MdocDeviceResponse, -// RecordNotFoundError, -// TypedArrayEncoder, -// W3cJsonLdVerifiablePresentation, -// W3cJwtVerifiablePresentation, -// W3cPresentation, -// X509Service, -// } from '@credo-ts/core' -// import { OpenId4VcJwtIssuerDid, OpenId4VcVerificationSessionState } from '@credo-ts/openid4vc' -// import { injectable } from 'tsyringe' -// import { Request as Req } from 'express' -// import { SignerMethod } from '../../../enums' -// import { CreateAuthorizationRequest, OpenId4VcIssuerX5c, ResponseModeEnum } from '../types/verifier.types' - -// // import { CreateAuthorizationRequest } from '../types/verifier.types' - -// @injectable() -// class VerificationSessionsService { -// public async createProofRequest(agentReq: Req, dto: CreateAuthorizationRequest) { -// try { -// let requestSigner -// if (dto.requestSigner.method === SignerMethod.Did) { -// requestSigner = dto.requestSigner as OpenId4VcJwtIssuerDid - -// const didToResolve = dto.requestSigner?.didUrl -// if (!didToResolve) { -// throw new Error('No DID provided to resolve (neither requestSigner.didUrl nor verifierDid present)') -// } - -// const didDocument = await agentReq.agent.dids.resolveDidDocument(didToResolve) - -// let verifierDidUrl: string | undefined = undefined -// if (didDocument.verificationMethod?.[0]?.id) { -// verifierDidUrl = didDocument.verificationMethod[0].id -// } - -// if (!verifierDidUrl) { -// throw new Error('No matching verification method found on verifier DID document') -// } - -// if (!requestSigner.didUrl || !String(requestSigner.didUrl).includes('#')) { -// requestSigner.didUrl = verifierDidUrl -// } - -// requestSigner = { method: 'did', didUrl: verifierDidUrl } as any -// } else { -// requestSigner = dto.requestSigner as OpenId4VcIssuerX5c - -// const parsedCertificate = X509Service.parseCertificate(agentReq.agent.context, { -// encodedCertificate: requestSigner.x5c[0], -// }) -// requestSigner.issuer = parsedCertificate.sanUriNames[0] -// } - -// if (!requestSigner) { -// } else if (requestSigner.method === 'did') { -// } -// const options: any = { -// requestSigner, -// verifierId: dto.verifierId, -// } - -// if(dto.responseMode === ResponseModeEnum.DC_API || ResponseModeEnum.DC_API_JWT){ -// options.expectedOrigins = dto.expectedOrigins -// } - -// if (dto.responseMode) options.responseMode = dto.responseMode -// if (dto.presentationExchange) { -// options.presentationExchange = dto.presentationExchange -// } else if (dto.dcql) { -// options.dcql = dto.dcql -// } - -// return (await agentReq.agent.modules.openId4VcVerifier.createAuthorizationRequest(options)) as any -// } catch (error) { -// throw error -// } -// } - -// public async findVerificationSessionsByQuery( -// agentReq: Req, -// publicVerifierId?: string, -// payloadState?: string, -// state?: OpenId4VcVerificationSessionState, -// authorizationRequestUri?: string, -// nonce?: string, -// ) { -// return await agentReq.agent.modules.openId4VcVerifier.findVerificationSessionsByQuery({ -// verifierId: publicVerifierId, -// payloadState, -// state, -// authorizationRequestUri, -// nonce, -// }) -// } - -// public async getVerificationSessionsById(agentReq: Req, verificationSessionId: string) { -// return await agentReq.agent.modules.openId4VcVerifier.getVerificationSessionById(verificationSessionId) -// } - -// public async getVerifiedAuthorizationResponse(request: Req, verificationSessionId: string) { -// const verificationSession = -// await request.agent.modules.openId4VcVerifier.getVerificationSessionById(verificationSessionId) -// const verified = await request.agent.modules.openId4VcVerifier.getVerifiedAuthorizationResponse( -// verificationSession.id, -// ) -// console.log(verified.presentationExchange?.presentations) -// console.log(verified.dcql?.presentationResult) - -// const presentations = await Promise.all( -// (verified.presentationExchange?.presentations ?? Object.values(verified.dcql?.presentations ?? {})) -// .flat() -// .map(async (presentation: { toJson: () => any; presentation: W3cPresentation; serializedJwt: any; documents: Mdoc[]; base64Url: any; compact: any }) => { -// if (presentation instanceof W3cJsonLdVerifiablePresentation) { -// return { -// pretty: presentation.toJson(), -// encoded: presentation.toJson(), -// } -// } - -// if (presentation instanceof W3cJwtVerifiablePresentation) { -// return { -// pretty: JsonTransformer.toJSON(presentation.presentation), -// encoded: presentation.serializedJwt, -// } -// } - -// if (presentation instanceof MdocDeviceResponse) { -// return { -// pretty: JsonTransformer.toJSON({ -// documents: presentation.documents.map((doc) => ({ -// doctype: doc.docType, -// alg: doc.alg, -// base64Url: doc.base64Url, -// validityInfo: doc.validityInfo, -// deviceSignedNamespaces: doc.deviceSignedNamespaces, -// issuerSignedNamespaces: Object.entries(doc.issuerSignedNamespaces).map( -// ([nameSpace, nameSpacEntries]) => [ -// nameSpace, -// Object.entries(nameSpacEntries).map(([key, value]) => -// value instanceof Uint8Array -// ? [`base64:${key}`, `data:image/jpeg;base64,${TypedArrayEncoder.toBase64(value)}`] -// : [key, value], -// ), -// ], -// ), -// })), -// }), -// encoded: presentation.base64Url, -// } -// } - -// // if ( -// // presentation instanceof W3cV2JwtVerifiablePresentation || -// // presentation instanceof W3cV2SdJwtVerifiablePresentation -// // ) { -// // throw new Error('W3C V2 presentations are not supported yet') -// // } - -// return { -// pretty: { -// ...presentation, -// compact: undefined, -// }, -// encoded: presentation.compact, -// } -// }) ?? [], -// ) - -// const dcqlSubmission = verified.dcql -// ? Object.keys(verified.dcql.presentations).map((key, index) => ({ -// queryCredentialId: key, -// presentationIndex: index, -// })) -// : undefined - -// console.log('presentations', presentations) - -// return { -// verificationSessionId: verificationSession.id, -// responseStatus: verificationSession.state, -// error: verificationSession.errorMessage, -// //authorizationRequest, - -// presentations: presentations, - -// submission: verified.presentationExchange?.submission, -// definition: verified.presentationExchange?.definition, -// transactionDataSubmission: verified.transactionData, - -// // dcqlQuery, -// dcqlSubmission: verified.dcql -// ? { ...verified.dcql.presentationResult, vpTokenMapping: dcqlSubmission } -// : undefined, -// } as any -// } -// } - -// export const verificationSessionService = new VerificationSessionsService() +import type { RestAgentModules, RestMultiTenantAgentModules } from '../../../cliAgent' + +import { + Agent, + ClaimFormat, + DidKey, + JsonEncoder, + JsonTransformer, + Jwt, + Mdoc, + MdocDeviceResponse, + RecordNotFoundError, + TypedArrayEncoder, + W3cJsonLdVerifiablePresentation, + W3cJwtVerifiablePresentation, + W3cPresentation, + X509Service, +} from '@credo-ts/core' +import { OpenId4VcJwtIssuerDid, OpenId4VcVerificationSessionState } from '@credo-ts/openid4vc' +import { Request as Req } from 'express' +import { injectable } from 'tsyringe' + +import { SignerMethod } from '../../../enums' +import { CreateAuthorizationRequest, OpenId4VcIssuerX5c, ResponseModeEnum } from '../types/verifier.types' + +// import { CreateAuthorizationRequest } from '../types/verifier.types' + +@injectable() +class VerificationSessionsService { + public async createProofRequest(agentReq: Req, dto: CreateAuthorizationRequest) { + try { + let requestSigner + if (dto.requestSigner.method === SignerMethod.Did) { + requestSigner = dto.requestSigner as OpenId4VcJwtIssuerDid + + const didToResolve = dto.requestSigner?.didUrl + if (!didToResolve) { + throw new Error('No DID provided to resolve (neither requestSigner.didUrl nor verifierDid present)') + } + + const didDocument = await agentReq.agent.dids.resolveDidDocument(didToResolve) + + let verifierDidUrl: string | undefined = undefined + if (didDocument.verificationMethod?.[0]?.id) { + verifierDidUrl = didDocument.verificationMethod[0].id + } + + if (!verifierDidUrl) { + throw new Error('No matching verification method found on verifier DID document') + } + + if (!requestSigner.didUrl || !String(requestSigner.didUrl).includes('#')) { + requestSigner.didUrl = verifierDidUrl + } + + requestSigner = { method: 'did', didUrl: verifierDidUrl } as any + } else { + requestSigner = dto.requestSigner as OpenId4VcIssuerX5c + + const parsedCertificate = X509Service.parseCertificate(agentReq.agent.context, { + encodedCertificate: requestSigner.x5c[0], + }) + requestSigner.issuer = parsedCertificate.sanUriNames[0] + } + + if (!requestSigner) { + } else if (requestSigner.method === 'did') { + } + const options: any = { + requestSigner, + verifierId: dto.verifierId, + } + + if (dto.responseMode === ResponseModeEnum.DC_API || ResponseModeEnum.DC_API_JWT) { + options.expectedOrigins = dto.expectedOrigins + } + + if (dto.responseMode) options.responseMode = dto.responseMode + if (dto.presentationExchange) { + options.presentationExchange = dto.presentationExchange + } else if (dto.dcql) { + options.dcql = dto.dcql + } + + return (await agentReq.agent.modules.openid4vc.verifier?.createAuthorizationRequest(options)) as any + } catch (error) { + throw error + } + } + + public async findVerificationSessionsByQuery( + agentReq: Req, + publicVerifierId?: string, + payloadState?: string, + state?: OpenId4VcVerificationSessionState, + authorizationRequestUri?: string, + nonce?: string, + ) { + return await agentReq.agent.modules.openid4vc.verifier?.findVerificationSessionsByQuery({ + verifierId: publicVerifierId, + payloadState, + state, + authorizationRequestUri, + nonce, + }) + } + + public async getVerificationSessionsById(agentReq: Req, verificationSessionId: string) { + return await agentReq.agent.modules.openid4vc.verifier?.getVerificationSessionById(verificationSessionId) + } + + public async getVerifiedAuthorizationResponse(request: Req, verificationSessionId: string) { + const verificationSession = + await request.agent.modules.openid4vc.verifier?.getVerificationSessionById(verificationSessionId) + const verified = await request.agent.modules.openid4vc.verifier?.getVerifiedAuthorizationResponse( + verificationSession!.id, + ) + + const presentations = await Promise.all( + (verified!.presentationExchange?.presentations ?? Object.values(verified!.dcql?.presentations ?? {})) + .flat() + .map(async (presentation: any) => { + if (presentation instanceof W3cJsonLdVerifiablePresentation) { + return { + pretty: presentation.toJson(), + encoded: presentation.toJson(), + } + } + + if (presentation instanceof W3cJwtVerifiablePresentation) { + return { + pretty: JsonTransformer.toJSON(presentation.presentation), + encoded: presentation.serializedJwt, + } + } + + if (presentation instanceof MdocDeviceResponse) { + return { + pretty: JsonTransformer.toJSON({ + documents: presentation.documents.map((doc) => ({ + doctype: doc.docType, + alg: doc.alg, + base64Url: doc.base64Url, + validityInfo: doc.validityInfo, + deviceSignedNamespaces: doc.deviceSignedNamespaces, + issuerSignedNamespaces: Object.entries(doc.issuerSignedNamespaces).map( + ([nameSpace, nameSpacEntries]) => [ + nameSpace, + Object.entries(nameSpacEntries).map(([key, value]) => + value instanceof Uint8Array + ? [`base64:${key}`, `data:image/jpeg;base64,${TypedArrayEncoder.toBase64(value)}`] + : [key, value], + ), + ], + ), + })), + }), + encoded: presentation.base64Url, + } + } + + // if ( + // presentation instanceof W3cV2JwtVerifiablePresentation || + // presentation instanceof W3cV2SdJwtVerifiablePresentation + // ) { + // throw new Error('W3C V2 presentations are not supported yet') + // } + + return { + pretty: { + ...presentation, + compact: undefined, + }, + encoded: presentation.compact, + } + }) ?? [], + ) + + const dcqlSubmission = verified!.dcql + ? Object.keys(verified!.dcql.presentations).map((key, index) => ({ + queryCredentialId: key, + presentationIndex: index, + })) + : undefined + + return { + verificationSessionId: verificationSession?.id, + responseStatus: verificationSession?.state, + error: verificationSession?.errorMessage, + //authorizationRequest, + + presentations: presentations, + + submission: verified!.presentationExchange?.submission, + definition: verified!.presentationExchange?.definition, + transactionDataSubmission: verified!.transactionData, + + // dcqlQuery, + dcqlSubmission: verified!.dcql + ? { ...verified!.dcql.presentationResult, vpTokenMapping: dcqlSubmission } + : undefined, + } as any + } +} + +export const verificationSessionService = new VerificationSessionsService() diff --git a/src/routes/swagger.json b/src/routes/swagger.json index 1525c153..1dccfa78 100644 --- a/src/routes/swagger.json +++ b/src/routes/swagger.json @@ -416,11 +416,6 @@ ], "type": "string" }, - "Record_string.unknown_": { - "properties": {}, - "type": "object", - "description": "Construct a type with a set of properties K of type T" - }, "RecordId": { "type": "string", "example": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e" @@ -521,40 +516,6 @@ "type": "object", "additionalProperties": false }, - "JsonValue": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number", - "format": "double" - }, - { - "type": "boolean" - }, - { - "$ref": "#/components/schemas/JsonObject" - }, - { - "$ref": "#/components/schemas/JsonArray" - } - ], - "nullable": true - }, - "JsonObject": { - "properties": {}, - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/JsonValue" - } - }, - "JsonArray": { - "items": { - "$ref": "#/components/schemas/JsonValue" - }, - "type": "array" - }, "Pick_JwsGeneralFormat.Exclude_keyofJwsGeneralFormat.payload__": { "properties": { "header": { @@ -1527,111 +1488,799 @@ } ] }, - "W3cIssuer": { + "W3cJsonLdVerifiableCredential": { "properties": { + "context": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/JsonObject" + } + ] + }, + "type": "array" + }, "id": { "type": "string" + }, + "type": { + "items": { + "type": "string" + }, + "type": "array" + }, + "input_descriptors": { + "items": { + "$ref": "#/components/schemas/InputDescriptorV2Model" + }, + "type": "array" + }, + "frame": { + "additionalProperties": false, + "type": "object" } }, "required": [ - "id" + "id", + "input_descriptors" ], "type": "object", "additionalProperties": false }, - "W3cCredentialSubject": { + "PresentationDefinition": { "properties": { - "id": { - "type": "string" - }, - "claims": { - "$ref": "#/components/schemas/Record_string.unknown_" + "definition": { + "$ref": "#/components/schemas/DifPresentationExchangeDefinitionV2Model" } }, + "required": [ + "definition" + ], "type": "object", "additionalProperties": false }, - "SingleOrArray_W3cCredentialSubject_": { - "anyOf": [ - { - "$ref": "#/components/schemas/W3cCredentialSubject" - }, - { + "DcqlClaim": { + "properties": { + "path": { "items": { - "$ref": "#/components/schemas/W3cCredentialSubject" + "type": "string" }, "type": "array" + }, + "intent_to_retain": { + "type": "boolean" } - ] + }, + "required": [ + "path" + ], + "type": "object", + "additionalProperties": false }, - "W3cCredentialSchema": { + "DcqlCredential": { "properties": { "id": { "type": "string" }, - "type": { + "format": { "type": "string" + }, + "meta": { + "$ref": "#/components/schemas/Record_string.any_" + }, + "require_cryptographic_holder_binding": { + "type": "boolean" + }, + "claims": { + "items": { + "$ref": "#/components/schemas/DcqlClaim" + }, + "type": "array" } }, "required": [ "id", - "type" + "format", + "claims" ], "type": "object", "additionalProperties": false }, - "SingleOrArray_W3cCredentialSchema_": { - "anyOf": [ - { - "$ref": "#/components/schemas/W3cCredentialSchema" + "DcqlQuery": { + "properties": { + "combine": { + "type": "string", + "enum": [ + "all", + "any" + ] }, - { + "credentials": { "items": { - "$ref": "#/components/schemas/W3cCredentialSchema" + "$ref": "#/components/schemas/DcqlCredential" }, "type": "array" } - ] + }, + "required": [ + "credentials" + ], + "type": "object", + "additionalProperties": false }, - "W3cCredentialStatus": { + "DcqlDefinition": { "properties": { - "id": { + "query": { + "$ref": "#/components/schemas/DcqlQuery" + } + }, + "required": [ + "credential", + "proof" + ], + "type": "object", + "additionalProperties": false + }, + "TenantConfig": { + "properties": { + "label": { + "type": "string" + } + }, + "required": [ + "label" + ], + "type": "object" + }, + "MetadataValue": { + "$ref": "#/components/schemas/Record_string.any_" + }, + "MetadataBase": { + "properties": {}, + "additionalProperties": { + "$ref": "#/components/schemas/MetadataValue" + }, + "type": "object" + }, + "Metadata____": { + "description": "Metadata access class to get, set (create and update), add (append to a record) and delete metadata on any record.\n\nset will override the previous value if it already exists\n\nnote: To add persistence to these records, you have to update the record in the correct repository", + "properties": { + "data": { + "$ref": "#/components/schemas/MetadataBase" + } + }, + "required": [ + "data" + ], + "type": "object", + "additionalProperties": false + }, + "Pick_CustomTenantConfig.Exclude_keyofCustomTenantConfig.walletConfig__": { + "properties": { + "label": { "type": "string" }, - "type": { + "connectionImageUrl": { "type": "string" } }, "required": [ - "id", - "type" + "label" + ], + "type": "object", + "description": "From T, pick a set of properties whose keys are in the union K" + }, + "Omit_CustomTenantConfig.walletConfig_": { + "$ref": "#/components/schemas/Pick_CustomTenantConfig.Exclude_keyofCustomTenantConfig.walletConfig__", + "description": "Construct a type with the properties of T except for those in type K." + }, + "CreateTenantOptions": { + "properties": { + "config": { + "$ref": "#/components/schemas/Omit_CustomTenantConfig.walletConfig_" + } + }, + "required": [ + "config" ], "type": "object", "additionalProperties": false }, - "W3cJsonLdVerifiableCredential": { + "JwtObject": { "properties": { - "context": { + "alg": { "items": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/JsonObject" - } - ] + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "alg" + ], + "type": "object", + "additionalProperties": false + }, + "LdpObject": { + "properties": { + "proof_type": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "proof_type" + ], + "type": "object", + "additionalProperties": false + }, + "DiObject": { + "properties": { + "proof_type": { + "items": { + "type": "string" }, "type": "array" }, - "id": { - "type": "string" - }, - "type": { + "cryptosuite": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "proof_type", + "cryptosuite" + ], + "type": "object", + "additionalProperties": false + }, + "SdJwtObject": { + "properties": { + "undefined": { "items": { "type": "string" }, "type": "array" + } + }, + "type": "object", + "additionalProperties": false + }, + "MsoMdocObject": { + "properties": { + "alg": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "alg" + ], + "type": "object", + "additionalProperties": false + }, + "Format": { + "properties": { + "jwt": { + "$ref": "#/components/schemas/JwtObject" + }, + "jwt_vc": { + "$ref": "#/components/schemas/JwtObject" + }, + "jwt_vc_json": { + "$ref": "#/components/schemas/JwtObject" + }, + "jwt_vp": { + "$ref": "#/components/schemas/JwtObject" + }, + "jwt_vp_json": { + "$ref": "#/components/schemas/JwtObject" + }, + "ldp": { + "$ref": "#/components/schemas/LdpObject" + }, + "ldp_vc": { + "$ref": "#/components/schemas/LdpObject" + }, + "ldp_vp": { + "$ref": "#/components/schemas/LdpObject" + }, + "di": { + "$ref": "#/components/schemas/DiObject" + }, + "di_vc": { + "$ref": "#/components/schemas/DiObject" + }, + "di_vp": { + "$ref": "#/components/schemas/DiObject" + }, + "undefined": { + "$ref": "#/components/schemas/SdJwtObject" + }, + "mso_mdoc": { + "$ref": "#/components/schemas/MsoMdocObject" + } + }, + "type": "object", + "additionalProperties": false + }, + "Issuance": { + "properties": { + "manifest": { + "type": "string" + } + }, + "type": "object", + "additionalProperties": {} + }, + "Optionality": { + "type": "string", + "enum": [ + "required", + "preferred" + ] + }, + "Directives": { + "type": "string", + "enum": [ + "required", + "allowed", + "disallowed" + ] + }, + "PdStatus": { + "properties": { + "directive": { + "$ref": "#/components/schemas/Directives" + } + }, + "type": "object", + "additionalProperties": false + }, + "Statuses": { + "properties": { + "active": { + "$ref": "#/components/schemas/PdStatus" + }, + "suspended": { + "$ref": "#/components/schemas/PdStatus" + }, + "revoked": { + "$ref": "#/components/schemas/PdStatus" + } + }, + "type": "object", + "additionalProperties": false + }, + "OneOfNumberStringBoolean": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "number", + "format": "double" + }, + { + "type": "string" + } + ] + }, + "OneOfNumberString": { + "anyOf": [ + { + "type": "number", + "format": "double" + }, + { + "type": "string" + } + ] + }, + "FilterV2": { + "properties": { + "const": { + "$ref": "#/components/schemas/OneOfNumberStringBoolean" + }, + "enum": { + "items": { + "$ref": "#/components/schemas/OneOfNumberStringBoolean" + }, + "type": "array" + }, + "exclusiveMinimum": { + "$ref": "#/components/schemas/OneOfNumberString" + }, + "exclusiveMaximum": { + "$ref": "#/components/schemas/OneOfNumberString" + }, + "format": { + "type": "string" + }, + "formatMaximum": { + "type": "string" + }, + "formatMinimum": { + "type": "string" + }, + "formatExclusiveMaximum": { + "type": "string" + }, + "formatExclusiveMinimum": { + "type": "string" + }, + "minLength": { + "type": "number", + "format": "double" + }, + "maxLength": { + "type": "number", + "format": "double" + }, + "minimum": { + "$ref": "#/components/schemas/OneOfNumberString" + }, + "maximum": { + "$ref": "#/components/schemas/OneOfNumberString" + }, + "not": { + "additionalProperties": false, + "type": "object" + }, + "pattern": { + "type": "string" + }, + "type": { + "type": "string" + }, + "contains": { + "$ref": "#/components/schemas/FilterV2" + }, + "items": { + "$ref": "#/components/schemas/FilterV2Items" + } + }, + "type": "object", + "additionalProperties": false + }, + "FilterV2Items": { + "properties": { + "const": { + "$ref": "#/components/schemas/OneOfNumberStringBoolean" + }, + "enum": { + "items": { + "$ref": "#/components/schemas/OneOfNumberStringBoolean" + }, + "type": "array" + }, + "exclusiveMinimum": { + "$ref": "#/components/schemas/OneOfNumberString" + }, + "exclusiveMaximum": { + "$ref": "#/components/schemas/OneOfNumberString" + }, + "format": { + "type": "string" + }, + "formatMaximum": { + "type": "string" + }, + "formatMinimum": { + "type": "string" + }, + "formatExclusiveMaximum": { + "type": "string" + }, + "formatExclusiveMinimum": { + "type": "string" + }, + "minLength": { + "type": "number", + "format": "double" + }, + "maxLength": { + "type": "number", + "format": "double" + }, + "minimum": { + "$ref": "#/components/schemas/OneOfNumberString" + }, + "maximum": { + "$ref": "#/components/schemas/OneOfNumberString" + }, + "not": { + "additionalProperties": false, + "type": "object" + }, + "pattern": { + "type": "string" + }, + "type": { + "type": "string" + }, + "contains": { + "$ref": "#/components/schemas/FilterV2" + }, + "items": { + "$ref": "#/components/schemas/FilterV2Items" + } + }, + "type": "object", + "additionalProperties": false + }, + "FieldV2": { + "properties": { + "id": { + "type": "string" + }, + "path": { + "items": { + "type": "string" + }, + "type": "array" + }, + "purpose": { + "type": "string" + }, + "filter": { + "$ref": "#/components/schemas/FilterV2" + }, + "predicate": { + "$ref": "#/components/schemas/Optionality" + }, + "intent_to_retain": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "optional": { + "type": "boolean" + } + }, + "required": [ + "path" + ], + "type": "object", + "additionalProperties": false + }, + "HolderSubject": { + "properties": { + "field_id": { + "items": { + "type": "string" + }, + "type": "array" + }, + "directive": { + "$ref": "#/components/schemas/Optionality" + } + }, + "required": [ + "field_id", + "directive" + ], + "type": "object", + "additionalProperties": false + }, + "ConstraintsV2": { + "properties": { + "limit_disclosure": { + "$ref": "#/components/schemas/Optionality" + }, + "statuses": { + "$ref": "#/components/schemas/Statuses" + }, + "fields": { + "items": { + "$ref": "#/components/schemas/FieldV2" + }, + "type": "array" + }, + "subject_is_issuer": { + "$ref": "#/components/schemas/Optionality" + }, + "is_holder": { + "items": { + "$ref": "#/components/schemas/HolderSubject" + }, + "type": "array" + }, + "same_subject": { + "items": { + "$ref": "#/components/schemas/HolderSubject" + }, + "type": "array" + } + }, + "type": "object", + "additionalProperties": false + }, + "InputDescriptorV2Model": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "purpose": { + "type": "string" + }, + "format": { + "$ref": "#/components/schemas/Format" + }, + "group": { + "items": { + "type": "string" + }, + "type": "array" + }, + "issuance": { + "items": { + "$ref": "#/components/schemas/Issuance" + }, + "type": "array" + }, + "constraints": { + "$ref": "#/components/schemas/ConstraintsV2" + } + }, + "required": [ + "id", + "constraints" + ], + "type": "object", + "additionalProperties": false + }, + "Rules": { + "type": "string", + "enum": [ + "all", + "pick" + ] + }, + "SubmissionRequirement": { + "properties": { + "name": { + "type": "string" + }, + "purpose": { + "type": "string" + }, + "rule": { + "$ref": "#/components/schemas/Rules" + }, + "count": { + "type": "number", + "format": "double" + }, + "min": { + "type": "number", + "format": "double" + }, + "max": { + "type": "number", + "format": "double" + }, + "from": { + "type": "string" + }, + "from_nested": { + "items": { + "$ref": "#/components/schemas/SubmissionRequirement" + }, + "type": "array" + } + }, + "required": [ + "rule" + ], + "type": "object", + "additionalProperties": false + }, + "InputDescriptorV2": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "purpose": { + "type": "string" + }, + "format": { + "$ref": "#/components/schemas/Format" + }, + "group": { + "items": { + "type": "string" + }, + "type": "array" + }, + "issuance": { + "items": { + "$ref": "#/components/schemas/Issuance" + }, + "type": "array" + }, + "constraints": { + "$ref": "#/components/schemas/ConstraintsV2" + } + }, + "required": [ + "id", + "constraints" + ], + "type": "object", + "additionalProperties": false + }, + "PresentationDefinitionV2": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "purpose": { + "type": "string" + }, + "format": { + "$ref": "#/components/schemas/Format" + }, + "submission_requirements": { + "items": { + "$ref": "#/components/schemas/SubmissionRequirement" + }, + "type": "array" + }, + "input_descriptors": { + "items": { + "$ref": "#/components/schemas/InputDescriptorV2" + }, + "type": "array" + }, + "frame": { + "additionalProperties": false, + "type": "object" + } + }, + "required": [ + "id", + "input_descriptors" + ], + "type": "object", + "additionalProperties": false + }, + "DifPresentationExchangeDefinitionV2Model": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "purpose": { + "type": "string" + }, + "format": { + "$ref": "#/components/schemas/Format" + }, + "submission_requirements": { + "items": {}, + "type": "array" }, "input_descriptors": { "items": { @@ -1739,76 +2388,123 @@ } }, "required": [ - "credential", - "proof" + "query" ], "type": "object", "additionalProperties": false }, - "TenantConfig": { + "ResponseModeEnum": { + "enum": [ + "direct_post", + "direct_post.jwt", + "dc_api", + "dc_api.jwt" + ], + "type": "string" + }, + "OpenId4VcJwtIssuerDid": { "properties": { - "label": { + "didUrl": { "type": "string" + }, + "method": { + "type": "string", + "enum": [ + "did" + ], + "nullable": false } }, "required": [ - "label" + "didUrl", + "method" ], "type": "object" }, - "MetadataValue": { - "$ref": "#/components/schemas/Record_string.any_" - }, - "MetadataBase": { - "properties": {}, - "additionalProperties": { - "$ref": "#/components/schemas/MetadataValue" - }, - "type": "object" - }, - "Metadata____": { - "description": "Metadata access class to get, set (create and update), add (append to a record) and delete metadata on any record.\n\nset will override the previous value if it already exists\n\nnote: To add persistence to these records, you have to update the record in the correct repository", + "OpenId4VcIssuerX5c": { "properties": { - "data": { - "$ref": "#/components/schemas/MetadataBase" + "alg": { + "type": "string" + }, + "x5c": { + "items": { + "type": "string" + }, + "type": "array" + }, + "issuer": { + "type": "string" + }, + "method": { + "type": "string", + "enum": [ + "x5c" + ], + "nullable": false } }, "required": [ - "data" + "x5c", + "method" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "Pick_CustomTenantConfig.Exclude_keyofCustomTenantConfig.walletConfig__": { + "CreateAuthorizationRequest": { "properties": { - "label": { + "verifierId": { "type": "string" }, - "connectionImageUrl": { - "type": "string" + "presentationExchange": { + "$ref": "#/components/schemas/PresentationDefinition" + }, + "dcql": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/DcqlDefinition" + } + ] + }, + "responseMode": { + "$ref": "#/components/schemas/ResponseModeEnum" + }, + "requestSigner": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenId4VcJwtIssuerDid" + }, + { + "$ref": "#/components/schemas/OpenId4VcIssuerX5c" + } + ] + }, + "expectedOrigins": { + "items": { + "type": "string" + }, + "type": "array" } }, "required": [ - "label" + "verifierId", + "requestSigner" ], "type": "object", - "description": "From T, pick a set of properties whose keys are in the union K" + "additionalProperties": false }, - "Omit_CustomTenantConfig.walletConfig_": { - "$ref": "#/components/schemas/Pick_CustomTenantConfig.Exclude_keyofCustomTenantConfig.walletConfig__", - "description": "Construct a type with the properties of T except for those in type K." + "OpenId4VcVerificationSessionRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" }, - "CreateTenantOptions": { - "properties": { - "config": { - "$ref": "#/components/schemas/Omit_CustomTenantConfig.walletConfig_" - } - }, - "required": [ - "config" + "OpenId4VcVerificationSessionState": { + "enum": [ + "RequestCreated", + "RequestUriRetrieved", + "ResponseVerified", + "Error" ], - "type": "object", - "additionalProperties": false + "type": "string" } }, "securitySchemes": { @@ -3978,6 +4674,193 @@ } ] } + }, + "/openid4vc/verification-sessions/create-presentation-request": { + "post": { + "operationId": "CreateProofRequest", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": {} + } + } + } + }, + "description": "Create an authorization request, acting as a Relying Party (RP)", + "tags": [ + "oid4vc verification sessions" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAuthorizationRequest" + } + } + } + } + } + }, + "/openid4vc/verification-sessions": { + "get": { + "operationId": "GetAllVerificationSessions", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/OpenId4VcVerificationSessionRecord" + }, + "type": "array" + } + } + } + } + }, + "description": "Retrieve all verification session records", + "tags": [ + "oid4vc verification sessions" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [ + { + "in": "query", + "name": "publicVerifierId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "payloadState", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "state", + "required": false, + "schema": { + "$ref": "#/components/schemas/OpenId4VcVerificationSessionState" + } + }, + { + "in": "query", + "name": "authorizationRequestUri", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "nonce", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/openid4vc/verification-sessions/{verificationSessionId}": { + "get": { + "operationId": "GetVerificationSessionsById", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenId4VcVerificationSessionRecord" + } + } + } + } + }, + "description": "Get verification session by ID", + "tags": [ + "oid4vc verification sessions" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [ + { + "in": "path", + "name": "verificationSessionId", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, + "/openid4vc/verification-sessions/response/{verificationSessionId}": { + "get": { + "operationId": "GetVerifiedAuthorizationResponse", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": {} + } + } + } + }, + "tags": [ + "oid4vc verification sessions" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [ + { + "in": "path", + "name": "verificationSessionId", + "required": true, + "schema": { + "type": "string" + } + } + ] + } } }, "servers": [ From 9573fcabf1c38a2d2055155628302937c255b932 Mon Sep 17 00:00:00 2001 From: shitrerohit Date: Tue, 16 Dec 2025 12:27:58 +0530 Subject: [PATCH 16/38] fix:changes on cli agent file Signed-off-by: shitrerohit --- src/cliAgent.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cliAgent.ts b/src/cliAgent.ts index 2d350f6b..3ebe2024 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -1,6 +1,7 @@ // Note: For now we need to import askar-nodejs at the top to handle the undefined askar issue // Refer from: https://github.com/credebl/mobile-sdk/blob/main/packages/ssi/src/wallet/wallet.ts import '@openwallet-foundation/askar-nodejs' +import type { AskarModuleConfigStoreOptions } from '@credo-ts/askar' import type { InitConfig } from '@credo-ts/core' import type { IndyVdrPoolConfig } from '@credo-ts/indy-vdr' From 232943b38dcfbda28255783312b177ecb6047f33 Mon Sep 17 00:00:00 2001 From: shitrerohit Date: Tue, 16 Dec 2025 18:22:21 +0530 Subject: [PATCH 17/38] WIP:changes in create issuer work flow Signed-off-by: shitrerohit --- src/cliAgent.ts | 63 +++--- .../openid4vc/issuers/issuer.Controller.ts | 187 ++++++++---------- .../openid4vc/issuers/issuer.service.ts | 114 +++++------ .../openid4vc/types/issuer.types.ts | 5 +- 4 files changed, 182 insertions(+), 187 deletions(-) diff --git a/src/cliAgent.ts b/src/cliAgent.ts index 3ebe2024..822fb4ab 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -130,7 +130,13 @@ export async function readRestConfig(path: string) { export type RestMultiTenantAgentModules = Awaited> export type RestAgentModules = Awaited> - +function requireEnv(name: string): string { + const value = process.env[name] + if (!value) { + throw new Error(`Missing environment variable: ${name}`) + } + return value +} // TODO: add object const getModules = ( networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]], @@ -230,7 +236,8 @@ const getModules = ( }), questionAnswer: new QuestionAnswerModule(), - openid4vc: new OpenId4VcModule({}), + // openid4vc: new OpenId4VcModule({}), + // Todo: We can remove this polygon module for time being // polygon: new PolygonModule({ // didContractAddress: didRegistryContractAddress // ? didRegistryContractAddress @@ -241,30 +248,30 @@ const getModules = ( // rpcUrl: rpcUrl ? rpcUrl : (process.env.RPC_URL as string), // serverUrl: fileServerUrl ? fileServerUrl : (process.env.SERVER_URL as string), // }), - // openid4vc: new OpenId4VcModule({ - // // app: openId4VcApp, - // issuer: { - // baseUrl: - // process.env.NODE_ENV === 'PROD' - // ? `https://${process.env.APP_URL}/oid4vci` - // : `${process.env.AGENT_HTTP_URL}/oid4vci`, - // app: openId4VcApp, - // statefulCredentialOfferExpirationInSeconds: Number(process.env.OID4VCI_CRED_OFFER_EXPIRY) || 3600, - // accessTokenExpiresInSeconds: Number(process.env.OID4VCI_ACCESS_TOKEN_EXPIRY) || 3600, - // authorizationCodeExpiresInSeconds: Number(process.env.OID4VCI_AUTH_CODE_EXPIRY) || 3600, - // cNonceExpiresInSeconds: Number(process.env.OID4VCI_CNONCE_EXPIRY) || 3600, - // dpopRequired: false, - // credentialRequestToCredentialMapper: (...args) => getCredentialRequestToCredentialMapper()(...args), - // }, - // verifier: { - // baseUrl: - // process.env.NODE_ENV === 'PROD' - // ? `https://${process.env.APP_URL}/oid4vp` - // : `${process.env.AGENT_HTTP_URL}/oid4vp`, - // app: openId4VpApp, - // authorizationRequestExpirationInSeconds: Number(process.env.OID4VP_AUTH_REQUEST_PROOF_REQUEST_EXPIRY) || 3600, - // }, - // }), + openid4vc: new OpenId4VcModule({ + // app: openId4VcApp, + issuer: { + baseUrl: + process.env.NODE_ENV === 'PROD' + ? `https://${requireEnv('APP_URL')}/oid4vci` + : `${requireEnv('AGENT_HTTP_URL')}/oid4vci`, + app: openId4VcApp, + statefulCredentialOfferExpirationInSeconds: Number(process.env.OID4VCI_CRED_OFFER_EXPIRY) || 3600, + accessTokenExpiresInSeconds: Number(process.env.OID4VCI_ACCESS_TOKEN_EXPIRY) || 3600, + authorizationCodeExpiresInSeconds: Number(process.env.OID4VCI_AUTH_CODE_EXPIRY) || 3600, + cNonceExpiresInSeconds: Number(process.env.OID4VCI_CNONCE_EXPIRY) || 3600, + dpopRequired: false, + credentialRequestToCredentialMapper: (...args) => getCredentialRequestToCredentialMapper()(...args), + }, + verifier: { + baseUrl: + process.env.NODE_ENV === 'PROD' + ? `https://${requireEnv('APP_URL')}/oid4vp` + : `${requireEnv('AGENT_HTTP_URL')}/oid4vp`, + app: openId4VpApp, + authorizationRequestExpirationInSeconds: Number(process.env.OID4VP_AUTH_REQUEST_PROOF_REQUEST_EXPIRY) || 3600, + }, + }), // openId4VcVerifier: new OpenId4VcVerifierModule({ // baseUrl: // process.env.NODE_ENV === 'PROD' @@ -503,8 +510,8 @@ export async function runRestAgent(restConfig: AriesRestConfig) { ) transport.app.use(bodyParser.json({ limit: process.env.APP_JSON_BODY_SIZE ?? '5mb' })) - transport.app.use('/oid4vci', modules.openid4vc.issuer?.config.app ?? express.Router()) - transport.app.use('/oid4vp', modules.openid4vc.verifier?.config.app ?? express.Router()) + transport.app.use('/oid4vci', modules.openid4vc.issuer?.config.app._router ?? express.Router()) + transport.app.use('/oid4vp', modules.openid4vc.verifier?.config.app._router ?? express.Router()) } } diff --git a/src/controllers/openid4vc/issuers/issuer.Controller.ts b/src/controllers/openid4vc/issuers/issuer.Controller.ts index 149ed0b8..8e6bfea4 100644 --- a/src/controllers/openid4vc/issuers/issuer.Controller.ts +++ b/src/controllers/openid4vc/issuers/issuer.Controller.ts @@ -1,108 +1,93 @@ -// import { -// Controller, -// Delete, -// Get, -// Post, -// Put, -// Route, -// Tags, -// Path, -// Query, -// Body, -// Security, -// Request, -// Example -// } from 'tsoa' -// import { injectable } from 'tsyringe' +import { Request as Req } from 'express' +import { Controller, Delete, Get, Post, Put, Route, Tags, Path, Query, Body, Security, Request, Example } from 'tsoa' +import { injectable } from 'tsyringe' -// import ErrorHandlingService from '../../../errorHandlingService' -// import { CreateIssuerOptions, UpdateIssuerRecordOptions } from '../types/issuer.types' -// import { Request as Req } from 'express' +import { SCOPES } from '../../../enums' +import ErrorHandlingService from '../../../errorHandlingService' +import { OpenId4VcUpdateIssuerRecordOptionsExample } from '../examples/issuer.examples' +import { CreateIssuerOptions, UpdateIssuerRecordOptions } from '../types/issuer.types' -// import { issuerService } from './issuer.service' -// import { SCOPES } from '../../../enums' -// import { OpenId4VcUpdateIssuerRecordOptionsExample } from '../examples/issuer.examples' -// @Route('/openid4vc/issuer') -// @Tags('oid4vc issuers') -// @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) -// @injectable() -// export class IssuerController extends Controller { -// /** -// * Creates an issuer with issuer metadata. -// */ -// @Post() -// @Example( -// OpenId4VcUpdateIssuerRecordOptionsExample.withScope.value -// ) -// public async createIssuer(@Request() request: Req, @Body() createIssuerOptions: CreateIssuerOptions) { -// try { -// return await issuerService.createIssuerAgent(request, createIssuerOptions) -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } +import { issuerService } from './issuer.service' -// /** -// * Updates issuer metadata for a given publicIssuerId. -// */ -// @Put('{publicIssuerId}') -// public async updateIssuerMetadata( -// @Request() request: Req, -// @Path() publicIssuerId: string, -// @Body() updateIssuerRecordOptions: UpdateIssuerRecordOptions, -// ) { -// try { -// return await issuerService.updateIssuerMetadata(request, publicIssuerId, updateIssuerRecordOptions) -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } +@Route('/openid4vc/issuer') +@Tags('oid4vc issuers') +@Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) +@injectable() +export class IssuerController extends Controller { + /** + * Creates an issuer with issuer metadata. + */ + @Post() + @Example(OpenId4VcUpdateIssuerRecordOptionsExample.withScope.value) + public async createIssuer(@Request() request: Req, @Body() createIssuerOptions: CreateIssuerOptions) { + try { + return await issuerService.createIssuerAgent(request, createIssuerOptions) + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } -// /** -// * Returns metadata for a specific issuer. -// */ -// @Get('{issuerId}/metadata') -// public async getIssuerAgentMetaData(@Request() request: Req, @Path() issuerId: string) { -// try { -// return await issuerService.getIssuerAgentMetaData(request, issuerId) -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } + /** + * Updates issuer metadata for a given publicIssuerId. + */ + @Put('{publicIssuerId}') + public async updateIssuerMetadata( + @Request() request: Req, + @Path() publicIssuerId: string, + @Body() updateIssuerRecordOptions: UpdateIssuerRecordOptions, + ) { + try { + return await issuerService.updateIssuerMetadata(request, publicIssuerId, updateIssuerRecordOptions) + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } -// /** -// * Query issuers by optional publicIssuerId. -// */ -// @Get() -// public async getIssuersByQuery(@Request() request: Req, @Query() publicIssuerId?: string) { -// try { -// return await issuerService.getIssuersByQuery(request, publicIssuerId) -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } + /** + * Returns metadata for a specific issuer. + */ + @Get('{issuerId}/metadata') + public async getIssuerAgentMetaData(@Request() request: Req, @Path() issuerId: string) { + try { + return await issuerService.getIssuerAgentMetaData(request, issuerId) + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } -// /** -// * Returns a specific issuer by publicIssuerId. -// */ -// @Get('{publicIssuerId}') -// public async getIssuer(@Request() request: Req, @Path() publicIssuerId: string) { -// try { -// return await issuerService.getIssuer(request, publicIssuerId) -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } + /** + * Query issuers by optional publicIssuerId. + */ + @Get() + public async getIssuersByQuery(@Request() request: Req, @Query() publicIssuerId?: string) { + try { + return await issuerService.getIssuersByQuery(request, publicIssuerId) + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } -// /** -// * Deletes a specific issuer by record id. -// */ -// @Delete('{id}') -// public async deleteIssuer(@Request() request: Req, @Path() id: string): Promise { -// try { -// await issuerService.deleteIssuer(request, id) -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } -// } + /** + * Returns a specific issuer by publicIssuerId. + */ + @Get('{publicIssuerId}') + public async getIssuer(@Request() request: Req, @Path() publicIssuerId: string) { + try { + return await issuerService.getIssuer(request, publicIssuerId) + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } + + /** + * Deletes a specific issuer by record id. + */ + // @Delete('{id}') + // public async deleteIssuer(@Request() request: Req, @Path() id: string): Promise { + // try { + // await issuerService.deleteIssuer(request, id) + // } catch (error) { + // throw ErrorHandlingService.handle(error) + // } + // } +} diff --git a/src/controllers/openid4vc/issuers/issuer.service.ts b/src/controllers/openid4vc/issuers/issuer.service.ts index f1552097..416f4d77 100644 --- a/src/controllers/openid4vc/issuers/issuer.service.ts +++ b/src/controllers/openid4vc/issuers/issuer.service.ts @@ -1,57 +1,57 @@ -// import type { RestAgentModules, RestMultiTenantAgentModules } from '../../../cliAgent' -// import type { Agent } from '@credo-ts/core' -// // import { OpenId4VcIssuerRepository } from '@credo-ts/openid4vc/build/openid4vc-issuer/repository/OpenId4VcIssuerRepository.mjs' -// import { Request as Req } from 'express' - - -// export class IssuerService { -// public async createIssuerAgent( -// agentReq: Req, -// createIssuerOptions: any, //TODO: Replace with OpenId4VciCreateIssuerOptions, -// ) { -// const issuerRecord = await agentReq.agent.modules.openId4VcIssuer.createIssuer(createIssuerOptions) -// const issuerMetadata = await agentReq.agent.modules.openId4VcIssuer.getIssuerMetadata(issuerRecord.issuerId) -// // eslint-disable-next-line no-console -// console.log(`\nIssuer URL: ${issuerMetadata.credentialIssuer.credential_issuer}`) -// return issuerRecord -// } - -// public async updateIssuerMetadata( -// agentReq: Req, -// publicIssuerId: string, -// updateIssuerRecordOptions: any, // TODO: Replace with OpenId4VcUpdateIssuerRecordOptions -// ) { -// await agentReq.agent.modules.openId4VcIssuer.updateIssuerMetadata({ -// issuerId: publicIssuerId, -// ...updateIssuerRecordOptions, -// }) -// return await this.getIssuer(agentReq, publicIssuerId) -// } - -// public async getIssuersByQuery( -// agentReq: Req, -// publicIssuerId?: string, -// ) { -// const repository = agentReq.agent.dependencyManager.resolve(OpenId4VcIssuerRepository) -// return await repository.findByQuery(agentReq.agent.context, { issuerId: publicIssuerId }) -// } - -// public async getIssuer(agentReq:Req , publicIssuerId: string) { -// return await agentReq.agent.modules.openId4VcIssuer.getIssuerByIssuerId(publicIssuerId) -// } - -// public async deleteIssuer(agentReq: Req, issuerId: string) { -// const repository = agentReq.agent.dependencyManager.resolve(OpenId4VcIssuerRepository) -// await repository.deleteById(agentReq.agent.context, issuerId) -// } - -// public async getIssuerAgentMetaData( -// agentReq: Req, -// issuerId: string, -// ) { -// // return await agent.modules.openId4VcIssuer.getIssuerMetadata(issuerId) -// return 0 -// } -// } - -// export const issuerService = new IssuerService() +import type { RestAgentModules } from '../../../cliAgent' +import type { Agent } from '@credo-ts/core' +import type { Request as Req } from 'express' + +// import { OpenId4VcIssuerRepository } from '@credo-ts/openid4vc/build/openid4vc-issuer/repository/OpenId4VcIssuerRepository.mjs' + +export class IssuerService { + public async createIssuerAgent( + agentReq: Req, + createIssuerOptions: any, //TODO: Replace with OpenId4VciCreateIssuerOptions, + ) { + console.log('Creating issuer agent with options:', JSON.stringify(createIssuerOptions)) + const issuerRecord = await agentReq.agent.modules.openid4vc.issuer?.createIssuer(createIssuerOptions) + console.log('Created issuer record:', JSON.stringify(issuerRecord, null, 2)) + const issuerMetadata = await agentReq.agent.modules.openid4vc.issuer?.getIssuerMetadata( + issuerRecord?.issuerId ?? '', + ) + // eslint-disable-next-line no-console + console.log(`\nIssuer URL: ${issuerMetadata?.credentialIssuer.credential_issuer}`) + return issuerRecord + } + + public async updateIssuerMetadata( + agentReq: Req, + publicIssuerId: string, + updateIssuerRecordOptions: any, // TODO: Replace with OpenId4VcUpdateIssuerRecordOptions + ) { + await agentReq.agent.modules.openid4vc.issuer?.updateIssuerMetadata({ + issuerId: publicIssuerId, + ...updateIssuerRecordOptions, + }) + return await this.getIssuer(agentReq, publicIssuerId) + } + + public async getIssuersByQuery(agentReq: Req, publicIssuerId?: string) { + const result = publicIssuerId + ? (agentReq.agent as Agent).openid4vc.issuer.getIssuerByIssuerId(publicIssuerId) // .dependencyManager.resolve(OpenId4VcIssuerRepository) + : (agentReq.agent as Agent).openid4vc.issuer.getAllIssuers() + return result + } + + public async getIssuer(agentReq: Req, publicIssuerId: string) { + return await agentReq.agent.modules.openid4vc.issuer?.getIssuerByIssuerId(publicIssuerId) + } + + // public async deleteIssuer(agentReq: Req, issuerId: string) { + // const result = (agentReq.agent as Agent).openid4vc.config.issuer. + // return result + // } + + public async getIssuerAgentMetaData(agentReq: Req, issuerId: string) { + // return await agent.modules.openId4VcIssuer.getIssuerMetadata(issuerId) + return 0 + } +} + +export const issuerService = new IssuerService() diff --git a/src/controllers/openid4vc/types/issuer.types.ts b/src/controllers/openid4vc/types/issuer.types.ts index 9c37ea52..9411dd1f 100644 --- a/src/controllers/openid4vc/types/issuer.types.ts +++ b/src/controllers/openid4vc/types/issuer.types.ts @@ -1,6 +1,9 @@ import type { MdocNameSpaces, W3cCredential } from '@credo-ts/core' import type { OpenId4VciCredentialFormatProfile } from '@credo-ts/openid4vc' +import { Kms } from '@credo-ts/core' +import { OpenId4VciCreateCredentialOfferOptions, OpenId4VciSignCredentials } from '@credo-ts/openid4vc' + export enum SignerMethod { Did = 'did', X5c = 'x5c', @@ -141,7 +144,7 @@ export interface CredentialConfigurationSupportedWithFormats { } export interface CreateIssuerOptions { issuerId?: string - accessTokenSignerKeyType?: string + accessTokenSignerKeyType?: any display?: CredentialDisplay[] authorizationServerConfigs?: AuthorizationServerConfig[] dpopSigningAlgValuesSupported?: string[] From 0816425750b09d55cc5a24acba28bbb4cac9c9ca Mon Sep 17 00:00:00 2001 From: shitrerohit Date: Fri, 19 Dec 2025 20:13:16 +0530 Subject: [PATCH 18/38] WIP:Resolving the issues from issue credential workflow. Signed-off-by: shitrerohit --- src/cliAgent.ts | 23 +- .../holder/credentialBindingResolver.ts | 130 ++++ .../openid4vc/holder/holder.Controller.ts | 172 +++--- .../openid4vc/holder/holder.service.ts | 560 ++++++++++-------- .../openid4vc/issuers/issuer.service.ts | 7 +- .../openid4vc/types/issuer.types.ts | 26 +- 6 files changed, 563 insertions(+), 355 deletions(-) create mode 100644 src/controllers/openid4vc/holder/credentialBindingResolver.ts diff --git a/src/cliAgent.ts b/src/cliAgent.ts index 822fb4ab..6da4fba4 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -48,6 +48,7 @@ import { } from '@credo-ts/indy-vdr' import { agentDependencies, DidCommHttpInboundTransport, DidCommWsInboundTransport } from '@credo-ts/node' import { + OpenId4VcHolderModule, // OpenId4VcHolderModule, // OpenId4VcIssuerModule, OpenId4VcModule, @@ -67,10 +68,7 @@ import { IndicioAcceptanceMechanism, IndicioTransactionAuthorAgreement, Network, import { setupServer } from './server' import { generateSecretKey } from './utils/helpers' import { TsLogger } from './utils/logger' -import { getCredentialRequestToCredentialMapper, getTrustedCerts } from './utils/oid4vc-agent' - -const openId4VpApp = express() -const openId4VcApp = express() +import { getMixedCredentialRequestToCredentialMapper, getTrustedCerts } from './utils/oid4vc-agent' export type Transports = 'ws' | 'http' export type InboundTransport = { @@ -137,6 +135,7 @@ function requireEnv(name: string): string { } return value } +const expressApp = express() // TODO: add object const getModules = ( networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]], @@ -157,6 +156,7 @@ const getModules = ( const anonCredsCredentialFormatService = new AnonCredsDidCommCredentialFormatService() const anonCredsProofFormatService = new AnonCredsDidCommProofFormatService() const presentationExchangeProofFormatService = new DidCommDifPresentationExchangeProofFormatService() + return { askar: new AskarModule({ askar, @@ -249,26 +249,26 @@ const getModules = ( // serverUrl: fileServerUrl ? fileServerUrl : (process.env.SERVER_URL as string), // }), openid4vc: new OpenId4VcModule({ - // app: openId4VcApp, + app: expressApp, issuer: { baseUrl: process.env.NODE_ENV === 'PROD' ? `https://${requireEnv('APP_URL')}/oid4vci` : `${requireEnv('AGENT_HTTP_URL')}/oid4vci`, - app: openId4VcApp, + app: expressApp, statefulCredentialOfferExpirationInSeconds: Number(process.env.OID4VCI_CRED_OFFER_EXPIRY) || 3600, accessTokenExpiresInSeconds: Number(process.env.OID4VCI_ACCESS_TOKEN_EXPIRY) || 3600, authorizationCodeExpiresInSeconds: Number(process.env.OID4VCI_AUTH_CODE_EXPIRY) || 3600, cNonceExpiresInSeconds: Number(process.env.OID4VCI_CNONCE_EXPIRY) || 3600, dpopRequired: false, - credentialRequestToCredentialMapper: (...args) => getCredentialRequestToCredentialMapper()(...args), + credentialRequestToCredentialMapper: (...args) => getMixedCredentialRequestToCredentialMapper()(...args), }, verifier: { baseUrl: process.env.NODE_ENV === 'PROD' ? `https://${requireEnv('APP_URL')}/oid4vp` : `${requireEnv('AGENT_HTTP_URL')}/oid4vp`, - app: openId4VpApp, + // app: openId4VpApp, authorizationRequestExpirationInSeconds: Number(process.env.OID4VP_AUTH_REQUEST_PROOF_REQUEST_EXPIRY) || 3600, }, }), @@ -293,7 +293,7 @@ const getModules = ( // dpopRequired: false, // credentialRequestToCredentialMapper: (...args) => getCredentialRequestToCredentialMapper()(...args), // }), - // openId4VcHolderModule: new OpenId4VcHolderModule(), + openId4VcHolderModule: new OpenId4VcHolderModule(), x509: new X509Module({ getTrustedCertificatesForVerification: async (_agentContext, { certificateChain, verification }) => { //TODO: We need to trust the certificate tenant wise, for that we need to fetch those details from platform @@ -510,8 +510,8 @@ export async function runRestAgent(restConfig: AriesRestConfig) { ) transport.app.use(bodyParser.json({ limit: process.env.APP_JSON_BODY_SIZE ?? '5mb' })) - transport.app.use('/oid4vci', modules.openid4vc.issuer?.config.app._router ?? express.Router()) - transport.app.use('/oid4vp', modules.openid4vc.verifier?.config.app._router ?? express.Router()) + // transport.app.use('/oid4vci', modules.openid4vc.issuer?.config.app.routes ?? express.Router()) + // transport.app.use('/oid4vp', modules.openid4vc.verifier?.config.app.routes ?? express.Router()) } } @@ -547,6 +547,7 @@ export async function runRestAgent(restConfig: AriesRestConfig) { webhookUrl, port: adminPort, schemaFileServerURL, + app: expressApp, }, apiKey, ) diff --git a/src/controllers/openid4vc/holder/credentialBindingResolver.ts b/src/controllers/openid4vc/holder/credentialBindingResolver.ts new file mode 100644 index 00000000..1875c4cc --- /dev/null +++ b/src/controllers/openid4vc/holder/credentialBindingResolver.ts @@ -0,0 +1,130 @@ +import { DidJwk, DidKey, DidsApi, type JwkDidCreateOptions, type KeyDidCreateOptions, Kms } from '@credo-ts/core' +import { type OpenId4VciCredentialBindingResolver, OpenId4VciCredentialFormatProfile } from '@credo-ts/openid4vc' + +export function getCredentialBindingResolver({ + pidSchemes, + requestBatch, +}: { + pidSchemes?: { sdJwtVcVcts: Array; msoMdocDoctypes: Array } + requestBatch?: boolean | number +}): OpenId4VciCredentialBindingResolver { + return async ({ + supportedDidMethods, + credentialConfiguration, + issuerMaxBatchSize, + proofTypes, + supportsAllDidMethods, + supportsJwk, + credentialFormat, + agentContext, + }) => { + const kms = agentContext.resolve(Kms.KeyManagementApi) + + // First, we try to pick a did method + // Prefer did:jwk, otherwise use did:key, otherwise use undefined + let didMethod: 'key' | 'jwk' | undefined = + supportsAllDidMethods || supportedDidMethods?.includes('did:jwk') + ? 'jwk' + : supportedDidMethods?.includes('did:key') + ? 'key' + : undefined + + // If supportedDidMethods is undefined, and supportsJwk is false, we will default to did:key + // this is important as part of MATTR launchpad support which MUST use did:key but doesn't + // define which did methods they support + if (!supportedDidMethods && !supportsJwk) { + didMethod = 'key' + } + + const shouldKeyBeHardwareBackedForMsoMdoc = + credentialConfiguration?.format === OpenId4VciCredentialFormatProfile.MsoMdoc && + pidSchemes?.msoMdocDoctypes.includes(credentialConfiguration.doctype) + + const shouldKeyBeHardwareBackedForSdJwtVc = + (credentialConfiguration?.format === 'vc+sd-jwt' || credentialConfiguration.format === 'dc+sd-jwt') && + credentialConfiguration.vct && + pidSchemes?.sdJwtVcVcts.includes(credentialConfiguration.vct) + + const shouldKeyBeHardwareBacked = shouldKeyBeHardwareBackedForSdJwtVc || shouldKeyBeHardwareBackedForMsoMdoc + + // We don't want to request more than 10 credentials + const batchSize = + requestBatch === true + ? Math.min(issuerMaxBatchSize, 10) + : typeof requestBatch === 'number' + ? Math.min(issuerMaxBatchSize, requestBatch) + : 1 + console.log('proofTypes', JSON.stringify(proofTypes)) + // TODO: support key attestations + if (!proofTypes.jwt || proofTypes.jwt.keyAttestationsRequired) { + throw new Error('Unable to request credentials. Only jwt proof type without key attestations supported') + } + + const signatureAlgorithm = proofTypes.jwt?.supportedSignatureAlgorithms[0] + const keys = await Promise.all( + new Array(batchSize).fill(0).map(() => + kms + .createKeyForSignatureAlgorithm({ + algorithm: signatureAlgorithm!, + // FIXME: what should happen with already existing keys created in the secure environment? + backend: shouldKeyBeHardwareBacked ? 'secureEnvironment' : 'askar', + }) + .then((key) => Kms.PublicJwk.fromUnknown(key.publicJwk)), + ), + ) + + if (didMethod) { + const dm = didMethod + const didsApi = agentContext.dependencyManager.resolve(DidsApi) + const didResults = await Promise.all( + keys.map(async (key) => { + const didResult = await didsApi.create({ + method: dm, + options: { + keyId: key.keyId, + }, + }) + + if (didResult.didState.state !== 'finished') { + throw new Error('DID creation failed.') + } + + let verificationMethodId: string + if (didMethod === 'jwk') { + const didJwk = DidJwk.fromDid(didResult.didState.did) + verificationMethodId = didJwk.verificationMethodId + } else { + const didKey = DidKey.fromDid(didResult.didState.did) + verificationMethodId = `${didKey.did}#${didKey.publicJwk.fingerprint}` + } + + return verificationMethodId + }), + ) + + return { + method: 'did', + didUrls: didResults, + } + } + + // Otherwise we also support plain jwk for sd-jwt only + if ( + supportsJwk && + (credentialFormat === OpenId4VciCredentialFormatProfile.SdJwtVc || + credentialFormat === OpenId4VciCredentialFormatProfile.SdJwtDc || + credentialFormat === OpenId4VciCredentialFormatProfile.MsoMdoc) + ) { + return { + method: 'jwk', + keys, + } + } + + throw new Error( + `No supported binding method could be found. Supported methods are did:key and did:jwk, or plain jwk for sd-jwt/mdoc. Issuer supports ${ + supportsJwk ? 'jwk, ' : '' + }${supportedDidMethods?.join(', ') ?? 'Unknown'}`, + ) + } +} diff --git a/src/controllers/openid4vc/holder/holder.Controller.ts b/src/controllers/openid4vc/holder/holder.Controller.ts index 30f92ad1..8e976112 100644 --- a/src/controllers/openid4vc/holder/holder.Controller.ts +++ b/src/controllers/openid4vc/holder/holder.Controller.ts @@ -1,97 +1,97 @@ -// import { Request as Req } from 'express' -// import { Body, Controller, Get, Post, Route, Security, Tags, Request } from 'tsoa' -// import { injectable } from 'tsyringe' +import { Request as Req } from 'express' +import { Body, Controller, Get, Post, Route, Security, Tags, Request } from 'tsoa' +import { injectable } from 'tsyringe' -// import { SCOPES } from '../../../enums/enum' -// import { -// AuthorizeRequestCredentialOffer, -// RequestCredentialBody, -// ResolveCredentialOfferBody, -// ResolveProofRequest, -// } from '../types/holder.types' +import { SCOPES } from '../../../enums/enum' +import { + AuthorizeRequestCredentialOffer, + RequestCredentialBody, + ResolveCredentialOfferBody, + ResolveProofRequest, +} from '../types/holder.types' -// import { holderService } from './holder.service' +import { holderService } from './holder.service' -// @Tags('oid4vc holders') -// @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) -// @Route('openid4vc/holder') -// @injectable() -// export class HolderController extends Controller { -// /** -// * Get SdJwt type of credentials -// */ -// @Get('/sd-jwt-vcs') -// public async getSdJwtCredentials(@Request() request: Req) { -// return await holderService.getSdJwtCredentials(request) -// } +@Tags('oid4vc holders') +@Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) +@Route('openid4vc/holder') +@injectable() +export class HolderController extends Controller { + /** + * Get SdJwt type of credentials + */ + @Get('/sd-jwt-vcs') + public async getSdJwtCredentials(@Request() request: Req) { + return await holderService.getSdJwtCredentials(request) + } -// /** -// * Fetch all mso mdoc credentials in wallet -// */ -// @Get('/mdoc-vcs') -// public async getMdocCredentials(@Request() request: Req) { -// return await holderService.getMdocCredentials(request) -// } + /** + * Fetch all mso mdoc credentials in wallet + */ + @Get('/mdoc-vcs') + public async getMdocCredentials(@Request() request: Req) { + return await holderService.getMdocCredentials(request) + } -// /** -// * Decode mso mdoc credential in wallet -// */ -// @Post('/mdoc-vcs/decode') -// public async decodeMdocCredential( -// @Request() request: Req, -// @Body() -// body: { -// base64Url: string -// }, -// ) { -// return await holderService.decodeMdocCredential(request, body) -// } + /** + * Decode mso mdoc credential in wallet + */ + @Post('/mdoc-vcs/decode') + public async decodeMdocCredential( + @Request() request: Req, + @Body() + body: { + base64Url: string + }, + ) { + return await holderService.decodeMdocCredential(request, body) + } -// /** -// * Resolve a credential offer -// */ -// @Post('resolve-credential-offer') -// public async resolveCredOffer(@Request() request: Req, @Body() body: ResolveCredentialOfferBody) { -// return await holderService.resolveCredentialOffer(request, body) -// } + /** + * Resolve a credential offer + */ + @Post('resolve-credential-offer') + public async resolveCredOffer(@Request() request: Req, @Body() body: ResolveCredentialOfferBody) { + return await holderService.resolveCredentialOffer(request, body) + } -// // /** -// // * Initiate an OID4VCI authorization request -// // */ -// @Post('authorization-request') -// public async requestAuthorizationForCredential( -// @Request() request: Req, -// @Body() body: AuthorizeRequestCredentialOffer, -// ) { -// return await holderService.requestAuthorizationForCredential(request, body) -// } + // /** + // * Initiate an OID4VCI authorization request + // */ + @Post('authorization-request') + public async requestAuthorizationForCredential( + @Request() request: Req, + @Body() body: AuthorizeRequestCredentialOffer, + ) { + return await holderService.requestAuthorizationForCredential(request, body) + } -// /** -// * Initiates a token request, then requests credentials from issuer -// */ -// @Post('request-credential') -// public async requestCredential(@Request() request: Req, @Body() body: RequestCredentialBody) { -// return await holderService.requestCredential(request, body) -// } + /** + * Initiates a token request, then requests credentials from issuer + */ + @Post('request-credential') + public async requestCredential(@Request() request: Req, @Body() body: RequestCredentialBody) { + return await holderService.requestCredential(request, body) + } -// /** -// * Resolve a proof request -// */ -// @Post('resolve-proof-request') -// public async resolveProofRequest(@Request() request: Req, @Body() body: ResolveProofRequest) { -// return await holderService.resolveProofRequest(request, body) -// } + /** + * Resolve a proof request + */ + @Post('resolve-proof-request') + public async resolveProofRequest(@Request() request: Req, @Body() body: ResolveProofRequest) { + return await holderService.resolveProofRequest(request, body) + } -// /** -// * Accept a proof request -// */ -// @Post('accept-proof-request') -// public async acceptProofRequest(@Request() request: Req, @Body() body: ResolveProofRequest) { -// return await holderService.acceptPresentationRequest(request, body) -// } + /** + * Accept a proof request + */ + @Post('accept-proof-request') + public async acceptProofRequest(@Request() request: Req, @Body() body: ResolveProofRequest) { + return await holderService.acceptPresentationRequest(request, body) + } -// @Post('decode-sdjwt') -// public async decodeSdJwt(@Request() request: Req, @Body() body: { jwt: string }) { -// return await holderService.decodeSdJwt(request, body) -// } -// } \ No newline at end of file + @Post('decode-sdjwt') + public async decodeSdJwt(@Request() request: Req, @Body() body: { jwt: string }) { + return await holderService.decodeSdJwt(request, body) + } +} diff --git a/src/controllers/openid4vc/holder/holder.service.ts b/src/controllers/openid4vc/holder/holder.service.ts index bb2adbc5..555f778f 100644 --- a/src/controllers/openid4vc/holder/holder.service.ts +++ b/src/controllers/openid4vc/holder/holder.service.ts @@ -1,280 +1,338 @@ -// import type { -// AuthorizeRequestCredentialOffer, -// RequestCredentialBody, -// ResolveCredentialOfferBody, -// ResolveProofRequest, -// } from '../types/holder.types' -// import type { Agent, DcqlCredentialsForRequest, DcqlQueryResult } from '@credo-ts/core' -// import type { -// OpenId4VcAuthorizationCodeTokenRequestOptions, -// OpenId4VciPreAuthorizedTokenRequestOptions, -// OpenId4VciResolvedCredentialOffer, -// OpenId4VciTokenRequestOptions, -// } from '@credo-ts/openid4vc' +import type { + AuthorizeRequestCredentialOffer, + RequestCredentialBody, + ResolveCredentialOfferBody, + ResolveProofRequest, +} from '../types/holder.types' +import type { Agent, DcqlCredentialsForRequest, DcqlQueryResult } from '@credo-ts/core' +import type { + OpenId4VcAuthorizationCodeTokenRequestOptions, + OpenId4VciPreAuthorizedTokenRequestOptions, + OpenId4VciResolvedCredentialOffer, + OpenId4VciTokenRequestOptions, +} from '@credo-ts/openid4vc' +import type { Request as Req } from 'express' -// import { -// DifPresentationExchangeService, -// DidKey, -// DidJwk, -// // getJwkFromKey, -// Mdoc, -// W3cJsonLdVerifiableCredential, -// W3cJwtVerifiableCredential, -// } from '@credo-ts/core' -// import { -// OpenId4VciAuthorizationFlow, -// authorizationCodeGrantIdentifier, -// preAuthorizedCodeGrantIdentifier, -// } from '@credo-ts/openid4vc' -// import { Request as Req } from 'express' -// export class HolderService { -// private HOLDER_REDIRECT = process.env.HOLDER_REDIRECT ?? 'http://localhost:4001/redirect' -// private HOLDER_CLIENT_ID = process.env.HOLDER_CLIENT_ID ?? 'wallet' +import { + DifPresentationExchangeService, + DidKey, + DidJwk, + Mdoc, + W3cJsonLdVerifiableCredential, + W3cJwtVerifiableCredential, +} from '@credo-ts/core' +import { + OpenId4VciAuthorizationFlow, + authorizationCodeGrantIdentifier, + preAuthorizedCodeGrantIdentifier, +} from '@credo-ts/openid4vc' -// public async getSdJwtCredentials(agentReq: Req) { -// return await agentReq.agent.sdJwtVc.getAll() -// } +import { getCredentialBindingResolver } from './credentialBindingResolver' +export class HolderService { + private HOLDER_REDIRECT = process.env.HOLDER_REDIRECT ?? 'http://localhost:4001/redirect' + private HOLDER_CLIENT_ID = process.env.HOLDER_CLIENT_ID ?? 'wallet' -// public async getMdocCredentials(agentReq: Req) { -// return await agentReq.agent.mdoc.getAll() -// } + public async getSdJwtCredentials(agentReq: Req) { + return await agentReq.agent.sdJwtVc.getAll() + } -// public async decodeMdocCredential( -// agentReq: Req, -// options: { -// base64Url: string -// }, -// ) { -// const credential = Mdoc.fromBase64Url(options.base64Url) -// return { -// namespace: credential.issuerSignedNamespaces, -// docType: credential.docType, -// validityInfo: credential.validityInfo, -// issuerSignedCertificateChain: credential.issuerSignedCertificateChain, -// } as any -// } + public async getMdocCredentials(agentReq: Req) { + return await agentReq.agent.mdoc.getAll() + } -// public async resolveCredentialOffer(agentReq: Req, body: ResolveCredentialOfferBody) { -// return (await agentReq.agent.modules.openId4VcHolderModule.resolveCredentialOffer(body.credentialOfferUri)) as any -// } + public async decodeMdocCredential( + agentReq: Req, + options: { + base64Url: string + }, + ) { + const credential = Mdoc.fromBase64Url(options.base64Url) + return { + namespace: credential.issuerSignedNamespaces, + docType: credential.docType, + validityInfo: credential.validityInfo, + issuerSignedCertificateChain: credential.issuerSignedCertificateChain, + } as any + } -// public async requestAuthorizationForCredential(agentReq: Req, body: AuthorizeRequestCredentialOffer) { -// console.log('Requesting authorization for credential offer:', body) -// const resolvedCredentialOffer = await agentReq.agent.modules.openId4VcHolderModule.resolveCredentialOffer( -// body.credentialOfferUri, -// ) -// console.log('Resolved credential offer:', resolvedCredentialOffer) -// const resolvedAuthorization = await this.initiateAuthorization( -// agentReq, -// resolvedCredentialOffer, -// body.credentialsToRequest, -// ) + public async resolveCredentialOffer(agentReq: Req, body: ResolveCredentialOfferBody) { + return (await agentReq.agent.modules.openid4vc.holder.resolveCredentialOffer(body.credentialOfferUri)) as any + } -// let actionToTake = '' -// let authorizationRequestUrl: string | undefined = undefined -// let codeVerifier: string | undefined = undefined -// console.log('Resolved authorization', resolvedAuthorization) + public async requestAuthorizationForCredential(agentReq: Req, body: AuthorizeRequestCredentialOffer) { + const resolvedCredentialOffer = await agentReq.agent.modules.openid4vc.holder.resolveCredentialOffer( + body.credentialOfferUri, + ) + const resolvedAuthorization = await this.initiateAuthorization( + agentReq, + resolvedCredentialOffer, + body.credentialsToRequest, + ) -// switch (resolvedAuthorization.authorizationFlow) { -// case 'Oauth2Redirect': -// actionToTake = 'Open the authorizationRequestUrl in your browser.' -// authorizationRequestUrl = resolvedAuthorization.authorizationRequestUrl -// codeVerifier = resolvedAuthorization.codeVerifier -// break -// case 'PresentationDuringIssuance': -// actionToTake = 'Presentation during issuance not supported yet' -// break -// case 'PreAuthorized': -// if (resolvedCredentialOffer.credentialOfferPayload.grants?.[preAuthorizedCodeGrantIdentifier]?.tx_code) { -// actionToTake = 'Ask for txcode from issuer and use it further' -// } -// break -// } + let actionToTake = '' + let authorizationRequestUrl: string | undefined = undefined + let codeVerifier: string | undefined = undefined -// return { actionToTake, authorizationRequestUrl, codeVerifier } as any -// } + switch (resolvedAuthorization.authorizationFlow) { + case 'Oauth2Redirect': + actionToTake = 'Open the authorizationRequestUrl in your browser.' + authorizationRequestUrl = resolvedAuthorization.authorizationRequestUrl + codeVerifier = resolvedAuthorization.codeVerifier + break + case 'PresentationDuringIssuance': + actionToTake = 'Presentation during issuance not supported yet' + break + case 'PreAuthorized': + if (resolvedCredentialOffer.credentialOfferPayload.grants?.[preAuthorizedCodeGrantIdentifier]?.tx_code) { + actionToTake = 'Ask for txcode from issuer and use it further' + } + break + } -// public async requestCredential(agentReq: Req, body: RequestCredentialBody) { -// const resolvedCredentialOffer = await agentReq.agent.modules.openId4VcHolderModule.resolveCredentialOffer( -// body.credentialOfferUri, -// ) + return { actionToTake, authorizationRequestUrl, codeVerifier } as any + } -// let options: OpenId4VciTokenRequestOptions -// if (resolvedCredentialOffer.credentialOfferPayload.grants?.[preAuthorizedCodeGrantIdentifier]) { -// options = { -// resolvedCredentialOffer, -// txCode: body.txCode, -// code: body.authorizationCode, -// } as OpenId4VciPreAuthorizedTokenRequestOptions -// } else { -// options = { -// resolvedCredentialOffer, -// code: body.authorizationCode, -// clientId: this.HOLDER_CLIENT_ID, -// codeVerifier: body.codeVerifier, -// redirectUri: this.HOLDER_REDIRECT, -// } as OpenId4VcAuthorizationCodeTokenRequestOptions -// } + public async requestCredential(agentReq: Req, body: RequestCredentialBody) { + const resolvedCredentialOffer = await agentReq.agent.modules.openid4vc.holder.resolveCredentialOffer( + body.credentialOfferUri, + ) -// // return (await this.requestAndStoreCredentials(agentReq, resolvedCredentialOffer, options)) as any -// return {} as any -// } + let options: OpenId4VciTokenRequestOptions + if (resolvedCredentialOffer.credentialOfferPayload.grants?.[preAuthorizedCodeGrantIdentifier]) { + options = { + resolvedCredentialOffer, + txCode: body.txCode, + code: body.authorizationCode, + } as OpenId4VciPreAuthorizedTokenRequestOptions + } else { + options = { + resolvedCredentialOffer, + code: body.authorizationCode, + clientId: this.HOLDER_CLIENT_ID, + codeVerifier: body.codeVerifier, + redirectUri: this.HOLDER_REDIRECT, + } as OpenId4VcAuthorizationCodeTokenRequestOptions + } -// // private async requestAndStoreCredentials( -// // agentReq: Req, -// // resolvedCredentialOffer: OpenId4VciResolvedCredentialOffer, -// // options: OpenId4VciTokenRequestOptions, -// // ) { -// // const tokenResponse = await agentReq.agent.modules.openId4VcHolderModule.requestToken({ ...options }) -// // const credentialResponse = await agentReq.agent.modules.openId4VcHolderModule.requestCredentials({ -// // ...options, -// // credentialConfigurationIds: resolvedCredentialOffer.credentialOfferPayload.credential_configuration_ids, -// // credentialBindingResolver: async ({ -// // keyTypes, -// // supportedDidMethods, -// // supportsAllDidMethods, -// // }: { -// // keyTypes: string[] -// // supportedDidMethods?: string[] -// // supportsAllDidMethods?: boolean -// // }) => { -// // const key = await agentReq.agent.wallet.createKey({ keyType: keyTypes[0] as any }) -// // if (supportsAllDidMethods || supportedDidMethods?.includes('did:key')) { -// // const didKey = new DidKey(key) -// // return { method: 'did', didUrl: `${didKey.did}#${didKey.key.fingerprint}` } -// // } -// // if (supportedDidMethods?.includes('did:jwk')) { -// // const didJwk = DidJwk.fromJwk(getJwkFromKey(key)) -// // return { method: 'did', didUrl: `${didJwk.did}#0` } -// // } -// // return { method: 'jwk', jwk: getJwkFromKey(key) } -// // }, -// // ...tokenResponse, -// // }) + return (await this.requestAndStoreCredentials(agentReq, resolvedCredentialOffer, options)) as any + // return {} as any + } + // private async requestAndStoreCredentials( + // // agentReq: Req, + // // resolvedCredentialOffer: OpenId4VciResolvedCredentialOffer, + // // options: OpenId4VciTokenRequestOptions, + // // ) { + // // const tokenResponse = await agentReq.agent.modules.openId4VcHolderModule.requestToken({ ...options }) + // // const credentialResponse = await agentReq.agent.modules.openId4VcHolderModule.requestCredentials({ + // // ...options, + // // credentialConfigurationIds: resolvedCredentialOffer.credentialOfferPayload.credential_configuration_ids, + // // credentialBindingResolver: async ({ + // // keyTypes, + // // supportedDidMethods, + // // supportsAllDidMethods, + // // }: { + // // keyTypes: string[] + // // supportedDidMethods?: string[] + // // supportsAllDidMethods?: boolean + // // }) => { + // // const key = await agentReq.agent.wallet.createKey({ keyType: keyTypes[0] as any }) + // // if (supportsAllDidMethods || supportedDidMethods?.includes('did:key')) { + // // const didKey = new DidKey(key) + // // return { method: 'did', didUrl: `${didKey.did}#${didKey.key.fingerprint}` } + // // } + // // if (supportedDidMethods?.includes('did:jwk')) { + // // const didJwk = DidJwk.fromJwk(getJwkFromKey(key)) + // // return { method: 'did', didUrl: `${didJwk.did}#0` } + // // } + // // return { method: 'jwk', jwk: getJwkFromKey(key) } + // // }, + // // ...tokenResponse, + // // }) -// // const storedCredentials = await Promise.all( -// // credentialResponse.credentials.map(async (response: any) => { -// // const credential = response.credentials[0] -// // if (credential instanceof W3cJwtVerifiableCredential || credential instanceof W3cJsonLdVerifiableCredential) { -// // return await agentReq.agent.w3cCredentials.storeCredential({ credential }) -// // } -// // if (credential instanceof Mdoc) { -// // return await agentReq.agent.mdoc.store(credential) -// // } -// // return await agentReq.agent.sdJwtVc.store(credential.compact) -// // }), -// // ) + // // const storedCredentials = await Promise.all( + // // credentialResponse.credentials.map(async (response: any) => { + // // const credential = response.credentials[0] + // // if (credential instanceof W3cJwtVerifiableCredential || credential instanceof W3cJsonLdVerifiableCredential) { + // // return await agentReq.agent.w3cCredentials.storeCredential({ credential }) + // // } + // // if (credential instanceof Mdoc) { + // // return await agentReq.agent.mdoc.store(credential) + // // } + // // return await agentReq.agent.sdJwtVc.store(credential.compact) + // // }), + // // ) -// // return storedCredentials as any -// // } + // // return storedCredentials as any + // // } + private async requestAndStoreCredentials( + agentReq: Req, + resolvedCredentialOffer: OpenId4VciResolvedCredentialOffer, + options: OpenId4VciTokenRequestOptions, + ) { + const tokenResponse = await agentReq.agent.modules.openid4vc.holder.requestToken({ ...options }) + const credentialResponse = await agentReq.agent.modules.openid4vc.holder.requestCredentials({ + ...options, + credentialConfigurationIds: resolvedCredentialOffer.credentialOfferPayload.credential_configuration_ids, + // credentialBindingResolver: async ({ + // keyTypes, + // supportedDidMethods, + // supportsAllDidMethods, + // }: { + // keyTypes: string[] + // supportedDidMethods?: string[] + // supportsAllDidMethods?: boolean + // }) => { + // const key = await agentReq.agent.wallet.createKey({ keyType: keyTypes[0] as any }) + // if (supportsAllDidMethods || supportedDidMethods?.includes('did:key')) { + // const didKey = new DidKey(key) + // return { method: 'did', didUrl: `${didKey.did}#${didKey.key.fingerprint}` } + // } + // if (supportedDidMethods?.includes('did:jwk')) { + // const didJwk = DidJwk.fromJwk(getJwkFromKey(key)) + // return { method: 'did', didUrl: `${didJwk.did}#0` } + // } + // return { method: 'jwk', jwk: getJwkFromKey(key) } + // }, + credentialBindingResolver: getCredentialBindingResolver({ + pidSchemes: undefined, + requestBatch: false, + }), + ...tokenResponse, + }) + // const credentialResponse = await agentReq.agent.modules.openid4vc.holder.requestCredentials({ + // ...options, + // credentialConfigurationIds: resolvedCredentialOffer.credentialOfferPayload.credential_configuration_ids, + // credentialBindingResolver: async (options) => { + // const { keyId, publicJwk } = await agentReq.agent.kms.createKey({ + // type: { + // crv: 'Ed25519', + // kty: 'OKP', + // }, + // }) + // if (options.supportsAllDidMethods || options.supportedDidMethods?.includes('did:key')) { + // const didKey = new DidKey(key) + // return { method: 'did', didUrls: [`${didKey.did}#${didKey.key.fingerprint}`] } + // } + // if (options.supportedDidMethods?.includes('did:jwk')) { + // const didJwk = DidJwk.fromKey(key) + // return { method: 'did', didUrls: [`${didJwk.did}#0`] } + // } + // return { method: 'jwk', jwk: key } + // }, + // }) -// private async initiateAuthorization( -// agentReq: Req, -// resolvedCredentialOffer: OpenId4VciResolvedCredentialOffer, -// credentialsToRequest: string[], -// ) { -// console.log('Initiating authorization with resolvedCredentialOffer:', resolvedCredentialOffer) -// console.log('Credentials to request:', credentialsToRequest) + const storedCredentials = await Promise.all( + credentialResponse.credentials.map(async (response: any) => { + const credential = response.credentials[0] + // if (credential instanceof W3cJwtVerifiableCredential || credential instanceof W3cJsonLdVerifiableCredential) { + // return await agentReq.agent.w3cCredentials.storeCredential({ credential }) + // } + // if (credential instanceof Mdoc) { + // return await agentReq.agent.mdoc.store({ record: credential }) + // } + return await agentReq.agent.sdJwtVc.store(credential.compact) + }), + ) -// const grants = resolvedCredentialOffer.credentialOfferPayload.grants -// console.log('Grants:', grants) + return storedCredentials as any + } -// // 👉 Handle Pre-Authorized Code Grant -// if (grants?.[preAuthorizedCodeGrantIdentifier]) { -// const preAuthorizedCode = grants[preAuthorizedCodeGrantIdentifier]['pre-authorized_code'] -// return { -// authorizationFlow: 'PreAuthorized' as const, -// preAuthorizedCode, -// } -// } + private async initiateAuthorization( + agentReq: Req, + resolvedCredentialOffer: OpenId4VciResolvedCredentialOffer, + credentialsToRequest: string[], + ) { + const grants = resolvedCredentialOffer.credentialOfferPayload.grants -// // 👉 Handle Authorization Code Grant -// if (grants?.[authorizationCodeGrantIdentifier]) { -// console.log('Using authorization code grant flow') + // 👉 Handle Pre-Authorized Code Grant + if (grants?.[preAuthorizedCodeGrantIdentifier]) { + const preAuthorizedCode = grants[preAuthorizedCodeGrantIdentifier]['pre-authorized_code'] + return { + authorizationFlow: 'PreAuthorized' as const, + preAuthorizedCode, + } + } -// const scope = Object.entries(resolvedCredentialOffer.offeredCredentialConfigurations) -// .map(([id, val]) => (credentialsToRequest.includes(id) ? val.scope : undefined)) -// .filter((v): v is string => Boolean(v)) + // 👉 Handle Authorization Code Grant + if (grants?.[authorizationCodeGrantIdentifier]) { + const scope = Object.entries(resolvedCredentialOffer.offeredCredentialConfigurations) + .map(([id, val]) => (credentialsToRequest.includes(id) ? val.scope : undefined)) + .filter((v): v is string => Boolean(v)) -// const resolved = await agentReq.agent.modules.openId4VcHolderModule.resolveOpenId4VciAuthorizationRequest( -// resolvedCredentialOffer, -// { -// clientId: this.HOLDER_CLIENT_ID, -// redirectUri: this.HOLDER_REDIRECT, -// scope, -// }, -// ) + const resolved = await agentReq.agent.modules.openid4vc.holder.resolveOpenId4VciAuthorizationRequest( + resolvedCredentialOffer, + { + clientId: this.HOLDER_CLIENT_ID, + redirectUri: this.HOLDER_REDIRECT, + scope, + }, + ) -// // 👉 Support Presentation During Issuance flow -// if (resolved.authorizationFlow === OpenId4VciAuthorizationFlow.PresentationDuringIssuance) { -// return { -// ...resolved, -// authorizationFlow: 'PresentationDuringIssuance' as const, -// } -// } + // 👉 Support Presentation During Issuance flow + if (resolved.authorizationFlow === OpenId4VciAuthorizationFlow.PresentationDuringIssuance) { + return { + ...resolved, + authorizationFlow: 'PresentationDuringIssuance' as const, + } + } -// return { -// ...resolved, -// authorizationFlow: 'Oauth2Redirect' as const, -// } as any -// } + return { + ...resolved, + authorizationFlow: 'Oauth2Redirect' as const, + } as any + } -// // ❌ Unsupported grant -// throw new Error('Unsupported grant type') -// } + // ❌ Unsupported grant + throw new Error('Unsupported grant type') + } -// public async resolveProofRequest(agentReq: Req, body: ResolveProofRequest) { -// return (await agentReq.agent.modules.openId4VcHolderModule.resolveOpenId4VpAuthorizationRequest( -// body.proofRequestUri, -// )) as any -// } + public async resolveProofRequest(agentReq: Req, body: ResolveProofRequest) { + return (await agentReq.agent.modules.openid4vc.holder.resolveOpenId4VpAuthorizationRequest( + body.proofRequestUri, + )) as any + } -// public async acceptPresentationRequest(agentReq: Req, body: ResolveProofRequest) { -// const resolved = await agentReq.agent.modules.openId4VcHolderModule.resolveOpenId4VpAuthorizationRequest( -// body.proofRequestUri, -// ) -// console.log('Resolved proof request:', resolved) -// // const presentationExchangeService = agent.dependencyManager.resolve(DifPresentationExchangeService) + public async acceptPresentationRequest(agentReq: Req, body: ResolveProofRequest) { + const resolved = await agentReq.agent.modules.openid4vc.holder.resolveOpenId4VpAuthorizationRequest( + body.proofRequestUri, + ) + // const presentationExchangeService = agent.dependencyManager.resolve(DifPresentationExchangeService) -// if (!resolved.dcql) throw new Error('Missing DCQL on request') -// console.log('DCQL query result:', resolved.dcql.queryResult) -// // -// let dcqlCredentials -// try { -// dcqlCredentials = await agentReq.agent.modules.openId4VcHolderModule.selectCredentialsForDcqlRequest( -// resolved.dcql.queryResult, -// ) -// console.log('Selected credentials for DCQL request:', dcqlCredentials) -// } catch (error) { -// console.error('Error selecting credentials for DCQL request:', error) -// throw error -// } -// const submissionResult = await agentReq.agent.modules.openId4VcHolderModule.acceptOpenId4VpAuthorizationRequest({ -// authorizationRequestPayload: resolved.authorizationRequestPayload, -// dcql: { -// credentials: dcqlCredentials as DcqlCredentialsForRequest, -// }, -// }) -// console.log('Presentation submission result:', submissionResult) -// return submissionResult.serverResponse -// } + if (!resolved.dcql) throw new Error('Missing DCQL on request') + // + let dcqlCredentials + try { + dcqlCredentials = await agentReq.agent.modules.openid4vc.holder.selectCredentialsForDcqlRequest( + resolved.dcql.queryResult, + ) + } catch (error) { + throw error + } + const submissionResult = await agentReq.agent.modules.openid4vc.holder.acceptOpenId4VpAuthorizationRequest({ + authorizationRequestPayload: resolved.authorizationRequestPayload, + dcql: { + credentials: dcqlCredentials as DcqlCredentialsForRequest, + }, + }) + return submissionResult.serverResponse + } -// public async decodeSdJwt(agentReq: Req, body: { jwt: string }) { -// const sdJwt = agentReq.agent.sdJwtVc.fromCompact(body.jwt) -// return sdJwt as any -// } + public async decodeSdJwt(agentReq: Req, body: { jwt: string }) { + const sdJwt = agentReq.agent.sdJwtVc.fromCompact(body.jwt) + return sdJwt as any + } -// public async getSelectedCredentialsForRequest( -// dcqlQueryResult: DcqlQueryResult, -// selectedCredentials: { [credentialQueryId: string]: string }, -// ) { -// if (!dcqlQueryResult.can_be_satisfied) { -// throw new Error( -// 'Cannot select the credentials for the dcql query presentation if the request cannot be satisfied', -// ) -// } -// // TODO: Implement logic to select credentials based on selectedCredentials -// return {} as any // Placeholder return to avoid errors -// } -// } -// export const holderService = new HolderService() + public async getSelectedCredentialsForRequest( + dcqlQueryResult: DcqlQueryResult, + selectedCredentials: { [credentialQueryId: string]: string }, + ) { + if (!dcqlQueryResult.can_be_satisfied) { + throw new Error( + 'Cannot select the credentials for the dcql query presentation if the request cannot be satisfied', + ) + } + // TODO: Implement logic to select credentials based on selectedCredentials + return {} as any // Placeholder return to avoid errors + } +} +export const holderService = new HolderService() diff --git a/src/controllers/openid4vc/issuers/issuer.service.ts b/src/controllers/openid4vc/issuers/issuer.service.ts index 416f4d77..0d0ba61d 100644 --- a/src/controllers/openid4vc/issuers/issuer.service.ts +++ b/src/controllers/openid4vc/issuers/issuer.service.ts @@ -1,4 +1,5 @@ import type { RestAgentModules } from '../../../cliAgent' +import type { CreateIssuerOptions } from '../types/issuer.types' import type { Agent } from '@credo-ts/core' import type { Request as Req } from 'express' @@ -9,9 +10,7 @@ export class IssuerService { agentReq: Req, createIssuerOptions: any, //TODO: Replace with OpenId4VciCreateIssuerOptions, ) { - console.log('Creating issuer agent with options:', JSON.stringify(createIssuerOptions)) const issuerRecord = await agentReq.agent.modules.openid4vc.issuer?.createIssuer(createIssuerOptions) - console.log('Created issuer record:', JSON.stringify(issuerRecord, null, 2)) const issuerMetadata = await agentReq.agent.modules.openid4vc.issuer?.getIssuerMetadata( issuerRecord?.issuerId ?? '', ) @@ -49,8 +48,8 @@ export class IssuerService { // } public async getIssuerAgentMetaData(agentReq: Req, issuerId: string) { - // return await agent.modules.openId4VcIssuer.getIssuerMetadata(issuerId) - return 0 + return (await agentReq.agent.modules.openid4vc.issuer?.getIssuerMetadata(issuerId)) as any + // return 0 } } diff --git a/src/controllers/openid4vc/types/issuer.types.ts b/src/controllers/openid4vc/types/issuer.types.ts index 9411dd1f..1f9cf4ad 100644 --- a/src/controllers/openid4vc/types/issuer.types.ts +++ b/src/controllers/openid4vc/types/issuer.types.ts @@ -55,6 +55,7 @@ export interface OpenId4VciOfferW3cCredential extends OpenId4VciOfferCredentials } export interface OpenId4VcIssuanceSessionsCreateOffer { + //extends OpenId4VciCreateCredentialOfferOptions { publicIssuerId: string credentials: Array authorizationCodeFlowConfig?: { @@ -111,8 +112,13 @@ export interface BatchCredentialIssuanceOptions { batchSize: number } +export interface KeyAttestationRequiredRecords { + key_storage: string[] + user_authentication: string[] +} export interface ProofTypeConfig { proof_signing_alg_values_supported: string[] + key_attestations_required?: KeyAttestationRequiredRecords } export interface CredentialConfigurationDisplay { @@ -130,17 +136,31 @@ export interface CredentialDefinition { [key: string]: any } +export interface Claim { + path: string[] + display?: ClaimDisplay[] + mandatory?: boolean +} + +export interface ClaimDisplay { + name: string + locale: string +} +export interface CredentialMetadata { + display: CredentialDisplay[] + claims: Claim[] +} + export interface CredentialConfigurationSupportedWithFormats { format: 'vc+sd-jwt' | 'mso_mdoc' | 'jwt_vc_json' | string vct?: string doctype?: string scope?: string - claims?: any cryptographic_binding_methods_supported?: string[] - credential_signing_alg_values_supported?: string[] + credential_signing_alg_values_supported?: string[] | number[] proof_types_supported?: Record credential_definition?: CredentialDefinition - display?: CredentialConfigurationDisplay[] + credential_metadata?: CredentialMetadata } export interface CreateIssuerOptions { issuerId?: string From 768ba54cc9e70d822160f9018918611d8bec407f Mon Sep 17 00:00:00 2001 From: shitrerohit Date: Tue, 23 Dec 2025 15:56:01 +0530 Subject: [PATCH 19/38] fix:sd-jwt store credential Signed-off-by: shitrerohit --- src/controllers/openid4vc/holder/holder.service.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/controllers/openid4vc/holder/holder.service.ts b/src/controllers/openid4vc/holder/holder.service.ts index 555f778f..bdb80422 100644 --- a/src/controllers/openid4vc/holder/holder.service.ts +++ b/src/controllers/openid4vc/holder/holder.service.ts @@ -20,6 +20,7 @@ import { Mdoc, W3cJsonLdVerifiableCredential, W3cJwtVerifiableCredential, + SdJwtVcRecord, } from '@credo-ts/core' import { OpenId4VciAuthorizationFlow, @@ -222,15 +223,21 @@ export class HolderService { // }) const storedCredentials = await Promise.all( - credentialResponse.credentials.map(async (response: any) => { - const credential = response.credentials[0] + credentialResponse.credentials.map(async (response) => { + // console.log('response', JSON.stringify(response)) + // const credential = response.credentials[0] // if (credential instanceof W3cJwtVerifiableCredential || credential instanceof W3cJsonLdVerifiableCredential) { // return await agentReq.agent.w3cCredentials.storeCredential({ credential }) // } // if (credential instanceof Mdoc) { // return await agentReq.agent.mdoc.store({ record: credential }) // } - return await agentReq.agent.sdJwtVc.store(credential.compact) + const credentialRecord = response.record + if (credentialRecord instanceof SdJwtVcRecord) { + return await agentReq.agent.sdJwtVc.store({ + record: credentialRecord, + }) + } }), ) From bbf02c66f4b7afb2334ddf76a865a91a3816d45f Mon Sep 17 00:00:00 2001 From: shitrerohit Date: Wed, 31 Dec 2025 15:51:32 +0530 Subject: [PATCH 20/38] WIP: store mDoc credential Signed-off-by: shitrerohit --- src/cliAgent.ts | 6 +++++- .../openid4vc/holder/credentialBindingResolver.ts | 14 +------------- src/controllers/openid4vc/holder/holder.service.ts | 11 +++++------ src/utils/oid4vc-agent.ts | 3 +++ 4 files changed, 14 insertions(+), 20 deletions(-) diff --git a/src/cliAgent.ts b/src/cliAgent.ts index 6da4fba4..8c9ec147 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -27,6 +27,8 @@ import { LogLevel, Agent, X509Module, + JwkDidRegistrar, + JwkDidResolver, } from '@credo-ts/core' import { DidCommHttpOutboundTransport, @@ -170,17 +172,19 @@ const getModules = ( indyVdr, networks: networkConfig, }), - dids: new DidsModule({ registrars: [ new IndyVdrIndyDidRegistrar(), new KeyDidRegistrar(), + new JwkDidRegistrar(), // , new PolygonDidRegistrar() ], resolvers: [ new IndyVdrIndyDidResolver(), new KeyDidResolver(), new WebDidResolver(), + new JwkDidResolver(), + new KeyDidResolver(), // , new PolygonDidResolver() ], }), diff --git a/src/controllers/openid4vc/holder/credentialBindingResolver.ts b/src/controllers/openid4vc/holder/credentialBindingResolver.ts index 1875c4cc..d414899d 100644 --- a/src/controllers/openid4vc/holder/credentialBindingResolver.ts +++ b/src/controllers/openid4vc/holder/credentialBindingResolver.ts @@ -36,17 +36,6 @@ export function getCredentialBindingResolver({ didMethod = 'key' } - const shouldKeyBeHardwareBackedForMsoMdoc = - credentialConfiguration?.format === OpenId4VciCredentialFormatProfile.MsoMdoc && - pidSchemes?.msoMdocDoctypes.includes(credentialConfiguration.doctype) - - const shouldKeyBeHardwareBackedForSdJwtVc = - (credentialConfiguration?.format === 'vc+sd-jwt' || credentialConfiguration.format === 'dc+sd-jwt') && - credentialConfiguration.vct && - pidSchemes?.sdJwtVcVcts.includes(credentialConfiguration.vct) - - const shouldKeyBeHardwareBacked = shouldKeyBeHardwareBackedForSdJwtVc || shouldKeyBeHardwareBackedForMsoMdoc - // We don't want to request more than 10 credentials const batchSize = requestBatch === true @@ -54,7 +43,6 @@ export function getCredentialBindingResolver({ : typeof requestBatch === 'number' ? Math.min(issuerMaxBatchSize, requestBatch) : 1 - console.log('proofTypes', JSON.stringify(proofTypes)) // TODO: support key attestations if (!proofTypes.jwt || proofTypes.jwt.keyAttestationsRequired) { throw new Error('Unable to request credentials. Only jwt proof type without key attestations supported') @@ -67,7 +55,7 @@ export function getCredentialBindingResolver({ .createKeyForSignatureAlgorithm({ algorithm: signatureAlgorithm!, // FIXME: what should happen with already existing keys created in the secure environment? - backend: shouldKeyBeHardwareBacked ? 'secureEnvironment' : 'askar', + backend: 'askar', }) .then((key) => Kms.PublicJwk.fromUnknown(key.publicJwk)), ), diff --git a/src/controllers/openid4vc/holder/holder.service.ts b/src/controllers/openid4vc/holder/holder.service.ts index bdb80422..d7d275fd 100644 --- a/src/controllers/openid4vc/holder/holder.service.ts +++ b/src/controllers/openid4vc/holder/holder.service.ts @@ -21,6 +21,7 @@ import { W3cJsonLdVerifiableCredential, W3cJwtVerifiableCredential, SdJwtVcRecord, + MdocRecord, } from '@credo-ts/core' import { OpenId4VciAuthorizationFlow, @@ -224,15 +225,13 @@ export class HolderService { const storedCredentials = await Promise.all( credentialResponse.credentials.map(async (response) => { - // console.log('response', JSON.stringify(response)) - // const credential = response.credentials[0] + const credentialRecord = response.record // if (credential instanceof W3cJwtVerifiableCredential || credential instanceof W3cJsonLdVerifiableCredential) { // return await agentReq.agent.w3cCredentials.storeCredential({ credential }) // } - // if (credential instanceof Mdoc) { - // return await agentReq.agent.mdoc.store({ record: credential }) - // } - const credentialRecord = response.record + if (credentialRecord instanceof MdocRecord) { + return await agentReq.agent.mdoc.store({ record: credentialRecord }) + } if (credentialRecord instanceof SdJwtVcRecord) { return await agentReq.agent.sdJwtVc.store({ record: credentialRecord, diff --git a/src/utils/oid4vc-agent.ts b/src/utils/oid4vc-agent.ts index f9a8053d..a1ba9b6b 100644 --- a/src/utils/oid4vc-agent.ts +++ b/src/utils/oid4vc-agent.ts @@ -198,6 +198,9 @@ export async function getTrustedCerts() { } const data = await response.json() return data as string[] + // return [ + // 'MIICBjCCAbigAwIBAgIQYq0k0aKF8v8XKMTnyD2q6TAFBgMrZXAwKzEcMBoGA1UEAxMTRXhhbXBsZSBDb3Jwb3JhdGlvbjELMAkGA1UEBhMCVVMwHhcNMjUwMTAxMDAwMDAwWhcNMjYwMTAxMDAwMDAwWjArMRwwGgYDVQQDExNFeGFtcGxlIENvcnBvcmF0aW9uMQswCQYDVQQGEwJVUzAqMAUGAytlcAMhAC4Bjw5RcVKyweVaiL3B3zzz7mx/4Xs4qfL8qaMtAJVao4HxMIHuMB0GA1UdDgQWBBTGsKAg3mtQAAMMBnS792uyT2pUyDAOBgNVHQ8BAf8EBAMCAaIwFQYDVR0lAQH/BAswCQYHKIGMXQUBAjAiBgNVHSMBAf8EGDAWgBTGsKAg3mtQAAMMBnS792uyT2pUyDBABgNVHRIBAf8ENjA0ggtleGFtcGxlLmNvbYYSaHR0cDovL2V4YW1wbGUuY29tgRFhZG1pbkBleGFtcGxlLmNvbTAsBgNVHREBAf8EIjAgggtleGFtcGxlLmNvbYERYWRtaW5AZXhhbXBsZS5jb20wEgYDVR0TAQH/BAgwBgEB/wIBADAFBgMrZXADQQASLPWxqJ1JmneTQDOGQz0Bk1t71M29IkRx+Eytmf4ZrxYL3qlbUl+fhXQGDwvTjl0Dl5bSDgEVbOMPs3Ul1QYA', + // ] } catch (error) { // eslint-disable-next-line no-console console.error('Error fetching data:', error) From 6c572c888143997328ed5823002c7504abac5170 Mon Sep 17 00:00:00 2001 From: shitrerohit Date: Wed, 31 Dec 2025 16:05:16 +0530 Subject: [PATCH 21/38] fix:sonar cloud issue Signed-off-by: shitrerohit --- src/cliAgent.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cliAgent.ts b/src/cliAgent.ts index 8c9ec147..5d3e1a04 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -138,6 +138,7 @@ function requireEnv(name: string): string { return value } const expressApp = express() +expressApp.disable('x-powered-by') // TODO: add object const getModules = ( networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]], From 21f66e085ae4071ff371b37d6b6e7564e52a5f94 Mon Sep 17 00:00:00 2001 From: shitrerohit Date: Mon, 5 Jan 2026 12:21:36 +0530 Subject: [PATCH 22/38] fix:completed flow changes for mdoc Signed-off-by: shitrerohit --- .../openid4vc/types/issuer.types.ts | 1 + src/controllers/x509/x509.service.ts | 44 +++++++++---------- src/utils/oid4vc-agent.ts | 2 +- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/src/controllers/openid4vc/types/issuer.types.ts b/src/controllers/openid4vc/types/issuer.types.ts index 1f9cf4ad..8c07cead 100644 --- a/src/controllers/openid4vc/types/issuer.types.ts +++ b/src/controllers/openid4vc/types/issuer.types.ts @@ -16,6 +16,7 @@ export interface OpenId4VciOfferCredentials { method: SignerMethod did?: string x5c?: string[] + keyId: string } } diff --git a/src/controllers/x509/x509.service.ts b/src/controllers/x509/x509.service.ts index 8e0ca051..efad9ae8 100644 --- a/src/controllers/x509/x509.service.ts +++ b/src/controllers/x509/x509.service.ts @@ -1,11 +1,10 @@ - import type { BasicX509CreateCertificateConfig, X509ImportCertificateOptionsDto } from '../types' import type { CredoError } from '@credo-ts/core' import type { Request as Req } from 'express' import { transformPrivateKeyToPrivateJwk, transformSeedToPrivateJwk } from '@credo-ts/askar' import { - Kms, + Kms, TypedArrayEncoder, X509Certificate, X509ExtendedKeyUsage, @@ -15,13 +14,13 @@ import { type Agent, } from '@credo-ts/core' import { KeyAlgorithm } from '@openwallet-foundation/askar-nodejs' +import { error } from 'console' import { keyAlgorithmToCurve } from '../../utils/constant' import { generateSecretKey, getCertificateValidityForSystem, getTypeFromCurve } from '../../utils/helpers' import { pemToRawEd25519PrivateKey } from './crypto-util' import { type X509CreateCertificateOptionsDto } from './x509.types' -import { error } from 'console' class x509Service { public async createSelfSignedDCS(createX509Options: BasicX509CreateCertificateConfig, agentReq: Req) { @@ -79,24 +78,24 @@ class x509Service { public async createCertificate(agentReq: Req, options: X509CreateCertificateOptionsDto) { const agent = agentReq.agent - let authorityKeyID, subjectPublicKeyID + let authorityKeyID, subjectPublicKeyID, authorityKeyKmsId - agent.config.logger.debug(`createCertificate options:`, options) + agent.config.logger.debug(`createCertificate options:`, options) - if (options.authorityKey && options?.authorityKey?.seed) { - const { privateJwk } = transformSeedToPrivateJwk({ - type: getTypeFromCurve(options.authorityKey.keyType ?? 'P-256'), - seed: TypedArrayEncoder.fromString(options.authorityKey!.seed!), - }) - + const { privateJwk } = transformSeedToPrivateJwk({ + type: getTypeFromCurve(options.authorityKey.keyType ?? 'P-256'), + seed: TypedArrayEncoder.fromString(options.authorityKey!.seed!), + }) + const { publicJwk } = await agent.kms.importKey({ privateJwk }) authorityKeyID = publicJwk } else { - const { publicJwk } = await agent.kms.createKey({ - type: getTypeFromCurve(options.authorityKey?.keyType ?? 'P-256') - }) - authorityKeyID = publicJwk + const { publicJwk, keyId } = await agent.kms.createKey({ + type: getTypeFromCurve(options.authorityKey?.keyType ?? 'P-256'), + }) + authorityKeyID = publicJwk + authorityKeyKmsId = keyId } if (options.subjectPublicKey) { @@ -109,19 +108,17 @@ class x509Service { }) subjectPublicKeyID = importedKey.publicJwk - } else { const { keyId, publicJwk } = await agent.kms.createKey({ - type: getTypeFromCurve(options.subjectPublicKey?.keyType ?? 'P-256') + type: getTypeFromCurve(options.subjectPublicKey?.keyType ?? 'P-256'), }) subjectPublicKeyID = publicJwk } } - agent.config.logger.info('This is subjectPublicKeyID', subjectPublicKeyID) const certificate = await agent.x509.createCertificate({ - // authorityKey: authorityKeyID as Key, + // authorityKey: authorityKeyID as Key, authorityKey: Kms.PublicJwk.fromPublicJwk(authorityKeyID), // subjectPublicKey: Kms.PublicJwk.fromPublicJwk(subjectPublicKeyID!), serialNumber: options.serialNumber, @@ -130,10 +127,10 @@ class x509Service { subject: options.subject, validity: options.validity, }) - agent.config.logger.info("Result") const issuerCertificate = certificate.toString('base64') - return { publicCertificateBase64: issuerCertificate } + + return { publicCertificateBase64: issuerCertificate, keyId: authorityKeyKmsId } } public async ImportX509Certificates(agentReq: Req, options: X509ImportCertificateOptionsDto) { @@ -169,8 +166,9 @@ class x509Service { agent.config.logger.error(`Error caught`) // If the key already exists, we assume the self-signed certificate is already created - if (error instanceof Kms.KeyManagementKeyExistsError) { - console.error( 'key already exists while importing certificate') + if (error instanceof Kms.KeyManagementKeyExistsError) { + // eslint-disable-next-line no-console + console.error('key already exists while importing certificate') } else { agent.config.logger.error(`${JSON.stringify(error)}`) throw error diff --git a/src/utils/oid4vc-agent.ts b/src/utils/oid4vc-agent.ts index a1ba9b6b..fa881a38 100644 --- a/src/utils/oid4vc-agent.ts +++ b/src/utils/oid4vc-agent.ts @@ -199,7 +199,7 @@ export async function getTrustedCerts() { const data = await response.json() return data as string[] // return [ - // 'MIICBjCCAbigAwIBAgIQYq0k0aKF8v8XKMTnyD2q6TAFBgMrZXAwKzEcMBoGA1UEAxMTRXhhbXBsZSBDb3Jwb3JhdGlvbjELMAkGA1UEBhMCVVMwHhcNMjUwMTAxMDAwMDAwWhcNMjYwMTAxMDAwMDAwWjArMRwwGgYDVQQDExNFeGFtcGxlIENvcnBvcmF0aW9uMQswCQYDVQQGEwJVUzAqMAUGAytlcAMhAC4Bjw5RcVKyweVaiL3B3zzz7mx/4Xs4qfL8qaMtAJVao4HxMIHuMB0GA1UdDgQWBBTGsKAg3mtQAAMMBnS792uyT2pUyDAOBgNVHQ8BAf8EBAMCAaIwFQYDVR0lAQH/BAswCQYHKIGMXQUBAjAiBgNVHSMBAf8EGDAWgBTGsKAg3mtQAAMMBnS792uyT2pUyDBABgNVHRIBAf8ENjA0ggtleGFtcGxlLmNvbYYSaHR0cDovL2V4YW1wbGUuY29tgRFhZG1pbkBleGFtcGxlLmNvbTAsBgNVHREBAf8EIjAgggtleGFtcGxlLmNvbYERYWRtaW5AZXhhbXBsZS5jb20wEgYDVR0TAQH/BAgwBgEB/wIBADAFBgMrZXADQQASLPWxqJ1JmneTQDOGQz0Bk1t71M29IkRx+Eytmf4ZrxYL3qlbUl+fhXQGDwvTjl0Dl5bSDgEVbOMPs3Ul1QYA', + // 'MIICBjCCAbigAwIBAgIQSHpmUFWPGbA9FmUtsjRy/jAFBgMrZXAwKzEcMBoGA1UEAxMTRXhhbXBsZSBDb3Jwb3JhdGlvbjELMAkGA1UEBhMCVVMwHhcNMjUwMTAxMDAwMDAwWhcNMjcwMTAxMDAwMDAwWjArMRwwGgYDVQQDExNFeGFtcGxlIENvcnBvcmF0aW9uMQswCQYDVQQGEwJVUzAqMAUGAytlcAMhAORuQWdVPZvmsAlBHqXy+HN6dfhAmZOWhdDJ81JzWqlVo4HxMIHuMB0GA1UdDgQWBBR8qFPBWwY2OSWF4CkBVk37XwubzjAOBgNVHQ8BAf8EBAMCAaIwFQYDVR0lAQH/BAswCQYHKIGMXQUBAjAiBgNVHSMBAf8EGDAWgBR8qFPBWwY2OSWF4CkBVk37XwubzjBABgNVHRIBAf8ENjA0ggtleGFtcGxlLmNvbYYSaHR0cDovL2V4YW1wbGUuY29tgRFhZG1pbkBleGFtcGxlLmNvbTAsBgNVHREBAf8EIjAgggtleGFtcGxlLmNvbYERYWRtaW5AZXhhbXBsZS5jb20wEgYDVR0TAQH/BAgwBgEB/wIBADAFBgMrZXADQQCcqIaYQ95Z7uJu1rfFfe1GP9/fyfqw0LFX3PVC2TSNlXZTJL/Hea4mJRkFtVthcAMAfUAV1tmisyviJP+5x18A', // ] } catch (error) { // eslint-disable-next-line no-console From 57f71c5e2d8c14bcc88cdc01961ec6cf251441ef Mon Sep 17 00:00:00 2001 From: shitrerohit Date: Mon, 5 Jan 2026 15:03:08 +0530 Subject: [PATCH 23/38] fix:resolved code rabit related issues Signed-off-by: shitrerohit --- .../holder/credentialBindingResolver.ts | 6 +++++- .../openid4vc/holder/holder.service.ts | 1 + .../issuance-sessions.service.ts | 20 +++++++------------ src/utils/oid4vc-agent.ts | 18 ++++++++--------- 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/src/controllers/openid4vc/holder/credentialBindingResolver.ts b/src/controllers/openid4vc/holder/credentialBindingResolver.ts index d414899d..7f330e73 100644 --- a/src/controllers/openid4vc/holder/credentialBindingResolver.ts +++ b/src/controllers/openid4vc/holder/credentialBindingResolver.ts @@ -48,7 +48,11 @@ export function getCredentialBindingResolver({ throw new Error('Unable to request credentials. Only jwt proof type without key attestations supported') } - const signatureAlgorithm = proofTypes.jwt?.supportedSignatureAlgorithms[0] + const signatureAlgorithm = proofTypes.jwt?.supportedSignatureAlgorithms?.[0] + + if (!signatureAlgorithm) { + throw new Error('No supported signature algorithms found for JWT proof type') + } const keys = await Promise.all( new Array(batchSize).fill(0).map(() => kms diff --git a/src/controllers/openid4vc/holder/holder.service.ts b/src/controllers/openid4vc/holder/holder.service.ts index d7d275fd..1d80b09d 100644 --- a/src/controllers/openid4vc/holder/holder.service.ts +++ b/src/controllers/openid4vc/holder/holder.service.ts @@ -237,6 +237,7 @@ export class HolderService { record: credentialRecord, }) } + throw new Error(`Unsupported credential record type`) }), ) diff --git a/src/controllers/openid4vc/issuance-sessions/issuance-sessions.service.ts b/src/controllers/openid4vc/issuance-sessions/issuance-sessions.service.ts index 772cbfff..8dd7027b 100644 --- a/src/controllers/openid4vc/issuance-sessions/issuance-sessions.service.ts +++ b/src/controllers/openid4vc/issuance-sessions/issuance-sessions.service.ts @@ -57,24 +57,18 @@ class IssuanceSessionsService { options.issuanceMetadata.credentials = mappedCredentials - // const { credentialOffer, issuanceSession } = await agentReq.agent.modules.openId4VcIssuer.createCredentialOffer({ - // issuerId: publicIssuerId, - // issuanceMetadata: options.issuanceMetadata, - // offeredCredentials: credentials.map((c) => c.credentialSupportedId), - // preAuthorizedCodeFlowConfig: options.preAuthorizedCodeFlowConfig, - // authorizationCodeFlowConfig: options.authorizationCodeFlowConfig, - // }) - - const { credentialOffer, issuanceSession } = (await agentReq.agent.modules.openid4vc.issuer?.createCredentialOffer({ + const issuerModule = agentReq.agent.modules.openid4vc.issuer + + if (!issuerModule) { + throw new Error('OID4VC issuer module not initialized') + } + const { credentialOffer, issuanceSession } = await issuerModule.createCredentialOffer({ issuerId: publicIssuerId, issuanceMetadata: options.issuanceMetadata, credentialConfigurationIds: credentials.map((c) => c.credentialSupportedId), preAuthorizedCodeFlowConfig: options.preAuthorizedCodeFlowConfig, authorizationCodeFlowConfig: options.authorizationCodeFlowConfig, - })) as { - credentialOffer: unknown - issuanceSession: unknown - } + }) return { credentialOffer, issuanceSession } } diff --git a/src/utils/oid4vc-agent.ts b/src/utils/oid4vc-agent.ts index fa881a38..54e94ac2 100644 --- a/src/utils/oid4vc-agent.ts +++ b/src/utils/oid4vc-agent.ts @@ -192,15 +192,15 @@ export function getMixedCredentialRequestToCredentialMapper(): OpenId4VciCredent export async function getTrustedCerts() { try { - const response = await fetch(`${process.env.TRUST_LIST_URL}`) - if (!response.ok) { - throw new Error(`HTTP error! status: ${response.status}`) - } - const data = await response.json() - return data as string[] - // return [ - // 'MIICBjCCAbigAwIBAgIQSHpmUFWPGbA9FmUtsjRy/jAFBgMrZXAwKzEcMBoGA1UEAxMTRXhhbXBsZSBDb3Jwb3JhdGlvbjELMAkGA1UEBhMCVVMwHhcNMjUwMTAxMDAwMDAwWhcNMjcwMTAxMDAwMDAwWjArMRwwGgYDVQQDExNFeGFtcGxlIENvcnBvcmF0aW9uMQswCQYDVQQGEwJVUzAqMAUGAytlcAMhAORuQWdVPZvmsAlBHqXy+HN6dfhAmZOWhdDJ81JzWqlVo4HxMIHuMB0GA1UdDgQWBBR8qFPBWwY2OSWF4CkBVk37XwubzjAOBgNVHQ8BAf8EBAMCAaIwFQYDVR0lAQH/BAswCQYHKIGMXQUBAjAiBgNVHSMBAf8EGDAWgBR8qFPBWwY2OSWF4CkBVk37XwubzjBABgNVHRIBAf8ENjA0ggtleGFtcGxlLmNvbYYSaHR0cDovL2V4YW1wbGUuY29tgRFhZG1pbkBleGFtcGxlLmNvbTAsBgNVHREBAf8EIjAgggtleGFtcGxlLmNvbYERYWRtaW5AZXhhbXBsZS5jb20wEgYDVR0TAQH/BAgwBgEB/wIBADAFBgMrZXADQQCcqIaYQ95Z7uJu1rfFfe1GP9/fyfqw0LFX3PVC2TSNlXZTJL/Hea4mJRkFtVthcAMAfUAV1tmisyviJP+5x18A', - // ] + // const response = await fetch(`${process.env.TRUST_LIST_URL}`) + // if (!response.ok) { + // throw new Error(`HTTP error! status: ${response.status}`) + // } + // const data = await response.json() + // return data as string[] + return [ + 'MIICBzCCAbmgAwIBAgIRAMEUex+GR2GZKusP/izv/oswBQYDK2VwMCsxHDAaBgNVBAMTE0V4YW1wbGUgQ29ycG9yYXRpb24xCzAJBgNVBAYTAlVTMB4XDTI1MDEwMTAwMDAwMFoXDTI3MDEwMTAwMDAwMFowKzEcMBoGA1UEAxMTRXhhbXBsZSBDb3Jwb3JhdGlvbjELMAkGA1UEBhMCVVMwKjAFBgMrZXADIQC5RNVbJCX2L/z/PLbvaxLqi7+hA4fUUStWcmAo/qkX2aOB8TCB7jAdBgNVHQ4EFgQUkog6trQXXfsjb472jybLCBixSAMwDgYDVR0PAQH/BAQDAgGiMBUGA1UdJQEB/wQLMAkGByiBjF0FAQIwIgYDVR0jAQH/BBgwFoAUkog6trQXXfsjb472jybLCBixSAMwQAYDVR0SAQH/BDYwNIILZXhhbXBsZS5jb22GEmh0dHA6Ly9leGFtcGxlLmNvbYERYWRtaW5AZXhhbXBsZS5jb20wLAYDVR0RAQH/BCIwIIILZXhhbXBsZS5jb22BEWFkbWluQGV4YW1wbGUuY29tMBIGA1UdEwEB/wQIMAYBAf8CAQAwBQYDK2VwA0EAPjHj2keDv8BN3FGkOqG36VQKaYvb9Ena+1BI7hb+sBJ+QgBTlj1sK/+I7LMUfu/K3oCyZxT1CZpYRZkh7GEWAw==', + ] } catch (error) { // eslint-disable-next-line no-console console.error('Error fetching data:', error) From 586ba2c278d8c29bc7e98ecbb8a47363e55565f3 Mon Sep 17 00:00:00 2001 From: shitrerohit Date: Mon, 5 Jan 2026 15:33:26 +0530 Subject: [PATCH 24/38] fix:removed commented code Signed-off-by: shitrerohit --- src/cliAgent.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/cliAgent.ts b/src/cliAgent.ts index 5d3e1a04..1a603e4f 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -49,13 +49,7 @@ import { IndyVdrIndyDidRegistrar, } from '@credo-ts/indy-vdr' import { agentDependencies, DidCommHttpInboundTransport, DidCommWsInboundTransport } from '@credo-ts/node' -import { - OpenId4VcHolderModule, - // OpenId4VcHolderModule, - // OpenId4VcIssuerModule, - OpenId4VcModule, - // OpenId4VcVerifierModule, -} from '@credo-ts/openid4vc' +import { OpenId4VcHolderModule, OpenId4VcModule } from '@credo-ts/openid4vc' import { QuestionAnswerModule } from '@credo-ts/question-answer' import { TenantsModule } from '@credo-ts/tenants' import { anoncreds } from '@hyperledger/anoncreds-nodejs' From 5851bd69bbeeea3949236cd57e024538dd61e744 Mon Sep 17 00:00:00 2001 From: shitrerohit Date: Mon, 5 Jan 2026 15:46:26 +0530 Subject: [PATCH 25/38] fix: resolved PR comments Signed-off-by: shitrerohit --- .../openid4vc/issuers/issuer.service.ts | 4 ++-- src/utils/oid4vc-agent.ts | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/controllers/openid4vc/issuers/issuer.service.ts b/src/controllers/openid4vc/issuers/issuer.service.ts index 0d0ba61d..b1f093de 100644 --- a/src/controllers/openid4vc/issuers/issuer.service.ts +++ b/src/controllers/openid4vc/issuers/issuer.service.ts @@ -33,8 +33,8 @@ export class IssuerService { public async getIssuersByQuery(agentReq: Req, publicIssuerId?: string) { const result = publicIssuerId - ? (agentReq.agent as Agent).openid4vc.issuer.getIssuerByIssuerId(publicIssuerId) // .dependencyManager.resolve(OpenId4VcIssuerRepository) - : (agentReq.agent as Agent).openid4vc.issuer.getAllIssuers() + ? (agentReq.agent as Agent).openid4vc.issuer?.getIssuerByIssuerId(publicIssuerId) // .dependencyManager.resolve(OpenId4VcIssuerRepository) + : (agentReq.agent as Agent).openid4vc.issuer?.getAllIssuers() return result } diff --git a/src/utils/oid4vc-agent.ts b/src/utils/oid4vc-agent.ts index 54e94ac2..9336b0b1 100644 --- a/src/utils/oid4vc-agent.ts +++ b/src/utils/oid4vc-agent.ts @@ -192,15 +192,15 @@ export function getMixedCredentialRequestToCredentialMapper(): OpenId4VciCredent export async function getTrustedCerts() { try { - // const response = await fetch(`${process.env.TRUST_LIST_URL}`) - // if (!response.ok) { - // throw new Error(`HTTP error! status: ${response.status}`) - // } - // const data = await response.json() - // return data as string[] - return [ - 'MIICBzCCAbmgAwIBAgIRAMEUex+GR2GZKusP/izv/oswBQYDK2VwMCsxHDAaBgNVBAMTE0V4YW1wbGUgQ29ycG9yYXRpb24xCzAJBgNVBAYTAlVTMB4XDTI1MDEwMTAwMDAwMFoXDTI3MDEwMTAwMDAwMFowKzEcMBoGA1UEAxMTRXhhbXBsZSBDb3Jwb3JhdGlvbjELMAkGA1UEBhMCVVMwKjAFBgMrZXADIQC5RNVbJCX2L/z/PLbvaxLqi7+hA4fUUStWcmAo/qkX2aOB8TCB7jAdBgNVHQ4EFgQUkog6trQXXfsjb472jybLCBixSAMwDgYDVR0PAQH/BAQDAgGiMBUGA1UdJQEB/wQLMAkGByiBjF0FAQIwIgYDVR0jAQH/BBgwFoAUkog6trQXXfsjb472jybLCBixSAMwQAYDVR0SAQH/BDYwNIILZXhhbXBsZS5jb22GEmh0dHA6Ly9leGFtcGxlLmNvbYERYWRtaW5AZXhhbXBsZS5jb20wLAYDVR0RAQH/BCIwIIILZXhhbXBsZS5jb22BEWFkbWluQGV4YW1wbGUuY29tMBIGA1UdEwEB/wQIMAYBAf8CAQAwBQYDK2VwA0EAPjHj2keDv8BN3FGkOqG36VQKaYvb9Ena+1BI7hb+sBJ+QgBTlj1sK/+I7LMUfu/K3oCyZxT1CZpYRZkh7GEWAw==', - ] + const response = await fetch(`${process.env.TRUST_LIST_URL}`) + if (!response.ok) { + throw new Error(`HTTP error! status: ${response.status}`) + } + const data = await response.json() + return data as string[] + // return [ + // 'MIICBzCCAbmgAwIBAgIRAMEUex+GR2GZKusP/izv/oswBQYDK2VwMCsxHDAaBgNVBAMTE0V4YW1wbGUgQ29ycG9yYXRpb24xCzAJBgNVBAYTAlVTMB4XDTI1MDEwMTAwMDAwMFoXDTI3MDEwMTAwMDAwMFowKzEcMBoGA1UEAxMTRXhhbXBsZSBDb3Jwb3JhdGlvbjELMAkGA1UEBhMCVVMwKjAFBgMrZXADIQC5RNVbJCX2L/z/PLbvaxLqi7+hA4fUUStWcmAo/qkX2aOB8TCB7jAdBgNVHQ4EFgQUkog6trQXXfsjb472jybLCBixSAMwDgYDVR0PAQH/BAQDAgGiMBUGA1UdJQEB/wQLMAkGByiBjF0FAQIwIgYDVR0jAQH/BBgwFoAUkog6trQXXfsjb472jybLCBixSAMwQAYDVR0SAQH/BDYwNIILZXhhbXBsZS5jb22GEmh0dHA6Ly9leGFtcGxlLmNvbYERYWRtaW5AZXhhbXBsZS5jb20wLAYDVR0RAQH/BCIwIIILZXhhbXBsZS5jb22BEWFkbWluQGV4YW1wbGUuY29tMBIGA1UdEwEB/wQIMAYBAf8CAQAwBQYDK2VwA0EAPjHj2keDv8BN3FGkOqG36VQKaYvb9Ena+1BI7hb+sBJ+QgBTlj1sK/+I7LMUfu/K3oCyZxT1CZpYRZkh7GEWAw==', + // ] } catch (error) { // eslint-disable-next-line no-console console.error('Error fetching data:', error) From 44b1c6af52826d7f3b943937abe1e5d049fe9d03 Mon Sep 17 00:00:00 2001 From: shitrerohit Date: Fri, 9 Jan 2026 19:37:10 +0530 Subject: [PATCH 26/38] feat/oidv4vc issuance and verification changes Signed-off-by: shitrerohit --- src/controllers/did/DidController.ts | 1022 +++++++++-------- .../openid4vc/types/issuer.types.ts | 2 +- .../openid4vc/types/verifier.types.ts | 6 +- .../verification-sessions.service.ts | 15 +- .../verifiers/verifier.Controller.ts | 115 +- .../openid4vc/verifiers/verifier.service.ts | 99 +- src/utils/oid4vc-agent.ts | 1 + 7 files changed, 636 insertions(+), 624 deletions(-) diff --git a/src/controllers/did/DidController.ts b/src/controllers/did/DidController.ts index 1bc214ea..b13279a5 100644 --- a/src/controllers/did/DidController.ts +++ b/src/controllers/did/DidController.ts @@ -1,26 +1,28 @@ - import type { DidResolutionResultProps } from '../types' import type { PolygonDidCreateOptions } from '@ayanworks/credo-polygon-w3c-module/build/dids' import type { DidDocument, KeyDidCreateOptions, PeerDidNumAlgo2CreateOptions } from '@credo-ts/core' import { transformPrivateKeyToPrivateJwk, transformSeedToPrivateJwk } from '@credo-ts/askar' import { - TypedArrayEncoder, - DidDocumentBuilder, - getEd25519VerificationKey2018, - createPeerDidDocumentFromServices, - PeerDidNumAlgo, - Kms, - Hasher, - LogLevel, - Agent, + TypedArrayEncoder, + DidDocumentBuilder, + getEd25519VerificationKey2018, + createPeerDidDocumentFromServices, + PeerDidNumAlgo, + Kms, + Hasher, + LogLevel, + Agent, + DidKey, } from '@credo-ts/core' -import { Key, KeyAlgorithm,askar } from '@openwallet-foundation/askar-nodejs' +import { Key, KeyAlgorithm, askar } from '@openwallet-foundation/askar-nodejs' import axios from 'axios' import { Request as Req } from 'express' import { Body, Controller, Example, Get, Path, Post, Route, Tags, Security, Request } from 'tsoa' import { injectable } from 'tsyringe' +import { container } from 'tsyringe' +import { RestMultiTenantAgentModules } from '../../cliAgent' import { DidMethod, KeyAlgorithmCurve, Network, Role, SCOPES } from '../../enums' import ErrorHandlingService from '../../errorHandlingService' import { BadRequestError, InternalServerError } from '../../errors' @@ -30,551 +32,573 @@ import { getTypeFromCurve } from '../../utils/helpers' import { CreateDidResponse, Did, DidRecordExample } from '../examples' import { DidCreate } from '../types' import { supportedKeyTypesDID } from '../x509/x509.types' -import { container } from 'tsyringe' -import { RestMultiTenantAgentModules } from '../../cliAgent' - - @Tags('Dids') @Route('/dids') @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) @injectable() export class DidController extends Controller { - /** - * Resolves did and returns did resolution result - * @param did Decentralized Identifier - * @returns DidResolutionResult - */ - private agent = container.resolve(Agent) - - @Example(DidRecordExample) - @Get('/:did') - public async getDidRecordByDid(@Request() request: Req, @Path('did') did: Did) { - try { - const resolveResult = await request.agent.dids.resolve(did) - const importDid = await request.agent.dids.import({ - did, - overwrite: true, - }) - if (!resolveResult.didDocument) { - throw new InternalServerError(`Error resolving DID docs for did: ${importDid}`) - } - - return { ...resolveResult, didDocument: resolveResult.didDocument.toJSON() } - } catch (error) { - throw ErrorHandlingService.handle(error) - } + /** + * Resolves did and returns did resolution result + * @param did Decentralized Identifier + * @returns DidResolutionResult + */ + private agent = container.resolve(Agent) + + @Example(DidRecordExample) + @Get('/:did') + public async getDidRecordByDid(@Request() request: Req, @Path('did') did: Did) { + try { + const resolveResult = await request.agent.dids.resolve(did) + const importDid = await request.agent.dids.import({ + did, + overwrite: true, + }) + if (!resolveResult.didDocument) { + throw new InternalServerError(`Error resolving DID docs for did: ${importDid}`) + } + + return { ...resolveResult, didDocument: resolveResult.didDocument.toJSON() } + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } + + /** + * Did nym registration + * @body DidCreateOptions + * @returns DidResolutionResult + */ + // @Example(DidRecordExample) + @Example(CreateDidResponse) + @Post('/write') + public async writeDid(@Request() request: Req, @Body() createDidOptions: DidCreate) { + let didRes + + this.agent.config.logger.info(`askar version ${askar.version()}`) + try { + if (!createDidOptions.method) { + throw new BadRequestError('Method is required') + } + + let result + switch (createDidOptions.method) { + case DidMethod.Indy: + result = await this.handleIndy(request.agent, createDidOptions) + break + + case DidMethod.Key: + result = await this.handleKey(request.agent, createDidOptions) + break + + case DidMethod.Web: + result = await this.handleWeb(request.agent, createDidOptions) + break + + case DidMethod.Polygon: + result = await this.handlePolygon(request.agent, createDidOptions) + break + + case DidMethod.Peer: + result = await this.handleDidPeer(request.agent, createDidOptions) + break + + default: + throw new BadRequestError(`Invalid method: ${createDidOptions.method}`) + } + + didRes = { ...result } + + return didRes + } catch (error) { + throw ErrorHandlingService.handle(error) } + } - /** - * Did nym registration - * @body DidCreateOptions - * @returns DidResolutionResult - */ - // @Example(DidRecordExample) - @Example(CreateDidResponse) - @Post('/write') - public async writeDid(@Request() request: Req, @Body() createDidOptions: DidCreate) { - let didRes - - this.agent.config.logger.info(`askar version ${askar.version()}`) - try { - if (!createDidOptions.method) { - throw new BadRequestError('Method is required') - } - - let result - switch (createDidOptions.method) { - case DidMethod.Indy: - result = await this.handleIndy(request.agent, createDidOptions) - break - - case DidMethod.Key: - result = await this.handleKey(request.agent, createDidOptions) - break - - case DidMethod.Web: - result = await this.handleWeb(request.agent, createDidOptions) - break - - case DidMethod.Polygon: - result = await this.handlePolygon(request.agent, createDidOptions) - break - - case DidMethod.Peer: - result = await this.handleDidPeer(request.agent, createDidOptions) - break - - default: - throw new BadRequestError(`Invalid method: ${createDidOptions.method}`) - } - - didRes = { ...result } - - return didRes - } catch (error) { - throw ErrorHandlingService.handle(error) - } + private async handleDidPeer(agent: AgentType, createDidOptions: DidCreate) { + let didResponse + let did + + if (!createDidOptions.keyType) { + throw Error('keyType is required') } - private async handleDidPeer(agent: AgentType, createDidOptions: DidCreate) { - let didResponse - let did + const didRouting = await agent.modules.didcomm.mediationRecipient.getRouting({}) + const { didDocument, keys } = createPeerDidDocumentFromServices( + [ + { + id: 'didcomm', + recipientKeys: [didRouting.recipientKey], + routingKeys: didRouting.routingKeys, + serviceEndpoint: didRouting.endpoints[0], + }, + ], + true, + ) + + const didPeerResponse = await agent.dids.create({ + didDocument, + method: DidMethod.Peer, + options: { + numAlgo: PeerDidNumAlgo.MultipleInceptionKeyWithoutDoc, + keys, + }, + }) + + did = didPeerResponse.didState.did + didResponse = { + did, + } + return didResponse + } - if (!createDidOptions.keyType) { - throw Error('keyType is required') - } + private async handleIndy(agent: AgentType, createDidOptions: DidCreate) { + let result + if (!createDidOptions.keyType) { + throw new BadRequestError('keyType is required') + } - const didRouting = await agent.modules.didcomm.mediationRecipient.getRouting({}) - const { didDocument, keys } = createPeerDidDocumentFromServices([ - { - id: 'didcomm', - recipientKeys: [didRouting.recipientKey], - routingKeys: didRouting.routingKeys, - serviceEndpoint: didRouting.endpoints[0], - }, - ], - true) - - const didPeerResponse = await agent.dids.create({ - didDocument, - method: DidMethod.Peer, - options: { - numAlgo: PeerDidNumAlgo.MultipleInceptionKeyWithoutDoc, - keys - }, - }) + if (!createDidOptions.network) { + throw new BadRequestError('For indy method network is required') + } - did = didPeerResponse.didState.did - didResponse = { - did, - } - return didResponse + if (createDidOptions.keyType !== KeyAlgorithm.Ed25519) { + throw new BadRequestError('Only ed25519 key type supported') } - private async handleIndy(agent: AgentType, createDidOptions: DidCreate) { - let result - if (!createDidOptions.keyType) { - throw new BadRequestError('keyType is required') - } + if (!Network.Bcovrin_Testnet && !Network.Indicio_Demonet && !Network.Indicio_Testnet) { + throw new BadRequestError(`Invalid network for 'indy' method: ${createDidOptions.network}`) + } - if (!createDidOptions.network) { - throw new BadRequestError('For indy method network is required') - } + switch (createDidOptions?.network?.toLowerCase()) { + case Network.Bcovrin_Testnet: + result = await this.handleBcovrin( + agent, + createDidOptions, + `did:${createDidOptions.method}:${createDidOptions.network}`, + ) + break + + case Network.Indicio_Demonet: + case Network.Indicio_Testnet: + result = await this.handleIndicio( + agent, + createDidOptions, + `did:${createDidOptions.method}:${createDidOptions.network}`, + ) + break + + default: + throw new BadRequestError(`Network does not exists`) + } + return result + } - if (createDidOptions.keyType !== KeyAlgorithm.Ed25519) { - throw new BadRequestError('Only ed25519 key type supported') + private async handleBcovrin(agent: AgentType, createDidOptions: DidCreate, didMethod: string) { + let didDocument + if (!createDidOptions.seed) { + throw new BadRequestError('Seed is required') + } + if (createDidOptions?.role?.toLowerCase() === Role.Endorser) { + if (createDidOptions.did) { + await this.importDid(agent, didMethod, createDidOptions.did, createDidOptions.seed) + const getDid = await agent.dids.getCreatedDids({ + method: createDidOptions.method, + did: `did:${createDidOptions.method}:${createDidOptions.network}:${createDidOptions.did}`, + }) + if (getDid.length > 0) { + didDocument = getDid[0].didDocument } - if (!Network.Bcovrin_Testnet && !Network.Indicio_Demonet && !Network.Indicio_Testnet) { - throw new BadRequestError(`Invalid network for 'indy' method: ${createDidOptions.network}`) + return { + did: `${didMethod}:${createDidOptions.did}`, + didDocument: didDocument, } + } else { + const BCOVRIN_REGISTER_URL = process.env.BCOVRIN_REGISTER_URL as string + const res = await axios.post(BCOVRIN_REGISTER_URL, { + role: 'ENDORSER', + alias: 'Alias', + seed: createDidOptions.seed, + }) + const { did } = res?.data || {} + await this.importDid(agent, didMethod, did, createDidOptions.seed) + const didRecord = await agent.dids.getCreatedDids({ + method: DidMethod.Indy, + did: `did:${DidMethod.Indy}:${Network.Bcovrin_Testnet}:${res.data.did}`, + }) - switch (createDidOptions?.network?.toLowerCase()) { - case Network.Bcovrin_Testnet: - result = await this.handleBcovrin( - agent, - createDidOptions, - `did:${createDidOptions.method}:${createDidOptions.network}`, - ) - break - - case Network.Indicio_Demonet: - case Network.Indicio_Testnet: - result = await this.handleIndicio( - agent, - createDidOptions, - `did:${createDidOptions.method}:${createDidOptions.network}`, - ) - break - - default: - throw new BadRequestError(`Network does not exists`) + if (didRecord.length > 0) { + didDocument = didRecord[0].didDocument } - return result - } - private async handleBcovrin(agent: AgentType, createDidOptions: DidCreate, didMethod: string) { - let didDocument - if (!createDidOptions.seed) { - throw new BadRequestError('Seed is required') - } - if (createDidOptions?.role?.toLowerCase() === Role.Endorser) { - if (createDidOptions.did) { - await this.importDid(agent, didMethod, createDidOptions.did, createDidOptions.seed) - const getDid = await agent.dids.getCreatedDids({ - method: createDidOptions.method, - did: `did:${createDidOptions.method}:${createDidOptions.network}:${createDidOptions.did}`, - }) - if (getDid.length > 0) { - didDocument = getDid[0].didDocument - } - - return { - did: `${didMethod}:${createDidOptions.did}`, - didDocument: didDocument, - } - } else { - const BCOVRIN_REGISTER_URL = process.env.BCOVRIN_REGISTER_URL as string - const res = await axios.post(BCOVRIN_REGISTER_URL, { - role: 'ENDORSER', - alias: 'Alias', - seed: createDidOptions.seed, - }) - const { did } = res?.data || {} - await this.importDid(agent, didMethod, did, createDidOptions.seed) - const didRecord = await agent.dids.getCreatedDids({ - method: DidMethod.Indy, - did: `did:${DidMethod.Indy}:${Network.Bcovrin_Testnet}:${res.data.did}`, - }) - - if (didRecord.length > 0) { - didDocument = didRecord[0].didDocument - } - - return { - did: `${didMethod}:${res.data.did}`, - didDocument: didDocument, - } - } - } else { - if (!createDidOptions.endorserDid) { - throw new BadRequestError('Please provide the endorser DID or role') - } - const didCreateTxResult = await this.createEndorserDid(agent, createDidOptions.endorserDid) - return { did: didCreateTxResult.didState.did, didDocument: didCreateTxResult.didState.didDocument } + return { + did: `${didMethod}:${res.data.did}`, + didDocument: didDocument, } + } + } else { + if (!createDidOptions.endorserDid) { + throw new BadRequestError('Please provide the endorser DID or role') + } + const didCreateTxResult = await this.createEndorserDid(agent, createDidOptions.endorserDid) + return { did: didCreateTxResult.didState.did, didDocument: didCreateTxResult.didState.didDocument } } + } - private async handleIndicio(agent: AgentType, createDidOptions: DidCreate, didMethod: string) { - let didDocument - if (!createDidOptions.seed) { - throw new BadRequestError('Seed is required') - } - if (createDidOptions?.role?.toLowerCase() === Role.Endorser) { - if (createDidOptions.did) { - await this.importDid(agent, didMethod, createDidOptions.did, createDidOptions.seed) - const didRecord = await agent.dids.getCreatedDids({ - method: createDidOptions.method, - did: `did:${createDidOptions.method}:${createDidOptions.network}:${createDidOptions.did}`, - }) - - if (didRecord.length > 0) { - didDocument = didRecord[0].didDocument - } - - return { - did: `${didMethod}:${createDidOptions.did}`, - didDocument: didDocument, - } - } else { - const key = await this.createIndicioKey(agent, createDidOptions) - const INDICIO_NYM_URL = process.env.INDICIO_NYM_URL as string - const res = await axios.post(INDICIO_NYM_URL, key) - if (res.data.statusCode === 200) { - await this.importDid(agent, didMethod, key.did, createDidOptions.seed) - const didRecord = await agent.dids.getCreatedDids({ - method: DidMethod.Indy, - did: `${didMethod}:${key.did}`, - }) - - if (didRecord.length > 0) { - didDocument = didRecord[0].didDocument - } - - return { - did: `${didMethod}:${key.did}`, - didDocument: didDocument, - } - } - } - } else { - if (!createDidOptions.endorserDid) { - throw new BadRequestError('Please provide the endorser DID or role') - } - const didCreateTxResult = await this.createEndorserDid(agent, createDidOptions.endorserDid) - return didCreateTxResult - } + private async handleIndicio(agent: AgentType, createDidOptions: DidCreate, didMethod: string) { + let didDocument + if (!createDidOptions.seed) { + throw new BadRequestError('Seed is required') } - - private async createEndorserDid(agent: AgentType, endorserDid: string) { - return agent.dids.create({ - method: 'indy', - options: { - endorserMode: 'external', - endorserDid: endorserDid || '', - }, + if (createDidOptions?.role?.toLowerCase() === Role.Endorser) { + if (createDidOptions.did) { + await this.importDid(agent, didMethod, createDidOptions.did, createDidOptions.seed) + const didRecord = await agent.dids.getCreatedDids({ + method: createDidOptions.method, + did: `did:${createDidOptions.method}:${createDidOptions.network}:${createDidOptions.did}`, }) - } - private async createIndicioKey(agent: AgentType, createDidOptions: DidCreate) { - if (!createDidOptions.seed) { - throw new BadRequestError('Seed is required') + if (didRecord.length > 0) { + didDocument = didRecord[0].didDocument + } + + return { + did: `${didMethod}:${createDidOptions.did}`, + didDocument: didDocument, } - // TODO: Remove comments afterwards - // const key = await agent.kms.createKey({ - // privateKey: TypedArrayEncoder.fromString(createDidOptions.seed), - // keyType: KeyAlgorithm.Ed25519, - // }) - - // const buffer = TypedArrayEncoder.fromBase58(key.publicKeyBase58) - // const did = TypedArrayEncoder.toBase58(buffer.slice(0, 16)) - - const _verificationKey = ( - await agent.kms.createKey({ - type: { - kty: 'OKP', - crv: 'Ed25519', - }, - }) - ).publicJwk - - const verificationKey = Kms.PublicJwk.fromPublicJwk(_verificationKey) as Kms.PublicJwk - - // Create a new key and calculate did according to the rules for indy did method - const buffer = Hasher.hash(verificationKey.publicKey.publicKey, 'sha-256') - - const did = TypedArrayEncoder.toBase58(buffer.slice(0, 16)) - - let body - if (createDidOptions.network === Network.Indicio_Testnet) { - body = { - network: 'testnet', - did, - verkey: TypedArrayEncoder.toBase58(buffer), - } - } else if (createDidOptions.network === Network.Indicio_Demonet) { - body = { - network: 'demonet', - did, - verkey: TypedArrayEncoder.toBase58(buffer), - } - } else { - throw new BadRequestError('Please provide a valid did method') + } else { + const key = await this.createIndicioKey(agent, createDidOptions) + const INDICIO_NYM_URL = process.env.INDICIO_NYM_URL as string + const res = await axios.post(INDICIO_NYM_URL, key) + if (res.data.statusCode === 200) { + await this.importDid(agent, didMethod, key.did, createDidOptions.seed) + const didRecord = await agent.dids.getCreatedDids({ + method: DidMethod.Indy, + did: `${didMethod}:${key.did}`, + }) + + if (didRecord.length > 0) { + didDocument = didRecord[0].didDocument + } + + return { + did: `${didMethod}:${key.did}`, + didDocument: didDocument, + } } - return body + } + } else { + if (!createDidOptions.endorserDid) { + throw new BadRequestError('Please provide the endorser DID or role') + } + const didCreateTxResult = await this.createEndorserDid(agent, createDidOptions.endorserDid) + return didCreateTxResult + } + } + + private async createEndorserDid(agent: AgentType, endorserDid: string) { + return agent.dids.create({ + method: 'indy', + options: { + endorserMode: 'external', + endorserDid: endorserDid || '', + }, + }) + } + + private async createIndicioKey(agent: AgentType, createDidOptions: DidCreate) { + if (!createDidOptions.seed) { + throw new BadRequestError('Seed is required') + } + // TODO: Remove comments afterwards + // const key = await agent.kms.createKey({ + // privateKey: TypedArrayEncoder.fromString(createDidOptions.seed), + // keyType: KeyAlgorithm.Ed25519, + // }) + + // const buffer = TypedArrayEncoder.fromBase58(key.publicKeyBase58) + // const did = TypedArrayEncoder.toBase58(buffer.slice(0, 16)) + + const _verificationKey = ( + await agent.kms.createKey({ + type: { + kty: 'OKP', + crv: 'Ed25519', + }, + }) + ).publicJwk + + const verificationKey = Kms.PublicJwk.fromPublicJwk(_verificationKey) as Kms.PublicJwk + + // Create a new key and calculate did according to the rules for indy did method + const buffer = Hasher.hash(verificationKey.publicKey.publicKey, 'sha-256') + + const did = TypedArrayEncoder.toBase58(buffer.slice(0, 16)) + + let body + if (createDidOptions.network === Network.Indicio_Testnet) { + body = { + network: 'testnet', + did, + verkey: TypedArrayEncoder.toBase58(buffer), + } + } else if (createDidOptions.network === Network.Indicio_Demonet) { + body = { + network: 'demonet', + did, + verkey: TypedArrayEncoder.toBase58(buffer), + } + } else { + throw new BadRequestError('Please provide a valid did method') + } + return body + } + + private async importDid(agent: AgentType, didMethod: string, did: string, seed: string) { + // TODO: Remove comments afterwards + // await agent.dids.import({ + // did: `${didMethod}:${did}`, + // overwrite: true, + // privateKeys: [ + // { + // keyType: KeyAlgorithm.Ed25519, + // privateKey: TypedArrayEncoder.fromString(seed), + // }, + // ], + // }) + + const { privateJwk } = transformSeedToPrivateJwk({ + type: { + crv: 'Ed25519', + kty: 'OKP', + }, + seed: TypedArrayEncoder.fromString(seed), + }) + + const key = await agent.kms.importKey({ privateJwk }) + + const publicJwk = Kms.PublicJwk.fromPublicJwk(key.publicJwk) + const completeDid = `${didMethod}:${did}` + await agent.dids.import({ + did: completeDid, + keys: [ + { + kmsKeyId: key.keyId, + didDocumentRelativeKeyId: verkey, + }, + ], + }) + } + public async handleKey(agent: AgentType, didOptions: DidCreate) { + let did + let didResponse + let didDocument + + if (!didOptions.keyType) { + throw new BadRequestError('keyType is required') + } + if (didOptions.keyType === KeyAlgorithm.Bls12381G2) { + throw new BadRequestError('didOptions.keyType for type "bls12381g2" has been deprecated') + } + if (didOptions.keyType === (p521 as KeyAlgorithm)) { + throw new BadRequestError('didOptions.keyType for type p521 is not supported') } - private async importDid(agent: AgentType, didMethod: string, did: string, seed: string) { - // TODO: Remove comments afterwards - // await agent.dids.import({ - // did: `${didMethod}:${did}`, - // overwrite: true, - // privateKeys: [ - // { - // keyType: KeyAlgorithm.Ed25519, - // privateKey: TypedArrayEncoder.fromString(seed), - // }, - // ], - // }) - - const { privateJwk } = transformSeedToPrivateJwk({ - type: { - crv: 'Ed25519', - kty: 'OKP', - }, - seed: TypedArrayEncoder.fromString(seed), - }) + const normalizedCurve = keyAlgorithmToCurve[didOptions.keyType as KeyAlgorithm] + if (!(normalizedCurve && supportedKeyTypesDID[DidMethod.Key]?.some((kt) => kt.crv === normalizedCurve))) { + throw new BadRequestError(`Invalid keyType: ${didOptions.keyType}`) + } - const key = await agent.kms.importKey({ privateJwk }) + if (!didOptions.did) { + if (didOptions.seed) { + this.agent.config.logger.info('Creating DID:key with provided seed') + const privateJwk = transformPrivateKeyToPrivateJwk({ + privateKey: TypedArrayEncoder.fromString(didOptions.seed), + type: getTypeFromCurve(didOptions.keyType ?? KeyAlgorithm.Ed25519), + }).privateJwk - const publicJwk = Kms.PublicJwk.fromPublicJwk(key.publicJwk) - const completeDid = `${didMethod}:${did}` - await agent.dids.import({ - did: completeDid, - keys: [ - { - kmsKeyId: key.keyId, - didDocumentRelativeKeyId: verkey, - - } - ] + const { keyId, publicJwk } = await agent.kms.importKey({ + privateJwk, }) - } - - public async handleKey(agent: AgentType, didOptions: DidCreate) { - let did - let didResponse - let didDocument - if (!didOptions.seed) { - throw new BadRequestError('Seed is required') - } - if (!didOptions.keyType) { - throw new BadRequestError('keyType is required') - } - if (didOptions.keyType === KeyAlgorithm.Bls12381G2) { - throw new BadRequestError('didOptions.keyType for type "bls12381g2" has been deprecated') - } - if (didOptions.keyType === p521 as KeyAlgorithm) { - throw new BadRequestError('didOptions.keyType for type p521 is not supported') - } - const normalizedCurve = keyAlgorithmToCurve[didOptions.keyType as KeyAlgorithm] - if (!(normalizedCurve && supportedKeyTypesDID[DidMethod.Key]?.some(kt => kt.crv === normalizedCurve))) { - throw new BadRequestError(`Invalid keyType: ${didOptions.keyType}`) - } + this.agent.config.logger.info(`This is keyId:::::: ${keyId}`) + const publicKey = Kms.PublicJwk.fromPublicJwk(publicJwk) + const didKey = new DidKey(publicKey) + didDocument = didKey.didDocument + did = didDocument.id - if (!didOptions.did) { - const privateJwk = transformPrivateKeyToPrivateJwk({ - privateKey: TypedArrayEncoder.fromString(didOptions.seed), - type: getTypeFromCurve(didOptions.keyType ?? KeyAlgorithm.Ed25519), - }).privateJwk - const { keyId } = await agent.kms.importKey({ - privateJwk, - }) - this.agent.config.logger.info(`This is keyId:::::: ${keyId}`) - const didResponse = await agent.dids.create({ - method: DidMethod.Key, - options: { - keyId, - }, - }) - this.agent.config.logger.info(`This is didResponse:::::: ${JSON.stringify(didResponse)}`) - - did = `${didResponse.didState.did}` - didDocument = didResponse.didState.didDocument - } else { - did = didOptions.did - const createdDid = await agent.dids.getCreatedDids({ - method: DidMethod.Key, - did: didOptions.did, - }) - didDocument = createdDid[0]?.didDocument - } + const verificationMethodId = didDocument.verificationMethod?.[0]?.id + const relativeKeyId = verificationMethodId?.split('#')[1] - this.agent.config.logger.info(`This is did ${did}` ) - this.agent.config.logger.info(`This is didDocument ${didDocument}` ) + this.agent.config.logger.info(`This is did:::::: ${did}`) + this.agent.config.logger.info(`This is verificationMethodId:::::: ${verificationMethodId}`) await agent.dids.import({ - did, - overwrite: true, - didDocument, + did, + didDocument, + overwrite: true, + keys: [ + { + didDocumentRelativeKeyId: `#${relativeKeyId}`, + kmsKeyId: keyId, + }, + ], }) - return { did: did, didDocument: didDocument } + } else { + this.agent.config.logger.info('Creating DID:key without seed') + const { keyId } = await agent.kms.createKey({ + type: getTypeFromCurve(didOptions.keyType ?? KeyAlgorithm.Ed25519), + }) + this.agent.config.logger.info(`This is did:::::: ${did}`) + const didCreateResult = await agent.dids.create({ + method: 'key', + options: { keyId }, + }) + didDocument = didCreateResult.didState.didDocument + did = didCreateResult.didState.did + } + } else { + did = didOptions.did + const createdDid = await agent.dids.getCreatedDids({ + method: DidMethod.Key, + did: didOptions.did, + }) + didDocument = createdDid[0]?.didDocument + + await agent.dids.import({ + did, + overwrite: true, + didDocument, + }) } - public async handleWeb(agent: AgentType, didOptions: DidCreate) { - let didDocument: DidDocument - if (!didOptions.domain) { - throw new BadRequestError('For create did:web, domain is required') - } + this.agent.config.logger.info(`This is did ${did}`) + this.agent.config.logger.info(`This is didDocument ${JSON.stringify(didDocument)}`) - if (!didOptions.seed) { - throw new BadRequestError('Seed is required') - } + return { did: did, didDocument: didDocument } + } - if (!didOptions.keyType) { - throw new BadRequestError('keyType is required') - } + public async handleWeb(agent: AgentType, didOptions: DidCreate) { + let didDocument: DidDocument + if (!didOptions.domain) { + throw new BadRequestError('For create did:web, domain is required') + } - if (didOptions.keyType !== KeyAlgorithm.Ed25519 && didOptions.keyType !== KeyAlgorithm.Bls12381G2) { - throw new BadRequestError('Only ed25519 and bls12381g2 key type supported') - } + if (!didOptions.seed) { + throw new BadRequestError('Seed is required') + } - const domain = didOptions.domain - const did = `did:${didOptions.method}:${domain}` - const keyId = `${did}#key-1` - - // TODO: Remove comments afterwards - // const key = await agent.kms.createKey({ - // keyType: didOptions.keyType, - // // Commenting for now, as per the multi-tenant endpoint - // // privateKey: TypedArrayEncoder.fromString(didOptions.seed), - // seed: TypedArrayEncoder.fromString(didOptions.seed), - // }) - - // const ed25519Key = await agent.kms.createKey({ - // type: { - // crv: 'Ed25519', - // kty: 'OKP', - // } - // }) - // const publicJwk = Kms.PublicJwk.fromPublicJwk(ed25519Key.publicJwk) - // const { privateJwk } = transformPrivateKeyToPrivateJwk({ - // type: { - // crv: 'Ed25519', - // kty: 'OKP', - // }, - // privateKey: TypedArrayEncoder.fromString(didOptions.seed), - // }) - - - - if (didOptions.keyType === KeyAlgorithm.Ed25519) { - const { privateJwk } = transformSeedToPrivateJwk({ - type: { - crv: 'Ed25519', - kty: 'OKP', - }, - seed: TypedArrayEncoder.fromString(didOptions.seed), - }) - - const key = await agent.kms.importKey({ privateJwk }) - - const publicJwk = Kms.PublicJwk.fromPublicJwk(key.publicJwk) - didDocument = new DidDocumentBuilder(did) - .addContext('https://w3id.org/security/suites/ed25519-2018/v1') - .addVerificationMethod(getEd25519VerificationKey2018({ id: keyId, controller: did, publicJwk })) - .addAuthentication(keyId) - .addAssertionMethod(keyId) - .build() - } else if (didOptions.keyType === KeyAlgorithm.Bls12381G2) { - // Support for BBS signature is discontinued from credo-ts version 0.6.0 - throw new BadRequestError(`Support for ${KeyAlgorithm.Bls12381G2} has been deprecated`) - } else { - throw new BadRequestError('Unsupported key type') // fallback, but this won't hit due to earlier check - } + if (!didOptions.keyType) { + throw new BadRequestError('keyType is required') + } - await agent.dids.import({ - did, - overwrite: true, - didDocument, - }) - return { did, didDocument } + if (didOptions.keyType !== KeyAlgorithm.Ed25519 && didOptions.keyType !== KeyAlgorithm.Bls12381G2) { + throw new BadRequestError('Only ed25519 and bls12381g2 key type supported') } - public async handlePolygon(agent: AgentType, createDidOptions: DidCreate) { - // need to discuss try catch logic - const { endpoint, network, privatekey } = createDidOptions + const domain = didOptions.domain + const did = `did:${didOptions.method}:${domain}` + const keyId = `${did}#key-1` + + // TODO: Remove comments afterwards + // const key = await agent.kms.createKey({ + // keyType: didOptions.keyType, + // // Commenting for now, as per the multi-tenant endpoint + // // privateKey: TypedArrayEncoder.fromString(didOptions.seed), + // seed: TypedArrayEncoder.fromString(didOptions.seed), + // }) + + // const ed25519Key = await agent.kms.createKey({ + // type: { + // crv: 'Ed25519', + // kty: 'OKP', + // } + // }) + // const publicJwk = Kms.PublicJwk.fromPublicJwk(ed25519Key.publicJwk) + // const { privateJwk } = transformPrivateKeyToPrivateJwk({ + // type: { + // crv: 'Ed25519', + // kty: 'OKP', + // }, + // privateKey: TypedArrayEncoder.fromString(didOptions.seed), + // }) + + if (didOptions.keyType === KeyAlgorithm.Ed25519) { + const { privateJwk } = transformSeedToPrivateJwk({ + type: { + crv: 'Ed25519', + kty: 'OKP', + }, + seed: TypedArrayEncoder.fromString(didOptions.seed), + }) + + const key = await agent.kms.importKey({ privateJwk }) + + const publicJwk = Kms.PublicJwk.fromPublicJwk(key.publicJwk) + didDocument = new DidDocumentBuilder(did) + .addContext('https://w3id.org/security/suites/ed25519-2018/v1') + .addVerificationMethod(getEd25519VerificationKey2018({ id: keyId, controller: did, publicJwk })) + .addAuthentication(keyId) + .addAssertionMethod(keyId) + .build() + } else if (didOptions.keyType === KeyAlgorithm.Bls12381G2) { + // Support for BBS signature is discontinued from credo-ts version 0.6.0 + throw new BadRequestError(`Support for ${KeyAlgorithm.Bls12381G2} has been deprecated`) + } else { + throw new BadRequestError('Unsupported key type') // fallback, but this won't hit due to earlier check + } - if (!network) { - throw new BadRequestError('Network is required for Polygon method') - } + await agent.dids.import({ + did, + overwrite: true, + didDocument, + }) + return { did, didDocument } + } - const networkName = network?.split(':')[1] + public async handlePolygon(agent: AgentType, createDidOptions: DidCreate) { + // need to discuss try catch logic + const { endpoint, network, privatekey } = createDidOptions - if (networkName !== 'mainnet' && networkName !== 'testnet') { - throw new BadRequestError('Invalid network type') - } - if (!privatekey || typeof privatekey !== 'string' || !privatekey.trim() || privatekey.length !== 64) { - throw new BadRequestError('Invalid private key or key not supported') - } + if (!network) { + throw new BadRequestError('Network is required for Polygon method') + } - const createDidResponse = await agent.dids.create({ - method: DidMethod.Polygon, - options: { - network: networkName, - endpoint, - }, - secret: { - privateKey: TypedArrayEncoder.fromHex(`${privatekey}`), - }, - }) - const didResponse = { - did: createDidResponse?.didState?.did, - didDocument: createDidResponse?.didState?.didDocument, - } - return didResponse + const networkName = network?.split(':')[1] + + if (networkName !== 'mainnet' && networkName !== 'testnet') { + throw new BadRequestError('Invalid network type') + } + if (!privatekey || typeof privatekey !== 'string' || !privatekey.trim() || privatekey.length !== 64) { + throw new BadRequestError('Invalid private key or key not supported') } - @Get('/') - public async getDids(@Request() request: Req) { - try { - const createdDids = await request.agent.dids.getCreatedDids() - return createdDids - } catch (error) { - throw ErrorHandlingService.handle(error) - } + const createDidResponse = await agent.dids.create({ + method: DidMethod.Polygon, + options: { + network: networkName, + endpoint, + }, + secret: { + privateKey: TypedArrayEncoder.fromHex(`${privatekey}`), + }, + }) + const didResponse = { + did: createDidResponse?.didState?.did, + didDocument: createDidResponse?.didState?.didDocument, + } + return didResponse + } + + @Get('/') + public async getDids(@Request() request: Req) { + try { + const createdDids = await request.agent.dids.getCreatedDids() + return createdDids + } catch (error) { + throw ErrorHandlingService.handle(error) } + } } diff --git a/src/controllers/openid4vc/types/issuer.types.ts b/src/controllers/openid4vc/types/issuer.types.ts index 8c07cead..a8f35491 100644 --- a/src/controllers/openid4vc/types/issuer.types.ts +++ b/src/controllers/openid4vc/types/issuer.types.ts @@ -16,7 +16,7 @@ export interface OpenId4VciOfferCredentials { method: SignerMethod did?: string x5c?: string[] - keyId: string + keyId?: string } } diff --git a/src/controllers/openid4vc/types/verifier.types.ts b/src/controllers/openid4vc/types/verifier.types.ts index 61ea0b95..e0ad7cd7 100644 --- a/src/controllers/openid4vc/types/verifier.types.ts +++ b/src/controllers/openid4vc/types/verifier.types.ts @@ -6,7 +6,7 @@ export enum ResponseModeEnum { DIRECT_POST = 'direct_post', DIRECT_POST_JWT = 'direct_post.jwt', DC_API = 'dc_api', - DC_API_JWT = 'dc_api.jwt' + DC_API_JWT = 'dc_api.jwt', } /* -------------------------------------------------------------------------- */ @@ -69,6 +69,7 @@ export type OpenId4VcIssuerX5c = { issuer?: string x5c: string[] alg?: string + keyId?: string } export interface CreateAuthorizationRequest { @@ -79,7 +80,7 @@ export interface CreateAuthorizationRequest { responseMode?: ResponseModeEnum requestSigner: OpenId4VcJwtIssuerDid | OpenId4VcIssuerX5c - expectedOrigins?: string [] + expectedOrigins?: string[] } /* -------------------------------------------------------------------------- */ @@ -97,6 +98,5 @@ export class OpenId4VcSiopCreateVerifierOptions { } export class OpenId4VcUpdateVerifierRecordOptions { - verifierId?: string clientMetadata?: OpenId4VcSiopVerifierClientMetadata } diff --git a/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts b/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts index b5cd628c..53834ded 100644 --- a/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts +++ b/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts @@ -23,8 +23,6 @@ import { injectable } from 'tsyringe' import { SignerMethod } from '../../../enums' import { CreateAuthorizationRequest, OpenId4VcIssuerX5c, ResponseModeEnum } from '../types/verifier.types' -// import { CreateAuthorizationRequest } from '../types/verifier.types' - @injectable() class VerificationSessionsService { public async createProofRequest(agentReq: Req, dto: CreateAuthorizationRequest) { @@ -62,10 +60,6 @@ class VerificationSessionsService { }) requestSigner.issuer = parsedCertificate.sanUriNames[0] } - - if (!requestSigner) { - } else if (requestSigner.method === 'did') { - } const options: any = { requestSigner, verifierId: dto.verifierId, @@ -77,11 +71,16 @@ class VerificationSessionsService { if (dto.responseMode) options.responseMode = dto.responseMode if (dto.presentationExchange) { - options.presentationExchange = dto.presentationExchange + // options.presentationExchange = dto.presentationExchange + throw new Error('Presentation Exchange is not supported for now') } else if (dto.dcql) { + const parsedCertificate = X509Service.parseCertificate(agentReq.agent.context, { + encodedCertificate: requestSigner.x5c[0], + }) + parsedCertificate.publicJwk.keyId = requestSigner.keyId + options.requestSigner.x5c = [parsedCertificate] options.dcql = dto.dcql } - return (await agentReq.agent.modules.openid4vc.verifier?.createAuthorizationRequest(options)) as any } catch (error) { throw error diff --git a/src/controllers/openid4vc/verifiers/verifier.Controller.ts b/src/controllers/openid4vc/verifiers/verifier.Controller.ts index 3dd6006e..4f081c6a 100644 --- a/src/controllers/openid4vc/verifiers/verifier.Controller.ts +++ b/src/controllers/openid4vc/verifiers/verifier.Controller.ts @@ -1,64 +1,67 @@ -// import { SCOPES } from '../../../enums' -// import { Body, Delete, Get, Path, Post, Put, Query, Route, Request, Security, Tags } from 'tsoa' -// import { Request as Req } from 'express' +import { Request as Req } from 'express' +import { Body, Delete, Get, Path, Post, Put, Query, Route, Request, Security, Tags } from 'tsoa' -// import { OpenId4VcSiopCreateVerifierOptions, OpenId4VcUpdateVerifierRecordOptions } from '../types/verifier.types' -// import { VerifierService } from '../verifiers/verifier.service' +import { SCOPES } from '../../../enums' +import { OpenId4VcSiopCreateVerifierOptions, OpenId4VcUpdateVerifierRecordOptions } from '../types/verifier.types' +import { VerifierService } from '../verifiers/verifier.service' -// @Tags('oid4vc verifiers') -// @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) -// @Route('openid4vc/verifier') -// export class VerifierController { -// private verifierService: VerifierService +@Tags('oid4vc verifiers') +@Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) +@Route('openid4vc/verifier') +export class VerifierController { + private verifierService: VerifierService -// public constructor() { -// this.verifierService = new VerifierService() -// } + public constructor() { + this.verifierService = new VerifierService() + } -// /** -// * Create a new verifier and store the verifier record -// */ -// @Post('/') -// public async createVerifier(@Request() request: Req, @Body() options: OpenId4VcSiopCreateVerifierOptions) { -// return await this.verifierService.createVerifier(request, options) -// } + /** + * Create a new verifier and store the verifier record + */ + @Post('/') + public async createVerifier(@Request() request: Req, @Body() options: OpenId4VcSiopCreateVerifierOptions) { + return await this.verifierService.createVerifier(request, options) + } -// /** -// * Update verifier metadata -// */ -// @Put('{publicVerifierId}') -// public async updateVerifierMetadata( -// @Request() request: Req, -// @Path('publicVerifierId') publicVerifierId: string, -// @Body() verifierRecordOptions: OpenId4VcUpdateVerifierRecordOptions, -// ) { -// return await this.verifierService.updateVerifierMetadata(request, { -// verifierId: publicVerifierId, -// clientMetadata: verifierRecordOptions.clientMetadata, -// }) -// } + /** + * Update verifier metadata + */ + @Put('{publicVerifierId}') + public async updateVerifierMetadata( + @Request() request: Req, + @Path('publicVerifierId') publicVerifierId: string, + @Body() verifierRecordOptions: OpenId4VcUpdateVerifierRecordOptions, + ) { + return await this.verifierService.updateVerifierMetadata(request, { + verifierId: publicVerifierId, + clientMetadata: verifierRecordOptions.clientMetadata, + }) + } -// /** -// * Get verifiers by query -// */ -// @Get('/') -// public async getVerifiersByQuery(@Request() request: Req, @Query() publicVerifierId?: string) { -// return await this.verifierService.getVerifiersByQuery(request, publicVerifierId) -// } + /** + * Get verifiers by query + */ + @Get('/') + public async getVerifiersByQuery(@Request() request: Req, @Query() publicVerifierId?: string) { + return await this.verifierService.getVerifiersByQuery(request, publicVerifierId) + } -// /** -// * Get single verifier by ID -// */ -// @Get('{publicVerifierId}') -// public async getVerifier(@Request() request: Req, @Path('publicVerifierId') publicVerifierId: string) { -// return await this.verifierService.getVerifier(request, publicVerifierId) -// } + /** + * Get single verifier by ID + */ + @Get('{publicVerifierId}') + public async getVerifier(@Request() request: Req, @Path('publicVerifierId') publicVerifierId: string) { + return await this.verifierService.getVerifier(request, publicVerifierId) + } -// /** -// * Delete verifier by ID -// */ -// @Delete('{verifierId}') -// public async deleteVerifier(@Request() request: Req, @Path('verifierId') verifierId: string): Promise { -// await this.verifierService.deleteVerifier(request, verifierId) -// } -// } + /** + * Delete verifier by ID + */ + @Delete('{verifierId}') + public async deleteVerifier( + @Request() request: Req, + @Path('verifierId') verifierId: string, + ): Promise<{ message: string }> { + return await this.verifierService.deleteVerifier(request, verifierId) + } +} diff --git a/src/controllers/openid4vc/verifiers/verifier.service.ts b/src/controllers/openid4vc/verifiers/verifier.service.ts index 9bb29c12..c8a83a20 100644 --- a/src/controllers/openid4vc/verifiers/verifier.service.ts +++ b/src/controllers/openid4vc/verifiers/verifier.service.ts @@ -1,57 +1,42 @@ -// import type { RestAgentModules, RestMultiTenantAgentModules } from '../../../../src/cliAgent' -// import type { Agent } from '@credo-ts/core' -// import type { OpenId4VcUpdateVerifierRecordOptions } from '@credo-ts/openid4vc' - -// import { OpenId4VcVerifierRepository } from '@credo-ts/openid4vc' -// import { OpenId4VcSiopCreateVerifierOptions } from '../types/verifier.types' -// import { Request as Req } from 'express' - -// export class VerifierService { -// public async createVerifier( -// agentReq: Req, -// options: OpenId4VcSiopCreateVerifierOptions, -// ) { -// const verifierRecord = await agentReq.agent.modules.openId4VcVerifier.createVerifier(options) -// return verifierRecord -// } - -// public async updateVerifierMetadata( -// agentReq: Req, -// options: OpenId4VcUpdateVerifierRecordOptions, -// ) { -// // console.log(`Updating verifier ${options.verifierId}`) - -// await agentReq.agent.modules.openId4VcVerifier.updateVerifierMetadata(options) -// const verifierRecord = await this.getVerifier(agentReq, options.verifierId) -// return verifierRecord -// } - -// public async getVerifiersByQuery( -// agentReq: Req, -// publicVerifierId?: string, -// ) { -// const verifierRepository = agentReq.agent.dependencyManager.resolve(OpenId4VcVerifierRepository) -// const verifiers = await verifierRepository.findByQuery(agentReq.agent.context, { -// verifierId: publicVerifierId, -// }) - -// return verifiers -// } - -// public async getVerifier( -// agentReq: Req, -// publicVerifierId: string, -// ) { -// return await agentReq.agent.modules.openId4VcVerifier.getVerifierByVerifierId(publicVerifierId) -// } - -// public async deleteVerifier( -// agentReq: Req, -// publicVerifierId: string, -// ) { -// const verifierRepository = agentReq.agent.dependencyManager.resolve(OpenId4VcVerifierRepository) -// await verifierRepository.deleteById(agentReq.agent.context, publicVerifierId) -// } -// } - -// export const issuerService = new VerifierService() +import type { RestAgentModules, RestMultiTenantAgentModules } from '../../../../src/cliAgent' +import type { OpenId4VcSiopCreateVerifierOptions } from '../types/verifier.types' +import type { Agent } from '@credo-ts/core' +import type { OpenId4VcUpdateVerifierRecordOptions } from '@credo-ts/openid4vc' +import type { Request as Req } from 'express' + +import { OpenId4VcVerifierRepository } from '@credo-ts/openid4vc' + +export class VerifierService { + public async createVerifier(agentReq: Req, options: OpenId4VcSiopCreateVerifierOptions) { + const verifierRecord = await agentReq.agent.modules.openid4vc.verifier.createVerifier(options) + return verifierRecord + } + + public async updateVerifierMetadata(agentReq: Req, options: OpenId4VcUpdateVerifierRecordOptions) { + await agentReq.agent.modules.openid4vc.verifier.updateVerifierMetadata(options) + const verifierRecord = await this.getVerifier(agentReq, options.verifierId) + return verifierRecord + } + + public async getVerifiersByQuery(agentReq: Req, publicVerifierId?: string) { + const verifierRepository = agentReq.agent.dependencyManager.resolve(OpenId4VcVerifierRepository) + const verifiers = await verifierRepository.findByQuery(agentReq.agent.context, { + verifierId: publicVerifierId, + }) + + return verifiers + } + + public async getVerifier(agentReq: Req, publicVerifierId: string) { + return await agentReq.agent.modules.openid4vc.verifier.getVerifierByVerifierId(publicVerifierId) + } + + public async deleteVerifier(agentReq: Req, publicVerifierId: string) { + const verifierRepository = agentReq.agent.dependencyManager.resolve(OpenId4VcVerifierRepository) + return await verifierRepository + .deleteById(agentReq.agent.context, publicVerifierId) + .then(() => ({ message: 'Record deleted successfully' })) + } +} + +export const verifierService = new VerifierService() diff --git a/src/utils/oid4vc-agent.ts b/src/utils/oid4vc-agent.ts index 9336b0b1..96df4e5f 100644 --- a/src/utils/oid4vc-agent.ts +++ b/src/utils/oid4vc-agent.ts @@ -200,6 +200,7 @@ export async function getTrustedCerts() { return data as string[] // return [ // 'MIICBzCCAbmgAwIBAgIRAMEUex+GR2GZKusP/izv/oswBQYDK2VwMCsxHDAaBgNVBAMTE0V4YW1wbGUgQ29ycG9yYXRpb24xCzAJBgNVBAYTAlVTMB4XDTI1MDEwMTAwMDAwMFoXDTI3MDEwMTAwMDAwMFowKzEcMBoGA1UEAxMTRXhhbXBsZSBDb3Jwb3JhdGlvbjELMAkGA1UEBhMCVVMwKjAFBgMrZXADIQC5RNVbJCX2L/z/PLbvaxLqi7+hA4fUUStWcmAo/qkX2aOB8TCB7jAdBgNVHQ4EFgQUkog6trQXXfsjb472jybLCBixSAMwDgYDVR0PAQH/BAQDAgGiMBUGA1UdJQEB/wQLMAkGByiBjF0FAQIwIgYDVR0jAQH/BBgwFoAUkog6trQXXfsjb472jybLCBixSAMwQAYDVR0SAQH/BDYwNIILZXhhbXBsZS5jb22GEmh0dHA6Ly9leGFtcGxlLmNvbYERYWRtaW5AZXhhbXBsZS5jb20wLAYDVR0RAQH/BCIwIIILZXhhbXBsZS5jb22BEWFkbWluQGV4YW1wbGUuY29tMBIGA1UdEwEB/wQIMAYBAf8CAQAwBQYDK2VwA0EAPjHj2keDv8BN3FGkOqG36VQKaYvb9Ena+1BI7hb+sBJ+QgBTlj1sK/+I7LMUfu/K3oCyZxT1CZpYRZkh7GEWAw==', + // 'MIICBjCCAbigAwIBAgIRAJyCTLRUEF9FQkk+ELnRLOgwBQYDK2VwMCsxHDAaBgNVBAMTE0V4YW1wbGUgQ29ycG9yYXRpb24xCzAJBgNVBAYTAlVTMB4XDTI1MDEwMTAwMDAwMFoXDTI3MDEwMTAwMDAwMFowKzEcMBoGA1UEAxMTRXhhbXBsZSBDb3Jwb3JhdGlvbjELMAkGA1UEBhMCVVMwKjAFBgMrZXADIQBeWlB8f20JOxam3yUOtVq0R3W7rWm1eRVDZY3u5xxnBaOB8DCB7TAdBgNVHQ4EFgQUcayusF1KIxnM+ynxIybo0bwGSY8wDgYDVR0PAQH/BAQDAgGiMBUGA1UdJQEB/wQLMAkGByiBjF0FAQIwIgYDVR0jAQH/BBgwFoAUcayusF1KIxnM+ynxIybo0bwGSY8wQQYDVR0SAQH/BDcwNYIJbG9jYWxob3N0hhVodHRwOi8vbG9jYWxob3N0OjQwMDGBEWFkbWluQGV4YW1wbGUuY29tMCoGA1UdEQEB/wQgMB6CCWxvY2FsaG9zdIERYWRtaW5AZXhhbXBsZS5jb20wEgYDVR0TAQH/BAgwBgEB/wIBADAFBgMrZXADQQCkB9fINZYClndo78TRY632qu937a0Jxo65UOR5kQ7EGDqzuf5ALxZ9Wcd0xgMYweC291WcachvfuyAmZ+BtC8B', // ] } catch (error) { // eslint-disable-next-line no-console From 368bf501a9f47170d69d24554315404085cea602 Mon Sep 17 00:00:00 2001 From: shitrerohit Date: Mon, 12 Jan 2026 17:22:11 +0530 Subject: [PATCH 27/38] fix: resolved code rabbit ai issues Signed-off-by: shitrerohit --- src/cliAgent.ts | 4 ---- .../holder/credentialBindingResolver.ts | 2 -- .../openid4vc/holder/holder.service.ts | 16 ++++------------ .../issuance-sessions.service.ts | 10 ++++++++-- .../openid4vc/issuers/issuer.service.ts | 10 ++++++---- .../verification-sessions.service.ts | 13 +++++++------ src/controllers/x509/x509.service.ts | 1 - 7 files changed, 25 insertions(+), 31 deletions(-) diff --git a/src/cliAgent.ts b/src/cliAgent.ts index 1a603e4f..fc9c6ba0 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -179,7 +179,6 @@ const getModules = ( new KeyDidResolver(), new WebDidResolver(), new JwkDidResolver(), - new KeyDidResolver(), // , new PolygonDidResolver() ], }), @@ -508,9 +507,6 @@ export async function runRestAgent(restConfig: AriesRestConfig) { }), ) transport.app.use(bodyParser.json({ limit: process.env.APP_JSON_BODY_SIZE ?? '5mb' })) - - // transport.app.use('/oid4vci', modules.openid4vc.issuer?.config.app.routes ?? express.Router()) - // transport.app.use('/oid4vp', modules.openid4vc.verifier?.config.app.routes ?? express.Router()) } } diff --git a/src/controllers/openid4vc/holder/credentialBindingResolver.ts b/src/controllers/openid4vc/holder/credentialBindingResolver.ts index 7f330e73..5727d8fd 100644 --- a/src/controllers/openid4vc/holder/credentialBindingResolver.ts +++ b/src/controllers/openid4vc/holder/credentialBindingResolver.ts @@ -2,10 +2,8 @@ import { DidJwk, DidKey, DidsApi, type JwkDidCreateOptions, type KeyDidCreateOpt import { type OpenId4VciCredentialBindingResolver, OpenId4VciCredentialFormatProfile } from '@credo-ts/openid4vc' export function getCredentialBindingResolver({ - pidSchemes, requestBatch, }: { - pidSchemes?: { sdJwtVcVcts: Array; msoMdocDoctypes: Array } requestBatch?: boolean | number }): OpenId4VciCredentialBindingResolver { return async ({ diff --git a/src/controllers/openid4vc/holder/holder.service.ts b/src/controllers/openid4vc/holder/holder.service.ts index 1d80b09d..6cb0236e 100644 --- a/src/controllers/openid4vc/holder/holder.service.ts +++ b/src/controllers/openid4vc/holder/holder.service.ts @@ -13,16 +13,7 @@ import type { } from '@credo-ts/openid4vc' import type { Request as Req } from 'express' -import { - DifPresentationExchangeService, - DidKey, - DidJwk, - Mdoc, - W3cJsonLdVerifiableCredential, - W3cJwtVerifiableCredential, - SdJwtVcRecord, - MdocRecord, -} from '@credo-ts/core' +import { Mdoc, SdJwtVcRecord, MdocRecord } from '@credo-ts/core' import { OpenId4VciAuthorizationFlow, authorizationCodeGrantIdentifier, @@ -196,7 +187,6 @@ export class HolderService { // return { method: 'jwk', jwk: getJwkFromKey(key) } // }, credentialBindingResolver: getCredentialBindingResolver({ - pidSchemes: undefined, requestBatch: false, }), ...tokenResponse, @@ -321,7 +311,9 @@ export class HolderService { credentials: dcqlCredentials as DcqlCredentialsForRequest, }, }) - return submissionResult.serverResponse + const result: any = submissionResult.serverResponse + result['authorizationResponsePayload'] = submissionResult.authorizationResponsePayload + return result } public async decodeSdJwt(agentReq: Req, body: { jwt: string }) { diff --git a/src/controllers/openid4vc/issuance-sessions/issuance-sessions.service.ts b/src/controllers/openid4vc/issuance-sessions/issuance-sessions.service.ts index 8dd7027b..1959379a 100644 --- a/src/controllers/openid4vc/issuance-sessions/issuance-sessions.service.ts +++ b/src/controllers/openid4vc/issuance-sessions/issuance-sessions.service.ts @@ -12,7 +12,9 @@ class IssuanceSessionsService { const { credentials, publicIssuerId } = options const issuer = await agentReq.agent.modules.openid4vc.issuer?.getIssuerByIssuerId(publicIssuerId) - + if (!issuer) { + throw new NotFoundError(`Issuer with id ${publicIssuerId} not found`) + } const mappedCredentials = credentials.map((cred) => { const supported = issuer?.credentialConfigurationsSupported[cred.credentialSupportedId] if (!supported) { @@ -74,7 +76,11 @@ class IssuanceSessionsService { } public async getIssuanceSessionsById(agentReq: Req, sessionId: string) { - return agentReq.agent.modules.openid4vc.issuer?.getIssuanceSessionById(sessionId) + const issuer = agentReq.agent.modules.openid4vc.issuer + if (!issuer) { + throw new Error('OID4VC issuer module not initialized') + } + return issuer.getIssuanceSessionById(sessionId) } public async getIssuanceSessionsByQuery( diff --git a/src/controllers/openid4vc/issuers/issuer.service.ts b/src/controllers/openid4vc/issuers/issuer.service.ts index b1f093de..254f90ca 100644 --- a/src/controllers/openid4vc/issuers/issuer.service.ts +++ b/src/controllers/openid4vc/issuers/issuer.service.ts @@ -10,10 +10,12 @@ export class IssuerService { agentReq: Req, createIssuerOptions: any, //TODO: Replace with OpenId4VciCreateIssuerOptions, ) { - const issuerRecord = await agentReq.agent.modules.openid4vc.issuer?.createIssuer(createIssuerOptions) - const issuerMetadata = await agentReq.agent.modules.openid4vc.issuer?.getIssuerMetadata( - issuerRecord?.issuerId ?? '', - ) + const issuer = agentReq.agent.modules.openid4vc.issuer + if (!issuer) { + throw new Error('OID4VC issuer module not initialized') + } + const issuerRecord = await issuer.createIssuer(createIssuerOptions) + const issuerMetadata = await issuer.getIssuerMetadata(issuerRecord?.issuerId ?? '') // eslint-disable-next-line no-console console.log(`\nIssuer URL: ${issuerMetadata?.credentialIssuer.credential_issuer}`) return issuerRecord diff --git a/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts b/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts index 53834ded..7d026fc9 100644 --- a/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts +++ b/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts @@ -65,7 +65,7 @@ class VerificationSessionsService { verifierId: dto.verifierId, } - if (dto.responseMode === ResponseModeEnum.DC_API || ResponseModeEnum.DC_API_JWT) { + if (dto.responseMode === ResponseModeEnum.DC_API || dto.responseMode === ResponseModeEnum.DC_API_JWT) { options.expectedOrigins = dto.expectedOrigins } @@ -109,11 +109,12 @@ class VerificationSessionsService { } public async getVerifiedAuthorizationResponse(request: Req, verificationSessionId: string) { - const verificationSession = - await request.agent.modules.openid4vc.verifier?.getVerificationSessionById(verificationSessionId) - const verified = await request.agent.modules.openid4vc.verifier?.getVerifiedAuthorizationResponse( - verificationSession!.id, - ) + const verifier = request.agent.modules.openid4vc.verifier + if (!verifier) { + throw new Error('OID4VC verifier module not initialized') + } + const verificationSession = await verifier.getVerificationSessionById(verificationSessionId) + const verified = await verifier.getVerifiedAuthorizationResponse(verificationSession!.id) const presentations = await Promise.all( (verified!.presentationExchange?.presentations ?? Object.values(verified!.dcql?.presentations ?? {})) diff --git a/src/controllers/x509/x509.service.ts b/src/controllers/x509/x509.service.ts index efad9ae8..82b7a4b8 100644 --- a/src/controllers/x509/x509.service.ts +++ b/src/controllers/x509/x509.service.ts @@ -14,7 +14,6 @@ import { type Agent, } from '@credo-ts/core' import { KeyAlgorithm } from '@openwallet-foundation/askar-nodejs' -import { error } from 'console' import { keyAlgorithmToCurve } from '../../utils/constant' import { generateSecretKey, getCertificateValidityForSystem, getTypeFromCurve } from '../../utils/helpers' From 20ca52ef2363d6c88b42bbfb337f05d740f5bea9 Mon Sep 17 00:00:00 2001 From: shitrerohit Date: Tue, 13 Jan 2026 18:14:14 +0530 Subject: [PATCH 28/38] fix: resolved code rabbit issues Signed-off-by: shitrerohit --- src/cliAgent.ts | 62 ++++---- src/controllers/did/DidController.ts | 13 +- .../openid4vc/holder/holder.service.ts | 14 -- .../issuance-sessions.Controller.ts | 6 +- .../openid4vc/types/issuer.types.ts | 7 +- .../verification-sessions.service.ts | 147 ++++++++++-------- .../verifiers/verifier.Controller.ts | 3 + .../openid4vc/verifiers/verifier.service.ts | 4 +- 8 files changed, 130 insertions(+), 126 deletions(-) diff --git a/src/cliAgent.ts b/src/cliAgent.ts index fc9c6ba0..85aa8e7a 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -446,41 +446,41 @@ export async function runRestAgent(restConfig: AriesRestConfig) { }, ] } + let modules + + if (afjConfig.tenancy) { + modules = await getWithTenantModules( + networkConfig, + didRegistryContractAddress || '', + fileServerToken || '', + fileServerUrl || '', + rpcUrl || '', + schemaManagerContractAddress || '', + autoAcceptConnections || true, + autoAcceptCredentials || DidCommAutoAcceptCredential.Always, + autoAcceptProofs || DidCommAutoAcceptProof.ContentApproved, + walletScheme || AskarMultiWalletDatabaseScheme.ProfilePerWallet, + walletConfig, + ) + } else { + modules = getModules( + networkConfig, + didRegistryContractAddress || '', + fileServerToken || '', + fileServerUrl || '', + rpcUrl || '', + schemaManagerContractAddress || '', + autoAcceptConnections || true, + autoAcceptCredentials || DidCommAutoAcceptCredential.Always, + autoAcceptProofs || DidCommAutoAcceptProof.ContentApproved, + walletScheme || AskarMultiWalletDatabaseScheme.ProfilePerWallet, + walletConfig, + ) + } - const tenantModule = await getWithTenantModules( - networkConfig, - didRegistryContractAddress || '', - fileServerToken || '', - fileServerUrl || '', - rpcUrl || '', - schemaManagerContractAddress || '', - autoAcceptConnections || true, - autoAcceptCredentials || DidCommAutoAcceptCredential.Always, - autoAcceptProofs || DidCommAutoAcceptProof.ContentApproved, - walletScheme || AskarMultiWalletDatabaseScheme.ProfilePerWallet, - walletConfig, - ) - const modules = getModules( - networkConfig, - didRegistryContractAddress || '', - fileServerToken || '', - fileServerUrl || '', - rpcUrl || '', - schemaManagerContractAddress || '', - autoAcceptConnections || true, - autoAcceptCredentials || DidCommAutoAcceptCredential.Always, - autoAcceptProofs || DidCommAutoAcceptProof.ContentApproved, - walletScheme || AskarMultiWalletDatabaseScheme.ProfilePerWallet, - walletConfig, - ) const agent = new Agent({ config: agentConfig, modules: { - ...(afjConfig.tenancy - ? { - ...tenantModule, - } - : {}), ...modules, }, dependencies: agentDependencies, diff --git a/src/controllers/did/DidController.ts b/src/controllers/did/DidController.ts index b13279a5..e035c691 100644 --- a/src/controllers/did/DidController.ts +++ b/src/controllers/did/DidController.ts @@ -166,7 +166,7 @@ export class DidController extends Controller { throw new BadRequestError('Only ed25519 key type supported') } - if (!Network.Bcovrin_Testnet && !Network.Indicio_Demonet && !Network.Indicio_Testnet) { + if (!Object.values(Network).includes(createDidOptions.network as Network)) { throw new BadRequestError(`Invalid network for 'indy' method: ${createDidOptions.network}`) } @@ -215,6 +215,9 @@ export class DidController extends Controller { didDocument: didDocument, } } else { + if (!process.env.BCOVRIN_REGISTER_URL) { + throw new InternalServerError('BCOVRIN_REGISTER_URL is not set in environment variables') + } const BCOVRIN_REGISTER_URL = process.env.BCOVRIN_REGISTER_URL as string const res = await axios.post(BCOVRIN_REGISTER_URL, { role: 'ENDORSER', @@ -286,6 +289,10 @@ export class DidController extends Controller { did: `${didMethod}:${key.did}`, didDocument: didDocument, } + } else { + throw new InternalServerError( + `Failed to register DID with Indicio: ${res.data.message || res.data.body || 'Unknown error'}`, + ) } } } else { @@ -494,8 +501,8 @@ export class DidController extends Controller { throw new BadRequestError('keyType is required') } - if (didOptions.keyType !== KeyAlgorithm.Ed25519 && didOptions.keyType !== KeyAlgorithm.Bls12381G2) { - throw new BadRequestError('Only ed25519 and bls12381g2 key type supported') + if (didOptions.keyType !== KeyAlgorithm.Ed25519) { + throw new BadRequestError('Only ed25519 key type supported') } const domain = didOptions.domain diff --git a/src/controllers/openid4vc/holder/holder.service.ts b/src/controllers/openid4vc/holder/holder.service.ts index 6cb0236e..2db89766 100644 --- a/src/controllers/openid4vc/holder/holder.service.ts +++ b/src/controllers/openid4vc/holder/holder.service.ts @@ -95,7 +95,6 @@ export class HolderService { options = { resolvedCredentialOffer, txCode: body.txCode, - code: body.authorizationCode, } as OpenId4VciPreAuthorizedTokenRequestOptions } else { options = { @@ -320,18 +319,5 @@ export class HolderService { const sdJwt = agentReq.agent.sdJwtVc.fromCompact(body.jwt) return sdJwt as any } - - public async getSelectedCredentialsForRequest( - dcqlQueryResult: DcqlQueryResult, - selectedCredentials: { [credentialQueryId: string]: string }, - ) { - if (!dcqlQueryResult.can_be_satisfied) { - throw new Error( - 'Cannot select the credentials for the dcql query presentation if the request cannot be satisfied', - ) - } - // TODO: Implement logic to select credentials based on selectedCredentials - return {} as any // Placeholder return to avoid errors - } } export const holderService = new HolderService() diff --git a/src/controllers/openid4vc/issuance-sessions/issuance-sessions.Controller.ts b/src/controllers/openid4vc/issuance-sessions/issuance-sessions.Controller.ts index 792e58b4..fd8d0ea1 100644 --- a/src/controllers/openid4vc/issuance-sessions/issuance-sessions.Controller.ts +++ b/src/controllers/openid4vc/issuance-sessions/issuance-sessions.Controller.ts @@ -37,7 +37,7 @@ export class IssuanceSessionsController extends Controller { /** * Get issuance details by issuance SessionId */ - @Get('/:issuanceSessionId') + @Get('{issuanceSessionId}') public async getIssuanceSessionsById(@Request() request: Req, @Path('issuanceSessionId') issuanceSessionId: string) { try { return await issuanceSessionService.getIssuanceSessionsById(request, issuanceSessionId) @@ -77,7 +77,7 @@ export class IssuanceSessionsController extends Controller { /** * Update issuance session metadata by session ID */ - @Put('/:issuanceSessionId') + @Put('{issuanceSessionId}') public async updateSessionById( @Request() request: Req, @Path('issuanceSessionId') issuanceSessionId: string, @@ -93,7 +93,7 @@ export class IssuanceSessionsController extends Controller { /** * Delete issuance session by session ID */ - @Delete('/:issuanceSessionId') + @Delete('{issuanceSessionId}') public async deleteIssuanceSessionById( @Request() request: Req, @Path('issuanceSessionId') issuanceSessionId: string, diff --git a/src/controllers/openid4vc/types/issuer.types.ts b/src/controllers/openid4vc/types/issuer.types.ts index a8f35491..d83ef093 100644 --- a/src/controllers/openid4vc/types/issuer.types.ts +++ b/src/controllers/openid4vc/types/issuer.types.ts @@ -20,9 +20,9 @@ export interface OpenId4VciOfferCredentials { } } -export interface DisclosureFrame { +export interface DisclosureFrameForOffer { _sd?: string[] - [claim: string]: DisclosureFrame | string[] | undefined + [claim: string]: DisclosureFrameForOffer | string[] | undefined } export interface OpenId4VciOfferSdJwtCredential extends OpenId4VciOfferCredentials { @@ -30,8 +30,7 @@ export interface OpenId4VciOfferSdJwtCredential extends OpenId4VciOfferCredentia vct?: string [key: string]: unknown } - // disclosureFrame?: Record> - disclosureFrame?: DisclosureFrame + disclosureFrame?: DisclosureFrameForOffer } export interface ValidityInfo { signed: Date diff --git a/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts b/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts index 7d026fc9..315e3aa3 100644 --- a/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts +++ b/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts @@ -26,65 +26,71 @@ import { CreateAuthorizationRequest, OpenId4VcIssuerX5c, ResponseModeEnum } from @injectable() class VerificationSessionsService { public async createProofRequest(agentReq: Req, dto: CreateAuthorizationRequest) { - try { - let requestSigner - if (dto.requestSigner.method === SignerMethod.Did) { - requestSigner = dto.requestSigner as OpenId4VcJwtIssuerDid - - const didToResolve = dto.requestSigner?.didUrl - if (!didToResolve) { - throw new Error('No DID provided to resolve (neither requestSigner.didUrl nor verifierDid present)') - } - - const didDocument = await agentReq.agent.dids.resolveDidDocument(didToResolve) - - let verifierDidUrl: string | undefined = undefined - if (didDocument.verificationMethod?.[0]?.id) { - verifierDidUrl = didDocument.verificationMethod[0].id - } - - if (!verifierDidUrl) { - throw new Error('No matching verification method found on verifier DID document') - } - - if (!requestSigner.didUrl || !String(requestSigner.didUrl).includes('#')) { - requestSigner.didUrl = verifierDidUrl - } - - requestSigner = { method: 'did', didUrl: verifierDidUrl } as any - } else { - requestSigner = dto.requestSigner as OpenId4VcIssuerX5c - - const parsedCertificate = X509Service.parseCertificate(agentReq.agent.context, { - encodedCertificate: requestSigner.x5c[0], - }) - requestSigner.issuer = parsedCertificate.sanUriNames[0] + const verifier = agentReq.agent.modules.openid4vc.verifier + if (!verifier) throw new Error('OID4VC verifier module not initialized') + + let requestSigner + if (dto.requestSigner.method === SignerMethod.Did) { + requestSigner = dto.requestSigner as OpenId4VcJwtIssuerDid + + const didToResolve = dto.requestSigner?.didUrl + if (!didToResolve) { + throw new Error('No DID provided to resolve (neither requestSigner.didUrl nor verifierDid present)') + } + + const didDocument = await agentReq.agent.dids.resolveDidDocument(didToResolve) + + let verifierDidUrl: string | undefined = undefined + if (didDocument.verificationMethod?.[0]?.id) { + verifierDidUrl = didDocument.verificationMethod[0].id } - const options: any = { - requestSigner, - verifierId: dto.verifierId, + + if (!verifierDidUrl) { + throw new Error('No matching verification method found on verifier DID document') } - if (dto.responseMode === ResponseModeEnum.DC_API || dto.responseMode === ResponseModeEnum.DC_API_JWT) { - options.expectedOrigins = dto.expectedOrigins + if (!requestSigner.didUrl || !String(requestSigner.didUrl).includes('#')) { + requestSigner.didUrl = verifierDidUrl } - if (dto.responseMode) options.responseMode = dto.responseMode - if (dto.presentationExchange) { - // options.presentationExchange = dto.presentationExchange - throw new Error('Presentation Exchange is not supported for now') - } else if (dto.dcql) { - const parsedCertificate = X509Service.parseCertificate(agentReq.agent.context, { - encodedCertificate: requestSigner.x5c[0], - }) - parsedCertificate.publicJwk.keyId = requestSigner.keyId - options.requestSigner.x5c = [parsedCertificate] - options.dcql = dto.dcql + requestSigner = { method: 'did', didUrl: verifierDidUrl } as any + } else { + requestSigner = dto.requestSigner as OpenId4VcIssuerX5c + + const parsedCertificate = X509Service.parseCertificate(agentReq.agent.context, { + encodedCertificate: requestSigner.x5c[0], + }) + requestSigner.issuer = parsedCertificate.sanUriNames[0] + } + const options: any = { + requestSigner, + verifierId: dto.verifierId, + } + + if (dto.responseMode === ResponseModeEnum.DC_API || dto.responseMode === ResponseModeEnum.DC_API_JWT) { + options.expectedOrigins = dto.expectedOrigins + } + + if (dto.responseMode) options.responseMode = dto.responseMode + if (dto.presentationExchange) { + // options.presentationExchange = dto.presentationExchange + throw new Error('Presentation Exchange is not supported for now') + } else if (dto.dcql) { + if ( + dto.requestSigner.method !== SignerMethod.X5c || + !Array.isArray((requestSigner as OpenId4VcIssuerX5c).x5c) || + !(requestSigner as OpenId4VcIssuerX5c).x5c[0] + ) { + throw new Error('dcql currently requires x5c requestSigner with a valid certificate chain') } - return (await agentReq.agent.modules.openid4vc.verifier?.createAuthorizationRequest(options)) as any - } catch (error) { - throw error + const parsedCertificate = X509Service.parseCertificate(agentReq.agent.context, { + encodedCertificate: requestSigner.x5c[0], + }) + parsedCertificate.publicJwk.keyId = requestSigner.keyId + options.requestSigner.x5c = [parsedCertificate] + options.dcql = dto.dcql } + return (await verifier.createAuthorizationRequest(options)) as any } public async findVerificationSessionsByQuery( @@ -105,7 +111,11 @@ class VerificationSessionsService { } public async getVerificationSessionsById(agentReq: Req, verificationSessionId: string) { - return await agentReq.agent.modules.openid4vc.verifier?.getVerificationSessionById(verificationSessionId) + const verifier = agentReq.agent.modules.openid4vc.verifier + if (!verifier) { + throw new Error('OID4VC verifier module not initialized') + } + return await verifier.getVerificationSessionById(verificationSessionId) } public async getVerifiedAuthorizationResponse(request: Req, verificationSessionId: string) { @@ -114,10 +124,15 @@ class VerificationSessionsService { throw new Error('OID4VC verifier module not initialized') } const verificationSession = await verifier.getVerificationSessionById(verificationSessionId) - const verified = await verifier.getVerifiedAuthorizationResponse(verificationSession!.id) - + if (!verificationSession) { + throw new Error(`Verification session with id ${verificationSessionId} not found`) + } + const verified = await verifier.getVerifiedAuthorizationResponse(verificationSession.id) + if (!verified) { + throw new Error(`No verified response found for verification session with id ${verificationSessionId}`) + } const presentations = await Promise.all( - (verified!.presentationExchange?.presentations ?? Object.values(verified!.dcql?.presentations ?? {})) + (verified.presentationExchange?.presentations ?? Object.values(verified.dcql?.presentations ?? {})) .flat() .map(async (presentation: any) => { if (presentation instanceof W3cJsonLdVerifiablePresentation) { @@ -159,13 +174,6 @@ class VerificationSessionsService { } } - // if ( - // presentation instanceof W3cV2JwtVerifiablePresentation || - // presentation instanceof W3cV2SdJwtVerifiablePresentation - // ) { - // throw new Error('W3C V2 presentations are not supported yet') - // } - return { pretty: { ...presentation, @@ -175,12 +183,13 @@ class VerificationSessionsService { } }) ?? [], ) - - const dcqlSubmission = verified!.dcql - ? Object.keys(verified!.dcql.presentations).map((key, index) => ({ - queryCredentialId: key, - presentationIndex: index, - })) + const dcqlSubmission = verified?.dcql + ? Object.entries(verified.dcql.presentations).flatMap(([queryCredentialId, presentations]) => + presentations.map((_, presentationIndex) => ({ + queryCredentialId, + presentationIndex, + })), + ) : undefined return { diff --git a/src/controllers/openid4vc/verifiers/verifier.Controller.ts b/src/controllers/openid4vc/verifiers/verifier.Controller.ts index 4f081c6a..c49aa84b 100644 --- a/src/controllers/openid4vc/verifiers/verifier.Controller.ts +++ b/src/controllers/openid4vc/verifiers/verifier.Controller.ts @@ -32,6 +32,9 @@ export class VerifierController { @Path('publicVerifierId') publicVerifierId: string, @Body() verifierRecordOptions: OpenId4VcUpdateVerifierRecordOptions, ) { + if (!publicVerifierId) { + throw new Error('verifierId is required to update verifier metadata') + } return await this.verifierService.updateVerifierMetadata(request, { verifierId: publicVerifierId, clientMetadata: verifierRecordOptions.clientMetadata, diff --git a/src/controllers/openid4vc/verifiers/verifier.service.ts b/src/controllers/openid4vc/verifiers/verifier.service.ts index c8a83a20..725de2c9 100644 --- a/src/controllers/openid4vc/verifiers/verifier.service.ts +++ b/src/controllers/openid4vc/verifiers/verifier.service.ts @@ -31,10 +31,10 @@ export class VerifierService { return await agentReq.agent.modules.openid4vc.verifier.getVerifierByVerifierId(publicVerifierId) } - public async deleteVerifier(agentReq: Req, publicVerifierId: string) { + public async deleteVerifier(agentReq: Req, verifierId: string) { const verifierRepository = agentReq.agent.dependencyManager.resolve(OpenId4VcVerifierRepository) return await verifierRepository - .deleteById(agentReq.agent.context, publicVerifierId) + .deleteById(agentReq.agent.context, verifierId) .then(() => ({ message: 'Record deleted successfully' })) } } From fe5cfa22de6990a23e27945f530c9248c783ccc8 Mon Sep 17 00:00:00 2001 From: shitrerohit Date: Wed, 14 Jan 2026 11:54:49 +0530 Subject: [PATCH 29/38] fix: added comment for image check in verification session Signed-off-by: shitrerohit --- .../openid4vc/verifier-sessions/verification-sessions.service.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts b/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts index 315e3aa3..f1811e24 100644 --- a/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts +++ b/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts @@ -161,6 +161,7 @@ class VerificationSessionsService { issuerSignedNamespaces: Object.entries(doc.issuerSignedNamespaces).map( ([nameSpace, nameSpacEntries]) => [ nameSpace, + // TODO: Address it later to check whether the received Uint8Array is an image or not. Object.entries(nameSpacEntries).map(([key, value]) => value instanceof Uint8Array ? [`base64:${key}`, `data:image/jpeg;base64,${TypedArrayEncoder.toBase64(value)}`] From ea7f3b23adaa133321cd313d5d29723a00163593 Mon Sep 17 00:00:00 2001 From: shitrerohit Date: Wed, 14 Jan 2026 13:46:48 +0530 Subject: [PATCH 30/38] fix/removed commented code Signed-off-by: shitrerohit --- src/cliAgent.ts | 21 ----- .../openid4vc/holder/holder.service.ts | 89 ------------------- .../openid4vc/types/issuer.types.ts | 1 - .../verification-sessions.Controller.ts | 14 +-- .../verification-sessions.service.ts | 4 +- .../openid4vc/verifiers/verifier.service.ts | 2 - src/controllers/x509/x509.Controller.ts | 1 + src/utils/oid4vc-agent.ts | 4 - 8 files changed, 10 insertions(+), 126 deletions(-) diff --git a/src/cliAgent.ts b/src/cliAgent.ts index 85aa8e7a..7c53b39a 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -270,27 +270,6 @@ const getModules = ( authorizationRequestExpirationInSeconds: Number(process.env.OID4VP_AUTH_REQUEST_PROOF_REQUEST_EXPIRY) || 3600, }, }), - // openId4VcVerifier: new OpenId4VcVerifierModule({ - // baseUrl: - // process.env.NODE_ENV === 'PROD' - // ? `https://${process.env.APP_URL}/oid4vp` - // : `${process.env.AGENT_HTTP_URL}/oid4vp`, - // app: openId4VpApp, - // authorizationRequestExpirationInSeconds: Number(process.env.OID4VP_AUTH_REQUEST_PROOF_REQUEST_EXPIRY) || 3600, - // }), - // openId4VcIssuer: new OpenId4VcIssuerModule({ - // baseUrl: - // process.env.NODE_ENV === 'PROD' - // ? `https://${process.env.APP_URL}/oid4vci` - // : `${process.env.AGENT_HTTP_URL}/oid4vci`, - // app: openId4VcApp, - // statefulCredentialOfferExpirationInSeconds: Number(process.env.OID4VCI_CRED_OFFER_EXPIRY) || 3600, - // accessTokenExpiresInSeconds: Number(process.env.OID4VCI_ACCESS_TOKEN_EXPIRY) || 3600, - // authorizationCodeExpiresInSeconds: Number(process.env.OID4VCI_AUTH_CODE_EXPIRY) || 3600, - // cNonceExpiresInSeconds: Number(process.env.OID4VCI_CNONCE_EXPIRY) || 3600, - // dpopRequired: false, - // credentialRequestToCredentialMapper: (...args) => getCredentialRequestToCredentialMapper()(...args), - // }), openId4VcHolderModule: new OpenId4VcHolderModule(), x509: new X509Module({ getTrustedCertificatesForVerification: async (_agentContext, { certificateChain, verification }) => { diff --git a/src/controllers/openid4vc/holder/holder.service.ts b/src/controllers/openid4vc/holder/holder.service.ts index 2db89766..4d75e7b2 100644 --- a/src/controllers/openid4vc/holder/holder.service.ts +++ b/src/controllers/openid4vc/holder/holder.service.ts @@ -107,55 +107,7 @@ export class HolderService { } return (await this.requestAndStoreCredentials(agentReq, resolvedCredentialOffer, options)) as any - // return {} as any } - // private async requestAndStoreCredentials( - // // agentReq: Req, - // // resolvedCredentialOffer: OpenId4VciResolvedCredentialOffer, - // // options: OpenId4VciTokenRequestOptions, - // // ) { - // // const tokenResponse = await agentReq.agent.modules.openId4VcHolderModule.requestToken({ ...options }) - // // const credentialResponse = await agentReq.agent.modules.openId4VcHolderModule.requestCredentials({ - // // ...options, - // // credentialConfigurationIds: resolvedCredentialOffer.credentialOfferPayload.credential_configuration_ids, - // // credentialBindingResolver: async ({ - // // keyTypes, - // // supportedDidMethods, - // // supportsAllDidMethods, - // // }: { - // // keyTypes: string[] - // // supportedDidMethods?: string[] - // // supportsAllDidMethods?: boolean - // // }) => { - // // const key = await agentReq.agent.wallet.createKey({ keyType: keyTypes[0] as any }) - // // if (supportsAllDidMethods || supportedDidMethods?.includes('did:key')) { - // // const didKey = new DidKey(key) - // // return { method: 'did', didUrl: `${didKey.did}#${didKey.key.fingerprint}` } - // // } - // // if (supportedDidMethods?.includes('did:jwk')) { - // // const didJwk = DidJwk.fromJwk(getJwkFromKey(key)) - // // return { method: 'did', didUrl: `${didJwk.did}#0` } - // // } - // // return { method: 'jwk', jwk: getJwkFromKey(key) } - // // }, - // // ...tokenResponse, - // // }) - - // // const storedCredentials = await Promise.all( - // // credentialResponse.credentials.map(async (response: any) => { - // // const credential = response.credentials[0] - // // if (credential instanceof W3cJwtVerifiableCredential || credential instanceof W3cJsonLdVerifiableCredential) { - // // return await agentReq.agent.w3cCredentials.storeCredential({ credential }) - // // } - // // if (credential instanceof Mdoc) { - // // return await agentReq.agent.mdoc.store(credential) - // // } - // // return await agentReq.agent.sdJwtVc.store(credential.compact) - // // }), - // // ) - - // // return storedCredentials as any - // // } private async requestAndStoreCredentials( agentReq: Req, resolvedCredentialOffer: OpenId4VciResolvedCredentialOffer, @@ -165,52 +117,11 @@ export class HolderService { const credentialResponse = await agentReq.agent.modules.openid4vc.holder.requestCredentials({ ...options, credentialConfigurationIds: resolvedCredentialOffer.credentialOfferPayload.credential_configuration_ids, - // credentialBindingResolver: async ({ - // keyTypes, - // supportedDidMethods, - // supportsAllDidMethods, - // }: { - // keyTypes: string[] - // supportedDidMethods?: string[] - // supportsAllDidMethods?: boolean - // }) => { - // const key = await agentReq.agent.wallet.createKey({ keyType: keyTypes[0] as any }) - // if (supportsAllDidMethods || supportedDidMethods?.includes('did:key')) { - // const didKey = new DidKey(key) - // return { method: 'did', didUrl: `${didKey.did}#${didKey.key.fingerprint}` } - // } - // if (supportedDidMethods?.includes('did:jwk')) { - // const didJwk = DidJwk.fromJwk(getJwkFromKey(key)) - // return { method: 'did', didUrl: `${didJwk.did}#0` } - // } - // return { method: 'jwk', jwk: getJwkFromKey(key) } - // }, credentialBindingResolver: getCredentialBindingResolver({ requestBatch: false, }), ...tokenResponse, }) - // const credentialResponse = await agentReq.agent.modules.openid4vc.holder.requestCredentials({ - // ...options, - // credentialConfigurationIds: resolvedCredentialOffer.credentialOfferPayload.credential_configuration_ids, - // credentialBindingResolver: async (options) => { - // const { keyId, publicJwk } = await agentReq.agent.kms.createKey({ - // type: { - // crv: 'Ed25519', - // kty: 'OKP', - // }, - // }) - // if (options.supportsAllDidMethods || options.supportedDidMethods?.includes('did:key')) { - // const didKey = new DidKey(key) - // return { method: 'did', didUrls: [`${didKey.did}#${didKey.key.fingerprint}`] } - // } - // if (options.supportedDidMethods?.includes('did:jwk')) { - // const didJwk = DidJwk.fromKey(key) - // return { method: 'did', didUrls: [`${didJwk.did}#0`] } - // } - // return { method: 'jwk', jwk: key } - // }, - // }) const storedCredentials = await Promise.all( credentialResponse.credentials.map(async (response) => { diff --git a/src/controllers/openid4vc/types/issuer.types.ts b/src/controllers/openid4vc/types/issuer.types.ts index d83ef093..897dfca6 100644 --- a/src/controllers/openid4vc/types/issuer.types.ts +++ b/src/controllers/openid4vc/types/issuer.types.ts @@ -55,7 +55,6 @@ export interface OpenId4VciOfferW3cCredential extends OpenId4VciOfferCredentials } export interface OpenId4VcIssuanceSessionsCreateOffer { - //extends OpenId4VciCreateCredentialOfferOptions { publicIssuerId: string credentials: Array authorizationCodeFlowConfig?: { diff --git a/src/controllers/openid4vc/verifier-sessions/verification-sessions.Controller.ts b/src/controllers/openid4vc/verifier-sessions/verification-sessions.Controller.ts index 603cd542..d6274acf 100644 --- a/src/controllers/openid4vc/verifier-sessions/verification-sessions.Controller.ts +++ b/src/controllers/openid4vc/verifier-sessions/verification-sessions.Controller.ts @@ -8,13 +8,16 @@ import { SCOPES } from '../../../enums' import ErrorHandlingService from '../../../errorHandlingService' import { CreateAuthorizationRequest } from '../types/verifier.types' -import { verificationSessionService } from './verification-sessions.service' +import { VerificationSessionsService } from './verification-sessions.service' @Tags('oid4vc verification sessions') @Route('/openid4vc/verification-sessions') @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) @injectable() export class VerificationSessionsController extends Controller { + public constructor(private verificationSessionService: VerificationSessionsService) { + super() + } /** * Create an authorization request, acting as a Relying Party (RP) */ @@ -24,7 +27,7 @@ export class VerificationSessionsController extends Controller { @Body() createAuthorizationRequest: CreateAuthorizationRequest, ) { try { - return await verificationSessionService.createProofRequest(request, createAuthorizationRequest) + return await this.verificationSessionService.createProofRequest(request, createAuthorizationRequest) } catch (error) { throw ErrorHandlingService.handle(error) } @@ -43,7 +46,7 @@ export class VerificationSessionsController extends Controller { @Query('nonce') nonce?: string, ) { try { - return await verificationSessionService.findVerificationSessionsByQuery( + return await this.verificationSessionService.findVerificationSessionsByQuery( request, publicVerifierId, payloadState, @@ -65,12 +68,11 @@ export class VerificationSessionsController extends Controller { @Path('verificationSessionId') verificationSessionId: string, ) { try { - return await verificationSessionService.getVerificationSessionsById(request, verificationSessionId) + return await this.verificationSessionService.getVerificationSessionsById(request, verificationSessionId) } catch (error) { throw ErrorHandlingService.handle(error) } } - // TODO: Uncomment when the method is implemented: There was a problem resolving type of 'IDTokenPayload'. // /** // * Get verification response by verification Session ID // */ @@ -80,7 +82,7 @@ export class VerificationSessionsController extends Controller { @Path('verificationSessionId') verificationSessionId: string, ) { try { - return await verificationSessionService.getVerifiedAuthorizationResponse(request, verificationSessionId) + return await this.verificationSessionService.getVerifiedAuthorizationResponse(request, verificationSessionId) } catch (error) { throw ErrorHandlingService.handle(error) } diff --git a/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts b/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts index f1811e24..8b013983 100644 --- a/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts +++ b/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts @@ -24,7 +24,7 @@ import { SignerMethod } from '../../../enums' import { CreateAuthorizationRequest, OpenId4VcIssuerX5c, ResponseModeEnum } from '../types/verifier.types' @injectable() -class VerificationSessionsService { +export class VerificationSessionsService { public async createProofRequest(agentReq: Req, dto: CreateAuthorizationRequest) { const verifier = agentReq.agent.modules.openid4vc.verifier if (!verifier) throw new Error('OID4VC verifier module not initialized') @@ -212,5 +212,3 @@ class VerificationSessionsService { } as any } } - -export const verificationSessionService = new VerificationSessionsService() diff --git a/src/controllers/openid4vc/verifiers/verifier.service.ts b/src/controllers/openid4vc/verifiers/verifier.service.ts index 725de2c9..5d9fd510 100644 --- a/src/controllers/openid4vc/verifiers/verifier.service.ts +++ b/src/controllers/openid4vc/verifiers/verifier.service.ts @@ -38,5 +38,3 @@ export class VerifierService { .then(() => ({ message: 'Record deleted successfully' })) } } - -export const verifierService = new VerifierService() diff --git a/src/controllers/x509/x509.Controller.ts b/src/controllers/x509/x509.Controller.ts index 61a412eb..cc4725e4 100644 --- a/src/controllers/x509/x509.Controller.ts +++ b/src/controllers/x509/x509.Controller.ts @@ -5,6 +5,7 @@ import { Body, Controller, Post, Route, Tags, Security, Request, Get } from 'tso import { SCOPES } from '../../enums' import ErrorHandlingService from '../../errorHandlingService' import { X509ImportCertificateOptionsDto } from '../types' + import { x509ServiceT } from './x509.service' import { X509CreateCertificateOptionsDto } from './x509.types' diff --git a/src/utils/oid4vc-agent.ts b/src/utils/oid4vc-agent.ts index 96df4e5f..f9a8053d 100644 --- a/src/utils/oid4vc-agent.ts +++ b/src/utils/oid4vc-agent.ts @@ -198,10 +198,6 @@ export async function getTrustedCerts() { } const data = await response.json() return data as string[] - // return [ - // 'MIICBzCCAbmgAwIBAgIRAMEUex+GR2GZKusP/izv/oswBQYDK2VwMCsxHDAaBgNVBAMTE0V4YW1wbGUgQ29ycG9yYXRpb24xCzAJBgNVBAYTAlVTMB4XDTI1MDEwMTAwMDAwMFoXDTI3MDEwMTAwMDAwMFowKzEcMBoGA1UEAxMTRXhhbXBsZSBDb3Jwb3JhdGlvbjELMAkGA1UEBhMCVVMwKjAFBgMrZXADIQC5RNVbJCX2L/z/PLbvaxLqi7+hA4fUUStWcmAo/qkX2aOB8TCB7jAdBgNVHQ4EFgQUkog6trQXXfsjb472jybLCBixSAMwDgYDVR0PAQH/BAQDAgGiMBUGA1UdJQEB/wQLMAkGByiBjF0FAQIwIgYDVR0jAQH/BBgwFoAUkog6trQXXfsjb472jybLCBixSAMwQAYDVR0SAQH/BDYwNIILZXhhbXBsZS5jb22GEmh0dHA6Ly9leGFtcGxlLmNvbYERYWRtaW5AZXhhbXBsZS5jb20wLAYDVR0RAQH/BCIwIIILZXhhbXBsZS5jb22BEWFkbWluQGV4YW1wbGUuY29tMBIGA1UdEwEB/wQIMAYBAf8CAQAwBQYDK2VwA0EAPjHj2keDv8BN3FGkOqG36VQKaYvb9Ena+1BI7hb+sBJ+QgBTlj1sK/+I7LMUfu/K3oCyZxT1CZpYRZkh7GEWAw==', - // 'MIICBjCCAbigAwIBAgIRAJyCTLRUEF9FQkk+ELnRLOgwBQYDK2VwMCsxHDAaBgNVBAMTE0V4YW1wbGUgQ29ycG9yYXRpb24xCzAJBgNVBAYTAlVTMB4XDTI1MDEwMTAwMDAwMFoXDTI3MDEwMTAwMDAwMFowKzEcMBoGA1UEAxMTRXhhbXBsZSBDb3Jwb3JhdGlvbjELMAkGA1UEBhMCVVMwKjAFBgMrZXADIQBeWlB8f20JOxam3yUOtVq0R3W7rWm1eRVDZY3u5xxnBaOB8DCB7TAdBgNVHQ4EFgQUcayusF1KIxnM+ynxIybo0bwGSY8wDgYDVR0PAQH/BAQDAgGiMBUGA1UdJQEB/wQLMAkGByiBjF0FAQIwIgYDVR0jAQH/BBgwFoAUcayusF1KIxnM+ynxIybo0bwGSY8wQQYDVR0SAQH/BDcwNYIJbG9jYWxob3N0hhVodHRwOi8vbG9jYWxob3N0OjQwMDGBEWFkbWluQGV4YW1wbGUuY29tMCoGA1UdEQEB/wQgMB6CCWxvY2FsaG9zdIERYWRtaW5AZXhhbXBsZS5jb20wEgYDVR0TAQH/BAgwBgEB/wIBADAFBgMrZXADQQCkB9fINZYClndo78TRY632qu937a0Jxo65UOR5kQ7EGDqzuf5ALxZ9Wcd0xgMYweC291WcachvfuyAmZ+BtC8B', - // ] } catch (error) { // eslint-disable-next-line no-console console.error('Error fetching data:', error) From 34cab32058c36ada591045f346b0c0a701fb56a4 Mon Sep 17 00:00:00 2001 From: shitrerohit Date: Tue, 27 Jan 2026 11:18:53 +0530 Subject: [PATCH 31/38] fix:resolved sd-jwt issuance related issues Signed-off-by: shitrerohit --- src/controllers/x509/crypto-util.ts | 4 +++- src/controllers/x509/x509.service.ts | 6 +++--- src/utils/oid4vc-agent.ts | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/controllers/x509/crypto-util.ts b/src/controllers/x509/crypto-util.ts index 32e92046..ed675a0a 100644 --- a/src/controllers/x509/crypto-util.ts +++ b/src/controllers/x509/crypto-util.ts @@ -1,4 +1,6 @@ -import { createPrivateKey, KeyObject } from 'crypto' +import type { KeyObject } from 'crypto' + +import { createPrivateKey } from 'crypto' /** * Extracts the raw private key (hex) from a PEM-encoded EC (P-256) private key. diff --git a/src/controllers/x509/x509.service.ts b/src/controllers/x509/x509.service.ts index 82b7a4b8..36f9ffe5 100644 --- a/src/controllers/x509/x509.service.ts +++ b/src/controllers/x509/x509.service.ts @@ -143,7 +143,7 @@ class x509Service { encodedCertificate: options.certificate, }) const issuerCertificate = parsedCertificate.toString('base64') - + let key try { const keyTypeInfo = getTypeFromCurve(options.keyType) const { privateJwk } = transformPrivateKeyToPrivateJwk({ @@ -151,7 +151,7 @@ class x509Service { privateKey, }) - const key = await agent.kms.importKey({ + key = await agent.kms.importKey({ privateJwk, }) if ( @@ -174,7 +174,7 @@ class x509Service { } } - return { issuerCertificate } + return { issuerCertificate, keyId: key?.keyId } } public addTrustedCertificate( diff --git a/src/utils/oid4vc-agent.ts b/src/utils/oid4vc-agent.ts index f9a8053d..b0b97982 100644 --- a/src/utils/oid4vc-agent.ts +++ b/src/utils/oid4vc-agent.ts @@ -168,6 +168,7 @@ export function getMixedCredentialRequestToCredentialMapper(): OpenId4VciCredent } : { method: 'x5c', + // x5c: (issuerx509certificate ?? []).map((cert) => X509Certificate.fromEncodedCertificate(cert)), x5c: [parsedCertificate], // TODO: Need to check validation for issuer value // issuer: process.env.AGENT_HOST ?? 'http://localhost:4001', From 9e0c531270713a1cda767b58dbffcca5c41ca7e1 Mon Sep 17 00:00:00 2001 From: shitrerohit Date: Tue, 27 Jan 2026 13:11:34 +0530 Subject: [PATCH 32/38] fix:Removed commented code Signed-off-by: shitrerohit --- src/utils/oid4vc-agent.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/utils/oid4vc-agent.ts b/src/utils/oid4vc-agent.ts index b0b97982..f9a8053d 100644 --- a/src/utils/oid4vc-agent.ts +++ b/src/utils/oid4vc-agent.ts @@ -168,7 +168,6 @@ export function getMixedCredentialRequestToCredentialMapper(): OpenId4VciCredent } : { method: 'x5c', - // x5c: (issuerx509certificate ?? []).map((cert) => X509Certificate.fromEncodedCertificate(cert)), x5c: [parsedCertificate], // TODO: Need to check validation for issuer value // issuer: process.env.AGENT_HOST ?? 'http://localhost:4001', From 17865980285e12913ffecf74c32a8e6534eebfa8 Mon Sep 17 00:00:00 2001 From: shitrerohit Date: Wed, 28 Jan 2026 18:33:10 +0530 Subject: [PATCH 33/38] fix:changes in create proof request Signed-off-by: shitrerohit --- .../verification-sessions.service.ts | 21 +++++++------------ 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts b/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts index 8b013983..395cd31d 100644 --- a/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts +++ b/src/controllers/openid4vc/verifier-sessions/verification-sessions.service.ts @@ -30,6 +30,7 @@ export class VerificationSessionsService { if (!verifier) throw new Error('OID4VC verifier module not initialized') let requestSigner + let parsedCertificate if (dto.requestSigner.method === SignerMethod.Did) { requestSigner = dto.requestSigner as OpenId4VcJwtIssuerDid @@ -57,7 +58,7 @@ export class VerificationSessionsService { } else { requestSigner = dto.requestSigner as OpenId4VcIssuerX5c - const parsedCertificate = X509Service.parseCertificate(agentReq.agent.context, { + parsedCertificate = X509Service.parseCertificate(agentReq.agent.context, { encodedCertificate: requestSigner.x5c[0], }) requestSigner.issuer = parsedCertificate.sanUriNames[0] @@ -75,21 +76,13 @@ export class VerificationSessionsService { if (dto.presentationExchange) { // options.presentationExchange = dto.presentationExchange throw new Error('Presentation Exchange is not supported for now') - } else if (dto.dcql) { - if ( - dto.requestSigner.method !== SignerMethod.X5c || - !Array.isArray((requestSigner as OpenId4VcIssuerX5c).x5c) || - !(requestSigner as OpenId4VcIssuerX5c).x5c[0] - ) { - throw new Error('dcql currently requires x5c requestSigner with a valid certificate chain') - } - const parsedCertificate = X509Service.parseCertificate(agentReq.agent.context, { - encodedCertificate: requestSigner.x5c[0], - }) + } + if (parsedCertificate) { parsedCertificate.publicJwk.keyId = requestSigner.keyId - options.requestSigner.x5c = [parsedCertificate] - options.dcql = dto.dcql } + options.requestSigner.x5c = [parsedCertificate] + options.dcql = dto.dcql + // } return (await verifier.createAuthorizationRequest(options)) as any } From f194bb34b1a229ac5da878bc93f8d6f008642d77 Mon Sep 17 00:00:00 2001 From: shitrerohit Date: Sat, 31 Jan 2026 15:28:38 +0530 Subject: [PATCH 34/38] feat:API for delete credential Signed-off-by: shitrerohit --- .../openid4vc/holder/holder.Controller.ts | 9 +++++++- .../openid4vc/holder/holder.service.ts | 21 +++++++++++++++++++ .../openid4vc/types/holder.types.ts | 10 +++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/src/controllers/openid4vc/holder/holder.Controller.ts b/src/controllers/openid4vc/holder/holder.Controller.ts index 8e976112..9ed076b4 100644 --- a/src/controllers/openid4vc/holder/holder.Controller.ts +++ b/src/controllers/openid4vc/holder/holder.Controller.ts @@ -1,10 +1,12 @@ import { Request as Req } from 'express' -import { Body, Controller, Get, Post, Route, Security, Tags, Request } from 'tsoa' +import { Body, Controller, Get, Post, Route, Security, Tags, Request, Delete } from 'tsoa' import { injectable } from 'tsyringe' import { SCOPES } from '../../../enums/enum' import { AuthorizeRequestCredentialOffer, + CredentialType, + DeleteCredentialBody, RequestCredentialBody, ResolveCredentialOfferBody, ResolveProofRequest, @@ -94,4 +96,9 @@ export class HolderController extends Controller { public async decodeSdJwt(@Request() request: Req, @Body() body: { jwt: string }) { return await holderService.decodeSdJwt(request, body) } + + @Delete('credential') + public async delete(@Request() agentReq: Req, @Body() body: DeleteCredentialBody) { + return await holderService.deleteCredential(agentReq, body) + } } diff --git a/src/controllers/openid4vc/holder/holder.service.ts b/src/controllers/openid4vc/holder/holder.service.ts index 4d75e7b2..87aabb3f 100644 --- a/src/controllers/openid4vc/holder/holder.service.ts +++ b/src/controllers/openid4vc/holder/holder.service.ts @@ -1,5 +1,6 @@ import type { AuthorizeRequestCredentialOffer, + DeleteCredentialBody, RequestCredentialBody, ResolveCredentialOfferBody, ResolveProofRequest, @@ -20,6 +21,8 @@ import { preAuthorizedCodeGrantIdentifier, } from '@credo-ts/openid4vc' +import { CredentialType } from '../types/holder.types' + import { getCredentialBindingResolver } from './credentialBindingResolver' export class HolderService { private HOLDER_REDIRECT = process.env.HOLDER_REDIRECT ?? 'http://localhost:4001/redirect' @@ -226,6 +229,24 @@ export class HolderService { return result } + public async deleteCredential(agentReq: Req, { credentialId, credentialType }: DeleteCredentialBody) { + if (credentialType === CredentialType.SD_JWT) { + const sdJwtRecord = await agentReq.agent.sdJwtVc.getById(credentialId) + if (sdJwtRecord) { + return await agentReq.agent.sdJwtVc.deleteById(credentialId) + } + throw new Error(`Credential with id ${credentialId} not found`) + } else if (credentialType === CredentialType.MSO_MDOC) { + const mdocRecord = await agentReq.agent.mdoc.getById(credentialId) + if (mdocRecord) { + return await agentReq.agent.mdoc.deleteById(credentialId) + } + throw new Error(`Credential with id ${credentialId} not found`) + } else { + throw new Error(`Unsupported credential type: ${credentialType}`) + } + } + public async decodeSdJwt(agentReq: Req, body: { jwt: string }) { const sdJwt = agentReq.agent.sdJwtVc.fromCompact(body.jwt) return sdJwt as any diff --git a/src/controllers/openid4vc/types/holder.types.ts b/src/controllers/openid4vc/types/holder.types.ts index 550e7572..acda4b2c 100644 --- a/src/controllers/openid4vc/types/holder.types.ts +++ b/src/controllers/openid4vc/types/holder.types.ts @@ -23,3 +23,13 @@ export interface AcceptProofRequest { proofRequestUri: string // selectedCredentials?: { [inputDescriptorId: string]: string } } + +export interface DeleteCredentialBody { + credentialType: CredentialType + credentialId: string +} + +export enum CredentialType { + SD_JWT = 'sd-jwt-vc', + MSO_MDOC = 'mso_mdoc', +} From 34d858661acb996e61e590e95c15d303eeb685a3 Mon Sep 17 00:00:00 2001 From: shitrerohit Date: Sat, 31 Jan 2026 19:20:52 +0530 Subject: [PATCH 35/38] node verison changes Signed-off-by: shitrerohit --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 782ed195..e335d316 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Stage 1: Builder stage -FROM node:18.19.0 AS builder +FROM node:20.19.0 AS builder WORKDIR /app @@ -19,7 +19,7 @@ RUN yarn global add patch-package RUN yarn build # Stage 2: Production stage -FROM node:18.19.0-slim +FROM node:20.19.0-slim WORKDIR /app From 00b86806217cf9cb27b6c310eb0d31ffeb3a026b Mon Sep 17 00:00:00 2001 From: shitrerohit Date: Sat, 31 Jan 2026 19:31:39 +0530 Subject: [PATCH 36/38] update node version Signed-off-by: shitrerohit --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e335d316..dd506c11 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Stage 1: Builder stage -FROM node:20.19.0 AS builder +FROM node:22.22.0 AS builder WORKDIR /app @@ -19,7 +19,7 @@ RUN yarn global add patch-package RUN yarn build # Stage 2: Production stage -FROM node:20.19.0-slim +FROM node:22.22.0-slim WORKDIR /app From ca9a16b4988d4406860742caa54de4b2779456e6 Mon Sep 17 00:00:00 2001 From: shitrerohit Date: Sat, 31 Jan 2026 20:36:09 +0530 Subject: [PATCH 37/38] sample x5c certificate added Signed-off-by: shitrerohit --- src/cliAgent.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/cliAgent.ts b/src/cliAgent.ts index 7c53b39a..83c198b4 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -276,7 +276,13 @@ const getModules = ( //TODO: We need to trust the certificate tenant wise, for that we need to fetch those details from platform const certs: string[] = await getTrustedCerts() - return certs + // return certs + return [ 'MIICJjCCAcugAwIBAgIRAN1fhc0PPzEEzl2g7wO+8+kwCgYIKoZIzj0EAwIwIDERMA8GA1UEAxMITXkgb3JnQ0ExCzAJBgNVBAYTAk5MMB4XDTI2MDEyNzEzMDkwNVoXDTI3MDEyNzEzMDkwNVowIDERMA8GA1UEAxMITXkgb3JnQ0ExCzAJBgNVBAYTAk5MMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIPQ1tWUHCTCO/lADMFFA2cJFA0vfnG2LmwP0XmY+SWUxhs1pcWVNHOSydISq/Blj8KIbnQu+GSign53r6vlQZqOB5TCB4jAdBgNVHQ4EFgQUgqBFsZHs6ATywXlSra1TZzxocQMwDgYDVR0PAQH/BAQDAgGiMBUGA1UdJQEB/wQLMAkGByiBjF0FAQIwIgYDVR0jAQH/BBgwFoAUgqBFsZHs6ATywXlSra1TZzxocQMwMAYDVR0SAQH/BCYwJIIKMTAuMC4wLjExMoYWaHR0cDovLzEwLjAuMC4xMTI6NDAwMTAwBgNVHREBAf8EJjAkggoxMC4wLjAuMTEyhhZodHRwOi8vMTAuMC4wLjExMjo0MDAxMBIGA1UdEwEB/wQIMAYBAf8CAQAwCgYIKoZIzj0EAwIDSQAwRgIhAKiWZnIZUKRZlnuaoqZjbb3xQyMLExO2VwygzEjHWp2iAiEA5ovREGqmYtUSOB4Kr0UIS+5kzPpzTD1nujNfhHxBcj8=', + 'MIICKjCCAc+gAwIBAgIRAN6sF+QYp2bJV+MG3ChL4NwwCgYIKoZIzj0EAwIwIDERMA8GA1UEAxMITXkgb3JnQ0ExCzAJBgNVBAYTAk5MMB4XDTI2MDEyNzEzMDkwNVoXDTI3MDEyNzEzMDkwNVowIDERMA8GA1UEAxMITXkgb3JnQ0ExCzAJBgNVBAYTAk5MMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9F3cI/E/5YvpretURS64Z1jmNWGafoUFd6TtJbQXRpNR06JLpGBLnEQlwbR9LGBgzcU3UfuZagkWOsXjIRs6SKOB6TCB5jAdBgNVHQ4EFgQUdbpWCo4C7HmtUvgNeCzj6JQec8kwDgYDVR0PAQH/BAQDAgGiMBUGA1UdJQEB/wQLMAkGByiBjF0FAQIwIgYDVR0jAQH/BBgwFoAUdbpWCo4C7HmtUvgNeCzj6JQec8kwMgYDVR0SAQH/BCgwJoILMTAuNzguMjM2LjSGF2h0dHA6Ly8xMC43OC4yMzYuNDo0MDAxMDIGA1UdEQEB/wQoMCaCCzEwLjc4LjIzNi40hhdodHRwOi8vMTAuNzguMjM2LjQ6NDAwMTASBgNVHRMBAf8ECDAGAQH/AgEAMAoGCCqGSM49BAMCA0kAMEYCIQC9knX3KXpY+g15+hw1MpHM+OAsLpu4rfUkL9OAnbSGYgIhANUjOM/P5d4bn2WhXHHoNy8yv4V3K1ywK1D+eltRkWS2', + 'MIIB6DCCAZqgAwIBAgIQfr+ZHsxv9OksR4v0UtoKrjAFBgMrZXAwIDERMA8GA1UEAxMITXkgb3JnQ0ExCzAJBgNVBAYTAk5MMB4XDTI2MDEyNzE0MjE1OFoXDTI3MDEyNzE0MjE1OFowIDERMA8GA1UEAxMITXkgb3JnQ0ExCzAJBgNVBAYTAk5MMCowBQYDK2VwAyEAKFYb5SrH3cd9gj4R5vOhmEtx6yOdeOEfqwa57bRnZl6jgekwgeYwHQYDVR0OBBYEFK79Buzc1LoSXTlx9QE1i2/vcZcSMA4GA1UdDwEB/wQEAwIBojAVBgNVHSUBAf8ECzAJBgcogYxdBQECMCIGA1UdIwEB/wQYMBaAFK79Buzc1LoSXTlx9QE1i2/vcZcSMDIGA1UdEgEB/wQoMCaCCzEwLjc4LjIzNi40hhdodHRwOi8vMTAuNzguMjM2LjQ6NDAwMTAyBgNVHREBAf8EKDAmggsxMC43OC4yMzYuNIYXaHR0cDovLzEwLjc4LjIzNi40OjQwMDEwEgYDVR0TAQH/BAgwBgEB/wIBADAFBgMrZXADQQASF8k9LsHr46f3cYviu9zj4v7A60dOCrJWDUOY0XFutVluW48EDZWEuMhLT7lUc4NdF7d/V6VQ+odKdKUNAVwJ', + 'MIICODCCAd6gAwIBAgIQIpFA2HrJoh+uf1YPDhEJxzAKBggqhkjOPQQDAjAgMREwDwYDVQQDEwhNeSBvcmdDQTELMAkGA1UEBhMCTkwwHhcNMjYwMTMxMTQ1ODEzWhcNMjcwMTMxMTQ1ODEzWjAgMREwDwYDVQQDEwhNeSBvcmdDQTELMAkGA1UEBhMCTkwwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAASen/g9KRsKHv69/KJLvDfGqhJdXQueG/Y5qNcEEyDzcdZyucI2zgb96CAh+b/3tDb5kahiUXo3s4VXVxLDhYF3o4H5MIH2MB0GA1UdDgQWBBRc5xB2NgKmVNffxaD8LveV22rm8TAOBgNVHQ8BAf8EBAMCAaIwFQYDVR0lAQH/BAswCQYHKIGMXQUBAjAiBgNVHSMBAf8EGDAWgBRc5xB2NgKmVNffxaD8LveV22rm8TA6BgNVHRIBAf8EMDAughFxYS1hZ2VudC5zb3Zpby5pZIYZaHR0cHM6Ly9xYS1hZ2VudC5zb3Zpby5pZDA6BgNVHREBAf8EMDAughFxYS1hZ2VudC5zb3Zpby5pZIYZaHR0cHM6Ly9xYS1hZ2VudC5zb3Zpby5pZDASBgNVHRMBAf8ECDAGAQH/AgEAMAoGCCqGSM49BAMCA0gAMEUCIQCUqzMbpPdFd0RWadV2IM4f0qMSBcf/NzypgXz1OuAXFwIgcgldysw+5Sm6LrW97F3BrJs0ty1F96A3pJk7yAX2GkQ=', + 'MIIB+DCCAaqgAwIBAgIQQLKY+YW0RVReLxnDdd8i+zAFBgMrZXAwIDERMA8GA1UEAxMITXkgb3JnQ0ExCzAJBgNVBAYTAk5MMB4XDTI2MDEzMTE1MDQxNVoXDTI3MDEzMTE1MDQxNVowIDERMA8GA1UEAxMITXkgb3JnQ0ExCzAJBgNVBAYTAk5MMCowBQYDK2VwAyEAp8MYeYtvpEhvM7tihj4OCAhG2A94DMa2MXyF2E/X5uejgfkwgfYwHQYDVR0OBBYEFOIqVW2GthQPlIpIhalGAVxRsNIFMA4GA1UdDwEB/wQEAwIBojAVBgNVHSUBAf8ECzAJBgcogYxdBQECMCIGA1UdIwEB/wQYMBaAFOIqVW2GthQPlIpIhalGAVxRsNIFMDoGA1UdEgEB/wQwMC6CEXFhLWFnZW50LnNvdmlvLmlkhhlodHRwczovL3FhLWFnZW50LnNvdmlvLmlkMDoGA1UdEQEB/wQwMC6CEXFhLWFnZW50LnNvdmlvLmlkhhlodHRwczovL3FhLWFnZW50LnNvdmlvLmlkMBIGA1UdEwEB/wQIMAYBAf8CAQAwBQYDK2VwA0EA5kJzDFbyUnGkFcMcW5dKVOreAcHlptKL3GJGma0OKG8R5T6JOR6PX7AvpStJxMeS+SS4NiTHRsIPlzTC7l63DA==', + ] }, }), } From 3861761a979f08896bd50245d75071f93b024964 Mon Sep 17 00:00:00 2001 From: shitrerohit Date: Mon, 2 Feb 2026 19:09:44 +0530 Subject: [PATCH 38/38] fix: resolved PR comments Signed-off-by: shitrerohit --- samples/sample.ts | 3 +- samples/sampleWithApp.ts | 5 +- src/cliAgent.ts | 12 +-- .../holder/credentialBindingResolver.ts | 1 - .../openid4vc/holder/holder.service.ts | 1 + .../openid4vc/issuers/issuer.Controller.ts | 1 + .../openid4vc/issuers/issuer.service.ts | 2 +- src/controllers/types.ts | 49 ++++-------- src/controllers/x509/x509.service.ts | 2 - src/controllers/x509/x509.types.ts | 1 - src/types/request.d.ts | 21 +----- src/utils/agent.ts | 74 +++++++++++-------- src/utils/oid4vc-agent.ts | 31 +------- 13 files changed, 72 insertions(+), 131 deletions(-) diff --git a/samples/sample.ts b/samples/sample.ts index 3bbd6c88..fece0f8a 100644 --- a/samples/sample.ts +++ b/samples/sample.ts @@ -11,7 +11,8 @@ const run = async () => { const agent = await setupAgent({ port: 3001, endpoints: [endpoint], - name: 'Aries Test Agent', + id: 'Sample', + key: 'Sample', }) const conf: ServerConfig = { diff --git a/samples/sampleWithApp.ts b/samples/sampleWithApp.ts index 5d844e0f..d79db758 100644 --- a/samples/sampleWithApp.ts +++ b/samples/sampleWithApp.ts @@ -14,7 +14,8 @@ const run = async () => { const agent = await setupAgent({ port: 3001, endpoints: [endpoint], - name: 'Aries Test Agent', + id: 'Sample', + key: 'Sample', }) const app = express() @@ -23,7 +24,7 @@ const run = async () => { app.post('/greeting', jsonParser, (req, res) => { const config = agent.dependencyManager.resolve(AgentConfig) - res.send(`Hello, ${config.label}!`) + res.send(`Hello, agent initialized: , ${agent.isInitialized}!`) }) const conf: ServerConfig = { diff --git a/src/cliAgent.ts b/src/cliAgent.ts index 83c198b4..df6f49f3 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -172,6 +172,7 @@ const getModules = ( new IndyVdrIndyDidRegistrar(), new KeyDidRegistrar(), new JwkDidRegistrar(), + // TODO: We can enable polygon later // , new PolygonDidRegistrar() ], resolvers: [ @@ -234,7 +235,6 @@ const getModules = ( }), questionAnswer: new QuestionAnswerModule(), - // openid4vc: new OpenId4VcModule({}), // Todo: We can remove this polygon module for time being // polygon: new PolygonModule({ // didContractAddress: didRegistryContractAddress @@ -276,13 +276,7 @@ const getModules = ( //TODO: We need to trust the certificate tenant wise, for that we need to fetch those details from platform const certs: string[] = await getTrustedCerts() - // return certs - return [ 'MIICJjCCAcugAwIBAgIRAN1fhc0PPzEEzl2g7wO+8+kwCgYIKoZIzj0EAwIwIDERMA8GA1UEAxMITXkgb3JnQ0ExCzAJBgNVBAYTAk5MMB4XDTI2MDEyNzEzMDkwNVoXDTI3MDEyNzEzMDkwNVowIDERMA8GA1UEAxMITXkgb3JnQ0ExCzAJBgNVBAYTAk5MMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIPQ1tWUHCTCO/lADMFFA2cJFA0vfnG2LmwP0XmY+SWUxhs1pcWVNHOSydISq/Blj8KIbnQu+GSign53r6vlQZqOB5TCB4jAdBgNVHQ4EFgQUgqBFsZHs6ATywXlSra1TZzxocQMwDgYDVR0PAQH/BAQDAgGiMBUGA1UdJQEB/wQLMAkGByiBjF0FAQIwIgYDVR0jAQH/BBgwFoAUgqBFsZHs6ATywXlSra1TZzxocQMwMAYDVR0SAQH/BCYwJIIKMTAuMC4wLjExMoYWaHR0cDovLzEwLjAuMC4xMTI6NDAwMTAwBgNVHREBAf8EJjAkggoxMC4wLjAuMTEyhhZodHRwOi8vMTAuMC4wLjExMjo0MDAxMBIGA1UdEwEB/wQIMAYBAf8CAQAwCgYIKoZIzj0EAwIDSQAwRgIhAKiWZnIZUKRZlnuaoqZjbb3xQyMLExO2VwygzEjHWp2iAiEA5ovREGqmYtUSOB4Kr0UIS+5kzPpzTD1nujNfhHxBcj8=', - 'MIICKjCCAc+gAwIBAgIRAN6sF+QYp2bJV+MG3ChL4NwwCgYIKoZIzj0EAwIwIDERMA8GA1UEAxMITXkgb3JnQ0ExCzAJBgNVBAYTAk5MMB4XDTI2MDEyNzEzMDkwNVoXDTI3MDEyNzEzMDkwNVowIDERMA8GA1UEAxMITXkgb3JnQ0ExCzAJBgNVBAYTAk5MMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9F3cI/E/5YvpretURS64Z1jmNWGafoUFd6TtJbQXRpNR06JLpGBLnEQlwbR9LGBgzcU3UfuZagkWOsXjIRs6SKOB6TCB5jAdBgNVHQ4EFgQUdbpWCo4C7HmtUvgNeCzj6JQec8kwDgYDVR0PAQH/BAQDAgGiMBUGA1UdJQEB/wQLMAkGByiBjF0FAQIwIgYDVR0jAQH/BBgwFoAUdbpWCo4C7HmtUvgNeCzj6JQec8kwMgYDVR0SAQH/BCgwJoILMTAuNzguMjM2LjSGF2h0dHA6Ly8xMC43OC4yMzYuNDo0MDAxMDIGA1UdEQEB/wQoMCaCCzEwLjc4LjIzNi40hhdodHRwOi8vMTAuNzguMjM2LjQ6NDAwMTASBgNVHRMBAf8ECDAGAQH/AgEAMAoGCCqGSM49BAMCA0kAMEYCIQC9knX3KXpY+g15+hw1MpHM+OAsLpu4rfUkL9OAnbSGYgIhANUjOM/P5d4bn2WhXHHoNy8yv4V3K1ywK1D+eltRkWS2', - 'MIIB6DCCAZqgAwIBAgIQfr+ZHsxv9OksR4v0UtoKrjAFBgMrZXAwIDERMA8GA1UEAxMITXkgb3JnQ0ExCzAJBgNVBAYTAk5MMB4XDTI2MDEyNzE0MjE1OFoXDTI3MDEyNzE0MjE1OFowIDERMA8GA1UEAxMITXkgb3JnQ0ExCzAJBgNVBAYTAk5MMCowBQYDK2VwAyEAKFYb5SrH3cd9gj4R5vOhmEtx6yOdeOEfqwa57bRnZl6jgekwgeYwHQYDVR0OBBYEFK79Buzc1LoSXTlx9QE1i2/vcZcSMA4GA1UdDwEB/wQEAwIBojAVBgNVHSUBAf8ECzAJBgcogYxdBQECMCIGA1UdIwEB/wQYMBaAFK79Buzc1LoSXTlx9QE1i2/vcZcSMDIGA1UdEgEB/wQoMCaCCzEwLjc4LjIzNi40hhdodHRwOi8vMTAuNzguMjM2LjQ6NDAwMTAyBgNVHREBAf8EKDAmggsxMC43OC4yMzYuNIYXaHR0cDovLzEwLjc4LjIzNi40OjQwMDEwEgYDVR0TAQH/BAgwBgEB/wIBADAFBgMrZXADQQASF8k9LsHr46f3cYviu9zj4v7A60dOCrJWDUOY0XFutVluW48EDZWEuMhLT7lUc4NdF7d/V6VQ+odKdKUNAVwJ', - 'MIICODCCAd6gAwIBAgIQIpFA2HrJoh+uf1YPDhEJxzAKBggqhkjOPQQDAjAgMREwDwYDVQQDEwhNeSBvcmdDQTELMAkGA1UEBhMCTkwwHhcNMjYwMTMxMTQ1ODEzWhcNMjcwMTMxMTQ1ODEzWjAgMREwDwYDVQQDEwhNeSBvcmdDQTELMAkGA1UEBhMCTkwwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAASen/g9KRsKHv69/KJLvDfGqhJdXQueG/Y5qNcEEyDzcdZyucI2zgb96CAh+b/3tDb5kahiUXo3s4VXVxLDhYF3o4H5MIH2MB0GA1UdDgQWBBRc5xB2NgKmVNffxaD8LveV22rm8TAOBgNVHQ8BAf8EBAMCAaIwFQYDVR0lAQH/BAswCQYHKIGMXQUBAjAiBgNVHSMBAf8EGDAWgBRc5xB2NgKmVNffxaD8LveV22rm8TA6BgNVHRIBAf8EMDAughFxYS1hZ2VudC5zb3Zpby5pZIYZaHR0cHM6Ly9xYS1hZ2VudC5zb3Zpby5pZDA6BgNVHREBAf8EMDAughFxYS1hZ2VudC5zb3Zpby5pZIYZaHR0cHM6Ly9xYS1hZ2VudC5zb3Zpby5pZDASBgNVHRMBAf8ECDAGAQH/AgEAMAoGCCqGSM49BAMCA0gAMEUCIQCUqzMbpPdFd0RWadV2IM4f0qMSBcf/NzypgXz1OuAXFwIgcgldysw+5Sm6LrW97F3BrJs0ty1F96A3pJk7yAX2GkQ=', - 'MIIB+DCCAaqgAwIBAgIQQLKY+YW0RVReLxnDdd8i+zAFBgMrZXAwIDERMA8GA1UEAxMITXkgb3JnQ0ExCzAJBgNVBAYTAk5MMB4XDTI2MDEzMTE1MDQxNVoXDTI3MDEzMTE1MDQxNVowIDERMA8GA1UEAxMITXkgb3JnQ0ExCzAJBgNVBAYTAk5MMCowBQYDK2VwAyEAp8MYeYtvpEhvM7tihj4OCAhG2A94DMa2MXyF2E/X5uejgfkwgfYwHQYDVR0OBBYEFOIqVW2GthQPlIpIhalGAVxRsNIFMA4GA1UdDwEB/wQEAwIBojAVBgNVHSUBAf8ECzAJBgcogYxdBQECMCIGA1UdIwEB/wQYMBaAFOIqVW2GthQPlIpIhalGAVxRsNIFMDoGA1UdEgEB/wQwMC6CEXFhLWFnZW50LnNvdmlvLmlkhhlodHRwczovL3FhLWFnZW50LnNvdmlvLmlkMDoGA1UdEQEB/wQwMC6CEXFhLWFnZW50LnNvdmlvLmlkhhlodHRwczovL3FhLWFnZW50LnNvdmlvLmlkMBIGA1UdEwEB/wQIMAYBAf8CAQAwBQYDK2VwA0EA5kJzDFbyUnGkFcMcW5dKVOreAcHlptKL3GJGma0OKG8R5T6JOR6PX7AvpStJxMeS+SS4NiTHRsIPlzTC7l63DA==', - ] + return certs }, }), } @@ -415,7 +409,7 @@ export async function runRestAgent(restConfig: AriesRestConfig) { let networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]] - const parseIndyLedger = afjConfig?.indyLedger + const parseIndyLedger = afjConfig?.indyLedger ?? [] if (parseIndyLedger.length !== 0) { networkConfig = [ await fetchLedgerData(parseIndyLedger[0]), diff --git a/src/controllers/openid4vc/holder/credentialBindingResolver.ts b/src/controllers/openid4vc/holder/credentialBindingResolver.ts index 5727d8fd..5eb6e12d 100644 --- a/src/controllers/openid4vc/holder/credentialBindingResolver.ts +++ b/src/controllers/openid4vc/holder/credentialBindingResolver.ts @@ -56,7 +56,6 @@ export function getCredentialBindingResolver({ kms .createKeyForSignatureAlgorithm({ algorithm: signatureAlgorithm!, - // FIXME: what should happen with already existing keys created in the secure environment? backend: 'askar', }) .then((key) => Kms.PublicJwk.fromUnknown(key.publicJwk)), diff --git a/src/controllers/openid4vc/holder/holder.service.ts b/src/controllers/openid4vc/holder/holder.service.ts index 87aabb3f..c73b9560 100644 --- a/src/controllers/openid4vc/holder/holder.service.ts +++ b/src/controllers/openid4vc/holder/holder.service.ts @@ -129,6 +129,7 @@ export class HolderService { const storedCredentials = await Promise.all( credentialResponse.credentials.map(async (response) => { const credentialRecord = response.record + // TODO: We can add this later // if (credential instanceof W3cJwtVerifiableCredential || credential instanceof W3cJsonLdVerifiableCredential) { // return await agentReq.agent.w3cCredentials.storeCredential({ credential }) // } diff --git a/src/controllers/openid4vc/issuers/issuer.Controller.ts b/src/controllers/openid4vc/issuers/issuer.Controller.ts index 8e6bfea4..5dbf0418 100644 --- a/src/controllers/openid4vc/issuers/issuer.Controller.ts +++ b/src/controllers/openid4vc/issuers/issuer.Controller.ts @@ -79,6 +79,7 @@ export class IssuerController extends Controller { } } + // TODO: We can implement this method later /** * Deletes a specific issuer by record id. */ diff --git a/src/controllers/openid4vc/issuers/issuer.service.ts b/src/controllers/openid4vc/issuers/issuer.service.ts index 254f90ca..0263d934 100644 --- a/src/controllers/openid4vc/issuers/issuer.service.ts +++ b/src/controllers/openid4vc/issuers/issuer.service.ts @@ -44,6 +44,7 @@ export class IssuerService { return await agentReq.agent.modules.openid4vc.issuer?.getIssuerByIssuerId(publicIssuerId) } + // TODO: We can implement this method later // public async deleteIssuer(agentReq: Req, issuerId: string) { // const result = (agentReq.agent as Agent).openid4vc.config.issuer. // return result @@ -51,7 +52,6 @@ export class IssuerService { public async getIssuerAgentMetaData(agentReq: Req, issuerId: string) { return (await agentReq.agent.modules.openid4vc.issuer?.getIssuerMetadata(issuerId)) as any - // return 0 } } diff --git a/src/controllers/types.ts b/src/controllers/types.ts index 3c9737cf..75edb1ce 100644 --- a/src/controllers/types.ts +++ b/src/controllers/types.ts @@ -17,7 +17,6 @@ import type { X509CertificateIssuerAndSubjectOptions, SingleOrArray, } from '@credo-ts/core' - import type { JsonCredential, ReceiveOutOfBandInvitationConfig, @@ -33,10 +32,10 @@ import type { DidCommRouting, DidCommAttachment, } from '@credo-ts/didcomm' +import type { KeyAlgorithm } from '@openwallet-foundation/askar-nodejs' import type { DIDDocument } from 'did-resolver' -import { KeyAlgorithm } from '@openwallet-foundation/askar-nodejs' -export type CustomTenantConfig = {label: string} & { +export type CustomTenantConfig = { label: string } & { connectionImageUrl?: string } @@ -83,12 +82,6 @@ export interface ProposeCredentialOptions { connectionId: RecordId } -// export interface ProposeCredentialOptions extends BaseOptions { -// connectionId: string -// protocolVersion: CredentialProtocolVersionType -// credentialFormats: DidCommCredentialFormatPayload, 'createProposal'> -// } - export interface AcceptCredentialProposalOptions { credentialRecordId: string credentialFormats?: DidCommCredentialFormatPayload @@ -106,7 +99,10 @@ export interface CreateOfferOptions { goal?: string } -type CredentialFormatType = LegacyIndyCredentialFormat | DidCommJsonLdCredentialFormat | AnonCredsDidCommCredentialFormat +type CredentialFormatType = + | LegacyIndyCredentialFormat + | DidCommJsonLdCredentialFormat + | AnonCredsDidCommCredentialFormat export interface CreateOfferOobOptions { protocolVersion: string @@ -232,17 +228,6 @@ export interface ConnectionInvitationSchema { imageUrl?: string } -// TODO: added type in protocolVersion -// export interface RequestProofOptions { -// protocolVersion: 'v1' | 'v2' -// connectionId: string -// // TODO: added indy proof formate -// proofFormats: ProofFormatPayload<[IndyProofFormat], 'createRequest'> -// comment: string -// autoAcceptProof?: DidCommAutoAcceptProof -// parentThreadId?: string -// } - export interface RequestProofOptions { connectionId: string protocolVersion: string @@ -292,7 +277,6 @@ export interface ResolvedDid { } export interface DidCreate { - // FIXME: Check type keyType?: KeyAlgorithm seed?: string domain?: string @@ -446,26 +430,23 @@ export type DisclosureFrame = { [key: string]: boolean | DisclosureFrame } - export interface BasicX509CreateCertificateConfig extends X509CertificateIssuerAndSubjectOptions { - // FIXME: Check type - keyType: any; - issuerAlternativeNameURL: string; + keyType: any + issuerAlternativeNameURL: string } export interface X509ImportCertificateOptionsDto { - - /* + /* X.509 certificate in base64 string format */ - certificate: string; + certificate: string - /* + /* Private key in base64 string format */ - privateKey?: string; - + privateKey?: string + // FIXME: Check type - keyType: any; -} \ No newline at end of file + keyType: any +} diff --git a/src/controllers/x509/x509.service.ts b/src/controllers/x509/x509.service.ts index 36f9ffe5..c8525d1c 100644 --- a/src/controllers/x509/x509.service.ts +++ b/src/controllers/x509/x509.service.ts @@ -117,9 +117,7 @@ class x509Service { agent.config.logger.info('This is subjectPublicKeyID', subjectPublicKeyID) const certificate = await agent.x509.createCertificate({ - // authorityKey: authorityKeyID as Key, authorityKey: Kms.PublicJwk.fromPublicJwk(authorityKeyID), - // subjectPublicKey: Kms.PublicJwk.fromPublicJwk(subjectPublicKeyID!), serialNumber: options.serialNumber, issuer: options.issuer, extensions: options.extensions, diff --git a/src/controllers/x509/x509.types.ts b/src/controllers/x509/x509.types.ts index 311f6697..54bc08b8 100644 --- a/src/controllers/x509/x509.types.ts +++ b/src/controllers/x509/x509.types.ts @@ -34,7 +34,6 @@ export interface AuthorityAndSubjectKeyDto { * @example "p256" * @description Type of the key used for signing the X.509 Certificate (default is p256) */ - // FIXME: Check type keyType?: Curve } diff --git a/src/types/request.d.ts b/src/types/request.d.ts index 91ef0e3a..c14cad9b 100644 --- a/src/types/request.d.ts +++ b/src/types/request.d.ts @@ -2,16 +2,7 @@ import type { RestAgentModules, RestMultiTenantAgentModules } from '../cliAgent' import type { Agent } from '@credo-ts/core' import type { TenantAgent } from '@credo-ts/tenants' -// declare global { -// namespace Express { -// interface Request { -// user: { -// [x: string]: any -// agent: Agent | Agent | TenantAgent -// } -// } -// } -// } + type AgentType = Agent | Agent | TenantAgent interface IAgent { @@ -26,13 +17,3 @@ declare global { } } -// declare global { -// namespace Express { -// interface Request { -// user: { -// [x: string]: any -// agent: any -// } -// } -// } -// } diff --git a/src/utils/agent.ts b/src/utils/agent.ts index 582ff80b..44ea46c4 100644 --- a/src/utils/agent.ts +++ b/src/utils/agent.ts @@ -11,15 +11,7 @@ import { AnonCredsDidCommCredentialFormatService, } from '@credo-ts/anoncreds' import { AskarModule } from '@credo-ts/askar' -import { - DidsModule, - KeyDidRegistrar, - KeyDidResolver, - WebDidResolver, - Agent, - LogLevel, -} from '@credo-ts/core' - +import { DidsModule, KeyDidRegistrar, KeyDidResolver, WebDidResolver, Agent, LogLevel } from '@credo-ts/core' import { DidCommHttpOutboundTransport, DidCommJsonLdCredentialFormatService, @@ -28,24 +20,33 @@ import { DidCommProofV2Protocol, DidCommCredentialV2Protocol, DidCommModule, - DidCommConnectionInvitationMessage + DidCommConnectionInvitationMessage, } from '@credo-ts/didcomm' import { IndyVdrAnonCredsRegistry, IndyVdrModule } from '@credo-ts/indy-vdr' import { agentDependencies, DidCommHttpInboundTransport } from '@credo-ts/node' import { TenantsModule } from '@credo-ts/tenants' import { anoncreds } from '@hyperledger/anoncreds-nodejs' -import { askar } from '@openwallet-foundation/askar-nodejs' import { indyVdr } from '@hyperledger/indy-vdr-nodejs' +import { askar } from '@openwallet-foundation/askar-nodejs' import { TsLogger } from './logger' -export const setupAgent = async ({ name, endpoints, port }: { name: string; endpoints: string[]; port: number }) => { +export const setupAgent = async ({ + endpoints, + port, + id, + key, +}: { + endpoints: string[] + port: number + id: string + key: string +}) => { const logger = new TsLogger(LogLevel.debug) const config: InitConfig = { - // endpoints: endpoints, logger: logger, - allowInsecureHttpUrls: process.env.ALLOW_INSECURE_HTTP_URLS === 'true' + allowInsecureHttpUrls: process.env.ALLOW_INSECURE_HTTP_URLS?.toLowerCase() === 'true' ? true : false, } const legacyIndyCredentialFormat = new LegacyIndyDidCommCredentialFormatService() @@ -67,8 +68,8 @@ export const setupAgent = async ({ name, endpoints, port }: { name: string; endp askar: new AskarModule({ askar, store: { - id: name, - key: name + id: id, + key: key, }, }), @@ -101,7 +102,11 @@ export const setupAgent = async ({ name, endpoints, port }: { name: string; endp indyProofFormat: legacyIndyProofFormat, }), new DidCommProofV2Protocol({ - proofFormats: [legacyIndyProofFormat, new AnonCredsDidCommProofFormatService, new DidCommDifPresentationExchangeProofFormatService], + proofFormats: [ + legacyIndyProofFormat, + new AnonCredsDidCommProofFormatService(), + new DidCommDifPresentationExchangeProofFormatService(), + ], }), ], }, @@ -112,7 +117,11 @@ export const setupAgent = async ({ name, endpoints, port }: { name: string; endp indyCredentialFormat: legacyIndyCredentialFormat, }), new DidCommCredentialV2Protocol({ - credentialFormats: [legacyIndyCredentialFormat, new DidCommJsonLdCredentialFormatService(), new AnonCredsDidCommCredentialFormatService()], + credentialFormats: [ + legacyIndyCredentialFormat, + new DidCommJsonLdCredentialFormatService(), + new AnonCredsDidCommCredentialFormatService(), + ], }), ], }, @@ -136,20 +145,23 @@ export const setupAgent = async ({ name, endpoints, port }: { name: string; endp agent.modules.didcomm.registerOutboundTransport(new DidCommHttpOutboundTransport()) - httpInbound.app.get('/invitation', async (req: { query: { d_m: any; c_i: any }; url: string }, res: { send: (arg0: any) => void }) => { - if (typeof req.query.d_m === 'string') { - const invitation = await DidCommConnectionInvitationMessage.fromUrl(req.url.replace('d_m=', 'c_i=')) - res.send(invitation.toJSON()) - } - if (typeof req.query.c_i === 'string') { - const invitation = await DidCommConnectionInvitationMessage.fromUrl(req.url) - res.send(invitation.toJSON()) - } else { - const { outOfBandInvitation } = await agent.modules.didcomm.oob.createInvitation() + httpInbound.app.get( + '/invitation', + async (req: { query: { d_m: any; c_i: any }; url: string }, res: { send: (arg0: any) => void }) => { + if (typeof req.query.d_m === 'string') { + const invitation = await DidCommConnectionInvitationMessage.fromUrl(req.url.replace('d_m=', 'c_i=')) + res.send(invitation.toJSON()) + } + if (typeof req.query.c_i === 'string') { + const invitation = await DidCommConnectionInvitationMessage.fromUrl(req.url) + res.send(invitation.toJSON()) + } else { + const { outOfBandInvitation } = await agent.modules.didcomm.oob.createInvitation() - res.send(outOfBandInvitation.toUrl({ domain: endpoints + '/invitation' })) - } - }) + res.send(outOfBandInvitation.toUrl({ domain: endpoints + '/invitation' })) + } + }, + ) await agent.initialize() diff --git a/src/utils/oid4vc-agent.ts b/src/utils/oid4vc-agent.ts index f9a8053d..d254a96e 100644 --- a/src/utils/oid4vc-agent.ts +++ b/src/utils/oid4vc-agent.ts @@ -1,28 +1,12 @@ -// FIXME: We've made many changes in this file for building agent with OIDC modules, please check the types and proper implementation of the changes - -import type { DisclosureFrame } from '../controllers/types' import type { SdJwtVcHolderBinding } from '@credo-ts/core' import type { - OpenId4VcCredentialHolderBinding, - OpenId4VcCredentialHolderDidBinding, OpenId4VciCredentialRequestToCredentialMapper, OpenId4VciSignMdocCredentials, OpenId4VciSignSdJwtCredentials, - OpenId4VciSignW3cCredentials, } from '@credo-ts/openid4vc' -import { DidsApi, Kms, MdocApi, X509Certificate, X509Service } from '@credo-ts/core' -import { - ClaimFormat, - CredoError, - JsonTransformer, - W3cCredential, - W3cCredentialSubject, - W3cIssuer, - X509ModuleConfig, - parseDid, - w3cDate, -} from '@credo-ts/core' +import { DidsApi, X509Certificate, X509Service } from '@credo-ts/core' +import { ClaimFormat, X509ModuleConfig } from '@credo-ts/core' import { OpenId4VciCredentialFormatProfile } from '@credo-ts/openid4vc' import { SignerMethod } from '../enums/enum' @@ -31,7 +15,6 @@ export function getMixedCredentialRequestToCredentialMapper(): OpenId4VciCredent return async ({ holderBinding, issuanceSession, - verification, credentialConfigurationId, credentialConfiguration, agentContext, @@ -169,8 +152,6 @@ export function getMixedCredentialRequestToCredentialMapper(): OpenId4VciCredent : { method: 'x5c', x5c: [parsedCertificate], - // TODO: Need to check validation for issuer value - // issuer: process.env.AGENT_HOST ?? 'http://localhost:4001', }, disclosureFrame: disclosureFramePayload, })), @@ -182,14 +163,6 @@ export function getMixedCredentialRequestToCredentialMapper(): OpenId4VciCredent } } -// function assertDidBasedHolderBinding( -// holderBinding: OpenId4VcCredentialHolderBinding, -// ): asserts holderBinding is OpenId4VcCredentialHolderDidBinding { -// if (holderBinding.method !== 'did') { -// throw new CredoError('Only did based holder bindings supported for this credential type') -// } -// } - export async function getTrustedCerts() { try { const response = await fetch(`${process.env.TRUST_LIST_URL}`)