diff --git a/package.json b/package.json index fc6b98d8..37d89d71 100644 --- a/package.json +++ b/package.json @@ -50,8 +50,8 @@ "@credo-ts/push-notifications": "^0.7.1", "@credo-ts/question-answer": "0.6.2", "@credo-ts/tenants": "0.6.2", - "@hyperledger/anoncreds-nodejs": "0.3.1", - "@hyperledger/indy-vdr-nodejs": "0.2.2", + "@hyperledger/anoncreds-nodejs": "^0.3.4", + "@hyperledger/indy-vdr-nodejs": "^0.2.3", "@opentelemetry/api": "^1.9.0", "@opentelemetry/exporter-logs-otlp-http": "^0.202.0", "@opentelemetry/exporter-trace-otlp-http": "^0.202.0", diff --git a/patches/@credo-ts+core+0.6.0+001+fix: change version string type.patch b/patches/@credo-ts+core+0.6.2+001+fix: change version string type-import esm-export interface.patch similarity index 57% rename from patches/@credo-ts+core+0.6.0+001+fix: change version string type.patch rename to patches/@credo-ts+core+0.6.2+001+fix: change version string type-import esm-export interface.patch index d0791805..276af6b3 100644 --- a/patches/@credo-ts+core+0.6.0+001+fix: change version string type.patch +++ b/patches/@credo-ts+core+0.6.2+001+fix: change version string type-import esm-export interface.patch @@ -1,3 +1,44 @@ +diff --git a/node_modules/@credo-ts/core/build/modules/vc/data-integrity/jsonldUtil.d.mts b/node_modules/@credo-ts/core/build/modules/vc/data-integrity/jsonldUtil.d.mts +index 5a311c1..4d640d0 100644 +--- a/node_modules/@credo-ts/core/build/modules/vc/data-integrity/jsonldUtil.d.mts ++++ b/node_modules/@credo-ts/core/build/modules/vc/data-integrity/jsonldUtil.d.mts +@@ -14,7 +14,7 @@ interface Proof extends JsonObject { + verificationMethod: string | VerificationMethod; + [key: string]: JsonValue; + } +-interface DocumentLoaderResult { ++export interface DocumentLoaderResult { + contextUrl?: string | null; + documentUrl: string; + document: Record; +diff --git a/node_modules/@credo-ts/core/build/modules/vc/data-integrity/libraries/nativeDocumentLoader.mjs b/node_modules/@credo-ts/core/build/modules/vc/data-integrity/libraries/nativeDocumentLoader.mjs +index 49ee03f..aa7e43a 100644 +--- a/node_modules/@credo-ts/core/build/modules/vc/data-integrity/libraries/nativeDocumentLoader.mjs ++++ b/node_modules/@credo-ts/core/build/modules/vc/data-integrity/libraries/nativeDocumentLoader.mjs +@@ -2,7 +2,7 @@ + + //#region src/modules/vc/data-integrity/libraries/nativeDocumentLoader.ts + async function getNativeDocumentLoader() { +- const loader = await import("@digitalcredentials/jsonld/lib/documentLoaders/node"); ++ const loader = await import("@digitalcredentials/jsonld/lib/documentLoaders/node.js"); + if (!loader) throw new Error("Could not load node document loader. Module did not contain a loader function"); + if (typeof loader === "function") return loader; + if (typeof loader === "object" && typeof loader.default === "function") return loader.default; +diff --git a/node_modules/@credo-ts/core/build/modules/vc/data-integrity/libraries/nativeDocumentLoader.native.mjs b/node_modules/@credo-ts/core/build/modules/vc/data-integrity/libraries/nativeDocumentLoader.native.mjs +index 6a8ca37..0287e99 100644 +--- a/node_modules/@credo-ts/core/build/modules/vc/data-integrity/libraries/nativeDocumentLoader.native.mjs ++++ b/node_modules/@credo-ts/core/build/modules/vc/data-integrity/libraries/nativeDocumentLoader.native.mjs +@@ -1,8 +1,9 @@ + + ++ + //#region src/modules/vc/data-integrity/libraries/nativeDocumentLoader.native.ts + async function getNativeDocumentLoader() { +- const loader = await import("@digitalcredentials/jsonld/lib/documentLoaders/xhr"); ++ const loader = await import("@digitalcredentials/jsonld/lib/documentLoaders/xhr.js"); + if (!loader) throw new Error("Could not load node document loader. Module did not contain a loader function"); + if (typeof loader === "function") return loader; + if (typeof loader === "object" && typeof loader.default === "function") return loader.default; 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 diff --git a/patches/@digitalcredentials+jsonld-signatures+12.0.1.patch b/patches/@digitalcredentials+jsonld-signatures+12.0.1.patch new file mode 100644 index 00000000..e5ade717 --- /dev/null +++ b/patches/@digitalcredentials+jsonld-signatures+12.0.1.patch @@ -0,0 +1,22 @@ +diff --git a/node_modules/@digitalcredentials/jsonld-signatures/lib/suites/LinkedDataSignature.js b/node_modules/@digitalcredentials/jsonld-signatures/lib/suites/LinkedDataSignature.js +index 3aec367..4bb5517 100644 +--- a/node_modules/@digitalcredentials/jsonld-signatures/lib/suites/LinkedDataSignature.js ++++ b/node_modules/@digitalcredentials/jsonld-signatures/lib/suites/LinkedDataSignature.js +@@ -204,7 +204,7 @@ module.exports = class LinkedDataSignature extends LinkedDataProof { + documentLoader, + // throw errors if any values would be dropped due to missing + // definitions or relative URLs +- safe: true, ++ safe: false, + skipExpansion, + useNative: this.useNativeCanonize, + ...this.canonizeOptions +@@ -301,7 +301,7 @@ module.exports = class LinkedDataSignature extends LinkedDataProof { + '@context': constants.SECURITY_CONTEXT_URL, + '@embed': '@always', + id: verificationMethod +- }, {documentLoader, compactToRelative: false, safe: true}); ++ }, {documentLoader, compactToRelative: false, safe: false}); + if(!framed) { + throw new Error(`Verification method ${verificationMethod} not found.`); + } diff --git a/src/cliAgent.ts b/src/cliAgent.ts index 25cecab8..ce701b38 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -2,6 +2,7 @@ // Refer from: https://github.com/credebl/mobile-sdk/blob/main/packages/ssi/src/wallet/wallet.ts import '@openwallet-foundation/askar-nodejs' import '@hyperledger/indy-vdr-nodejs' +import '@hyperledger/anoncreds-nodejs' import type { AskarModuleConfigStoreOptions } from '@credo-ts/askar' import type { InitConfig } from '@credo-ts/core' import type { IndyVdrPoolConfig } from '@credo-ts/indy-vdr' @@ -150,6 +151,7 @@ const getModules = ( autoAcceptProofs: DidCommAutoAcceptProof, walletScheme: AskarMultiWalletDatabaseScheme, storeOptions: AskarModuleConfigStoreOptions, + endpoints: string[], ) => { const legacyIndyCredentialFormat = new LegacyIndyDidCommCredentialFormatService() const legacyIndyProofFormat = new LegacyIndyDidCommProofFormatService() @@ -197,6 +199,7 @@ const getModules = ( mediationRecipient: true, messagePickup: true, mediator: false, + endpoints: endpoints || [], basicMessages: true, connections: { @@ -298,6 +301,7 @@ const getWithTenantModules = ( autoAcceptProofs: DidCommAutoAcceptProof, walletScheme: AskarMultiWalletDatabaseScheme, walletConfig: AskarModuleConfigStoreOptions, + endpoints: string[], ) => { const modules = getModules( networkConfig, @@ -311,6 +315,7 @@ const getWithTenantModules = ( autoAcceptProofs, walletScheme, walletConfig, + endpoints, ) return { tenants: new TenantsModule({ @@ -341,6 +346,7 @@ const getWithTenantModules = ( export async function runRestAgent(restConfig: AriesRestConfig) { const { + endpoints, schemaFileServerURL, logLevel, inboundTransports = [], @@ -443,6 +449,7 @@ export async function runRestAgent(restConfig: AriesRestConfig) { autoAcceptProofs || DidCommAutoAcceptProof.ContentApproved, walletScheme || AskarMultiWalletDatabaseScheme.ProfilePerWallet, walletConfig, + endpoints || [], ) } else { modules = getModules( @@ -457,6 +464,7 @@ export async function runRestAgent(restConfig: AriesRestConfig) { autoAcceptProofs || DidCommAutoAcceptProof.ContentApproved, walletScheme || AskarMultiWalletDatabaseScheme.ProfilePerWallet, walletConfig, + endpoints || [], ) } diff --git a/src/controllers/anoncreds/cred-def/CredentialDefinitionController.ts b/src/controllers/anoncreds/cred-def/CredentialDefinitionController.ts index 663bec90..3578956e 100644 --- a/src/controllers/anoncreds/cred-def/CredentialDefinitionController.ts +++ b/src/controllers/anoncreds/cred-def/CredentialDefinitionController.ts @@ -113,8 +113,10 @@ export class CredentialDefinitionController extends Controller { await request.agent.modules.anoncreds.registerCredentialDefinition(credentialDefinitionPayload) if (registerCredentialDefinitionResult.credentialDefinitionState.state === CredentialEnum.Failed) { - const failureReason = registerCredentialDefinitionResult.credentialDefinitionState?.reason ?? 'Failed to register credential definition on ledger' - throw new InternalServerError(failureReason) + const failureReason = + registerCredentialDefinitionResult.credentialDefinitionState?.reason ?? + 'Failed to register credential definition on ledger' + throw new InternalServerError(failureReason) } if (registerCredentialDefinitionResult.credentialDefinitionState.state === CredentialEnum.Wait) { diff --git a/src/controllers/did/DidController.ts b/src/controllers/did/DidController.ts index f5c56ce3..f1bf0077 100644 --- a/src/controllers/did/DidController.ts +++ b/src/controllers/did/DidController.ts @@ -510,6 +510,7 @@ export class DidController extends Controller { return { did: did, didDocument: didDocument } } + // TODO: Right now we are using seed as privateKey for did creation. Fix this is API payload public async handleWeb(agent: AgentType, didOptions: DidCreate) { let didDocument: DidDocument if (!didOptions.domain) { @@ -532,44 +533,24 @@ export class DidController extends Controller { 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), - // }) + let key + let publicJwk if (didOptions.keyType === KeyAlgorithm.Ed25519) { - const { privateJwk } = transformSeedToPrivateJwk({ + const { privateJwk } = transformPrivateKeyToPrivateJwk({ type: { crv: 'Ed25519', kty: 'OKP', }, - seed: TypedArrayEncoder.fromString(didOptions.seed), + privateKey: TypedArrayEncoder.fromString(didOptions.seed), }) - const key = await agent.kms.importKey({ privateJwk }) + key = await agent.kms.importKey({ privateJwk }) - const publicJwk = Kms.PublicJwk.fromPublicJwk(key.publicJwk) + 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 })) + .addVerificationMethod(getEd25519VerificationKey2018({ id: keyId, publicJwk, controller: did })) .addAuthentication(keyId) .addAssertionMethod(keyId) .build() @@ -584,6 +565,12 @@ export class DidController extends Controller { did, overwrite: true, didDocument, + keys: [ + { + didDocumentRelativeKeyId: `#key-1`, + kmsKeyId: key.keyId, + }, + ], }) return { did, didDocument } } diff --git a/src/controllers/didcomm/credentials/CredentialController.ts b/src/controllers/didcomm/credentials/CredentialController.ts index 8b9b1d57..315a2c0e 100644 --- a/src/controllers/didcomm/credentials/CredentialController.ts +++ b/src/controllers/didcomm/credentials/CredentialController.ts @@ -1,325 +1,323 @@ -// 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 { + DidCommCredentialExchangeRecordProps, + CredentialProtocolVersionType, + DidCommCredentialState, + DidCommCredentialRole, + DidCommRouting, +} 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?: DidCommCredentialState, + @Query('role') role?: DidCommCredentialRole, + ) { + try { + const credentials = await request.agent.modules.didcomm.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.didcomm.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.didcomm.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.didcomm.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.didcomm.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: DidCommRouting + 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.didcomm.mediationRecipient.getRouting({}) + const { didDocument, keys } = createPeerDidDocumentFromServices( + [ + { + id: 'didcomm', + recipientKeys: [routing.recipientKey], + routingKeys: routing.routingKeys, + serviceEndpoint: routing.endpoints[0], + }, + ], + true, + ) + const did = await request.agent.dids.create({ + didDocument, + method: 'peer', + options: { + keys, + 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.didcomm.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.didcomm.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.credentialExchangeRecord.threadId, + 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.didcomm.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.didcomm.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.didcomm.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.didcomm.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/types.ts b/src/controllers/types.ts index 23ea0e8d..69179d91 100644 --- a/src/controllers/types.ts +++ b/src/controllers/types.ts @@ -96,7 +96,7 @@ export interface ProposeCredentialOptions { } export interface AcceptCredentialProposalOptions { - credentialRecordId: string + credentialExchangeRecordId: string credentialFormats?: DidCommCredentialFormatPayload autoAcceptCredential?: DidCommAutoAcceptCredential comment?: string @@ -118,7 +118,7 @@ type CredentialFormatType = | AnonCredsDidCommCredentialFormat export interface CreateOfferOobOptions { - protocolVersion: string + protocolVersion: ProtocolVersion credentialFormats: DidCommCredentialFormatPayload autoAcceptCredential?: DidCommAutoAcceptCredential comment?: string @@ -182,18 +182,18 @@ export interface V2OfferCredentialOptions { } export interface AcceptCredential { - credentialRecordId: RecordId + credentialExchangeRecordId: RecordId } export interface CredentialOfferOptions { - credentialRecordId: RecordId + credentialExchangeRecordId: RecordId credentialFormats?: DidCommCredentialFormatPayload autoAcceptCredential?: DidCommAutoAcceptCredential comment?: string } export interface AcceptCredentialRequestOptions { - credentialRecordId: RecordId + credentialExchangeRecordId: RecordId credentialFormats?: DidCommCredentialFormatPayload autoAcceptCredential?: DidCommAutoAcceptCredential comment?: string diff --git a/src/routes/routes.ts b/src/routes/routes.ts index 6af71e35..fb2a08de 100644 --- a/src/routes/routes.ts +++ b/src/routes/routes.ts @@ -34,6 +34,8 @@ import { SchemaController } from './../controllers/anoncreds/schema/SchemaContro // WARNING: This 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 { 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 { VerifierController } from './../controllers/openid4vc/verifiers/verifier.Controller'; import { expressAuthentication } from './../authentication'; // @ts-ignore - no great way to install types from subpackage @@ -1723,6 +1725,311 @@ const models: TsoaRoute.Models = { "additionalProperties": false, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "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 + "DidCommCredentialState": { + "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 + "DidCommCredentialRole": { + "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 + "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 + "DidCommCredentialExchangeRecord": { + "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 + "DidCommCredentialPreviewAttributeOptions": { + "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 + "Pick_AnonCredsDidCommProposeCredentialFormat.Exclude_keyofAnonCredsDidCommProposeCredentialFormat.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":"DidCommCredentialPreviewAttributeOptions"}},"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_AnonCredsDidCommProposeCredentialFormat.schemaIssuerId-or-issuerId_": { + "dataType": "refAlias", + "type": {"ref":"Pick_AnonCredsDidCommProposeCredentialFormat.Exclude_keyofAnonCredsDidCommProposeCredentialFormat.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 + "LegacyIndyDidCommProposeCredentialFormat": { + "dataType": "refAlias", + "type": {"ref":"Omit_AnonCredsDidCommProposeCredentialFormat.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}, + }, + "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 + "DidCommJsonLdCredentialDetailFormat": { + "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 + "AnonCredsDidCommProposeCredentialFormat": { + "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":"DidCommCredentialPreviewAttributeOptions"}}, + "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 + "DidCommCredentialFormatPayload_CredentialFormatType-Array.createProposal_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"indy":{"ref":"LegacyIndyDidCommProposeCredentialFormat"},"jsonld":{"ref":"DidCommJsonLdCredentialDetailFormat"},"anoncreds":{"ref":"AnonCredsDidCommProposeCredentialFormat"}},"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 + "DidCommAutoAcceptCredential": { + "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":"DidCommCredentialFormatPayload_CredentialFormatType-Array.createProposal_","required":true}, + "autoAcceptCredential": {"ref":"DidCommAutoAcceptCredential"}, + "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 + "AnonCredsDidCommAcceptProposalFormat": { + "dataType": "refObject", + "properties": { + "credentialDefinitionId": {"dataType":"string"}, + "revocationRegistryDefinitionId": {"dataType":"string"}, + "revocationRegistryIndex": {"dataType":"double"}, + "attributes": {"dataType":"array","array":{"dataType":"refObject","ref":"DidCommCredentialPreviewAttributeOptions"}}, + }, + "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 + "DidCommCredentialFormatPayload_CredentialFormats.acceptProposal_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"indy":{"ref":"AnonCredsDidCommAcceptProposalFormat"},"jsonld":{"ref":"EmptyObject"},"anoncreds":{"ref":"AnonCredsDidCommAcceptProposalFormat"}},"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": { + "credentialExchangeRecordId": {"dataType":"string","required":true}, + "credentialFormats": {"ref":"DidCommCredentialFormatPayload_CredentialFormats.acceptProposal_"}, + "autoAcceptCredential": {"ref":"DidCommAutoAcceptCredential"}, + "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 + "AnonCredsDidCommOfferCredentialFormat": { + "dataType": "refObject", + "properties": { + "credentialDefinitionId": {"dataType":"string","required":true}, + "revocationRegistryDefinitionId": {"dataType":"string"}, + "revocationRegistryIndex": {"dataType":"double"}, + "attributes": {"dataType":"array","array":{"dataType":"refObject","ref":"DidCommCredentialPreviewAttributeOptions"},"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 + "DidCommCredentialFormatPayload_CredentialFormats.createOffer_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"indy":{"ref":"AnonCredsDidCommOfferCredentialFormat"},"jsonld":{"ref":"DidCommJsonLdCredentialDetailFormat"},"anoncreds":{"ref":"AnonCredsDidCommOfferCredentialFormat"}},"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":"DidCommCredentialFormatPayload_CredentialFormats.createOffer_","required":true}, + "autoAcceptCredential": {"ref":"DidCommAutoAcceptCredential"}, + "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 + "DidCommCredentialFormatPayload_CredentialFormatType-Array.createOffer_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"indy":{"ref":"AnonCredsDidCommOfferCredentialFormat"},"jsonld":{"ref":"DidCommJsonLdCredentialDetailFormat"},"anoncreds":{"ref":"AnonCredsDidCommOfferCredentialFormat"}},"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": {"ref":"ProtocolVersion","required":true}, + "credentialFormats": {"ref":"DidCommCredentialFormatPayload_CredentialFormatType-Array.createOffer_","required":true}, + "autoAcceptCredential": {"ref":"DidCommAutoAcceptCredential"}, + "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 + "AnonCredsDidCommAcceptOfferFormat": { + "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 + "DidCommCredentialFormatPayload_CredentialFormats.acceptOffer_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"indy":{"ref":"AnonCredsDidCommAcceptOfferFormat"},"jsonld":{"ref":"EmptyObject"},"anoncreds":{"ref":"AnonCredsDidCommAcceptOfferFormat"}},"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": { + "credentialExchangeRecordId": {"ref":"RecordId","required":true}, + "credentialFormats": {"ref":"DidCommCredentialFormatPayload_CredentialFormats.acceptOffer_"}, + "autoAcceptCredential": {"ref":"DidCommAutoAcceptCredential"}, + "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 + "AnonCredsDidCommAcceptRequestFormat": { + "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 + "DidCommJsonLdAcceptRequestFormat": { + "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 + "DidCommCredentialFormatPayload_CredentialFormats.acceptRequest_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"indy":{"ref":"AnonCredsDidCommAcceptRequestFormat"},"jsonld":{"ref":"DidCommJsonLdAcceptRequestFormat"},"anoncreds":{"ref":"AnonCredsDidCommAcceptRequestFormat"}},"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": { + "credentialExchangeRecordId": {"ref":"RecordId","required":true}, + "credentialFormats": {"ref":"DidCommCredentialFormatPayload_CredentialFormats.acceptRequest_"}, + "autoAcceptCredential": {"ref":"DidCommAutoAcceptCredential"}, + "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": { + "credentialExchangeRecordId": {"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-DidCommJsonLdCredentialFormat-or-AnonCredsDidCommCredentialFormat_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-DidCommJsonLdCredentialFormat-or-AnonCredsDidCommCredentialFormat_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-DidCommJsonLdCredentialFormat-or-AnonCredsDidCommCredentialFormat_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-DidCommJsonLdCredentialFormat-or-AnonCredsDidCommCredentialFormat_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-DidCommJsonLdCredentialFormat-or-AnonCredsDidCommCredentialFormat_41_-Array_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"credential":{"ref":"CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-DidCommJsonLdCredentialFormat-or-AnonCredsDidCommCredentialFormat_41_-Array.credential_"},"request":{"ref":"CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-DidCommJsonLdCredentialFormat-or-AnonCredsDidCommCredentialFormat_41_-Array.request_"},"offerAttributes":{"dataType":"array","array":{"dataType":"refObject","ref":"DidCommCredentialPreviewAttributeOptions"}},"offer":{"ref":"CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-DidCommJsonLdCredentialFormat-or-AnonCredsDidCommCredentialFormat_41_-Array.offer_"},"proposal":{"ref":"CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-DidCommJsonLdCredentialFormat-or-AnonCredsDidCommCredentialFormat_41_-Array.proposal_"},"proposalAttributes":{"dataType":"array","array":{"dataType":"refObject","ref":"DidCommCredentialPreviewAttributeOptions"}}},"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 "OpenId4VcVerifierRecord": { "dataType": "refAlias", "type": {"ref":"Record_string.unknown_","validators":{}}, @@ -4413,6 +4720,453 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + 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":"DidCommCredentialState"}, + role: {"in":"query","name":"role","ref":"DidCommCredentialRole"}, + }; + 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 argsVerifierController_createVerifier: Record = { request: {"in":"request","name":"request","required":true,"dataType":"object"}, options: {"in":"body","name":"options","required":true,"ref":"OpenId4VcSiopCreateVerifierOptions"}, diff --git a/src/routes/swagger.json b/src/routes/swagger.json index 787e08ae..7fb14b5c 100644 --- a/src/routes/swagger.json +++ b/src/routes/swagger.json @@ -3930,6 +3930,657 @@ "type": "object", "additionalProperties": false }, + "ThreadId": { + "type": "string", + "example": "ea4e5e69-fc04-465a-90d2-9f8ff78aa71d" + }, + "DidCommCredentialState": { + "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" + }, + "DidCommCredentialRole": { + "enum": [ + "issuer", + "holder" + ], + "type": "string" + }, + "W3cCredentialRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "DidCommCredentialExchangeRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "ProtocolVersion": { + "enum": [ + "v1", + "v2" + ], + "type": "string" + }, + "DidCommCredentialPreviewAttributeOptions": { + "properties": { + "name": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "type": "object", + "additionalProperties": false + }, + "Pick_AnonCredsDidCommProposeCredentialFormat.Exclude_keyofAnonCredsDidCommProposeCredentialFormat.schemaIssuerId-or-issuerId__": { + "properties": { + "schemaId": { + "type": "string" + }, + "schemaName": { + "type": "string" + }, + "schemaVersion": { + "type": "string" + }, + "credentialDefinitionId": { + "type": "string" + }, + "attributes": { + "items": { + "$ref": "#/components/schemas/DidCommCredentialPreviewAttributeOptions" + }, + "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_AnonCredsDidCommProposeCredentialFormat.schemaIssuerId-or-issuerId_": { + "$ref": "#/components/schemas/Pick_AnonCredsDidCommProposeCredentialFormat.Exclude_keyofAnonCredsDidCommProposeCredentialFormat.schemaIssuerId-or-issuerId__", + "description": "Construct a type with the properties of T except for those in type K." + }, + "LegacyIndyDidCommProposeCredentialFormat": { + "$ref": "#/components/schemas/Omit_AnonCredsDidCommProposeCredentialFormat.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_" + } + }, + "required": [ + "@context", + "type", + "issuer", + "issuanceDate", + "credentialSubject" + ], + "type": "object", + "additionalProperties": {} + }, + "DidCommJsonLdCredentialDetailFormat": { + "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 + }, + "AnonCredsDidCommProposeCredentialFormat": { + "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/DidCommCredentialPreviewAttributeOptions" + }, + "type": "array" + }, + "schemaIssuerDid": { + "type": "string" + }, + "issuerDid": { + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + }, + "DidCommCredentialFormatPayload_CredentialFormatType-Array.createProposal_": { + "properties": { + "indy": { + "$ref": "#/components/schemas/LegacyIndyDidCommProposeCredentialFormat" + }, + "jsonld": { + "$ref": "#/components/schemas/DidCommJsonLdCredentialDetailFormat" + }, + "anoncreds": { + "$ref": "#/components/schemas/AnonCredsDidCommProposeCredentialFormat" + } + }, + "type": "object", + "description": "Get the payload for a specific method from a list of CredentialFormat interfaces and a method" + }, + "DidCommAutoAcceptCredential": { + "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/DidCommCredentialFormatPayload_CredentialFormatType-Array.createProposal_" + }, + "autoAcceptCredential": { + "$ref": "#/components/schemas/DidCommAutoAcceptCredential" + }, + "comment": { + "type": "string" + }, + "connectionId": { + "$ref": "#/components/schemas/RecordId" + } + }, + "required": [ + "protocolVersion", + "credentialFormats", + "connectionId" + ], + "type": "object", + "additionalProperties": false + }, + "AnonCredsDidCommAcceptProposalFormat": { + "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/DidCommCredentialPreviewAttributeOptions" + }, + "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_" + }, + "DidCommCredentialFormatPayload_CredentialFormats.acceptProposal_": { + "properties": { + "indy": { + "$ref": "#/components/schemas/AnonCredsDidCommAcceptProposalFormat" + }, + "jsonld": { + "$ref": "#/components/schemas/EmptyObject" + }, + "anoncreds": { + "$ref": "#/components/schemas/AnonCredsDidCommAcceptProposalFormat" + } + }, + "type": "object", + "description": "Get the payload for a specific method from a list of CredentialFormat interfaces and a method" + }, + "AcceptCredentialProposalOptions": { + "properties": { + "credentialExchangeRecordId": { + "type": "string" + }, + "credentialFormats": { + "$ref": "#/components/schemas/DidCommCredentialFormatPayload_CredentialFormats.acceptProposal_" + }, + "autoAcceptCredential": { + "$ref": "#/components/schemas/DidCommAutoAcceptCredential" + }, + "comment": { + "type": "string" + } + }, + "required": [ + "credentialExchangeRecordId" + ], + "type": "object", + "additionalProperties": false + }, + "AnonCredsDidCommOfferCredentialFormat": { + "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/DidCommCredentialPreviewAttributeOptions" + }, + "type": "array" + } + }, + "required": [ + "credentialDefinitionId", + "attributes" + ], + "type": "object", + "additionalProperties": false + }, + "DidCommCredentialFormatPayload_CredentialFormats.createOffer_": { + "properties": { + "indy": { + "$ref": "#/components/schemas/AnonCredsDidCommOfferCredentialFormat" + }, + "jsonld": { + "$ref": "#/components/schemas/DidCommJsonLdCredentialDetailFormat" + }, + "anoncreds": { + "$ref": "#/components/schemas/AnonCredsDidCommOfferCredentialFormat" + } + }, + "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/DidCommCredentialFormatPayload_CredentialFormats.createOffer_" + }, + "autoAcceptCredential": { + "$ref": "#/components/schemas/DidCommAutoAcceptCredential" + }, + "comment": { + "type": "string" + }, + "goalCode": { + "type": "string" + }, + "goal": { + "type": "string" + } + }, + "required": [ + "protocolVersion", + "connectionId", + "credentialFormats" + ], + "type": "object", + "additionalProperties": false + }, + "DidCommCredentialFormatPayload_CredentialFormatType-Array.createOffer_": { + "properties": { + "indy": { + "$ref": "#/components/schemas/AnonCredsDidCommOfferCredentialFormat" + }, + "jsonld": { + "$ref": "#/components/schemas/DidCommJsonLdCredentialDetailFormat" + }, + "anoncreds": { + "$ref": "#/components/schemas/AnonCredsDidCommOfferCredentialFormat" + } + }, + "type": "object", + "description": "Get the payload for a specific method from a list of CredentialFormat interfaces and a method" + }, + "CreateOfferOobOptions": { + "properties": { + "protocolVersion": { + "$ref": "#/components/schemas/ProtocolVersion" + }, + "credentialFormats": { + "$ref": "#/components/schemas/DidCommCredentialFormatPayload_CredentialFormatType-Array.createOffer_" + }, + "autoAcceptCredential": { + "$ref": "#/components/schemas/DidCommAutoAcceptCredential" + }, + "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 + }, + "AnonCredsDidCommAcceptOfferFormat": { + "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 + }, + "DidCommCredentialFormatPayload_CredentialFormats.acceptOffer_": { + "properties": { + "indy": { + "$ref": "#/components/schemas/AnonCredsDidCommAcceptOfferFormat" + }, + "jsonld": { + "$ref": "#/components/schemas/EmptyObject" + }, + "anoncreds": { + "$ref": "#/components/schemas/AnonCredsDidCommAcceptOfferFormat" + } + }, + "type": "object", + "description": "Get the payload for a specific method from a list of CredentialFormat interfaces and a method" + }, + "CredentialOfferOptions": { + "properties": { + "credentialExchangeRecordId": { + "$ref": "#/components/schemas/RecordId" + }, + "credentialFormats": { + "$ref": "#/components/schemas/DidCommCredentialFormatPayload_CredentialFormats.acceptOffer_" + }, + "autoAcceptCredential": { + "$ref": "#/components/schemas/DidCommAutoAcceptCredential" + }, + "comment": { + "type": "string" + } + }, + "required": [ + "credentialExchangeRecordId" + ], + "type": "object", + "additionalProperties": false + }, + "AnonCredsDidCommAcceptRequestFormat": { + "$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" + }, + "DidCommJsonLdAcceptRequestFormat": { + "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 + }, + "DidCommCredentialFormatPayload_CredentialFormats.acceptRequest_": { + "properties": { + "indy": { + "$ref": "#/components/schemas/AnonCredsDidCommAcceptRequestFormat" + }, + "jsonld": { + "$ref": "#/components/schemas/DidCommJsonLdAcceptRequestFormat" + }, + "anoncreds": { + "$ref": "#/components/schemas/AnonCredsDidCommAcceptRequestFormat" + } + }, + "type": "object", + "description": "Get the payload for a specific method from a list of CredentialFormat interfaces and a method" + }, + "AcceptCredentialRequestOptions": { + "properties": { + "credentialExchangeRecordId": { + "$ref": "#/components/schemas/RecordId" + }, + "credentialFormats": { + "$ref": "#/components/schemas/DidCommCredentialFormatPayload_CredentialFormats.acceptRequest_" + }, + "autoAcceptCredential": { + "$ref": "#/components/schemas/DidCommAutoAcceptCredential" + }, + "comment": { + "type": "string" + } + }, + "required": [ + "credentialExchangeRecordId" + ], + "type": "object", + "additionalProperties": false + }, + "AcceptCredential": { + "properties": { + "credentialExchangeRecordId": { + "$ref": "#/components/schemas/RecordId" + } + }, + "required": [ + "credentialExchangeRecordId" + ], + "type": "object", + "additionalProperties": false + }, + "CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-DidCommJsonLdCredentialFormat-or-AnonCredsDidCommCredentialFormat_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-DidCommJsonLdCredentialFormat-or-AnonCredsDidCommCredentialFormat_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-DidCommJsonLdCredentialFormat-or-AnonCredsDidCommCredentialFormat_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-DidCommJsonLdCredentialFormat-or-AnonCredsDidCommCredentialFormat_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-DidCommJsonLdCredentialFormat-or-AnonCredsDidCommCredentialFormat_41_-Array_": { + "properties": { + "credential": { + "$ref": "#/components/schemas/CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-DidCommJsonLdCredentialFormat-or-AnonCredsDidCommCredentialFormat_41_-Array.credential_" + }, + "request": { + "$ref": "#/components/schemas/CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-DidCommJsonLdCredentialFormat-or-AnonCredsDidCommCredentialFormat_41_-Array.request_" + }, + "offerAttributes": { + "items": { + "$ref": "#/components/schemas/DidCommCredentialPreviewAttributeOptions" + }, + "type": "array" + }, + "offer": { + "$ref": "#/components/schemas/CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-DidCommJsonLdCredentialFormat-or-AnonCredsDidCommCredentialFormat_41_-Array.offer_" + }, + "proposal": { + "$ref": "#/components/schemas/CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-DidCommJsonLdCredentialFormat-or-AnonCredsDidCommCredentialFormat_41_-Array.proposal_" + }, + "proposalAttributes": { + "items": { + "$ref": "#/components/schemas/DidCommCredentialPreviewAttributeOptions" + }, + "type": "array" + } + }, + "type": "object", + "description": "Get format data return value. Each key holds a mapping of credential format key to format data." + }, "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" @@ -5071,7 +5722,259 @@ }, "description": "Returns a specific issuer by publicIssuerId.", "tags": [ - "oid4vc issuers" + "oid4vc issuers" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [ + { + "in": "path", + "name": "publicIssuerId", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, + "/openid4vc/issuer/{issuerId}/metadata": { + "get": { + "operationId": "GetIssuerAgentMetaData", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": {} + } + } + } + }, + "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": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + } + } + }, + "description": "Deletes a specific issuer by record id.", + "tags": [ + "oid4vc issuers" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, + "/openid4vc/issuance-sessions/create-credential-offer": { + "post": { + "operationId": "CreateCredentialOffer", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "properties": { + "issuanceSession": { + "$ref": "#/components/schemas/OpenId4VcIssuanceSessionRecord" + }, + "credentialOffer": { + "type": "string" + } + }, + "required": [ + "issuanceSession", + "credentialOffer" + ], + "type": "object" + } + } + } + } + }, + "description": "Creates a credential offer with the specified credential configurations and authorization type.", + "tags": [ + "oid4vc issuance sessions" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenId4VcIssuanceSessionsCreateOffer" + } + } + } + } + } + }, + "/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", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenId4VcIssuanceSessionRecord" + } + } + } + } + }, + "description": "Update issuance session metadata by session ID", + "tags": [ + "oid4vc issuance sessions" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [ + { + "in": "path", + "name": "issuanceSessionId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "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": [ { @@ -5084,7 +5987,7 @@ "parameters": [ { "in": "path", - "name": "publicIssuerId", + "name": "issuanceSessionId", "required": true, "schema": { "type": "string" @@ -5093,22 +5996,27 @@ ] } }, - "/openid4vc/issuer/{issuerId}/metadata": { + "/openid4vc/issuance-sessions": { "get": { - "operationId": "GetIssuerAgentMetaData", + "operationId": "GetIssuanceSessionsByQuery", "responses": { "200": { "description": "Ok", "content": { "application/json": { - "schema": {} + "schema": { + "items": { + "$ref": "#/components/schemas/OpenId4VcIssuanceSessionRecord" + }, + "type": "array" + } } } } }, - "description": "Returns metadata for a specific issuer.", + "description": "Fetch all issuance sessions by query", "tags": [ - "oid4vc issuers" + "oid4vc issuance sessions" ], "security": [ { @@ -5120,9 +6028,49 @@ ], "parameters": [ { - "in": "path", - "name": "issuerId", - "required": true, + "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" } @@ -5130,32 +6078,27 @@ ] } }, - "/openid4vc/issuer/{id}": { - "delete": { - "operationId": "DeleteIssuer", + "/openid4vc/holder/sd-jwt-vcs": { + "get": { + "operationId": "GetSdJwtCredentials", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string" - } + "items": { + "$ref": "#/components/schemas/SdJwtVcRecord" }, - "required": [ - "message" - ], - "type": "object" + "type": "array" } } } } }, - "description": "Deletes a specific issuer by record id.", + "description": "Get SdJwt type of credentials", "tags": [ - "oid4vc issuers" + "oid4vc holders" ], "security": [ { @@ -5165,48 +6108,30 @@ ] } ], - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ] + "parameters": [] } }, - "/openid4vc/issuance-sessions/create-credential-offer": { - "post": { - "operationId": "CreateCredentialOffer", + "/openid4vc/holder/mdoc-vcs": { + "get": { + "operationId": "GetMdocCredentials", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "properties": { - "issuanceSession": { - "$ref": "#/components/schemas/OpenId4VcIssuanceSessionRecord" - }, - "credentialOffer": { - "type": "string" - } + "items": { + "$ref": "#/components/schemas/MdocRecord" }, - "required": [ - "issuanceSession", - "credentialOffer" - ], - "type": "object" + "type": "array" } } } } }, - "description": "Creates a credential offer with the specified credential configurations and authorization type.", + "description": "Fetch all mso mdoc credentials in wallet", "tags": [ - "oid4vc issuance sessions" + "oid4vc holders" ], "security": [ { @@ -5216,37 +6141,25 @@ ] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenId4VcIssuanceSessionsCreateOffer" - } - } - } - } + "parameters": [] } }, - "/openid4vc/issuance-sessions/{issuanceSessionId}": { - "get": { - "operationId": "GetIssuanceSessionsById", + "/openid4vc/holder/mdoc-vcs/decode": { + "post": { + "operationId": "DecodeMdocCredential", "responses": { "200": { "description": "Ok", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenId4VcIssuanceSessionRecord" - } + "schema": {} } } } }, - "description": "Get issuance details by issuance SessionId", + "description": "Decode mso mdoc credential in wallet", "tags": [ - "oid4vc issuance sessions" + "oid4vc holders" ], "security": [ { @@ -5256,34 +6169,43 @@ ] } ], - "parameters": [ - { - "in": "path", - "name": "issuanceSessionId", - "required": true, - "schema": { - "type": "string" + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "base64Url": { + "type": "string" + } + }, + "required": [ + "base64Url" + ], + "type": "object" + } } } - ] - }, - "put": { - "operationId": "UpdateSessionById", + } + } + }, + "/openid4vc/holder/resolve-credential-offer": { + "post": { + "operationId": "ResolveCredOffer", "responses": { "200": { "description": "Ok", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenId4VcIssuanceSessionRecord" - } + "schema": {} } } } }, - "description": "Update issuance session metadata by session ID", + "description": "Resolve a credential offer", "tags": [ - "oid4vc issuance sessions" + "oid4vc holders" ], "security": [ { @@ -5293,37 +6215,34 @@ ] } ], - "parameters": [ - { - "in": "path", - "name": "issuanceSessionId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Record_string.unknown_" + "$ref": "#/components/schemas/ResolveCredentialOfferBody" } } } } - }, - "delete": { - "operationId": "DeleteIssuanceSessionById", + } + }, + "/openid4vc/holder/authorization-request": { + "post": { + "operationId": "RequestAuthorizationForCredential", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": {} + } + } } }, - "description": "Delete issuance session by session ID", "tags": [ - "oid4vc issuance sessions" + "oid4vc holders" ], "security": [ { @@ -5333,39 +6252,35 @@ ] } ], - "parameters": [ - { - "in": "path", - "name": "issuanceSessionId", - "required": true, - "schema": { - "type": "string" + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizeRequestCredentialOffer" + } } } - ] + } } }, - "/openid4vc/issuance-sessions": { - "get": { - "operationId": "GetIssuanceSessionsByQuery", + "/openid4vc/holder/request-credential": { + "post": { + "operationId": "RequestCredential", "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/OpenId4VcIssuanceSessionRecord" - }, - "type": "array" - } + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": {} } } } }, - "description": "Fetch all issuance sessions by query", + "description": "Initiates a token request, then requests credentials from issuer", "tags": [ - "oid4vc issuance sessions" + "oid4vc holders" ], "security": [ { @@ -5375,77 +6290,33 @@ ] } ], - "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" + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RequestCredentialBody" + } } } - ] + } } }, - "/openid4vc/holder/sd-jwt-vcs": { - "get": { - "operationId": "GetSdJwtCredentials", + "/openid4vc/holder/resolve-proof-request": { + "post": { + "operationId": "ResolveProofRequest", "responses": { "200": { "description": "Ok", "content": { "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/SdJwtVcRecord" - }, - "type": "array" - } + "schema": {} } } } }, - "description": "Get SdJwt type of credentials", + "description": "Resolve a proof request", "tags": [ "oid4vc holders" ], @@ -5457,28 +6328,33 @@ ] } ], - "parameters": [] + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResolveProofRequest" + } + } + } + } } }, - "/openid4vc/holder/mdoc-vcs": { - "get": { - "operationId": "GetMdocCredentials", + "/openid4vc/holder/accept-proof-request": { + "post": { + "operationId": "AcceptProofRequest", "responses": { "200": { "description": "Ok", "content": { "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/MdocRecord" - }, - "type": "array" - } + "schema": {} } } } }, - "description": "Fetch all mso mdoc credentials in wallet", + "description": "Accept a proof request", "tags": [ "oid4vc holders" ], @@ -5490,12 +6366,22 @@ ] } ], - "parameters": [] + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResolveProofRequest" + } + } + } + } } }, - "/openid4vc/holder/mdoc-vcs/decode": { + "/openid4vc/holder/decode-sdjwt": { "post": { - "operationId": "DecodeMdocCredential", + "operationId": "DecodeSdJwt", "responses": { "200": { "description": "Ok", @@ -5506,7 +6392,6 @@ } } }, - "description": "Decode mso mdoc credential in wallet", "tags": [ "oid4vc holders" ], @@ -5525,12 +6410,12 @@ "application/json": { "schema": { "properties": { - "base64Url": { + "jwt": { "type": "string" } }, "required": [ - "base64Url" + "jwt" ], "type": "object" } @@ -5539,28 +6424,103 @@ } } }, - "/openid4vc/holder/resolve-credential-offer": { + "/openid4vc/holder/credential": { + "delete": { + "operationId": "Delete", + "responses": { + "204": { + "description": "No content" + } + }, + "tags": [ + "oid4vc holders" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteCredentialBody" + } + } + } + } + } + }, + "/multi-tenancy/create-tenant": { "post": { - "operationId": "ResolveCredOffer", + "operationId": "CreateTenant", "responses": { "200": { "description": "Ok", "content": { "application/json": { - "schema": {} + "schema": { + "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": "Resolve a credential offer", "tags": [ - "oid4vc holders" + "MultiTenancy" ], "security": [ { "jwt": [ - "tenant", - "dedicated" + "Basewallet" ] } ], @@ -5570,16 +6530,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResolveCredentialOfferBody" + "$ref": "#/components/schemas/CreateTenantOptions" } } } } } }, - "/openid4vc/holder/authorization-request": { + "/multi-tenancy/get-token/{tenantId}": { "post": { - "operationId": "RequestAuthorizationForCredential", + "operationId": "GetTenantToken", "responses": { "200": { "description": "Ok", @@ -5588,35 +6548,69 @@ "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" + } + } + } } }, "tags": [ - "oid4vc holders" + "MultiTenancy" ], "security": [ { "jwt": [ - "tenant", - "dedicated" + "Basewallet" ] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthorizeRequestCredentialOffer" - } + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" } } - } + ] } }, - "/openid4vc/holder/request-credential": { - "post": { - "operationId": "RequestCredential", + "/multi-tenancy/{tenantId}": { + "get": { + "operationId": "GetTenantById", "responses": { "200": { "description": "Ok", @@ -5625,36 +6619,67 @@ "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" + } + } + } } }, - "description": "Initiates a token request, then requests credentials from issuer", "tags": [ - "oid4vc holders" + "MultiTenancy" ], "security": [ { "jwt": [ - "tenant", - "dedicated" + "Basewallet" ] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RequestCredentialBody" - } + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" } } - } - } - }, - "/openid4vc/holder/resolve-proof-request": { - "post": { - "operationId": "ResolveProofRequest", + ] + }, + "delete": { + "operationId": "DeleteTenantById", "responses": { "200": { "description": "Ok", @@ -5663,49 +6688,85 @@ "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" + } + } + } } }, - "description": "Resolve a proof request", "tags": [ - "oid4vc holders" + "MultiTenancy" ], "security": [ { "jwt": [ - "tenant", - "dedicated" + "Basewallet" ] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResolveProofRequest" - } + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" } } - } + ] } }, - "/openid4vc/holder/accept-proof-request": { - "post": { - "operationId": "AcceptProofRequest", + "/didcomm/question-answer": { + "get": { + "operationId": "GetQuestionAnswerRecords", "responses": { "200": { - "description": "Ok", + "description": "QuestionAnswerRecord[]", "content": { "application/json": { - "schema": {} + "schema": { + "items": {}, + "type": "array" + } } } } }, - "description": "Accept a proof request", + "description": "Retrieve question and answer records by query", "tags": [ - "oid4vc holders" + "DIDComm - Question Answer" ], "security": [ { @@ -5715,34 +6776,67 @@ ] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResolveProofRequest" - } + "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" } } - } + ] } }, - "/openid4vc/holder/decode-sdjwt": { + "/didcomm/question-answer/question/{connectionId}": { "post": { - "operationId": "DecodeSdJwt", + "operationId": "SendQuestion", "responses": { "200": { "description": "Ok", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "examples": { + "Example 1": {} + } } } } }, + "description": "Send a question to a connection", "tags": [ - "oid4vc holders" + "DIDComm - Question Answer" ], "security": [ { @@ -5752,19 +6846,39 @@ ] } ], - "parameters": [], + "parameters": [ + { + "description": "Connection identifier", + "in": "path", + "name": "connectionId", + "required": true, + "schema": { + "$ref": "#/components/schemas/RecordId" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { - "jwt": { + "detail": { + "type": "string" + }, + "validResponses": { + "items": { + "$ref": "#/components/schemas/ValidResponse" + }, + "type": "array" + }, + "question": { "type": "string" } }, "required": [ - "jwt" + "validResponses", + "question" ], "type": "object" } @@ -5773,16 +6887,24 @@ } } }, - "/openid4vc/holder/credential": { - "delete": { - "operationId": "Delete", + "/didcomm/question-answer/answer/{id}": { + "post": { + "operationId": "SendAnswer", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Record_string.unknown_" + } + } + } } }, + "description": "Send a answer to question", "tags": [ - "oid4vc holders" + "DIDComm - Question Answer" ], "security": [ { @@ -5792,400 +6914,448 @@ ] } ], - "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/DeleteCredentialBody" + "$ref": "#/components/schemas/Record_response.string_" } } } } } }, - "/multi-tenancy/create-tenant": { - "post": { - "operationId": "CreateTenant", + "/didcomm/question-answer/{id}": { + "get": { + "operationId": "GetQuestionAnswerRecordById", "responses": { "200": { - "description": "Ok", + "description": "ConnectionRecord", "content": { "application/json": { "schema": { - "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" + "$ref": "#/components/schemas/Record_string.unknown_" } } } } }, + "description": "Retrieve question answer record by id", "tags": [ - "MultiTenancy" + "DIDComm - Question Answer" ], "security": [ { "jwt": [ - "Basewallet" + "tenant", + "dedicated" ] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateTenantOptions" - } + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/RecordId" } } - } + ] } }, - "/multi-tenancy/get-token/{tenantId}": { - "post": { - "operationId": "GetTenantToken", + "/didcomm/oob": { + "get": { + "operationId": "GetAllOutOfBandRecords", "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" - } - }, - "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" } } ] } }, - "/didcomm/question-answer": { - "get": { - "operationId": "GetQuestionAnswerRecords", + "/didcomm/oob/create-invitation": { + "post": { + "operationId": "CreateInvitation", "responses": { "200": { - "description": "QuestionAnswerRecord[]", + "description": "Out of band record", "content": { "application/json": { "schema": { - "items": {}, - "type": "array" + "properties": { + "invitationDid": { + "type": "string" + }, + "outOfBandRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "invitation": { + "$ref": "#/components/schemas/DidCommPlaintextMessage" + }, + "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": "Retrieve question and answer records by query", + "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 - Question Answer" + "DIDComm - Out Of Band" ], "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" + "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/question-answer/question/{connectionId}": { + "/didcomm/oob/create-legacy-connectionless-invitation": { "post": { - "operationId": "SendQuestion", + "operationId": "CreateLegacyConnectionlessInvitation", "responses": { "200": { - "description": "Ok", + "description": "a message and a invitationUrl", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Record_string.unknown_" + "properties": { + "outOfBandRecord": { + "$ref": "#/components/schemas/DidCommOutOfBandRecord" + }, + "invitationUrl": { + "type": "string" + }, + "message": { + "$ref": "#/components/schemas/DidCommMessage" + } + }, + "required": [ + "outOfBandRecord", + "invitationUrl", + "message" + ], + "type": "object" }, "examples": { - "Example 1": {} + "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": "Send a question to a connection", + "description": "Creates a new connectionless legacy invitation.", "tags": [ - "DIDComm - Question Answer" + "DIDComm - Out Of Band" ], "security": [ { @@ -6195,65 +7365,129 @@ ] } ], - "parameters": [ - { - "description": "Connection identifier", - "in": "path", - "name": "connectionId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RecordId" - } - } - ], + "parameters": [], "requestBody": { + "description": "configuration of how a connection invitation should be created", "required": true, "content": { "application/json": { "schema": { "properties": { - "detail": { + "routing": { + "$ref": "#/components/schemas/DidCommRouting" + }, + "domain": { "type": "string" }, - "validResponses": { - "items": { - "$ref": "#/components/schemas/ValidResponse" - }, - "type": "array" + "message": { + "$ref": "#/components/schemas/Record_string.unknown_" }, - "question": { + "recordId": { "type": "string" } }, "required": [ - "validResponses", - "question" + "domain", + "message", + "recordId" ], - "type": "object" + "type": "object", + "description": "configuration of how a connection invitation should be created" } } } } } }, - "/didcomm/question-answer/answer/{id}": { + "/didcomm/oob/receive-invitation": { "post": { - "operationId": "SendAnswer", + "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/Record_string.unknown_" + "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": "Send a answer to question", + "description": "Creates inbound out-of-band record and assigns out-of-band invitation message to it if the\nmessage is valid.", "tags": [ - "DIDComm - Question Answer" + "DIDComm - Out Of Band" ], "security": [ { @@ -6263,47 +7497,108 @@ ] } ], - "parameters": [ - { - "description": "The id of the question answer record", - "in": "path", - "name": "id", - "required": true, - "schema": { - "$ref": "#/components/schemas/RecordId" - } - } - ], + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Record_response.string_" + "$ref": "#/components/schemas/ReceiveInvitationProps" } } } } } }, - "/didcomm/question-answer/{id}": { - "get": { - "operationId": "GetQuestionAnswerRecordById", + "/didcomm/oob/receive-invitation-url": { + "post": { + "operationId": "ReceiveInvitationFromUrl", "responses": { "200": { - "description": "ConnectionRecord", + "description": "out-of-band record and connection record if one has been created.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Record_string.unknown_" + "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": "Retrieve question answer record by id", + "description": "Creates inbound out-of-band record and assigns out-of-band invitation message to it if the\nmessage is valid.", "tags": [ - "DIDComm - Question Answer" + "DIDComm - Out Of Band" ], "security": [ { @@ -6313,34 +7608,46 @@ ] } ], - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "$ref": "#/components/schemas/RecordId" + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReceiveInvitationByUrlProps" + } } } - ] + } } }, - "/didcomm/oob": { - "get": { - "operationId": "GetAllOutOfBandRecords", + "/didcomm/oob/{outOfBandId}/accept-invitation": { + "post": { + "operationId": "AcceptInvitation", "responses": { "200": { - "description": "OutOfBandRecord[]", + "description": "Ok", "content": { "application/json": { "schema": { - "items": {}, - "type": "array" + "properties": { + "connectionRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "outOfBandRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + } + }, + "required": [ + "connectionRecord", + "outOfBandRecord" + ], + "type": "object" }, "examples": { "Example 1": { - "value": [ - { + "value": { + "outOfBandRecord": { "_tags": { "invitationId": "1cbd22e4-1906-41e9-8807-83d84437f978", "state": "await-response", @@ -6377,15 +7684,30 @@ "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": "Retrieve all out of band records", + "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" ], @@ -6399,23 +7721,140 @@ ], "parameters": [ { - "description": "invitation identifier", + "in": "path", + "name": "outOfBandId", + "required": true, + "schema": { + "$ref": "#/components/schemas/RecordId" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptInvitationConfig" + } + } + } + } + } + }, + "/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": "invitationId", + "name": "outOfBandId", "required": false, "schema": { - "$ref": "#/components/schemas/RecordId" + "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/DidCommDidExchangeState" + } + }, + { + "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/oob/{outOfBandId}": { + "/didcomm/connections/{connectionId}": { "get": { - "operationId": "GetOutOfBandRecordById", + "operationId": "GetConnectionById", "responses": { "200": { - "description": "OutOfBandRecord", + "description": "ConnectionRecord", "content": { "application/json": { "schema": { @@ -6425,41 +7864,18 @@ "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": [] - } - ] + "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", + "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", + "invitationKey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz", + "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d", + "verkey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz" }, "metadata": {}, - "id": "42a95528-0e30-4f86-a462-0efb02178b53", + "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", "createdAt": "2022-01-01T00:00:00.000Z", - "reusable": false + "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", + "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", + "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d" } } } @@ -6467,9 +7883,9 @@ } } }, - "description": "Retrieve an out of band record by id", + "description": "Retrieve connection record by connection id", "tags": [ - "DIDComm - Out Of Band" + "DIDComm - Connections" ], "security": [ { @@ -6481,8 +7897,9 @@ ], "parameters": [ { + "description": "Connection identifier", "in": "path", - "name": "outOfBandId", + "name": "connectionId", "required": true, "schema": { "$ref": "#/components/schemas/RecordId" @@ -6491,15 +7908,15 @@ ] }, "delete": { - "operationId": "DeleteOutOfBandRecord", + "operationId": "DeleteConnection", "responses": { "204": { "description": "No content" } }, - "description": "Deletes an out of band record from the repository.", + "description": "Deletes a connection record from the connection repository.", "tags": [ - "DIDComm - Out Of Band" + "DIDComm - Connections" ], "security": [ { @@ -6511,9 +7928,9 @@ ], "parameters": [ { - "description": "Record identifier", + "description": "Connection identifier", "in": "path", - "name": "outOfBandId", + "name": "connectionId", "required": true, "schema": { "$ref": "#/components/schemas/RecordId" @@ -6522,103 +7939,33 @@ ] } }, - "/didcomm/oob/create-invitation": { + "/didcomm/connections/{connectionId}/accept-request": { "post": { - "operationId": "CreateInvitation", + "operationId": "AcceptRequest", "responses": { "200": { - "description": "Out of band record", + "description": "ConnectionRecord", "content": { "application/json": { "schema": { - "properties": { - "invitationDid": { - "type": "string" - }, - "outOfBandRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "invitation": { - "$ref": "#/components/schemas/DidCommPlaintextMessage" - }, - "invitationUrl": { - "type": "string" - } - }, - "required": [ - "invitationDid", - "outOfBandRecord", - "invitation", - "invitationUrl" - ], - "type": "object" + "$ref": "#/components/schemas/Record_string.unknown_" }, "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": [] - } - ] + "_tags": { + "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", + "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", + "invitationKey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz", + "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d", + "verkey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz" }, - "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 - } + "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" } } } @@ -6626,9 +7973,9 @@ } } }, - "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.", + "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 - Out Of Band" + "DIDComm - Connections" ], "security": [ { @@ -6638,195 +7985,46 @@ ] } ], - "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-connectionless-invitation": { - "post": { - "operationId": "CreateLegacyConnectionlessInvitation", - "responses": { - "200": { - "description": "a message and a invitationUrl", - "content": { - "application/json": { - "schema": { - "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": "Creates a new connectionless legacy invitation.", - "tags": [ - "DIDComm - Out Of Band" - ], - "security": [ + "parameters": [ { - "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/DidCommRouting" - }, - "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": "Connection identifier", + "in": "path", + "name": "connectionId", + "required": true, + "schema": { + "$ref": "#/components/schemas/RecordId" } } - } + ] } }, - "/didcomm/oob/receive-invitation": { + "/didcomm/connections/{connectionId}/accept-response": { "post": { - "operationId": "ReceiveInvitation", + "operationId": "AcceptResponse", "responses": { "200": { - "description": "out-of-band record and connection record if one has been created.", + "description": "ConnectionRecord", "content": { "application/json": { - "schema": { - "properties": { - "connectionRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "outOfBandRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" - } - }, - "required": [ - "connectionRecord", - "outOfBandRecord" - ], - "type": "object" + "schema": { + "$ref": "#/components/schemas/Record_string.unknown_" }, "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", + "_tags": { "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", - "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d" - } + "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" } } } @@ -6834,9 +8032,9 @@ } } }, - "description": "Creates inbound out-of-band record and assigns out-of-band invitation message to it if the\nmessage is valid.", + "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 - Out Of Band" + "DIDComm - Connections" ], "security": [ { @@ -6846,97 +8044,183 @@ ] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReceiveInvitationProps" + "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/DidCommConnectionRecord" + }, + "type": "array" + } } } } - } + }, + "tags": [ + "DIDComm - Connections" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "invitationId", + "required": true, + "schema": { + "type": "string" + } + } + ] } }, - "/didcomm/oob/receive-invitation-url": { - "post": { - "operationId": "ReceiveInvitationFromUrl", + "/dids/{did}": { + "get": { + "operationId": "GetDidRecordByDid", "responses": { "200": { - "description": "out-of-band record and connection record if one has been created.", + "description": "Ok", "content": { "application/json": { "schema": { "properties": { - "connectionRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" + "didDocumentMetadata": { + "$ref": "#/components/schemas/DIDDocumentMetadata" }, - "outOfBandRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" + "didResolutionMetadata": { + "$ref": "#/components/schemas/DidResolutionMetadata" + }, + "didDocument": { + "$ref": "#/components/schemas/Record_string.any_" } }, "required": [ - "connectionRecord", - "outOfBandRecord" + "didDocumentMetadata", + "didResolutionMetadata", + "didDocument" ], "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 + "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" + } + ] }, - "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" + "didDocumentMetadata": {}, + "didResolutionMetadata": { + "contentType": "application/did+ld+json" + } + } + } + } + } + } + } + }, + "tags": [ + "Dids" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [ + { + "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" + ] } } } @@ -6945,9 +8229,9 @@ } } }, - "description": "Creates inbound out-of-band record and assigns out-of-band invitation message to it if the\nmessage is valid.", + "description": "Did nym registration", "tags": [ - "DIDComm - Out Of Band" + "Dids" ], "security": [ { @@ -6963,102 +8247,33 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReceiveInvitationByUrlProps" + "$ref": "#/components/schemas/DidCreate" } } } } } }, - "/didcomm/oob/{outOfBandId}/accept-invitation": { - "post": { - "operationId": "AcceptInvitation", + "/dids": { + "get": { + "operationId": "GetDids", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "properties": { - "connectionRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "outOfBandRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" - } + "items": { + "$ref": "#/components/schemas/DidRecord" }, - "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" - } - } - } + "type": "array" } } } } }, - "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" + "Dids" ], "security": [ { @@ -7068,13 +8283,36 @@ ] } ], + "parameters": [] + } + }, + "/v1/orgs/{orgId}/token": { + "post": { + "operationId": "GetOrgToken", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgTokenResponse" + } + } + } + } + }, + "description": "Generate an organization token by forwarding credentials to the platform", + "tags": [ + "Auth" + ], + "security": [], "parameters": [ { "in": "path", - "name": "outOfBandId", + "name": "orgId", "required": true, "schema": { - "$ref": "#/components/schemas/RecordId" + "type": "string" } } ], @@ -7083,189 +8321,164 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AcceptInvitationConfig" + "$ref": "#/components/schemas/OrgTokenRequest" } } } } } }, - "/didcomm/connections": { + "/v1/orgs/test/dedicated-x509-certificates": { "get": { - "operationId": "GetAllConnections", + "operationId": "TestFetchDedicatedX509Certificates", "responses": { "200": { - "description": "ConnectionRecord[]", + "description": "Ok", "content": { "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/Record_string.unknown_" + "type": "string" }, "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" + "Auth" + ], + "security": [], + "parameters": [] + } + }, + "/v1/orgs/test/shared-agent-x509-certificates": { + "get": { + "operationId": "TestFetchSharedAgentX509Certificates", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + } + } + } + }, + "tags": [ + "Auth" + ], + "security": [], + "parameters": [] + } + }, + "/v1/orgs/test/trusted-certs": { + "get": { + "operationId": "TestGetTrustedCerts", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + } + } + } + }, + "description": "[TEMP] Manually trigger getTrustedCerts to test agent type detection and trust list fetch", + "tags": [ + "Auth" + ], + "security": [], + "parameters": [] + } + }, + "/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" + "dedicated", + "Basewallet" ] } ], - "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/DidCommDidExchangeState" - } - }, - { - "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" - } - } - ] + "parameters": [] } }, - "/didcomm/connections/{connectionId}": { - "get": { - "operationId": "GetConnectionById", + "/agent/token": { + "post": { + "operationId": "GetAgentToken", "responses": { "200": { - "description": "ConnectionRecord", + "description": "Ok", "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" - } - } + "$ref": "#/components/schemas/AgentToken" } } } } }, - "description": "Retrieve connection record by connection id", + "description": "Retrieve agent token", "tags": [ - "DIDComm - Connections" + "Agent" ], "security": [ { - "jwt": [ - "tenant", - "dedicated" - ] + "apiKey": [] } ], - "parameters": [ - { - "description": "Connection identifier", - "in": "path", - "name": "connectionId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RecordId" - } - } - ] - }, - "delete": { - "operationId": "DeleteConnection", + "parameters": [] + } + }, + "/agent/credential/verify": { + "post": { + "operationId": "VerifyCredential", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/W3cVerifyCredentialResult" + } + } + } } }, - "description": "Deletes a connection record from the connection repository.", "tags": [ - "DIDComm - Connections" + "Agent" ], "security": [ { @@ -7275,46 +8488,46 @@ ] } ], - "parameters": [ - { - "description": "Connection identifier", - "in": "path", - "name": "connectionId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RecordId" + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/SafeW3cJsonLdVerifyCredentialOptions" + }, + {} + ] + } } } - ] + } } }, - "/didcomm/connections/{connectionId}/accept-request": { - "post": { - "operationId": "AcceptRequest", + "/anoncreds/schemas/{schemaId}": { + "get": { + "operationId": "GetSchemaById", "responses": { "200": { - "description": "ConnectionRecord", + "description": "get schema by Id", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Record_string.unknown_" + "$ref": "#/components/schemas/SchemaResponseDTO" }, "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" + "ver": "1.0", + "id": "WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", + "name": "schema", + "version": "1.0", + "attrNames": [ + "string" + ], + "seqNo": 351936 } } } @@ -7322,9 +8535,9 @@ } } }, - "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.", + "description": "Get schema by schemaId", "tags": [ - "DIDComm - Connections" + "Anoncreds - Schemas" ], "security": [ { @@ -7336,44 +8549,48 @@ ], "parameters": [ { - "description": "Connection identifier", "in": "path", - "name": "connectionId", + "name": "schemaId", "required": true, "schema": { - "$ref": "#/components/schemas/RecordId" + "$ref": "#/components/schemas/SchemaId" } } ] } }, - "/didcomm/connections/{connectionId}/accept-response": { + "/anoncreds/schemas": { "post": { - "operationId": "AcceptResponse", + "operationId": "CreateSchema", "responses": { "200": { - "description": "ConnectionRecord", + "description": "get schema", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Record_string.unknown_" + "anyOf": [ + { + "$ref": "#/components/schemas/RegisterSchemaReturn" + }, + { + "$ref": "#/components/schemas/RegisterSchemaReturnStateFinished" + } + ] }, "examples": { "Example 1": { "value": { - "_tags": { - "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", - "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", - "invitationKey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz", - "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d", - "verkey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz" + "state": "finished", + "schema": { + "issuerId": "did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7", + "name": "Test Schema", + "version": "1.0.0", + "attrNames": [ + "Name", + "Age" + ] }, - "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" + "schemaId": "LRCUFcizUL74AGgLqdJHK7:2:Test Schema:1.0.0" } } } @@ -7381,144 +8598,170 @@ } } }, - "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.", + "description": "Create schema", "tags": [ - "DIDComm - Connections" + "Anoncreds - Schemas" ], "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "description": "Connection identifier", - "in": "path", - "name": "connectionId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RecordId" + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSchemaInput" + } } } - ] + } } }, - "/didcomm/url/{invitationId}": { + "/anoncreds/credential-definitions/{credentialDefinitionId}": { "get": { - "operationId": "GetInvitation", + "operationId": "GetCredentialDefinitionById", "responses": { "200": { - "description": "Ok", + "description": "CredDef", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/DidCommConnectionRecord" - }, - "type": "array" + "$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": [ - "DIDComm - Connections" + "Anoncreds - Credential Definitions" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } ], - "security": [], "parameters": [ { "in": "path", - "name": "invitationId", + "name": "credentialDefinitionId", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/CredentialDefinitionId" } } ] } }, - "/dids/{did}": { - "get": { - "operationId": "GetDidRecordByDid", + "/anoncreds/credential-definitions": { + "post": { + "operationId": "CreateCredentialDefinition", "responses": { "200": { - "description": "Ok", + "description": "CredDef", "content": { "application/json": { "schema": { - "properties": { - "didDocumentMetadata": { - "$ref": "#/components/schemas/DIDDocumentMetadata" - }, - "didResolutionMetadata": { - "$ref": "#/components/schemas/DidResolutionMetadata" + "anyOf": [ + { + "$ref": "#/components/schemas/RegisterCredentialDefinitionReturn" }, - "didDocument": { - "$ref": "#/components/schemas/Record_string.any_" + { + "$ref": "#/components/schemas/CredentialDefinitionStates" } - }, - "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" + "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": [ - "Dids" + "Anoncreds - Credential Definitions" ], "security": [ { @@ -7528,59 +8771,88 @@ ] } ], - "parameters": [ - { - "in": "path", - "name": "did", - "required": true, - "schema": { - "$ref": "#/components/schemas/Did" + "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" + } } } - ] + } } }, - "/dids/write": { - "post": { - "operationId": "WriteDid", + "/didcomm/credentials": { + "get": { + "operationId": "GetAllCredentials", "responses": { "200": { - "description": "DidResolutionResult", + "description": "CredentialExchangeRecord[]", "content": { "application/json": { - "schema": {}, + "schema": { + "items": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "type": "array" + }, "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" - ] + "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": "Did nym registration", + "description": "Retrieve all credential exchange records", "tags": [ - "Dids" + "DIDComm - Credentials" ], "security": [ { @@ -7590,22 +8862,53 @@ ] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DidCreate" - } + "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/DidCommCredentialState" + } + }, + { + "in": "query", + "name": "role", + "required": false, + "schema": { + "$ref": "#/components/schemas/DidCommCredentialRole" } } - } + ] } }, - "/dids": { + "/didcomm/credentials/w3c": { "get": { - "operationId": "GetDids", + "operationId": "GetAllW3c", "responses": { "200": { "description": "Ok", @@ -7613,7 +8916,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/DidRecord" + "$ref": "#/components/schemas/W3cCredentialRecord" }, "type": "array" } @@ -7622,7 +8925,7 @@ } }, "tags": [ - "Dids" + "DIDComm - Credentials" ], "security": [ { @@ -7635,199 +8938,344 @@ "parameters": [] } }, - "/v1/orgs/{orgId}/token": { - "post": { - "operationId": "GetOrgToken", + "/didcomm/credentials/w3c/{id}": { + "get": { + "operationId": "GetW3cById", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrgTokenResponse" + "$ref": "#/components/schemas/W3cCredentialRecord" } } } } }, - "description": "Generate an organization token by forwarding credentials to the platform", "tags": [ - "Auth" + "DIDComm - Credentials" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } ], - "security": [], "parameters": [ { "in": "path", - "name": "orgId", + "name": "id", "required": true, "schema": { "type": "string" } } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrgTokenRequest" - } - } - } - } + ] } }, - "/v1/orgs/test/dedicated-x509-certificates": { + "/didcomm/credentials/{credentialRecordId}": { "get": { - "operationId": "TestFetchDedicatedX509Certificates", + "operationId": "GetCredentialById", "responses": { "200": { - "description": "Ok", + "description": "CredentialExchangeRecord", "content": { "application/json": { "schema": { - "items": { - "type": "string" - }, - "type": "array" + "$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": [ - "Auth" + "DIDComm - Credentials" ], - "security": [], - "parameters": [] + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [ + { + "in": "path", + "name": "credentialRecordId", + "required": true, + "schema": { + "$ref": "#/components/schemas/RecordId" + } + } + ] } }, - "/v1/orgs/test/shared-agent-x509-certificates": { - "get": { - "operationId": "TestFetchSharedAgentX509Certificates", + "/didcomm/credentials/propose-credential": { + "post": { + "operationId": "ProposeCredential", "responses": { "200": { - "description": "Ok", + "description": "CredentialExchangeRecord", "content": { "application/json": { "schema": { - "items": { - "type": "string" - }, - "type": "array" + "$ref": "#/components/schemas/DidCommCredentialExchangeRecord" + }, + "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": [ - "Auth" + "DIDComm - Credentials" ], - "security": [], - "parameters": [] - } - }, - "/v1/orgs/test/trusted-certs": { - "get": { - "operationId": "TestGetTrustedCerts", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "items": { - "type": "string" - }, - "type": "array" - } + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProposeCredentialOptions" } } } - }, - "description": "[TEMP] Manually trigger getTrustedCerts to test agent type detection and trust list fetch", - "tags": [ - "Auth" - ], - "security": [], - "parameters": [] + } } }, - "/agent": { - "get": { - "operationId": "GetAgentInfo", + "/didcomm/credentials/accept-proposal": { + "post": { + "operationId": "AcceptProposal", "responses": { "200": { - "description": "Ok", + "description": "CredentialExchangeRecord", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AgentInfo" + "$ref": "#/components/schemas/DidCommCredentialExchangeRecord" + }, + "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 basic agent information", + "description": "Accept a credential proposal as issuer by sending an accept proposal message\nto the connection associated with the credential exchange record.", "tags": [ - "Agent" + "DIDComm - Credentials" ], "security": [ { "jwt": [ "tenant", - "dedicated", - "Basewallet" + "dedicated" ] } ], - "parameters": [] + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptCredentialProposalOptions" + } + } + } + } } }, - "/agent/token": { + "/didcomm/credentials/create-offer": { "post": { - "operationId": "GetAgentToken", + "operationId": "CreateOffer", "responses": { "200": { - "description": "Ok", + "description": "AgentMessage, CredentialExchangeRecord", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AgentToken" + "$ref": "#/components/schemas/DidCommCredentialExchangeRecord" + }, + "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 agent token", + "description": "Initiate a new credential exchange as issuer by creating a credential offer\nwithout specifying a connection id", "tags": [ - "Agent" + "DIDComm - Credentials" ], "security": [ { - "apiKey": [] + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOfferOptions" + } + } } - ], - "parameters": [] + } } }, - "/agent/credential/verify": { + "/didcomm/credentials/create-offer-oob": { "post": { - "operationId": "VerifyCredential", + "operationId": "CreateOfferOob", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/W3cVerifyCredentialResult" + "properties": { + "invitationDid": { + "type": "string" + }, + "credentialRequestThId": { + "type": "string" + }, + "outOfBandRecordId": { + "type": "string" + }, + "outOfBandRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "invitation": { + "$ref": "#/components/schemas/DidCommPlaintextMessage" + }, + "invitationUrl": { + "type": "string" + } + }, + "required": [ + "invitationDid", + "credentialRequestThId", + "outOfBandRecordId", + "outOfBandRecord", + "invitation", + "invitationUrl" + ], + "type": "object" } } } } }, "tags": [ - "Agent" + "DIDComm - Credentials" ], "security": [ { @@ -7843,40 +9291,45 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/SafeW3cJsonLdVerifyCredentialOptions" - }, - {} - ] + "$ref": "#/components/schemas/CreateOfferOobOptions" } } } } } }, - "/anoncreds/schemas/{schemaId}": { - "get": { - "operationId": "GetSchemaById", + "/didcomm/credentials/accept-offer": { + "post": { + "operationId": "AcceptOffer", "responses": { "200": { - "description": "get schema by Id", + "description": "CredentialExchangeRecord", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchemaResponseDTO" + "$ref": "#/components/schemas/DidCommCredentialExchangeRecord" }, "examples": { "Example 1": { "value": { - "ver": "1.0", - "id": "WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", - "name": "schema", - "version": "1.0", - "attrNames": [ - "string" - ], - "seqNo": 351936 + "_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" } } } @@ -7884,9 +9337,9 @@ } } }, - "description": "Get schema by schemaId", + "description": "Accept a credential offer as holder by sending an accept offer message\nto the connection associated with the credential exchange record.", "tags": [ - "Anoncreds - Schemas" + "DIDComm - Credentials" ], "security": [ { @@ -7896,50 +9349,51 @@ ] } ], - "parameters": [ - { - "in": "path", - "name": "schemaId", - "required": true, - "schema": { - "$ref": "#/components/schemas/SchemaId" + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CredentialOfferOptions" + } } } - ] + } } }, - "/anoncreds/schemas": { + "/didcomm/credentials/accept-request": { "post": { - "operationId": "CreateSchema", + "operationId": "AcceptRequest", "responses": { "200": { - "description": "get schema", + "description": "CredentialExchangeRecord", "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/RegisterSchemaReturn" - }, - { - "$ref": "#/components/schemas/RegisterSchemaReturnStateFinished" - } - ] + "$ref": "#/components/schemas/DidCommCredentialExchangeRecord" }, "examples": { "Example 1": { "value": { - "state": "finished", - "schema": { - "issuerId": "did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7", - "name": "Test Schema", - "version": "1.0.0", - "attrNames": [ - "Name", - "Age" - ] + "_tags": { + "state": "offer-sent", + "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", + "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" }, - "schemaId": "LRCUFcizUL74AGgLqdJHK7:2:Test Schema:1.0.0" + "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" } } } @@ -7947,9 +9401,9 @@ } } }, - "description": "Create schema", + "description": "Accept a credential request as issuer by sending an accept request message\nto the connection associated with the credential exchange record.", "tags": [ - "Anoncreds - Schemas" + "DIDComm - Credentials" ], "security": [ { @@ -7965,57 +9419,45 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateSchemaInput" + "$ref": "#/components/schemas/AcceptCredentialRequestOptions" } } } } } }, - "/anoncreds/credential-definitions/{credentialDefinitionId}": { - "get": { - "operationId": "GetCredentialDefinitionById", + "/didcomm/credentials/accept-credential": { + "post": { + "operationId": "AcceptCredential", "responses": { "200": { - "description": "CredDef", + "description": "CredentialExchangeRecord", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetCredentialDefinitionReturn" + "$ref": "#/components/schemas/DidCommCredentialExchangeRecord" }, "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" + "_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" } } } @@ -8023,9 +9465,9 @@ } } }, - "description": "Retrieve credential definition by credential definition id", + "description": "Accept a credential as holder by sending an accept credential message\nto the connection associated with the credential exchange record.", "tags": [ - "Anoncreds - Credential Definitions" + "DIDComm - Credentials" ], "security": [ { @@ -8035,82 +9477,37 @@ ] } ], - "parameters": [ - { - "in": "path", - "name": "credentialDefinitionId", - "required": true, - "schema": { - "$ref": "#/components/schemas/CredentialDefinitionId" + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptCredential" + } } } - ] + } } }, - "/anoncreds/credential-definitions": { - "post": { - "operationId": "CreateCredentialDefinition", + "/didcomm/credentials/{credentialRecordId}/form-data": { + "get": { + "operationId": "CredentialFormData", "responses": { "200": { - "description": "CredDef", + "description": "credentialRecord", "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/RegisterCredentialDefinitionReturn" - }, - { - "$ref": "#/components/schemas/CredentialDefinitionStates" - } - ] - }, - "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" - } - } - } - } + "$ref": "#/components/schemas/GetCredentialFormatDataReturn__40_LegacyIndyCredentialFormat-or-DidCommJsonLdCredentialFormat-or-AnonCredsDidCommCredentialFormat_41_-Array_" } } } - }, - "202": { - "description": "Wait for action to complete" } }, - "description": "Creates a new credential definition.", + "description": "Return credentialRecord", "tags": [ - "Anoncreds - Credential Definitions" + "DIDComm - Credentials" ], "security": [ { @@ -8120,39 +9517,16 @@ ] } ], - "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" - } + "parameters": [ + { + "in": "path", + "name": "credentialRecordId", + "required": true, + "schema": { + "type": "string" } } - } + ] } }, "/openid4vc/verifier": { diff --git a/yarn.lock b/yarn.lock index bbf92326..5fd6f23f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1252,40 +1252,42 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.3.tgz#c2b9d2e374ee62c586d3adbea87199b1d7a7a6ba" integrity sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ== -"@hyperledger/anoncreds-nodejs@0.3.1": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@hyperledger/anoncreds-nodejs/-/anoncreds-nodejs-0.3.1.tgz#72777755c6debd6aacaeb41eaeb6e7a3f1570760" - integrity sha512-/oWmWgcOPqjAtd2+dKASPYL84Qd7sAFyCBfEKM7PAgVbObaZUZc0kqA7hkEz/qyiqUvcP/JwKTc1v4zVZi6BTg== +"@hyperledger/anoncreds-nodejs@^0.3.4": + version "0.3.4" + resolved "https://registry.yarnpkg.com/@hyperledger/anoncreds-nodejs/-/anoncreds-nodejs-0.3.4.tgz#8fb060a0d783c43129812f82b3c8b356a87928d6" + integrity sha512-im5hRRvICM3hoyoJb4RJ7Mape7wIjDR8Tk+g/tHcg9GSPcEsJi+fJdxaHb7WVneycdZXeF6xky8BZwnQD2+Baw== dependencies: "@2060.io/ffi-napi" "^4.0.9" "@2060.io/ref-napi" "^3.0.6" - "@hyperledger/anoncreds-shared" "0.3.1" + "@hyperledger/anoncreds-shared" "0.3.4" ref-array-di "1.2.2" ref-struct-di "1.1.1" -"@hyperledger/anoncreds-shared@0.3.1": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@hyperledger/anoncreds-shared/-/anoncreds-shared-0.3.1.tgz#b227bc068c965ce6a6ce821b0a49832dd27c1461" - integrity sha512-pJNIMvineGpNsyEqsMR+tkRNy5+PQAnMkNgnefJlscCjVsTMqJnOtoNl18pk0LzjVKdGtwJtpg5N+lRx81hfAQ== +"@hyperledger/anoncreds-shared@0.3.4": + version "0.3.4" + resolved "https://registry.yarnpkg.com/@hyperledger/anoncreds-shared/-/anoncreds-shared-0.3.4.tgz#d6b62aa2720f3da8a8f7e79bd8cc167aeb5009cb" + integrity sha512-XRyX39yWjn+ymUxy+4BvE0gdRIkfTmHtj1A19aOE8gALaDIAMiBbe0HxO8dkM+iAUXntBtqRJEL87Kwcx6xd8g== dependencies: tar "^7.4.3" -"@hyperledger/indy-vdr-nodejs@0.2.2": - version "0.2.2" - resolved "https://registry.yarnpkg.com/@hyperledger/indy-vdr-nodejs/-/indy-vdr-nodejs-0.2.2.tgz#f1f5ed1b9c34103703882dbc6c10fe480d33b0e6" - integrity sha512-mc0iKuHCtKuOV0sMnGOTVWnQrpfBMS+1tIRyob+CvGCvwC2llGo3Hu5AvgPcR9nqCo/wJ0LoKBo66dYYb0uZbw== +"@hyperledger/indy-vdr-nodejs@^0.2.3": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@hyperledger/indy-vdr-nodejs/-/indy-vdr-nodejs-0.2.4.tgz#ff4be94dbdcfdc6c391f05f8ab06e787a5024c41" + integrity sha512-oJgzj4XGsPWHtkszdQpwSisRbWMdNVnV0zB8Q68gWgWU2vODcevA9Ad/GwNQce2D2TbieYc1TJiFEnBIoN2MeQ== dependencies: "@2060.io/ffi-napi" "^4.0.9" "@2060.io/ref-napi" "^3.0.6" - "@hyperledger/indy-vdr-shared" "0.2.2" - "@mapbox/node-pre-gyp" "^1.0.10" + "@hyperledger/indy-vdr-shared" "0.2.4" + "@types/ref-array-di" "^1.2.8" ref-array-di "^1.2.2" ref-struct-di "^1.1.1" -"@hyperledger/indy-vdr-shared@0.2.2": - version "0.2.2" - resolved "https://registry.yarnpkg.com/@hyperledger/indy-vdr-shared/-/indy-vdr-shared-0.2.2.tgz#9ca8b56cd89ab18792d129a0358b641e211274e3" - integrity sha512-9425MHU3K+/ahccCRjOIX3Z/51gqxvp3Nmyujyqlx9cd7PWG2Rianx7iNWecFBkdAEqS0DfHsb6YqqH39YZp/A== +"@hyperledger/indy-vdr-shared@0.2.4": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@hyperledger/indy-vdr-shared/-/indy-vdr-shared-0.2.4.tgz#4290877cf751a55430160ef95c886bcc9d309e44" + integrity sha512-4+Yv7m6h79ov6WxkaSprd3uoPM6HjaZXAjtYgrG4N1pBMPbxsUy9ZRmmngwvRxlyT8R8p2EBh8kDG5rDIxfHFw== + dependencies: + tar "^7.4.3" "@isaacs/cliui@^8.0.2": version "8.0.2" @@ -1571,21 +1573,6 @@ resolved "https://registry.yarnpkg.com/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz#9299f82874bab9e4c7f9c48d865becbfe8d6907c" integrity sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw== -"@mapbox/node-pre-gyp@^1.0.10": - version "1.0.11" - resolved "https://registry.yarnpkg.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz#417db42b7f5323d79e93b34a6d7a2a12c0df43fa" - integrity sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ== - dependencies: - detect-libc "^2.0.0" - https-proxy-agent "^5.0.0" - make-dir "^3.1.0" - node-fetch "^2.6.7" - nopt "^5.0.0" - npmlog "^5.0.1" - rimraf "^3.0.2" - semver "^7.3.5" - tar "^6.1.11" - "@multiformats/base-x@^4.0.1": version "4.0.1" resolved "https://registry.yarnpkg.com/@multiformats/base-x/-/base-x-4.0.1.tgz#95ff0fa58711789d53aefb2590a8b7a4e715d121" @@ -3130,11 +3117,6 @@ resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== -abbrev@1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== - accepts@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/accepts/-/accepts-2.0.0.tgz#bbcf4ba5075467f3f2131eab3cffc73c2f5d7895" @@ -3183,13 +3165,6 @@ aes-js@4.0.0-beta.5: resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-4.0.0-beta.5.tgz#8d2452c52adedebc3a3e28465d858c11ca315873" integrity sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q== -agent-base@6: - version "6.0.2" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" - integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== - dependencies: - debug "4" - ajv-formats@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" @@ -3259,19 +3234,6 @@ anymatch@^3.0.3, anymatch@~3.1.2: normalize-path "^3.0.0" picomatch "^2.0.4" -"aproba@^1.0.3 || ^2.0.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.1.0.tgz#75500a190313d95c64e871e7e4284c6ac219f0b1" - integrity sha512-tLIEcj5GuR2RSTnxNKdkK0dJ/GrC7P38sUkiDmDuHfsHmbagTFAxDVIBltoklXEVIQ/f14IL8IMJ5pn9Hez1Ew== - -are-we-there-yet@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz#372e0e7bd279d8e94c653aaa1f67200884bf3e1c" - integrity sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw== - dependencies: - delegates "^1.0.0" - readable-stream "^3.6.0" - arg@^4.1.0: version "4.1.3" resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" @@ -3729,11 +3691,6 @@ chokidar@^3.5.1: optionalDependencies: fsevents "~2.3.2" -chownr@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" - integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== - chownr@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/chownr/-/chownr-3.0.0.tgz#9855e64ecd240a9cc4267ce8a4aa5d24a1da15e4" @@ -3810,11 +3767,6 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -color-support@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" - integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== - combined-stream@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -3837,11 +3789,6 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -console-control-strings@^1.0.0, console-control-strings@^1.1.0: - version "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@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-1.0.1.tgz#a8b7bbeb2904befdfb6787e5c0c086959f605f9b" @@ -3980,13 +3927,6 @@ 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, 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" - debug@^3.1.0, debug@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" @@ -3994,6 +3934,13 @@ debug@^3.1.0, debug@^3.2.7: dependencies: ms "^2.1.1" +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" + 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" @@ -4049,11 +3996,6 @@ delayed-stream@~1.0.0: resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== -delegates@^1.0.0: - version "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: version "2.0.0" resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" @@ -4064,11 +4006,6 @@ destroy@1.2.0, destroy@~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.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" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" @@ -4930,13 +4867,6 @@ fs-extra@^11.2.0: jsonfile "^6.0.1" universalify "^2.0.0" -fs-minipass@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" - integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== - dependencies: - minipass "^3.0.0" - fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -4969,21 +4899,6 @@ functions-have-names@^1.2.3: resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== -gauge@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-3.0.2.tgz#03bf4441c044383908bcfa0656ad91803259b395" - integrity sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q== - dependencies: - aproba "^1.0.3 || ^2.0.0" - color-support "^1.1.2" - console-control-strings "^1.0.0" - has-unicode "^2.0.1" - object-assign "^4.1.1" - signal-exit "^3.0.0" - string-width "^4.2.3" - 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" @@ -5199,11 +5114,6 @@ has-tostringtag@^1.0.2: dependencies: has-symbols "^1.0.3" -has-unicode@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ== - hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3: version "1.1.7" resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" @@ -5273,14 +5183,6 @@ http2-wrapper@^1.0.0-beta.5.2: quick-lru "^5.1.1" resolve-alpn "^1.0.0" -https-proxy-agent@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" - integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== - dependencies: - agent-base "6" - debug "4" - human-signals@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" @@ -6374,13 +6276,6 @@ luxon@^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" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== - dependencies: - semver "^6.0.0" - make-dir@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" @@ -6528,31 +6423,11 @@ minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== -minipass@^3.0.0: - version "3.3.6" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.6.tgz#7bba384db3a1520d18c9c0e5251c3444e95dd94a" - integrity sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw== - dependencies: - yallist "^4.0.0" - -minipass@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" - integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== - "minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.4, minipass@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== -minizlib@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" - integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== - dependencies: - minipass "^3.0.0" - yallist "^4.0.0" - minizlib@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-3.1.0.tgz#6ad76c3a8f10227c9b51d1c9ac8e30b27f5a251c" @@ -6560,7 +6435,7 @@ minizlib@^3.1.0: dependencies: minipass "^7.1.2" -mkdirp@^1.0.3, mkdirp@^1.0.4: +mkdirp@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== @@ -6644,7 +6519,7 @@ 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-fetch@2, node-fetch@^2.6.7, node-fetch@^2.7.0: +node-fetch@2, node-fetch@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== @@ -6666,13 +6541,6 @@ node-releases@^2.0.27: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.27.tgz#eedca519205cf20f650f61d56b070db111231e4e" integrity sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA== -nopt@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88" - integrity sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ== - dependencies: - abbrev "1" - normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" @@ -6690,17 +6558,7 @@ npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" -npmlog@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-5.0.1.tgz#f06678e80e29419ad67ab964e0fa69959c1eb8b0" - integrity sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw== - dependencies: - are-we-there-yet "^2.0.0" - console-control-strings "^1.1.0" - gauge "^3.0.0" - set-blocking "^2.0.0" - -object-assign@^4, object-assign@^4.1.1: +object-assign@^4: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== @@ -7277,13 +7135,6 @@ rimraf@^2.6.1: dependencies: glob "^7.1.3" -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - router@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/router/-/router-2.2.0.tgz#019be620b711c87641167cc79b99090f00b146ef" @@ -7345,12 +7196,12 @@ scrypt-js@3.0.1: resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== -semver@^6.0.0, semver@^6.3.0, semver@^6.3.1: +semver@^6.3.0, semver@^6.3.1: version "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.3: +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== @@ -7437,11 +7288,6 @@ serve-static@~1.16.2: 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" - integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== - set-function-length@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" @@ -7535,7 +7381,7 @@ side-channel@^1.1.0: side-channel-map "^1.0.1" side-channel-weakmap "^1.0.2" -signal-exit@^3.0.0, signal-exit@^3.0.3, signal-exit@^3.0.7: +signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== @@ -7645,7 +7491,7 @@ string-length@^4.0.1: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" -"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -7811,18 +7657,6 @@ synckit@^0.11.7: dependencies: "@pkgr/core" "^0.2.9" -tar@^6.1.11: - version "6.2.1" - resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a" - integrity sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A== - dependencies: - chownr "^2.0.0" - fs-minipass "^2.0.0" - minipass "^5.0.0" - minizlib "^2.1.1" - mkdirp "^1.0.3" - yallist "^4.0.0" - tar@^7.4.3: version "7.5.2" resolved "https://registry.yarnpkg.com/tar/-/tar-7.5.2.tgz#115c061495ec51ff3c6745ff8f6d0871c5b1dedc" @@ -8358,13 +8192,6 @@ which@^2.0.1: dependencies: isexe "^2.0.0" -wide-align@^1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" - integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== - dependencies: - string-width "^1.0.2 || 2 || 3 || 4" - word-wrap@^1.2.5, word-wrap@~1.2.3: version "1.2.5" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34"