diff --git a/src/controllers/didcomm/proofs/ProofController.ts b/src/controllers/didcomm/proofs/ProofController.ts index a4f4a9f9..01832fb2 100644 --- a/src/controllers/didcomm/proofs/ProofController.ts +++ b/src/controllers/didcomm/proofs/ProofController.ts @@ -1,283 +1,286 @@ -// import type { -// PeerDidNumAlgo2CreateOptions, -// } from '@credo-ts/core' +import type { + PeerDidNumAlgo2CreateOptions, +} from '@credo-ts/core' -// import { -// AcceptProofRequestOptions, -// ProofExchangeRecordProps, -// ProofsProtocolVersionType, -// Routing, -// } from '@credo-ts/didcomm' +import { + AcceptProofRequestOptions, + DidCommProofExchangeRecordProps, + ProofsProtocolVersionType, + DidCommRouting, +} from '@credo-ts/didcomm' -// import { PeerDidNumAlgo, createPeerDidDocumentFromServices } from '@credo-ts/core' -// import { Request as Req } from 'express' -// import { Body, Controller, Example, Get, Path, Post, Query, Route, Tags, Security, Request } from 'tsoa' -// import { injectable } from 'tsyringe' +import { PeerDidNumAlgo, createPeerDidDocumentFromServices } from '@credo-ts/core' +import { Request as Req } from 'express' +import { Body, Controller, Example, Get, Path, Post, Query, Route, Tags, Security, Request } from 'tsoa' +import { injectable } from 'tsyringe' -// import { SCOPES } from '../../../enums' -// import ErrorHandlingService from '../../../errorHandlingService' -// import { ProofRecordExample, RecordId } from '../../examples' -// import { -// AcceptProofProposal, -// CreateProofRequestOobOptions, -// RequestProofOptions, -// RequestProofProposalOptions, -// } from '../../types' +import { SCOPES } from '../../../enums' +import ErrorHandlingService from '../../../errorHandlingService' +import { ProofRecordExample, RecordId } from '../../examples' +import { + AcceptProofProposal, + CreateProofRequestOobOptions, + RequestProofOptions, + RequestProofProposalOptions, +} from '../../types' -// @Tags('DIDComm - Proofs') -// @Route('/didcomm/proofs') -// @Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) -// @injectable() -// export class ProofController extends Controller { -// /** -// * Retrieve all proof records -// * -// * @param threadId -// * @returns ProofRecord[] -// */ -// @Example([ProofRecordExample]) -// @Get('/') -// public async getAllProofs(@Request() request: Req, @Query('threadId') threadId?: string) { -// try { -// const query = threadId ? { threadId } : {} -// const proofs = await request.agent.modules.proofs.findAllByQuery(query) +@Tags('DIDComm - Proofs') +@Route('/didcomm/proofs') +@Security('jwt', [SCOPES.TENANT_AGENT, SCOPES.DEDICATED_AGENT]) +@injectable() +export class ProofController extends Controller { + /** + * Retrieve all proof records + * + * @param threadId + * @returns ProofRecord[] + */ + @Example([ProofRecordExample]) + @Get('/') + public async getAllProofs(@Request() request: Req, @Query('threadId') threadId?: string) { + try { + const query = threadId ? { threadId } : {} + const proofs = await request.agent.modules.didcomm.proofs.findAllByQuery(query) -// return proofs.map((proof) => proof.toJSON()) -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } + return proofs.map((proof) => proof.toJSON()) + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } -// /** -// * Retrieve proof record by proof record id -// * -// * @param proofRecordId -// * @returns ProofRecord -// */ -// @Get('/:proofRecordId') -// @Example(ProofRecordExample) -// public async getProofById(@Request() request: Req, @Path('proofRecordId') proofRecordId: RecordId) { -// try { -// const proof = await request.agent.modules.proofs.getById(proofRecordId) + /** + * Retrieve proof record by proof record id + * + * @param proofRecordId + * @returns ProofRecord + */ + @Get('/:proofRecordId') + @Example(ProofRecordExample) + public async getProofById(@Request() request: Req, @Path('proofRecordId') proofRecordId: RecordId) { + try { + const proof = await request.agent.modules.didcomm.proofs.getById(proofRecordId) -// return proof.toJSON() -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } + return proof.toJSON() + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } -// /** -// * Initiate a new presentation exchange as prover by sending a presentation proposal request -// * to the connection with the specified connection id. -// * -// * @param proposal -// * @returns ProofRecord -// */ -// @Post('/propose-proof') -// @Example(ProofRecordExample) -// public async proposeProof(@Request() request: Req, @Body() requestProofProposalOptions: RequestProofProposalOptions) { -// try { -// const proof = await request.agent.modules.proofs.proposeProof({ -// connectionId: requestProofProposalOptions.connectionId, -// protocolVersion: 'v1' as ProofsProtocolVersionType<[]>, -// proofFormats: requestProofProposalOptions.proofFormats, -// comment: requestProofProposalOptions.comment, -// autoAcceptProof: requestProofProposalOptions.autoAcceptProof, -// goalCode: requestProofProposalOptions.goalCode, -// parentThreadId: requestProofProposalOptions.parentThreadId, -// }) + /** + * Initiate a new presentation exchange as prover by sending a presentation proposal request + * to the connection with the specified connection id. + * + * @param proposal + * @returns ProofRecord + */ + @Post('/propose-proof') + @Example(ProofRecordExample) + public async proposeProof(@Request() request: Req, @Body() requestProofProposalOptions: RequestProofProposalOptions) { + try { + const proof = await request.agent.modules.didcomm.proofs.proposeProof({ + connectionId: requestProofProposalOptions.connectionId, + protocolVersion: requestProofProposalOptions.protocolVersion as ProofsProtocolVersionType<[]>, + proofFormats: requestProofProposalOptions.proofFormats, + comment: requestProofProposalOptions.comment, + autoAcceptProof: requestProofProposalOptions.autoAcceptProof, + goalCode: requestProofProposalOptions.goalCode, + parentThreadId: requestProofProposalOptions.parentThreadId, + }) -// return proof -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } + return proof + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } -// /** -// * Accept a presentation proposal as verifier by sending an accept proposal message -// * to the connection associated with the proof record. -// * -// * @param proofRecordId -// * @param proposal -// * @returns ProofRecord -// */ -// @Post('/:proofRecordId/accept-proposal') -// @Example(ProofRecordExample) -// public async acceptProposal(@Request() request: Req, @Body() acceptProposal: AcceptProofProposal) { -// try { -// const proof = await request.agent.modules.proofs.acceptProposal(acceptProposal) + /** + * Accept a presentation proposal as verifier by sending an accept proposal message + * to the connection associated with the proof record. + * + * @param proofRecordId + * @param proposal + * @returns ProofRecord + */ + @Post('/accept-proposal') + @Example(ProofRecordExample) + public async acceptProposal(@Request() request: Req, @Body() acceptProposal: AcceptProofProposal) { + try { + const proof = await request.agent.modules.didcomm.proofs.acceptProposal(acceptProposal) -// return proof -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } + return proof + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } -// /** -// * Creates a presentation request bound to existing connection -// */ -// @Post('/request-proof') -// @Example(ProofRecordExample) -// public async requestProof(@Request() request: Req, @Body() requestProofOptions: RequestProofOptions) { -// try { -// const requestProofPayload = { -// connectionId: requestProofOptions.connectionId, -// protocolVersion: requestProofOptions.protocolVersion as ProofsProtocolVersionType<[]>, -// comment: requestProofOptions.comment, -// proofFormats: requestProofOptions.proofFormats, -// autoAcceptProof: requestProofOptions.autoAcceptProof, -// goalCode: requestProofOptions.goalCode, -// parentThreadId: requestProofOptions.parentThreadId, -// willConfirm: requestProofOptions.willConfirm, -// } -// const proof = await request.agent.modules.proofs.requestProof(requestProofPayload) + /** + * Creates a presentation request bound to existing connection + */ + @Post('/request-proof') + @Example(ProofRecordExample) + public async requestProof(@Request() request: Req, @Body() requestProofOptions: RequestProofOptions) { + try { + const requestProofPayload = { + connectionId: requestProofOptions.connectionId, + protocolVersion: requestProofOptions.protocolVersion as ProofsProtocolVersionType<[]>, + comment: requestProofOptions.comment, + proofFormats: requestProofOptions.proofFormats, + autoAcceptProof: requestProofOptions.autoAcceptProof, + goalCode: requestProofOptions.goalCode, + parentThreadId: requestProofOptions.parentThreadId, + willConfirm: requestProofOptions.willConfirm, + } + const proof = await request.agent.modules.didcomm.proofs.requestProof(requestProofPayload) -// return proof -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } + return proof + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } -// /** -// * Creates a presentation request not bound to any proposal or existing connection -// */ -// @Post('create-request-oob') -// @Example(ProofRecordExample) -// public async createRequest(@Request() request: Req, @Body() createRequestOptions: CreateProofRequestOobOptions) { -// try { -// let routing: Routing -// let invitationDid: string | undefined + /** + * Creates a presentation request not bound to any proposal or existing connection + */ + @Post('create-request-oob') + @Example(ProofRecordExample) + public async createRequest(@Request() request: Req, @Body() createRequestOptions: CreateProofRequestOobOptions) { + try { + let routing: DidCommRouting + let invitationDid: string | undefined -// if (createRequestOptions?.invitationDid) { -// invitationDid = createRequestOptions?.invitationDid -// } else { -// routing = await request.agent.modules.mediationRecipient.getRouting({}) -// const didDocument = createPeerDidDocumentFromServices([ -// { -// id: 'didcomm', -// recipientKeys: [routing.recipientKey], -// routingKeys: routing.routingKeys, -// serviceEndpoint: routing.endpoints[0], -// }, -// ]) -// const did = await request.agent.dids.create({ -// didDocument, -// method: 'peer', -// options: { -// numAlgo: PeerDidNumAlgo.MultipleInceptionKeyWithoutDoc, -// }, -// }) -// invitationDid = did.didState.did -// } + if (createRequestOptions?.invitationDid) { + invitationDid = createRequestOptions?.invitationDid + } else { + routing = await request.agent.modules.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: { + numAlgo: PeerDidNumAlgo.MultipleInceptionKeyWithoutDoc, + keys + }, + }) + invitationDid = did.didState.did + } -// const proof = await request.agent.modules.proofs.createRequest({ -// protocolVersion: createRequestOptions.protocolVersion as ProofsProtocolVersionType<[]>, -// proofFormats: createRequestOptions.proofFormats, -// goalCode: createRequestOptions.goalCode, -// willConfirm: createRequestOptions.willConfirm, -// parentThreadId: createRequestOptions.parentThreadId, -// autoAcceptProof: createRequestOptions.autoAcceptProof, -// comment: createRequestOptions.comment, -// }) -// const proofMessage = proof.message -// const outOfBandRecord = await request.agent.modules.oob.createInvitation({ -// label: createRequestOptions.label, -// messages: [proofMessage], -// autoAcceptConnection: true, -// imageUrl: createRequestOptions?.imageUrl, -// goalCode: createRequestOptions?.goalCode, -// invitationDid, -// }) + const proof = await request.agent.modules.didcomm.proofs.createRequest({ + protocolVersion: createRequestOptions.protocolVersion as ProofsProtocolVersionType<[]>, + proofFormats: createRequestOptions.proofFormats, + goalCode: createRequestOptions.goalCode, + willConfirm: createRequestOptions.willConfirm, + parentThreadId: createRequestOptions.parentThreadId, + autoAcceptProof: createRequestOptions.autoAcceptProof, + comment: createRequestOptions.comment, + }) + const proofMessage = proof.message + const outOfBandRecord = await request.agent.modules.didcomm.oob.createInvitation({ + label: createRequestOptions.label, + messages: [proofMessage], + autoAcceptConnection: true, + imageUrl: createRequestOptions?.imageUrl, + goalCode: createRequestOptions?.goalCode, + invitationDid, + }) -// return { -// invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ -// domain: request.agent.modules.didcomm.config.endpoints[0], -// }), -// invitation: outOfBandRecord.outOfBandInvitation.toJSON({ -// useDidSovPrefixWhereAllowed: request.agent.modules.didcomm.config.useDidSovPrefixWhereAllowed, -// }), -// outOfBandRecord: outOfBandRecord.toJSON(), -// invitationDid: createRequestOptions?.invitationDid ? '' : invitationDid, -// proofRecordThId: proof.proofRecord.threadId, -// proofMessageId: proof.message.thread?.threadId || proof.message.threadId || proof.message.id, -// } -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } + return { + invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ + domain: request.agent.modules.didcomm.config.endpoints[0], + }), + invitation: outOfBandRecord.outOfBandInvitation.toJSON({ + useDidSovPrefixWhereAllowed: request.agent.modules.didcomm.config.useDidSovPrefixWhereAllowed, + }), + outOfBandRecord: outOfBandRecord.toJSON(), + invitationDid, + proofRecordThId: proof.proofRecord.threadId, + proofMessageId: proof.message.thread?.threadId || proof.message.threadId || proof.message.id, + } + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } -// /** -// * Accept a presentation request as prover by sending an accept request message -// * to the connection associated with the proof record. -// * -// * @param proofRecordId -// * @param request -// * @returns ProofRecord -// */ -// @Post('/:proofRecordId/accept-request') -// @Example(ProofRecordExample) -// public async acceptRequest( -// @Request() request: Req, -// @Path('proofRecordId') proofRecordId: string, -// @Body() -// body: { -// filterByPresentationPreview?: boolean -// filterByNonRevocationRequirements?: boolean -// comment?: string -// }, -// ) { -// try { -// const requestedCredentials = await request.agent.modules.proofs.selectCredentialsForRequest({ -// proofRecordId, -// }) + /** + * Accept a presentation request as prover by sending an accept request message + * to the connection associated with the proof record. + * + * @param proofRecordId + * @param request + * @returns ProofRecord + */ + @Post('/:proofRecordId/accept-request') + @Example(ProofRecordExample) + public async acceptRequest( + @Request() request: Req, + @Path('proofRecordId') proofRecordId: string, + @Body() + body: { + // TODO: Check if we can remove the below body options as they are not used + filterByPresentationPreview?: boolean + filterByNonRevocationRequirements?: boolean + comment?: string + }, + ) { + try { + const requestedCredentials = await request.agent.modules.didcomm.proofs.selectCredentialsForRequest({ + proofExchangeRecordId: proofRecordId, + }) -// const acceptProofRequest: AcceptProofRequestOptions = { -// proofRecordId, -// comment: body.comment, -// proofFormats: requestedCredentials.proofFormats, -// } + const acceptProofRequest: AcceptProofRequestOptions = { + proofExchangeRecordId: proofRecordId, + comment: body.comment, + proofFormats: requestedCredentials.proofFormats, + } -// const proof = await request.agent.modules.proofs.acceptRequest(acceptProofRequest) + const proof = await request.agent.modules.didcomm.proofs.acceptRequest(acceptProofRequest) -// return proof.toJSON() -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } + return proof.toJSON() + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } -// /** -// * Accept a presentation as prover by sending an accept presentation message -// * to the connection associated with the proof record. -// * -// * @param proofRecordId -// * @returns ProofRecord -// */ -// @Post('/:proofRecordId/accept-presentation') -// @Example(ProofRecordExample) -// public async acceptPresentation(@Request() request: Req, @Path('proofRecordId') proofRecordId: string) { -// try { -// const proof = await request.agent.modules.proofs.acceptPresentation({ proofRecordId }) -// return proof -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } + /** + * Accept a presentation as prover by sending an accept presentation message + * to the connection associated with the proof record. + * + * @param proofRecordId + * @returns ProofRecord + */ + @Post('/:proofRecordId/accept-presentation') + @Example(ProofRecordExample) + public async acceptPresentation(@Request() request: Req, @Path('proofRecordId') proofRecordId: string) { + try { + const proof = await request.agent.modules.didcomm.proofs.acceptPresentation({ proofExchangeRecordId:proofRecordId }) + return proof + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } -// /** -// * Return proofRecord -// * -// * @param proofRecordId -// * @returns ProofRecord -// */ -// @Get('/:proofRecordId/form-data') -// @Example(ProofRecordExample) -// // TODO: Add return type -// public async proofFormData(@Request() request: Req, @Path('proofRecordId') proofRecordId: string) { -// try { -// const proof = await request.agent.modules.proofs.getFormatData(proofRecordId) -// return proof -// } catch (error) { -// throw ErrorHandlingService.handle(error) -// } -// } -// } + /** + * Return proofRecord + * + * @param proofRecordId + * @returns ProofRecord + */ + @Get('/:proofRecordId/form-data') + @Example(ProofRecordExample) + // TODO: Add return type + public async proofFormData(@Request() request: Req, @Path('proofRecordId') proofRecordId: string) { + try { + const proof = await request.agent.modules.didcomm.proofs.getFormatData(proofRecordId) + return proof + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } +} diff --git a/src/controllers/types.ts b/src/controllers/types.ts index 69179d91..ce84d863 100644 --- a/src/controllers/types.ts +++ b/src/controllers/types.ts @@ -2,7 +2,9 @@ import type { RecordId } from './examples' import type { AnonCredsCredentialDefinition, AnonCredsDidCommCredentialFormat, + AnonCredsDidCommProofFormat, LegacyIndyCredentialFormat, + LegacyIndyDidCommProofFormat, RegisterCredentialDefinitionReturnStateAction, RegisterCredentialDefinitionReturnStateFailed, RegisterCredentialDefinitionReturnStateFinished, @@ -42,6 +44,8 @@ import type { DidCommMessage, DidCommRouting, DidCommAttachment, + DidCommProofFormatPayload, + DidCommDifPresentationExchangeProofFormat, } from '@credo-ts/didcomm' import type { KeyAlgorithm } from '@openwallet-foundation/askar-nodejs' import type { DIDDocument } from 'did-resolver' @@ -82,6 +86,7 @@ export interface ProofRequestMessageResponse { // type CredentialFormats = [CredentialFormat] type CredentialFormats = [LegacyIndyCredentialFormat, AnonCredsDidCommCredentialFormat, DidCommJsonLdCredentialFormat] +type ProofFormats = [LegacyIndyDidCommProofFormat, AnonCredsDidCommProofFormat, DidCommDifPresentationExchangeProofFormat] enum ProtocolVersion { v1 = 'v1', @@ -254,8 +259,9 @@ export interface RequestProofOptions { // TODO: added type in protocolVersion export interface RequestProofProposalOptions { + protocolVersion: ProtocolVersion connectionId: string - proofFormats: any + proofFormats: DidCommProofFormatPayload goalCode?: string parentThreadId?: string autoAcceptProof?: DidCommAutoAcceptProof @@ -263,8 +269,8 @@ export interface RequestProofProposalOptions { } export interface AcceptProofProposal { - proofRecordId: string - proofFormats: any + proofExchangeRecordId: string + proofFormats: DidCommProofFormatPayload comment?: string autoAcceptProof?: DidCommAutoAcceptProof goalCode?: string diff --git a/src/routes/routes.ts b/src/routes/routes.ts index a36fef35..741017a0 100644 --- a/src/routes/routes.ts +++ b/src/routes/routes.ts @@ -36,6 +36,8 @@ import { CredentialDefinitionController } from './../controllers/anoncreds/cred- // WARNING: This 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 { ProofController } from './../controllers/didcomm/proofs/ProofController'; +// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { VerifierController } from './../controllers/openid4vc/verifiers/verifier.Controller'; import { expressAuthentication } from './../authentication'; // @ts-ignore - no great way to install types from subpackage @@ -2030,6 +2032,235 @@ const models: TsoaRoute.Models = { "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 + "DidCommProofExchangeRecord": { + "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 + "AnonCredsPresentationPreviewAttribute": { + "dataType": "refObject", + "properties": { + "name": {"dataType":"string","required":true}, + "credentialDefinitionId": {"dataType":"string"}, + "mimeType": {"dataType":"string"}, + "value": {"dataType":"string"}, + "referent": {"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 + "AnonCredsPredicateType": { + "dataType": "refAlias", + "type": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":[">="]},{"dataType":"enum","enums":[">"]},{"dataType":"enum","enums":["<="]},{"dataType":"enum","enums":["<"]}],"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 + "AnonCredsPresentationPreviewPredicate": { + "dataType": "refObject", + "properties": { + "name": {"dataType":"string","required":true}, + "credentialDefinitionId": {"dataType":"string","required":true}, + "predicate": {"ref":"AnonCredsPredicateType","required":true}, + "threshold": {"dataType":"double","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "AnonCredsNonRevokedInterval": { + "dataType": "refObject", + "properties": { + "from": {"dataType":"double"}, + "to": {"dataType":"double"}, + }, + "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 + "AnonCredsProposeProofFormat": { + "dataType": "refObject", + "properties": { + "name": {"dataType":"string"}, + "version": {"dataType":"string"}, + "attributes": {"dataType":"array","array":{"dataType":"refObject","ref":"AnonCredsPresentationPreviewAttribute"}}, + "predicates": {"dataType":"array","array":{"dataType":"refObject","ref":"AnonCredsPresentationPreviewPredicate"}}, + "nonRevokedInterval": {"ref":"AnonCredsNonRevokedInterval"}, + }, + "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 + "Schema": { + "dataType": "refObject", + "properties": { + "uri": {"dataType":"string","required":true}, + "required": {"dataType":"boolean"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "FilterV1": { + "dataType": "refObject", + "properties": { + "const": {"ref":"OneOfNumberStringBoolean"}, + "enum": {"dataType":"array","array":{"dataType":"refAlias","ref":"OneOfNumberStringBoolean"}}, + "exclusiveMinimum": {"ref":"OneOfNumberString"}, + "exclusiveMaximum": {"ref":"OneOfNumberString"}, + "format": {"dataType":"string"}, + "minLength": {"dataType":"double"}, + "maxLength": {"dataType":"double"}, + "minimum": {"ref":"OneOfNumberString"}, + "maximum": {"ref":"OneOfNumberString"}, + "not": {"dataType":"object"}, + "pattern": {"dataType":"string"}, + "type": {"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 + "FieldV1": { + "dataType": "refObject", + "properties": { + "id": {"dataType":"string"}, + "path": {"dataType":"array","array":{"dataType":"string"},"required":true}, + "purpose": {"dataType":"string"}, + "filter": {"ref":"FilterV1"}, + "predicate": {"ref":"Optionality"}, + }, + "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 + "ConstraintsV1": { + "dataType": "refObject", + "properties": { + "limit_disclosure": {"ref":"Optionality"}, + "statuses": {"ref":"Statuses"}, + "fields": {"dataType":"array","array":{"dataType":"refObject","ref":"FieldV1"}}, + "subject_is_issuer": {"ref":"Optionality"}, + "is_holder": {"dataType":"array","array":{"dataType":"refObject","ref":"HolderSubject"}}, + "same_subject": {"dataType":"array","array":{"dataType":"refObject","ref":"HolderSubject"}}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "InputDescriptorV1": { + "dataType": "refObject", + "properties": { + "id": {"dataType":"string","required":true}, + "name": {"dataType":"string"}, + "purpose": {"dataType":"string"}, + "group": {"dataType":"array","array":{"dataType":"string"}}, + "schema": {"dataType":"array","array":{"dataType":"refObject","ref":"Schema"},"required":true}, + "issuance": {"dataType":"array","array":{"dataType":"refObject","ref":"Issuance"}}, + "constraints": {"ref":"ConstraintsV1"}, + }, + "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 + "PresentationDefinitionV1": { + "dataType": "refObject", + "properties": { + "id": {"dataType":"string","required":true}, + "name": {"dataType":"string"}, + "purpose": {"dataType":"string"}, + "format": {"ref":"Format"}, + "submission_requirements": {"dataType":"array","array":{"dataType":"refObject","ref":"SubmissionRequirement"}}, + "input_descriptors": {"dataType":"array","array":{"dataType":"refObject","ref":"InputDescriptorV1"},"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 + "DidCommProofFormatPayload_ProofFormats.createProposal_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"indy":{"ref":"AnonCredsProposeProofFormat"},"anoncreds":{"ref":"AnonCredsProposeProofFormat"},"presentationExchange":{"dataType":"nestedObjectLiteral","nestedProperties":{"presentationDefinition":{"ref":"PresentationDefinitionV1","required":true}}}},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "DidCommAutoAcceptProof": { + "dataType": "refEnum", + "enums": ["always","contentApproved","never"], + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "RequestProofProposalOptions": { + "dataType": "refObject", + "properties": { + "protocolVersion": {"ref":"ProtocolVersion","required":true}, + "connectionId": {"dataType":"string","required":true}, + "proofFormats": {"ref":"DidCommProofFormatPayload_ProofFormats.createProposal_","required":true}, + "goalCode": {"dataType":"string"}, + "parentThreadId": {"dataType":"string"}, + "autoAcceptProof": {"ref":"DidCommAutoAcceptProof"}, + "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 + "DidCommProofFormatPayload_ProofFormats.acceptProposal_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"indy":{"dataType":"nestedObjectLiteral","nestedProperties":{"version":{"dataType":"string"},"name":{"dataType":"string"}}},"anoncreds":{"dataType":"nestedObjectLiteral","nestedProperties":{"version":{"dataType":"string"},"name":{"dataType":"string"}}},"presentationExchange":{"dataType":"nestedObjectLiteral","nestedProperties":{"options":{"dataType":"nestedObjectLiteral","nestedProperties":{"domain":{"dataType":"string"},"challenge":{"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 + "AcceptProofProposal": { + "dataType": "refObject", + "properties": { + "proofExchangeRecordId": {"dataType":"string","required":true}, + "proofFormats": {"ref":"DidCommProofFormatPayload_ProofFormats.acceptProposal_","required":true}, + "comment": {"dataType":"string"}, + "autoAcceptProof": {"ref":"DidCommAutoAcceptProof"}, + "goalCode": {"dataType":"string"}, + "willConfirm": {"dataType":"boolean"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "RequestProofOptions": { + "dataType": "refObject", + "properties": { + "connectionId": {"dataType":"string","required":true}, + "protocolVersion": {"dataType":"string","required":true}, + "proofFormats": {"dataType":"any","required":true}, + "comment": {"dataType":"string","required":true}, + "autoAcceptProof": {"ref":"DidCommAutoAcceptProof","required":true}, + "goalCode": {"dataType":"string"}, + "parentThreadId": {"dataType":"string"}, + "willConfirm": {"dataType":"boolean"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "CreateProofRequestOobOptions": { + "dataType": "refObject", + "properties": { + "protocolVersion": {"dataType":"string","required":true}, + "proofFormats": {"dataType":"any","required":true}, + "goalCode": {"dataType":"string"}, + "parentThreadId": {"dataType":"string"}, + "willConfirm": {"dataType":"boolean"}, + "autoAcceptProof": {"ref":"DidCommAutoAcceptProof"}, + "comment": {"dataType":"string"}, + "label": {"dataType":"string"}, + "imageUrl": {"dataType":"string"}, + "recipientKey": {"dataType":"string"}, + "invitationDid": {"dataType":"string"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "ProofFormatDataMessagePayload__40_LegacyIndyDidCommProofFormat-or-AnonCredsDidCommProofFormat-or-DidCommDifPresentationExchangeProofFormat_41_-Array.proposal_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "ProofFormatDataMessagePayload__40_LegacyIndyDidCommProofFormat-or-AnonCredsDidCommProofFormat-or-DidCommDifPresentationExchangeProofFormat_41_-Array.request_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "ProofFormatDataMessagePayload__40_LegacyIndyDidCommProofFormat-or-AnonCredsDidCommProofFormat-or-DidCommDifPresentationExchangeProofFormat_41_-Array.presentation_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "GetProofFormatDataReturn__40_LegacyIndyDidCommProofFormat-or-AnonCredsDidCommProofFormat-or-DidCommDifPresentationExchangeProofFormat_41_-Array_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"presentation":{"ref":"ProofFormatDataMessagePayload__40_LegacyIndyDidCommProofFormat-or-AnonCredsDidCommProofFormat-or-DidCommDifPresentationExchangeProofFormat_41_-Array.presentation_"},"request":{"ref":"ProofFormatDataMessagePayload__40_LegacyIndyDidCommProofFormat-or-AnonCredsDidCommProofFormat-or-DidCommDifPresentationExchangeProofFormat_41_-Array.request_"},"proposal":{"ref":"ProofFormatDataMessagePayload__40_LegacyIndyDidCommProofFormat-or-AnonCredsDidCommProofFormat-or-DidCommDifPresentationExchangeProofFormat_41_-Array.proposal_"}},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "OpenId4VcVerifierRecord": { "dataType": "refAlias", "type": {"ref":"Record_string.unknown_","validators":{}}, @@ -5062,6 +5293,340 @@ 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 argsProofController_getAllProofs: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + threadId: {"in":"query","name":"threadId","dataType":"string"}, + }; + app.get('/didcomm/proofs', + authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), + ...(fetchMiddlewares(ProofController)), + ...(fetchMiddlewares(ProofController.prototype.getAllProofs)), + + async function ProofController_getAllProofs(request: ExRequest, response: ExResponse, next: any) { + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args: argsProofController_getAllProofs, request, response }); + + const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; + + const controller: any = await container.get(ProofController); + if (typeof controller['setStatus'] === 'function') { + controller.setStatus(undefined); + } + + await templateService.apiHandler({ + methodName: 'getAllProofs', + controller, + response, + next, + validatedArgs, + successStatus: undefined, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + const argsProofController_getProofById: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + proofRecordId: {"in":"path","name":"proofRecordId","required":true,"ref":"RecordId"}, + }; + app.get('/didcomm/proofs/:proofRecordId', + authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), + ...(fetchMiddlewares(ProofController)), + ...(fetchMiddlewares(ProofController.prototype.getProofById)), + + async function ProofController_getProofById(request: ExRequest, response: ExResponse, next: any) { + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args: argsProofController_getProofById, request, response }); + + const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; + + const controller: any = await container.get(ProofController); + if (typeof controller['setStatus'] === 'function') { + controller.setStatus(undefined); + } + + await templateService.apiHandler({ + methodName: 'getProofById', + controller, + response, + next, + validatedArgs, + successStatus: undefined, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + const argsProofController_proposeProof: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + requestProofProposalOptions: {"in":"body","name":"requestProofProposalOptions","required":true,"ref":"RequestProofProposalOptions"}, + }; + app.post('/didcomm/proofs/propose-proof', + authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), + ...(fetchMiddlewares(ProofController)), + ...(fetchMiddlewares(ProofController.prototype.proposeProof)), + + async function ProofController_proposeProof(request: ExRequest, response: ExResponse, next: any) { + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args: argsProofController_proposeProof, request, response }); + + const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; + + const controller: any = await container.get(ProofController); + if (typeof controller['setStatus'] === 'function') { + controller.setStatus(undefined); + } + + await templateService.apiHandler({ + methodName: 'proposeProof', + controller, + response, + next, + validatedArgs, + successStatus: undefined, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + const argsProofController_acceptProposal: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + acceptProposal: {"in":"body","name":"acceptProposal","required":true,"ref":"AcceptProofProposal"}, + }; + app.post('/didcomm/proofs/accept-proposal', + authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), + ...(fetchMiddlewares(ProofController)), + ...(fetchMiddlewares(ProofController.prototype.acceptProposal)), + + async function ProofController_acceptProposal(request: ExRequest, response: ExResponse, next: any) { + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args: argsProofController_acceptProposal, request, response }); + + const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; + + const controller: any = await container.get(ProofController); + if (typeof controller['setStatus'] === 'function') { + controller.setStatus(undefined); + } + + await templateService.apiHandler({ + methodName: 'acceptProposal', + controller, + response, + next, + validatedArgs, + successStatus: undefined, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + const argsProofController_requestProof: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + requestProofOptions: {"in":"body","name":"requestProofOptions","required":true,"ref":"RequestProofOptions"}, + }; + app.post('/didcomm/proofs/request-proof', + authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), + ...(fetchMiddlewares(ProofController)), + ...(fetchMiddlewares(ProofController.prototype.requestProof)), + + async function ProofController_requestProof(request: ExRequest, response: ExResponse, next: any) { + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args: argsProofController_requestProof, request, response }); + + const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; + + const controller: any = await container.get(ProofController); + if (typeof controller['setStatus'] === 'function') { + controller.setStatus(undefined); + } + + await templateService.apiHandler({ + methodName: 'requestProof', + controller, + response, + next, + validatedArgs, + successStatus: undefined, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + const argsProofController_createRequest: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + createRequestOptions: {"in":"body","name":"createRequestOptions","required":true,"ref":"CreateProofRequestOobOptions"}, + }; + app.post('/didcomm/proofs/create-request-oob', + authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), + ...(fetchMiddlewares(ProofController)), + ...(fetchMiddlewares(ProofController.prototype.createRequest)), + + async function ProofController_createRequest(request: ExRequest, response: ExResponse, next: any) { + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args: argsProofController_createRequest, request, response }); + + const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; + + const controller: any = await container.get(ProofController); + if (typeof controller['setStatus'] === 'function') { + controller.setStatus(undefined); + } + + await templateService.apiHandler({ + methodName: 'createRequest', + controller, + response, + next, + validatedArgs, + successStatus: undefined, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + const argsProofController_acceptRequest: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + proofRecordId: {"in":"path","name":"proofRecordId","required":true,"dataType":"string"}, + body: {"in":"body","name":"body","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"comment":{"dataType":"string"},"filterByNonRevocationRequirements":{"dataType":"boolean"},"filterByPresentationPreview":{"dataType":"boolean"}}}, + }; + app.post('/didcomm/proofs/:proofRecordId/accept-request', + authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), + ...(fetchMiddlewares(ProofController)), + ...(fetchMiddlewares(ProofController.prototype.acceptRequest)), + + async function ProofController_acceptRequest(request: ExRequest, response: ExResponse, next: any) { + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args: argsProofController_acceptRequest, request, response }); + + const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; + + const controller: any = await container.get(ProofController); + if (typeof controller['setStatus'] === 'function') { + controller.setStatus(undefined); + } + + await templateService.apiHandler({ + methodName: 'acceptRequest', + controller, + response, + next, + validatedArgs, + successStatus: undefined, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + const argsProofController_acceptPresentation: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + proofRecordId: {"in":"path","name":"proofRecordId","required":true,"dataType":"string"}, + }; + app.post('/didcomm/proofs/:proofRecordId/accept-presentation', + authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), + ...(fetchMiddlewares(ProofController)), + ...(fetchMiddlewares(ProofController.prototype.acceptPresentation)), + + async function ProofController_acceptPresentation(request: ExRequest, response: ExResponse, next: any) { + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args: argsProofController_acceptPresentation, request, response }); + + const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; + + const controller: any = await container.get(ProofController); + if (typeof controller['setStatus'] === 'function') { + controller.setStatus(undefined); + } + + await templateService.apiHandler({ + methodName: 'acceptPresentation', + controller, + response, + next, + validatedArgs, + successStatus: undefined, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + const argsProofController_proofFormData: Record = { + request: {"in":"request","name":"request","required":true,"dataType":"object"}, + proofRecordId: {"in":"path","name":"proofRecordId","required":true,"dataType":"string"}, + }; + app.get('/didcomm/proofs/:proofRecordId/form-data', + authenticateMiddleware([{"jwt":["tenant","dedicated"]}]), + ...(fetchMiddlewares(ProofController)), + ...(fetchMiddlewares(ProofController.prototype.proofFormData)), + + async function ProofController_proofFormData(request: ExRequest, response: ExResponse, next: any) { + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args: argsProofController_proofFormData, request, response }); + + const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; + + const controller: any = await container.get(ProofController); + if (typeof controller['setStatus'] === 'function') { + controller.setStatus(undefined); + } + + await templateService.apiHandler({ + methodName: 'proofFormData', + controller, + response, + next, + validatedArgs, + successStatus: undefined, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa const 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 a306c85a..b2055646 100644 --- a/src/routes/swagger.json +++ b/src/routes/swagger.json @@ -4581,306 +4581,626 @@ "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" + "DidCommProofExchangeRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" }, - "OpenId4VcSiopVerifierClientMetadata": { + "AnonCredsPresentationPreviewAttribute": { "properties": { - "client_name": { + "name": { "type": "string" }, - "logo_uri": { + "credentialDefinitionId": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "value": { + "type": "string" + }, + "referent": { "type": "string" } }, + "required": [ + "name" + ], "type": "object", "additionalProperties": false }, - "OpenId4VcSiopCreateVerifierOptions": { + "AnonCredsPredicateType": { + "type": "string", + "enum": [ + ">=", + ">", + "<=", + "<" + ] + }, + "AnonCredsPresentationPreviewPredicate": { "properties": { - "verifierId": { + "name": { "type": "string" }, - "clientMetadata": { - "$ref": "#/components/schemas/OpenId4VcSiopVerifierClientMetadata" + "credentialDefinitionId": { + "type": "string" + }, + "predicate": { + "$ref": "#/components/schemas/AnonCredsPredicateType" + }, + "threshold": { + "type": "number", + "format": "double" } }, + "required": [ + "name", + "credentialDefinitionId", + "predicate", + "threshold" + ], "type": "object", "additionalProperties": false }, - "OpenId4VcUpdateVerifierRecordOptions": { + "AnonCredsNonRevokedInterval": { "properties": { - "clientMetadata": { - "$ref": "#/components/schemas/OpenId4VcSiopVerifierClientMetadata" + "from": { + "type": "number", + "format": "double" + }, + "to": { + "type": "number", + "format": "double" } }, "type": "object", "additionalProperties": false - } - }, - "securitySchemes": { - "apiKey": { - "type": "apiKey", - "name": "Authorization", - "in": "header" }, - "jwt": { - "type": "http", - "scheme": "bearer", - "bearerFormat": "JWT" - } - } - }, - "info": { - "title": "credo-controller", - "version": "2.0.0", - "description": "Rest endpoint wrapper for using your agent over HTTP", - "license": { - "name": "Apache-2.0" - }, - "contact": {} - }, - "paths": { - "/x509": { - "post": { - "operationId": "CreateX509Certificate", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "properties": { - "keyId": {}, - "publicCertificateBase64": { - "type": "string" - } - }, - "required": [ - "keyId", - "publicCertificateBase64" - ], - "type": "object" - } - } - } + "AnonCredsProposeProofFormat": { + "description": "Interface for creating an anoncreds proof proposal.", + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "attributes": { + "items": { + "$ref": "#/components/schemas/AnonCredsPresentationPreviewAttribute" + }, + "type": "array" + }, + "predicates": { + "items": { + "$ref": "#/components/schemas/AnonCredsPresentationPreviewPredicate" + }, + "type": "array" + }, + "nonRevokedInterval": { + "$ref": "#/components/schemas/AnonCredsNonRevokedInterval" } }, - "tags": [ - "x509" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] + "type": "object", + "additionalProperties": false + }, + "Schema": { + "properties": { + "uri": { + "type": "string" + }, + "required": { + "type": "boolean" } + }, + "required": [ + "uri" ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/X509CreateCertificateOptionsDto" - } - } - } - } - } - }, - "/x509/import": { - "post": { - "operationId": "ImportX509Certificates", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "properties": { - "keyId": {}, - "issuerCertificate": { - "type": "string" - } - }, - "required": [ - "keyId", - "issuerCertificate" - ], - "type": "object" - } - } - } + "type": "object", + "additionalProperties": false + }, + "FilterV1": { + "properties": { + "const": { + "$ref": "#/components/schemas/OneOfNumberStringBoolean" + }, + "enum": { + "items": { + "$ref": "#/components/schemas/OneOfNumberStringBoolean" + }, + "type": "array" + }, + "exclusiveMinimum": { + "$ref": "#/components/schemas/OneOfNumberString" + }, + "exclusiveMaximum": { + "$ref": "#/components/schemas/OneOfNumberString" + }, + "format": { + "type": "string" + }, + "minLength": { + "type": "number", + "format": "double" + }, + "maxLength": { + "type": "number", + "format": "double" + }, + "minimum": { + "$ref": "#/components/schemas/OneOfNumberString" + }, + "maximum": { + "$ref": "#/components/schemas/OneOfNumberString" + }, + "not": { + "additionalProperties": false, + "type": "object" + }, + "pattern": { + "type": "string" + }, + "type": { + "type": "string" } }, - "tags": [ - "x509" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] + "type": "object", + "additionalProperties": false + }, + "FieldV1": { + "properties": { + "id": { + "type": "string" + }, + "path": { + "items": { + "type": "string" + }, + "type": "array" + }, + "purpose": { + "type": "string" + }, + "filter": { + "$ref": "#/components/schemas/FilterV1" + }, + "predicate": { + "$ref": "#/components/schemas/Optionality" } + }, + "required": [ + "path" ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/X509ImportCertificateOptionsDto" - } - } - } - } - } - }, - "/x509/trusted": { - "post": { - "operationId": "AddTrustedCertificate", - "responses": { - "204": { - "description": "No content" + "type": "object", + "additionalProperties": false + }, + "ConstraintsV1": { + "properties": { + "limit_disclosure": { + "$ref": "#/components/schemas/Optionality" + }, + "statuses": { + "$ref": "#/components/schemas/Statuses" + }, + "fields": { + "items": { + "$ref": "#/components/schemas/FieldV1" + }, + "type": "array" + }, + "subject_is_issuer": { + "$ref": "#/components/schemas/Optionality" + }, + "is_holder": { + "items": { + "$ref": "#/components/schemas/HolderSubject" + }, + "type": "array" + }, + "same_subject": { + "items": { + "$ref": "#/components/schemas/HolderSubject" + }, + "type": "array" } }, - "tags": [ - "x509" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "certificate": { - "type": "string" - } - }, - "required": [ - "certificate" - ], - "type": "object" - } - } - } - } + "type": "object", + "additionalProperties": false }, - "get": { - "operationId": "GetTrustedCertificates", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "items": { - "type": "string" - }, - "type": "array" - } - } - } + "InputDescriptorV1": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "purpose": { + "type": "string" + }, + "group": { + "items": { + "type": "string" + }, + "type": "array" + }, + "schema": { + "items": { + "$ref": "#/components/schemas/Schema" + }, + "type": "array" + }, + "issuance": { + "items": { + "$ref": "#/components/schemas/Issuance" + }, + "type": "array" + }, + "constraints": { + "$ref": "#/components/schemas/ConstraintsV1" } }, - "tags": [ - "x509" + "required": [ + "id", + "schema" ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] + "type": "object", + "additionalProperties": false + }, + "PresentationDefinitionV1": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "purpose": { + "type": "string" + }, + "format": { + "$ref": "#/components/schemas/Format" + }, + "submission_requirements": { + "items": { + "$ref": "#/components/schemas/SubmissionRequirement" + }, + "type": "array" + }, + "input_descriptors": { + "items": { + "$ref": "#/components/schemas/InputDescriptorV1" + }, + "type": "array" } + }, + "required": [ + "id", + "input_descriptors" ], - "parameters": [] - } - }, - "/x509/decode": { - "post": { - "operationId": "DecodeCertificate", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/X509Certificate" - } + "type": "object", + "additionalProperties": false + }, + "DidCommProofFormatPayload_ProofFormats.createProposal_": { + "properties": { + "indy": { + "$ref": "#/components/schemas/AnonCredsProposeProofFormat" + }, + "anoncreds": { + "$ref": "#/components/schemas/AnonCredsProposeProofFormat" + }, + "presentationExchange": { + "properties": { + "presentationDefinition": { + "$ref": "#/components/schemas/PresentationDefinitionV1" } - } + }, + "required": [ + "presentationDefinition" + ], + "type": "object" } }, - "tags": [ - "x509" + "type": "object", + "description": "Get the payload for a specific method from a list of ProofFormat interfaces and a method" + }, + "DidCommAutoAcceptProof": { + "description": "Typing of the state for auto acceptance", + "enum": [ + "always", + "contentApproved", + "never" ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] + "type": "string" + }, + "RequestProofProposalOptions": { + "properties": { + "protocolVersion": { + "$ref": "#/components/schemas/ProtocolVersion" + }, + "connectionId": { + "type": "string" + }, + "proofFormats": { + "$ref": "#/components/schemas/DidCommProofFormatPayload_ProofFormats.createProposal_" + }, + "goalCode": { + "type": "string" + }, + "parentThreadId": { + "type": "string" + }, + "autoAcceptProof": { + "$ref": "#/components/schemas/DidCommAutoAcceptProof" + }, + "comment": { + "type": "string" } + }, + "required": [ + "protocolVersion", + "connectionId", + "proofFormats" ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { + "type": "object", + "additionalProperties": false + }, + "DidCommProofFormatPayload_ProofFormats.acceptProposal_": { + "properties": { + "indy": { + "properties": { + "version": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "anoncreds": { + "properties": { + "version": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "presentationExchange": { + "properties": { + "options": { "properties": { - "certificate": { + "domain": { + "type": "string" + }, + "challenge": { "type": "string" } }, - "required": [ - "certificate" - ], "type": "object" } - } + }, + "type": "object" } - } + }, + "type": "object", + "description": "Get the payload for a specific method from a list of ProofFormat interfaces and a method" + }, + "AcceptProofProposal": { + "properties": { + "proofExchangeRecordId": { + "type": "string" + }, + "proofFormats": { + "$ref": "#/components/schemas/DidCommProofFormatPayload_ProofFormats.acceptProposal_" + }, + "comment": { + "type": "string" + }, + "autoAcceptProof": { + "$ref": "#/components/schemas/DidCommAutoAcceptProof" + }, + "goalCode": { + "type": "string" + }, + "willConfirm": { + "type": "boolean" + } + }, + "required": [ + "proofExchangeRecordId", + "proofFormats" + ], + "type": "object", + "additionalProperties": false + }, + "RequestProofOptions": { + "properties": { + "connectionId": { + "type": "string" + }, + "protocolVersion": { + "type": "string" + }, + "proofFormats": {}, + "comment": { + "type": "string" + }, + "autoAcceptProof": { + "$ref": "#/components/schemas/DidCommAutoAcceptProof" + }, + "goalCode": { + "type": "string" + }, + "parentThreadId": { + "type": "string" + }, + "willConfirm": { + "type": "boolean" + } + }, + "required": [ + "connectionId", + "protocolVersion", + "proofFormats", + "comment", + "autoAcceptProof" + ], + "type": "object", + "additionalProperties": false + }, + "CreateProofRequestOobOptions": { + "properties": { + "protocolVersion": { + "type": "string" + }, + "proofFormats": {}, + "goalCode": { + "type": "string" + }, + "parentThreadId": { + "type": "string" + }, + "willConfirm": { + "type": "boolean" + }, + "autoAcceptProof": { + "$ref": "#/components/schemas/DidCommAutoAcceptProof" + }, + "comment": { + "type": "string" + }, + "label": { + "type": "string" + }, + "imageUrl": { + "type": "string" + }, + "recipientKey": { + "type": "string" + }, + "invitationDid": { + "type": "string" + } + }, + "required": [ + "protocolVersion", + "proofFormats" + ], + "type": "object", + "additionalProperties": false + }, + "ProofFormatDataMessagePayload__40_LegacyIndyDidCommProofFormat-or-AnonCredsDidCommProofFormat-or-DidCommDifPresentationExchangeProofFormat_41_-Array.proposal_": { + "properties": {}, + "type": "object", + "description": "Get the format data payload for a specific message from a list of ProofFormat interfaces and a message\n\nFor an indy offer, this resolves to the proof request format as defined here:\nhttps://github.com/hyperledger/aries-rfcs/tree/b3a3942ef052039e73cd23d847f42947f8287da2/features/0592-indy-attachments#proof-request-format" + }, + "ProofFormatDataMessagePayload__40_LegacyIndyDidCommProofFormat-or-AnonCredsDidCommProofFormat-or-DidCommDifPresentationExchangeProofFormat_41_-Array.request_": { + "properties": {}, + "type": "object", + "description": "Get the format data payload for a specific message from a list of ProofFormat interfaces and a message\n\nFor an indy offer, this resolves to the proof request format as defined here:\nhttps://github.com/hyperledger/aries-rfcs/tree/b3a3942ef052039e73cd23d847f42947f8287da2/features/0592-indy-attachments#proof-request-format" + }, + "ProofFormatDataMessagePayload__40_LegacyIndyDidCommProofFormat-or-AnonCredsDidCommProofFormat-or-DidCommDifPresentationExchangeProofFormat_41_-Array.presentation_": { + "properties": {}, + "type": "object", + "description": "Get the format data payload for a specific message from a list of ProofFormat interfaces and a message\n\nFor an indy offer, this resolves to the proof request format as defined here:\nhttps://github.com/hyperledger/aries-rfcs/tree/b3a3942ef052039e73cd23d847f42947f8287da2/features/0592-indy-attachments#proof-request-format" + }, + "GetProofFormatDataReturn__40_LegacyIndyDidCommProofFormat-or-AnonCredsDidCommProofFormat-or-DidCommDifPresentationExchangeProofFormat_41_-Array_": { + "properties": { + "presentation": { + "$ref": "#/components/schemas/ProofFormatDataMessagePayload__40_LegacyIndyDidCommProofFormat-or-AnonCredsDidCommProofFormat-or-DidCommDifPresentationExchangeProofFormat_41_-Array.presentation_" + }, + "request": { + "$ref": "#/components/schemas/ProofFormatDataMessagePayload__40_LegacyIndyDidCommProofFormat-or-AnonCredsDidCommProofFormat-or-DidCommDifPresentationExchangeProofFormat_41_-Array.request_" + }, + "proposal": { + "$ref": "#/components/schemas/ProofFormatDataMessagePayload__40_LegacyIndyDidCommProofFormat-or-AnonCredsDidCommProofFormat-or-DidCommDifPresentationExchangeProofFormat_41_-Array.proposal_" + } + }, + "type": "object" + }, + "OpenId4VcVerifierRecord": { + "$ref": "#/components/schemas/Record_string.unknown_", + "description": "For OID4VC you need to expos metadata files. Each issuer needs to host this metadata. This is not the case for DIDComm where we can just have one /didcomm endpoint.\nSo we create a record per openid issuer/verifier that you want, and each tenant can create multiple issuers/verifiers which have different endpoints\nand metadata files" + }, + "OpenId4VcSiopVerifierClientMetadata": { + "properties": { + "client_name": { + "type": "string" + }, + "logo_uri": { + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + }, + "OpenId4VcSiopCreateVerifierOptions": { + "properties": { + "verifierId": { + "type": "string" + }, + "clientMetadata": { + "$ref": "#/components/schemas/OpenId4VcSiopVerifierClientMetadata" + } + }, + "type": "object", + "additionalProperties": false + }, + "OpenId4VcUpdateVerifierRecordOptions": { + "properties": { + "clientMetadata": { + "$ref": "#/components/schemas/OpenId4VcSiopVerifierClientMetadata" + } + }, + "type": "object", + "additionalProperties": false } }, - "/polygon/create-keys": { + "securitySchemes": { + "apiKey": { + "type": "apiKey", + "name": "Authorization", + "in": "header" + }, + "jwt": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT" + } + } + }, + "info": { + "title": "credo-controller", + "version": "2.0.0", + "description": "Rest endpoint wrapper for using your agent over HTTP", + "license": { + "name": "Apache-2.0" + }, + "contact": {} + }, + "paths": { + "/x509": { "post": { - "operationId": "CreateKeyPair", + "operationId": "CreateX509Certificate", "responses": { "200": { - "description": "Secp256k1KeyPair", + "description": "Ok", "content": { "application/json": { "schema": { "properties": { - "address": { - "type": "string" - }, - "publicKeyBase58": { - "type": "string" - }, - "privateKey": { + "keyId": {}, + "publicCertificateBase64": { "type": "string" } }, "required": [ - "address", - "publicKeyBase58", - "privateKey" + "keyId", + "publicCertificateBase64" ], "type": "object" } @@ -4888,38 +5208,57 @@ } } }, - "description": "Create Secp256k1 key pair for polygon DID", "tags": [ - "Polygon" + "x509" ], "security": [ { "jwt": [ "tenant", - "dedicated", - "Basewallet" + "dedicated" ] } ], - "parameters": [] + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/X509CreateCertificateOptionsDto" + } + } + } + } } }, - "/polygon/create-schema": { + "/x509/import": { "post": { - "operationId": "CreateSchema", + "operationId": "ImportX509Certificates", "responses": { "200": { - "description": "Schema JSON", + "description": "Ok", "content": { "application/json": { - "schema": {} + "schema": { + "properties": { + "keyId": {}, + "issuerCertificate": { + "type": "string" + } + }, + "required": [ + "keyId", + "issuerCertificate" + ], + "type": "object" + } } } } }, - "description": "Create polygon based W3C schema", "tags": [ - "Polygon" + "x509" ], "security": [ { @@ -4935,35 +5274,237 @@ "content": { "application/json": { "schema": { - "properties": { - "schema": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "schemaName": { - "type": "string" - }, - "did": { - "type": "string" - } - }, - "required": [ - "schema", - "schemaName", - "did" - ], - "type": "object" + "$ref": "#/components/schemas/X509ImportCertificateOptionsDto" } } } } } }, - "/polygon/estimate-transaction": { + "/x509/trusted": { "post": { - "operationId": "EstimateTransaction", + "operationId": "AddTrustedCertificate", "responses": { - "200": { - "description": "Transaction Object", + "204": { + "description": "No content" + } + }, + "tags": [ + "x509" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "certificate": { + "type": "string" + } + }, + "required": [ + "certificate" + ], + "type": "object" + } + } + } + } + }, + "get": { + "operationId": "GetTrustedCertificates", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + } + } + } + }, + "tags": [ + "x509" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [] + } + }, + "/x509/decode": { + "post": { + "operationId": "DecodeCertificate", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/X509Certificate" + } + } + } + } + }, + "tags": [ + "x509" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "certificate": { + "type": "string" + } + }, + "required": [ + "certificate" + ], + "type": "object" + } + } + } + } + } + }, + "/polygon/create-keys": { + "post": { + "operationId": "CreateKeyPair", + "responses": { + "200": { + "description": "Secp256k1KeyPair", + "content": { + "application/json": { + "schema": { + "properties": { + "address": { + "type": "string" + }, + "publicKeyBase58": { + "type": "string" + }, + "privateKey": { + "type": "string" + } + }, + "required": [ + "address", + "publicKeyBase58", + "privateKey" + ], + "type": "object" + } + } + } + } + }, + "description": "Create Secp256k1 key pair for polygon DID", + "tags": [ + "Polygon" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated", + "Basewallet" + ] + } + ], + "parameters": [] + } + }, + "/polygon/create-schema": { + "post": { + "operationId": "CreateSchema", + "responses": { + "200": { + "description": "Schema JSON", + "content": { + "application/json": { + "schema": {} + } + } + } + }, + "description": "Create polygon based W3C schema", + "tags": [ + "Polygon" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "schema": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "schemaName": { + "type": "string" + }, + "did": { + "type": "string" + } + }, + "required": [ + "schema", + "schemaName", + "did" + ], + "type": "object" + } + } + } + } + } + }, + "/polygon/estimate-transaction": { + "post": { + "operationId": "EstimateTransaction", + "responses": { + "200": { + "description": "Transaction Object", "content": { "application/json": { "schema": {} @@ -5586,9 +6127,519 @@ } } }, - "description": "Creates an issuer with issuer metadata.", + "description": "Creates an issuer with issuer metadata.", + "tags": [ + "oid4vc issuers" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateIssuerOptions" + } + } + } + } + }, + "get": { + "operationId": "GetIssuersByQuery", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenId4VcIssuerRecord" + }, + { + "items": { + "$ref": "#/components/schemas/OpenId4VcIssuerRecord" + }, + "type": "array" + } + ] + } + } + } + } + }, + "description": "Query issuers by optional publicIssuerId.", + "tags": [ + "oid4vc issuers" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [ + { + "in": "query", + "name": "publicIssuerId", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/openid4vc/issuer/{publicIssuerId}": { + "put": { + "operationId": "UpdateIssuerMetadata", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenId4VcIssuerRecord" + } + } + } + } + }, + "description": "Updates issuer metadata for a given publicIssuerId.", + "tags": [ + "oid4vc issuers" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [ + { + "in": "path", + "name": "publicIssuerId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateIssuerRecordOptions" + } + } + } + } + }, + "get": { + "operationId": "GetIssuer", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenId4VcIssuerRecord" + } + } + } + } + }, + "description": "Returns a specific issuer by publicIssuerId.", + "tags": [ + "oid4vc issuers" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [ + { + "in": "path", + "name": "publicIssuerId", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, + "/openid4vc/issuer/{issuerId}/metadata": { + "get": { + "operationId": "GetIssuerAgentMetaData", + "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": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [ + { + "in": "path", + "name": "issuanceSessionId", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, + "/openid4vc/issuance-sessions": { + "get": { + "operationId": "GetIssuanceSessionsByQuery", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/OpenId4VcIssuanceSessionRecord" + }, + "type": "array" + } + } + } + } + }, + "description": "Fetch all issuance sessions by query", + "tags": [ + "oid4vc issuance sessions" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [ + { + "in": "query", + "name": "cNonce", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "publicIssuerId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "preAuthorizedCode", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "state", + "required": false, + "schema": { + "$ref": "#/components/schemas/OpenId4VcIssuanceSessionState" + } + }, + { + "in": "query", + "name": "credentialOfferUri", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "authorizationCode", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/openid4vc/holder/sd-jwt-vcs": { + "get": { + "operationId": "GetSdJwtCredentials", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/SdJwtVcRecord" + }, + "type": "array" + } + } + } + } + }, + "description": "Get SdJwt type of credentials", "tags": [ - "oid4vc issuers" + "oid4vc holders" ], "security": [ { @@ -5598,45 +6649,30 @@ ] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateIssuerOptions" - } - } - } - } - }, + "parameters": [] + } + }, + "/openid4vc/holder/mdoc-vcs": { "get": { - "operationId": "GetIssuersByQuery", + "operationId": "GetMdocCredentials", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenId4VcIssuerRecord" - }, - { - "items": { - "$ref": "#/components/schemas/OpenId4VcIssuerRecord" - }, - "type": "array" - } - ] + "items": { + "$ref": "#/components/schemas/MdocRecord" + }, + "type": "array" } } } } }, - "description": "Query issuers by optional publicIssuerId.", + "description": "Fetch all mso mdoc credentials in wallet", "tags": [ - "oid4vc issuers" + "oid4vc holders" ], "security": [ { @@ -5646,36 +6682,25 @@ ] } ], - "parameters": [ - { - "in": "query", - "name": "publicIssuerId", - "required": false, - "schema": { - "type": "string" - } - } - ] + "parameters": [] } }, - "/openid4vc/issuer/{publicIssuerId}": { - "put": { - "operationId": "UpdateIssuerMetadata", + "/openid4vc/holder/mdoc-vcs/decode": { + "post": { + "operationId": "DecodeMdocCredential", "responses": { "200": { "description": "Ok", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenId4VcIssuerRecord" - } + "schema": {} } } } }, - "description": "Updates issuer metadata for a given publicIssuerId.", + "description": "Decode mso mdoc credential in wallet", "tags": [ - "oid4vc issuers" + "oid4vc holders" ], "security": [ { @@ -5685,44 +6710,43 @@ ] } ], - "parameters": [ - { - "in": "path", - "name": "publicIssuerId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateIssuerRecordOptions" + "properties": { + "base64Url": { + "type": "string" + } + }, + "required": [ + "base64Url" + ], + "type": "object" } } } } - }, - "get": { - "operationId": "GetIssuer", + } + }, + "/openid4vc/holder/resolve-credential-offer": { + "post": { + "operationId": "ResolveCredOffer", "responses": { "200": { "description": "Ok", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenId4VcIssuerRecord" - } + "schema": {} } } } }, - "description": "Returns a specific issuer by publicIssuerId.", + "description": "Resolve a credential offer", "tags": [ - "oid4vc issuers" + "oid4vc holders" ], "security": [ { @@ -5732,21 +6756,22 @@ ] } ], - "parameters": [ - { - "in": "path", - "name": "publicIssuerId", - "required": true, - "schema": { - "type": "string" + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResolveCredentialOfferBody" + } } } - ] + } } }, - "/openid4vc/issuer/{issuerId}/metadata": { - "get": { - "operationId": "GetIssuerAgentMetaData", + "/openid4vc/holder/authorization-request": { + "post": { + "operationId": "RequestAuthorizationForCredential", "responses": { "200": { "description": "Ok", @@ -5757,9 +6782,8 @@ } } }, - "description": "Returns metadata for a specific issuer.", "tags": [ - "oid4vc issuers" + "oid4vc holders" ], "security": [ { @@ -5769,44 +6793,35 @@ ] } ], - "parameters": [ - { - "in": "path", - "name": "issuerId", - "required": true, - "schema": { - "type": "string" + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizeRequestCredentialOffer" + } } } - ] + } } }, - "/openid4vc/issuer/{id}": { - "delete": { - "operationId": "DeleteIssuer", + "/openid4vc/holder/request-credential": { + "post": { + "operationId": "RequestCredential", "responses": { "200": { "description": "Ok", "content": { "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } + "schema": {} } } } }, - "description": "Deletes a specific issuer by record id.", + "description": "Initiates a token request, then requests credentials from issuer", "tags": [ - "oid4vc issuers" + "oid4vc holders" ], "security": [ { @@ -5816,48 +6831,35 @@ ] } ], - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RequestCredentialBody" + } } } - ] + } } }, - "/openid4vc/issuance-sessions/create-credential-offer": { + "/openid4vc/holder/resolve-proof-request": { "post": { - "operationId": "CreateCredentialOffer", + "operationId": "ResolveProofRequest", "responses": { "200": { "description": "Ok", "content": { "application/json": { - "schema": { - "properties": { - "issuanceSession": { - "$ref": "#/components/schemas/OpenId4VcIssuanceSessionRecord" - }, - "credentialOffer": { - "type": "string" - } - }, - "required": [ - "issuanceSession", - "credentialOffer" - ], - "type": "object" - } + "schema": {} } } } }, - "description": "Creates a credential offer with the specified credential configurations and authorization type.", + "description": "Resolve a proof request", "tags": [ - "oid4vc issuance sessions" + "oid4vc holders" ], "security": [ { @@ -5873,31 +6875,29 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenId4VcIssuanceSessionsCreateOffer" + "$ref": "#/components/schemas/ResolveProofRequest" } } } } } }, - "/openid4vc/issuance-sessions/{issuanceSessionId}": { - "get": { - "operationId": "GetIssuanceSessionsById", + "/openid4vc/holder/accept-proof-request": { + "post": { + "operationId": "AcceptProofRequest", "responses": { "200": { "description": "Ok", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenId4VcIssuanceSessionRecord" - } + "schema": {} } } } }, - "description": "Get issuance details by issuance SessionId", + "description": "Accept a proof request", "tags": [ - "oid4vc issuance sessions" + "oid4vc holders" ], "security": [ { @@ -5907,34 +6907,34 @@ ] } ], - "parameters": [ - { - "in": "path", - "name": "issuanceSessionId", - "required": true, - "schema": { - "type": "string" + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResolveProofRequest" + } } } - ] - }, - "put": { - "operationId": "UpdateSessionById", + } + } + }, + "/openid4vc/holder/decode-sdjwt": { + "post": { + "operationId": "DecodeSdJwt", "responses": { "200": { "description": "Ok", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenId4VcIssuanceSessionRecord" - } + "schema": {} } } } }, - "description": "Update issuance session metadata by session ID", "tags": [ - "oid4vc issuance sessions" + "oid4vc holders" ], "security": [ { @@ -5944,37 +6944,37 @@ ] } ], - "parameters": [ - { - "in": "path", - "name": "issuanceSessionId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Record_string.unknown_" + "properties": { + "jwt": { + "type": "string" + } + }, + "required": [ + "jwt" + ], + "type": "object" } } } } - }, + } + }, + "/openid4vc/holder/credential": { "delete": { - "operationId": "DeleteIssuanceSessionById", + "operationId": "Delete", "responses": { "204": { "description": "No content" } }, - "description": "Delete issuance session by session ID", "tags": [ - "oid4vc issuance sessions" + "oid4vc holders" ], "security": [ { @@ -5984,215 +6984,243 @@ ] } ], - "parameters": [ - { - "in": "path", - "name": "issuanceSessionId", - "required": true, - "schema": { - "type": "string" + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteCredentialBody" + } } } - ] + } } }, - "/openid4vc/issuance-sessions": { - "get": { - "operationId": "GetIssuanceSessionsByQuery", + "/multi-tenancy/create-tenant": { + "post": { + "operationId": "CreateTenant", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/OpenId4VcIssuanceSessionRecord" + "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 + } }, - "type": "array" + "required": [ + "token", + "metadata", + "allowCache", + "createdAt", + "id", + "storageVersion", + "config", + "type" + ], + "type": "object" } } } } }, - "description": "Fetch all issuance sessions by query", "tags": [ - "oid4vc issuance sessions" + "MultiTenancy" ], "security": [ { "jwt": [ - "tenant", - "dedicated" + "Basewallet" ] } ], - "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/CreateTenantOptions" + } } } - ] + } } }, - "/openid4vc/holder/sd-jwt-vcs": { - "get": { - "operationId": "GetSdJwtCredentials", + "/multi-tenancy/get-token/{tenantId}": { + "post": { + "operationId": "GetTenantToken", "responses": { "200": { "description": "Ok", + "content": { + "application/json": { + "schema": {} + } + } + }, + "404": { + "description": "", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/SdJwtVcRecord" + "properties": { + "reason": { + "type": "string" + } }, - "type": "array" + "required": [ + "reason" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" } } } } }, - "description": "Get SdJwt type of credentials", "tags": [ - "oid4vc holders" + "MultiTenancy" ], "security": [ { "jwt": [ - "tenant", - "dedicated" + "Basewallet" ] } ], - "parameters": [] + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + } + ] } }, - "/openid4vc/holder/mdoc-vcs": { + "/multi-tenancy/{tenantId}": { "get": { - "operationId": "GetMdocCredentials", + "operationId": "GetTenantById", "responses": { "200": { "description": "Ok", + "content": { + "application/json": { + "schema": {} + } + } + }, + "404": { + "description": "", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/MdocRecord" + "properties": { + "reason": { + "type": "string" + } }, - "type": "array" + "required": [ + "reason" + ], + "type": "object" } } } - } - }, - "description": "Fetch all mso mdoc credentials in wallet", - "tags": [ - "oid4vc holders" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [] - } - }, - "/openid4vc/holder/mdoc-vcs/decode": { - "post": { - "operationId": "DecodeMdocCredential", - "responses": { - "200": { - "description": "Ok", + }, + "500": { + "description": "", "content": { "application/json": { - "schema": {} + "schema": { + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" + } } } } }, - "description": "Decode mso mdoc credential in wallet", "tags": [ - "oid4vc holders" + "MultiTenancy" ], "security": [ { "jwt": [ - "tenant", - "dedicated" + "Basewallet" ] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "base64Url": { - "type": "string" - } - }, - "required": [ - "base64Url" - ], - "type": "object" - } + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" } } - } - } - }, - "/openid4vc/holder/resolve-credential-offer": { - "post": { - "operationId": "ResolveCredOffer", + ] + }, + "delete": { + "operationId": "DeleteTenantById", "responses": { "200": { "description": "Ok", @@ -6201,86 +7229,85 @@ "schema": {} } } - } - }, - "description": "Resolve a credential offer", - "tags": [ - "oid4vc holders" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResolveCredentialOfferBody" + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "properties": { + "reason": { + "type": "string" + } + }, + "required": [ + "reason" + ], + "type": "object" + } } } - } - } - } - }, - "/openid4vc/holder/authorization-request": { - "post": { - "operationId": "RequestAuthorizationForCredential", - "responses": { - "200": { - "description": "Ok", + }, + "500": { + "description": "", "content": { "application/json": { - "schema": {} + "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", + "/didcomm/question-answer": { + "get": { + "operationId": "GetQuestionAnswerRecords", "responses": { "200": { - "description": "Ok", + "description": "QuestionAnswerRecord[]", "content": { "application/json": { - "schema": {} + "schema": { + "items": {}, + "type": "array" + } } } } }, - "description": "Initiates a token request, then requests credentials from issuer", + "description": "Retrieve question and answer records by query", "tags": [ - "oid4vc holders" + "DIDComm - Question Answer" ], "security": [ { @@ -6290,35 +7317,67 @@ ] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RequestCredentialBody" - } + "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/resolve-proof-request": { + "/didcomm/question-answer/question/{connectionId}": { "post": { - "operationId": "ResolveProofRequest", + "operationId": "SendQuestion", "responses": { "200": { "description": "Ok", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "examples": { + "Example 1": {} + } } } } }, - "description": "Resolve a proof request", + "description": "Send a question to a connection", "tags": [ - "oid4vc holders" + "DIDComm - Question Answer" ], "security": [ { @@ -6328,35 +7387,65 @@ ] } ], - "parameters": [], + "parameters": [ + { + "description": "Connection identifier", + "in": "path", + "name": "connectionId", + "required": true, + "schema": { + "$ref": "#/components/schemas/RecordId" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResolveProofRequest" + "properties": { + "detail": { + "type": "string" + }, + "validResponses": { + "items": { + "$ref": "#/components/schemas/ValidResponse" + }, + "type": "array" + }, + "question": { + "type": "string" + } + }, + "required": [ + "validResponses", + "question" + ], + "type": "object" } } } } } }, - "/openid4vc/holder/accept-proof-request": { + "/didcomm/question-answer/answer/{id}": { "post": { - "operationId": "AcceptProofRequest", + "operationId": "SendAnswer", "responses": { "200": { "description": "Ok", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/Record_string.unknown_" + } } } } }, - "description": "Accept a proof request", + "description": "Send a answer to question", "tags": [ - "oid4vc holders" + "DIDComm - Question Answer" ], "security": [ { @@ -6366,34 +7455,47 @@ ] } ], - "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/ResolveProofRequest" + "$ref": "#/components/schemas/Record_response.string_" } } } } } }, - "/openid4vc/holder/decode-sdjwt": { - "post": { - "operationId": "DecodeSdJwt", + "/didcomm/question-answer/{id}": { + "get": { + "operationId": "GetQuestionAnswerRecordById", "responses": { "200": { - "description": "Ok", + "description": "ConnectionRecord", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/Record_string.unknown_" + } } } } }, + "description": "Retrieve question answer record by id", "tags": [ - "oid4vc holders" + "DIDComm - Question Answer" ], "security": [ { @@ -6403,370 +7505,398 @@ ] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "jwt": { - "type": "string" - } - }, - "required": [ - "jwt" - ], - "type": "object" - } - } - } - } - } - }, - "/openid4vc/holder/credential": { - "delete": { - "operationId": "Delete", - "responses": { - "204": { - "description": "No content" - } - }, - "tags": [ - "oid4vc holders" - ], - "security": [ + "parameters": [ { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteCredentialBody" - } + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/RecordId" } } - } + ] } }, - "/multi-tenancy/create-tenant": { - "post": { - "operationId": "CreateTenant", + "/didcomm/oob": { + "get": { + "operationId": "GetAllOutOfBandRecords", "responses": { "200": { - "description": "Ok", + "description": "OutOfBandRecord[]", "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" + "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": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateTenantOptions" - } + "parameters": [ + { + "description": "invitation identifier", + "in": "query", + "name": "invitationId", + "required": false, + "schema": { + "$ref": "#/components/schemas/RecordId" } } - } + ] } }, - "/multi-tenancy/get-token/{tenantId}": { - "post": { - "operationId": "GetTenantToken", + "/didcomm/oob/{outOfBandId}": { + "get": { + "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" } } ] - } - }, - "/multi-tenancy/{tenantId}": { - "get": { - "operationId": "GetTenantById", + }, + "delete": { + "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" } } ] - }, - "delete": { - "operationId": "DeleteTenantById", + } + }, + "/didcomm/oob/create-invitation": { + "post": { + "operationId": "CreateInvitation", "responses": { "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } - }, - "404": { - "description": "", + "description": "Out of band record", "content": { "application/json": { "schema": { "properties": { - "reason": { + "invitationDid": { + "type": "string" + }, + "outOfBandRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "invitation": { + "$ref": "#/components/schemas/DidCommPlaintextMessage" + }, + "invitationUrl": { "type": "string" } }, "required": [ - "reason" + "invitationDid", + "outOfBandRecord", + "invitation", + "invitationUrl" ], "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" + }, + "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 + } } - }, - "required": [ - "message" - ], - "type": "object" + } } } } } }, + "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": [ - "MultiTenancy" + "DIDComm - Out Of Band" ], "security": [ { "jwt": [ - "Basewallet" + "tenant", + "dedicated" ] } ], - "parameters": [ - { - "in": "path", - "name": "tenantId", - "required": true, - "schema": { - "type": "string" + "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": { - "get": { - "operationId": "GetQuestionAnswerRecords", + "/didcomm/oob/create-legacy-connectionless-invitation": { + "post": { + "operationId": "CreateLegacyConnectionlessInvitation", "responses": { "200": { - "description": "QuestionAnswerRecord[]", + "description": "a message and a invitationUrl", "content": { "application/json": { "schema": { - "items": {}, - "type": "array" + "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": "Retrieve question and answer records by query", + "description": "Creates a new connectionless legacy invitation.", "tags": [ - "DIDComm - Question Answer" + "DIDComm - Out Of Band" ], "security": [ { @@ -6776,67 +7906,129 @@ ] } ], - "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" + "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" + } } } - ] + } } }, - "/didcomm/question-answer/question/{connectionId}": { + "/didcomm/oob/receive-invitation": { "post": { - "operationId": "SendQuestion", + "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": {} + "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 question to a connection", + "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": [ { @@ -6846,65 +8038,108 @@ ] } ], - "parameters": [ - { - "description": "Connection identifier", - "in": "path", - "name": "connectionId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RecordId" - } - } - ], + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "properties": { - "detail": { - "type": "string" - }, - "validResponses": { - "items": { - "$ref": "#/components/schemas/ValidResponse" - }, - "type": "array" - }, - "question": { - "type": "string" - } - }, - "required": [ - "validResponses", - "question" - ], - "type": "object" + "$ref": "#/components/schemas/ReceiveInvitationProps" } } } } } }, - "/didcomm/question-answer/answer/{id}": { + "/didcomm/oob/receive-invitation-url": { "post": { - "operationId": "SendAnswer", + "operationId": "ReceiveInvitationFromUrl", "responses": { "200": { - "description": "Ok", + "description": "out-of-band record and connection record if one has been created.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/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": [ { @@ -6914,84 +8149,46 @@ ] } ], - "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/ReceiveInvitationByUrlProps" } } } } } }, - "/didcomm/question-answer/{id}": { - "get": { - "operationId": "GetQuestionAnswerRecordById", - "responses": { - "200": { - "description": "ConnectionRecord", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Record_string.unknown_" - } - } - } - } - }, - "description": "Retrieve question answer record by id", - "tags": [ - "DIDComm - Question Answer" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "$ref": "#/components/schemas/RecordId" - } - } - ] - } - }, - "/didcomm/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", @@ -7025,9 +8222,97 @@ ] }, "metadata": {}, - "id": "42a95528-0e30-4f86-a462-0efb02178b53", + "id": "42a95528-0e30-4f86-a462-0efb02178b53", + "createdAt": "2022-01-01T00:00:00.000Z", + "reusable": false + }, + "connectionRecord": { + "_tags": { + "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", + "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", + "invitationKey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz", + "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d", + "verkey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz" + }, + "metadata": {}, + "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", + "createdAt": "2022-01-01T00:00:00.000Z", + "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", + "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", + "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d" + } + } + } + } + } + } + } + }, + "description": "Accept a connection invitation as invitee (by sending a connection request message) for the connection with the specified connection id.\nThis is not needed when auto accepting of connections is enabled.", + "tags": [ + "DIDComm - Out Of Band" + ], + "security": [ + { + "jwt": [ + "tenant", + "dedicated" + ] + } + ], + "parameters": [ + { + "in": "path", + "name": "outOfBandId", + "required": true, + "schema": { + "$ref": "#/components/schemas/RecordId" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptInvitationConfig" + } + } + } + } + } + }, + "/didcomm/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", - "reusable": false + "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", + "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", + "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d" } ] } @@ -7036,9 +8321,9 @@ } } }, - "description": "Retrieve all out of band records", + "description": "Retrieve all connections records", "tags": [ - "DIDComm - Out Of Band" + "DIDComm - Connections" ], "security": [ { @@ -7050,23 +8335,67 @@ ], "parameters": [ { - "description": "invitation identifier", "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": { @@ -7076,41 +8405,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" } } } @@ -7118,9 +8424,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": [ { @@ -7132,8 +8438,9 @@ ], "parameters": [ { + "description": "Connection identifier", "in": "path", - "name": "outOfBandId", + "name": "connectionId", "required": true, "schema": { "$ref": "#/components/schemas/RecordId" @@ -7142,15 +8449,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": [ { @@ -7162,114 +8469,44 @@ ], "parameters": [ { - "description": "Record identifier", + "description": "Connection identifier", "in": "path", - "name": "outOfBandId", + "name": "connectionId", "required": true, "schema": { "$ref": "#/components/schemas/RecordId" - } - } - ] - } - }, - "/didcomm/oob/create-invitation": { - "post": { - "operationId": "CreateInvitation", - "responses": { - "200": { - "description": "Out of band record", - "content": { - "application/json": { - "schema": { - "properties": { - "invitationDid": { - "type": "string" - }, - "outOfBandRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "invitation": { - "$ref": "#/components/schemas/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 - } + } + } + ] + } + }, + "/didcomm/connections/{connectionId}/accept-request": { + "post": { + "operationId": "AcceptRequest", + "responses": { + "200": { + "description": "ConnectionRecord", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "examples": { + "Example 1": { + "value": { + "_tags": { + "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", + "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", + "invitationKey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz", + "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d", + "verkey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz" + }, + "metadata": {}, + "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", + "createdAt": "2022-01-01T00:00:00.000Z", + "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", + "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", + "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d" } } } @@ -7277,9 +8514,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": [ { @@ -7289,63 +8526,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" - } + "parameters": [ + { + "description": "Connection identifier", + "in": "path", + "name": "connectionId", + "required": true, + "schema": { + "$ref": "#/components/schemas/RecordId" } } - } + ] } }, - "/didcomm/oob/create-legacy-connectionless-invitation": { + "/didcomm/connections/{connectionId}/accept-response": { "post": { - "operationId": "CreateLegacyConnectionlessInvitation", + "operationId": "AcceptResponse", "responses": { "200": { - "description": "a message and a invitationUrl", + "description": "ConnectionRecord", "content": { "application/json": { "schema": { - "properties": { - "outOfBandRecord": { - "$ref": "#/components/schemas/DidCommOutOfBandRecord" - }, - "invitationUrl": { - "type": "string" - }, - "message": { - "$ref": "#/components/schemas/DidCommMessage" - } - }, - "required": [ - "outOfBandRecord", - "invitationUrl", - "message" - ], - "type": "object" + "$ref": "#/components/schemas/Record_string.unknown_" }, "examples": { "Example 1": { "value": { - "message": { - "@id": "eac4ff4e-b4fb-4c1d-aef3-b29c89d1cc00", - "@type": "https://didcomm.org/connections/1.0/invitation" + "_tags": { + "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", + "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", + "invitationKey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz", + "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d", + "verkey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz" }, - "invitationUrl": "http://example.com/invitation_url" + "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" } } } @@ -7353,9 +8573,9 @@ } } }, - "description": "Creates a new connectionless legacy invitation.", + "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": [ { @@ -7365,118 +8585,122 @@ ] } ], - "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_" + "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" }, - "recordId": { - "type": "string" - } - }, - "required": [ - "domain", - "message", - "recordId" - ], - "type": "object", - "description": "configuration of how a connection invitation should be created" + "type": "array" + } } } } - } + }, + "tags": [ + "DIDComm - Connections" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "invitationId", + "required": true, + "schema": { + "type": "string" + } + } + ] } }, - "/didcomm/oob/receive-invitation": { - "post": { - "operationId": "ReceiveInvitation", + "/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" } } } @@ -7485,9 +8709,8 @@ } } }, - "description": "Creates inbound out-of-band record and assigns out-of-band invitation message to it if the\nmessage is valid.", "tags": [ - "DIDComm - Out Of Band" + "Dids" ], "security": [ { @@ -7497,97 +8720,48 @@ ] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReceiveInvitationProps" - } + "parameters": [ + { + "in": "path", + "name": "did", + "required": true, + "schema": { + "$ref": "#/components/schemas/Did" } } - } + ] } }, - "/didcomm/oob/receive-invitation-url": { + "/dids/write": { "post": { - "operationId": "ReceiveInvitationFromUrl", + "operationId": "WriteDid", "responses": { "200": { - "description": "out-of-band record and connection record if one has been created.", + "description": "DidResolutionResult", "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": {}, "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" + "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" + ] } } } @@ -7596,9 +8770,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": [ { @@ -7614,102 +8788,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": [ { @@ -7719,13 +8824,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" } } ], @@ -7734,158 +8862,88 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AcceptInvitationConfig" + "$ref": "#/components/schemas/OrgTokenRequest" } } } } } }, - "/didcomm/connections": { + "/agent": { "get": { - "operationId": "GetAllConnections", + "operationId": "GetAgentInfo", "responses": { "200": { - "description": "ConnectionRecord[]", + "description": "Ok", "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" - } - ] - } + "$ref": "#/components/schemas/AgentInfo" } } } } }, - "description": "Retrieve all connections records", + "description": "Retrieve basic agent information", "tags": [ - "DIDComm - Connections" + "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" + "parameters": [] + } + }, + "/agent/token": { + "post": { + "operationId": "GetAgentToken", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentToken" + } + } } - }, + } + }, + "description": "Retrieve agent token", + "tags": [ + "Agent" + ], + "security": [ { - "description": "Their label", - "in": "query", - "name": "theirLabel", - "required": false, - "schema": { - "type": "string" - } + "apiKey": [] } - ] + ], + "parameters": [] } }, - "/didcomm/connections/{connectionId}": { - "get": { - "operationId": "GetConnectionById", + "/agent/credential/verify": { + "post": { + "operationId": "VerifyCredential", "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/W3cVerifyCredentialResult" } } } } }, - "description": "Retrieve connection record by connection id", "tags": [ - "DIDComm - Connections" + "Agent" ], "security": [ { @@ -7895,28 +8953,56 @@ ] } ], - "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" + }, + {} + ] + } } } - ] - }, - "delete": { - "operationId": "DeleteConnection", + } + } + }, + "/anoncreds/schemas/{schemaId}": { + "get": { + "operationId": "GetSchemaById", "responses": { - "204": { - "description": "No content" + "200": { + "description": "get schema by Id", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SchemaResponseDTO" + }, + "examples": { + "Example 1": { + "value": { + "ver": "1.0", + "id": "WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", + "name": "schema", + "version": "1.0", + "attrNames": [ + "string" + ], + "seqNo": 351936 + } + } + } + } + } } }, - "description": "Deletes a connection record from the connection repository.", + "description": "Get schema by schemaId", "tags": [ - "DIDComm - Connections" + "Anoncreds - Schemas" ], "security": [ { @@ -7928,44 +9014,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-request": { + "/anoncreds/schemas": { "post": { - "operationId": "AcceptRequest", + "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" - }, - "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" + "state": "finished", + "schema": { + "issuerId": "did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7", + "name": "Test Schema", + "version": "1.0.0", + "attrNames": [ + "Name", + "Age" + ] + }, + "schemaId": "LRCUFcizUL74AGgLqdJHK7:2:Test Schema:1.0.0" } } } @@ -7973,9 +9063,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": "Create schema", "tags": [ - "DIDComm - Connections" + "Anoncreds - Schemas" ], "security": [ { @@ -7985,46 +9075,63 @@ ] } ], - "parameters": [ - { - "description": "Connection identifier", - "in": "path", - "name": "connectionId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RecordId" + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSchemaInput" + } } } - ] + } } }, - "/didcomm/connections/{connectionId}/accept-response": { - "post": { - "operationId": "AcceptResponse", + "/anoncreds/credential-definitions/{credentialDefinitionId}": { + "get": { + "operationId": "GetCredentialDefinitionById", "responses": { "200": { - "description": "ConnectionRecord", + "description": "CredDef", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Record_string.unknown_" + "$ref": "#/components/schemas/GetCredentialDefinitionReturn" }, "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: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" + } + } } } } @@ -8032,9 +9139,9 @@ } } }, - "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": "Retrieve credential definition by credential definition id", "tags": [ - "DIDComm - Connections" + "Anoncreds - Credential Definitions" ], "security": [ { @@ -8046,192 +9153,171 @@ ], "parameters": [ { - "description": "Connection identifier", "in": "path", - "name": "connectionId", + "name": "credentialDefinitionId", "required": true, "schema": { - "$ref": "#/components/schemas/RecordId" + "$ref": "#/components/schemas/CredentialDefinitionId" } } ] } }, - "/didcomm/url/{invitationId}": { - "get": { - "operationId": "GetInvitation", + "/anoncreds/credential-definitions": { + "post": { + "operationId": "CreateCredentialDefinition", "responses": { "200": { - "description": "Ok", + "description": "CredDef", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/DidCommConnectionRecord" - }, - "type": "array" + "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" + } + } + } + } } } } + }, + "202": { + "description": "Wait for action to complete" } }, + "description": "Creates a new credential definition.", "tags": [ - "DIDComm - Connections" + "Anoncreds - Credential Definitions" ], - "security": [], - "parameters": [ + "security": [ { - "in": "path", - "name": "invitationId", - "required": true, - "schema": { - "type": "string" - } + "jwt": [ + "tenant", + "dedicated" + ] } - ] - } - }, - "/dids/{did}": { - "get": { - "operationId": "GetDidRecordByDid", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "properties": { - "didDocumentMetadata": { - "$ref": "#/components/schemas/DIDDocumentMetadata" - }, - "didResolutionMetadata": { - "$ref": "#/components/schemas/DidResolutionMetadata" - }, - "didDocument": { - "$ref": "#/components/schemas/Record_string.any_" - } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "endorserDid": { + "type": "string" }, - "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" - } - } + "endorse": { + "type": "boolean" + }, + "tag": { + "type": "string" + }, + "schemaId": { + "$ref": "#/components/schemas/SchemaId" + }, + "issuerId": { + "type": "string" } - } + }, + "required": [ + "tag", + "schemaId", + "issuerId" + ], + "type": "object" } } } - }, - "tags": [ - "Dids" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [ - { - "in": "path", - "name": "did", - "required": true, - "schema": { - "$ref": "#/components/schemas/Did" - } - } - ] + } } }, - "/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" + "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" } - ], - "authentication": [ - "did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7#verkey" - ] + }, + "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": [ { @@ -8241,22 +9327,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", @@ -8264,7 +9381,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/DidRecord" + "$ref": "#/components/schemas/W3cCredentialRecord" }, "type": "array" } @@ -8273,7 +9390,7 @@ } }, "tags": [ - "Dids" + "DIDComm - Credentials" ], "security": [ { @@ -8286,123 +9403,213 @@ "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" - } - } - } - } + ] } }, - "/agent": { + "/didcomm/credentials/{credentialRecordId}": { "get": { - "operationId": "GetAgentInfo", + "operationId": "GetCredentialById", "responses": { "200": { - "description": "Ok", + "description": "CredentialExchangeRecord", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AgentInfo" + "$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 basic agent information", + "description": "Retrieve credential exchange record by credential record id", "tags": [ - "Agent" + "DIDComm - Credentials" ], "security": [ { "jwt": [ "tenant", - "dedicated", - "Basewallet" + "dedicated" ] } ], - "parameters": [] + "parameters": [ + { + "in": "path", + "name": "credentialRecordId", + "required": true, + "schema": { + "$ref": "#/components/schemas/RecordId" + } + } + ] } }, - "/agent/token": { + "/didcomm/credentials/propose-credential": { "post": { - "operationId": "GetAgentToken", + "operationId": "ProposeCredential", "responses": { "200": { - "description": "Ok", + "description": "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 holder by sending a propose credential message\nto the connection with a specified connection id.", "tags": [ - "Agent" + "DIDComm - Credentials" ], "security": [ { - "apiKey": [] + "jwt": [ + "tenant", + "dedicated" + ] } ], - "parameters": [] + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProposeCredentialOptions" + } + } + } + } } }, - "/agent/credential/verify": { + "/didcomm/credentials/accept-proposal": { "post": { - "operationId": "VerifyCredential", + "operationId": "AcceptProposal", "responses": { "200": { - "description": "Ok", + "description": "CredentialExchangeRecord", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/W3cVerifyCredentialResult" + "$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": "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": [ { @@ -8418,40 +9625,45 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/SafeW3cJsonLdVerifyCredentialOptions" - }, - {} - ] + "$ref": "#/components/schemas/AcceptCredentialProposalOptions" } } } } } }, - "/anoncreds/schemas/{schemaId}": { - "get": { - "operationId": "GetSchemaById", + "/didcomm/credentials/create-offer": { + "post": { + "operationId": "CreateOffer", "responses": { "200": { - "description": "get schema by Id", + "description": "AgentMessage, 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" } } } @@ -8459,9 +9671,9 @@ } } }, - "description": "Get schema by schemaId", + "description": "Initiate a new credential exchange as issuer by creating a credential offer\nwithout specifying a connection id", "tags": [ - "Anoncreds - Schemas" + "DIDComm - Credentials" ], "security": [ { @@ -8471,60 +9683,64 @@ ] } ], - "parameters": [ - { - "in": "path", - "name": "schemaId", - "required": true, - "schema": { - "$ref": "#/components/schemas/SchemaId" + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOfferOptions" + } } } - ] + } } }, - "/anoncreds/schemas": { + "/didcomm/credentials/create-offer-oob": { "post": { - "operationId": "CreateSchema", + "operationId": "CreateOfferOob", "responses": { "200": { - "description": "get schema", + "description": "Ok", "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/RegisterSchemaReturn" + "properties": { + "invitationDid": { + "type": "string" }, - { - "$ref": "#/components/schemas/RegisterSchemaReturnStateFinished" - } - ] - }, - "examples": { - "Example 1": { - "value": { - "state": "finished", - "schema": { - "issuerId": "did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7", - "name": "Test Schema", - "version": "1.0.0", - "attrNames": [ - "Name", - "Age" - ] - }, - "schemaId": "LRCUFcizUL74AGgLqdJHK7:2:Test Schema:1.0.0" + "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" } } } } }, - "description": "Create schema", "tags": [ - "Anoncreds - Schemas" + "DIDComm - Credentials" ], "security": [ { @@ -8540,57 +9756,45 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateSchemaInput" + "$ref": "#/components/schemas/CreateOfferOobOptions" } } } } } }, - "/anoncreds/credential-definitions/{credentialDefinitionId}": { - "get": { - "operationId": "GetCredentialDefinitionById", + "/didcomm/credentials/accept-offer": { + "post": { + "operationId": "AcceptOffer", "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" } } } @@ -8598,9 +9802,9 @@ } } }, - "description": "Retrieve credential definition by credential definition id", + "description": "Accept a credential offer as holder by sending an accept offer message\nto the connection associated with the credential exchange record.", "tags": [ - "Anoncreds - Credential Definitions" + "DIDComm - Credentials" ], "security": [ { @@ -8608,84 +9812,63 @@ "tenant", "dedicated" ] - } - ], - "parameters": [ - { - "in": "path", - "name": "credentialDefinitionId", - "required": true, - "schema": { - "$ref": "#/components/schemas/CredentialDefinitionId" + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CredentialOfferOptions" + } } } - ] + } } }, - "/anoncreds/credential-definitions": { + "/didcomm/credentials/accept-request": { "post": { - "operationId": "CreateCredentialDefinition", + "operationId": "AcceptRequest", "responses": { "200": { - "description": "CredDef", + "description": "CredentialExchangeRecord", "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/RegisterCredentialDefinitionReturn" - }, - { - "$ref": "#/components/schemas/CredentialDefinitionStates" - } - ] + "$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" } } } } } - }, - "202": { - "description": "Wait for action to complete" } }, - "description": "Creates a new credential definition.", + "description": "Accept a credential request as issuer by sending an accept request message\nto the connection associated with the credential exchange record.", "tags": [ - "Anoncreds - Credential Definitions" + "DIDComm - Credentials" ], "security": [ { @@ -8701,80 +9884,53 @@ "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" + "$ref": "#/components/schemas/AcceptCredentialRequestOptions" } } } } } }, - "/didcomm/credentials": { - "get": { - "operationId": "GetAllCredentials", + "/didcomm/credentials/accept-credential": { + "post": { + "operationId": "AcceptCredential", "responses": { "200": { - "description": "CredentialExchangeRecord[]", + "description": "CredentialExchangeRecord", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "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", + "value": { + "_tags": { + "state": "offer-sent", "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "credentialAttributes": [], - "protocolVersion": "v1" - } - ] + "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" + }, + "metadata": { + "_internal/indyCredential": { + "credentialDefinitionId": "q7ATwTYbQDgiigVijUAej:3:CL:318187:latest", + "schemaId": "q7ATwTYbQDgiigVijUAej:2:Employee Badge:1.0" + } + }, + "credentials": [], + "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", + "createdAt": "2022-01-01T00:00:00.000Z", + "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b", + "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", + "credentialAttributes": [], + "protocolVersion": "v1" + } } } } } } }, - "description": "Retrieve all credential exchange records", + "description": "Accept a credential as holder by sending an accept credential message\nto the connection associated with the credential exchange record.", "tags": [ "DIDComm - Credentials" ], @@ -8786,68 +9942,35 @@ ] } ], - "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" + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptCredential" + } } } - ] + } } }, - "/didcomm/credentials/w3c": { + "/didcomm/credentials/{credentialRecordId}/form-data": { "get": { - "operationId": "GetAllW3c", + "operationId": "CredentialFormData", "responses": { "200": { - "description": "Ok", + "description": "credentialRecord", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/W3cCredentialRecord" - }, - "type": "array" + "$ref": "#/components/schemas/GetCredentialFormatDataReturn__40_LegacyIndyCredentialFormat-or-DidCommJsonLdCredentialFormat-or-AnonCredsDidCommCredentialFormat_41_-Array_" } } } } }, + "description": "Return credentialRecord", "tags": [ "DIDComm - Credentials" ], @@ -8859,26 +9982,53 @@ ] } ], - "parameters": [] + "parameters": [ + { + "in": "path", + "name": "credentialRecordId", + "required": true, + "schema": { + "type": "string" + } + } + ] } }, - "/didcomm/credentials/w3c/{id}": { + "/didcomm/proofs": { "get": { - "operationId": "GetW3cById", + "operationId": "GetAllProofs", "responses": { "200": { - "description": "Ok", + "description": "ProofRecord[]", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/W3cCredentialRecord" + "items": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "type": "array" + }, + "examples": { + "Example 1": { + "value": [ + { + "metadata": {}, + "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", + "createdAt": "2022-01-01T00:00:00.000Z", + "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", + "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", + "protocolVersion": "v1" + } + ] + } } } } } }, + "description": "Retrieve all proof records", "tags": [ - "DIDComm - Credentials" + "DIDComm - Proofs" ], "security": [ { @@ -8890,9 +10040,9 @@ ], "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "threadId", + "required": false, "schema": { "type": "string" } @@ -8900,12 +10050,12 @@ ] } }, - "/didcomm/credentials/{credentialRecordId}": { + "/didcomm/proofs/{proofRecordId}": { "get": { - "operationId": "GetCredentialById", + "operationId": "GetProofById", "responses": { "200": { - "description": "CredentialExchangeRecord", + "description": "ProofRecord", "content": { "application/json": { "schema": { @@ -8914,23 +10064,11 @@ "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": [], + "metadata": {}, "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": [], + "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", + "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", "protocolVersion": "v1" } } @@ -8939,9 +10077,9 @@ } } }, - "description": "Retrieve credential exchange record by credential record id", + "description": "Retrieve proof record by proof record id", "tags": [ - "DIDComm - Credentials" + "DIDComm - Proofs" ], "security": [ { @@ -8954,7 +10092,7 @@ "parameters": [ { "in": "path", - "name": "credentialRecordId", + "name": "proofRecordId", "required": true, "schema": { "$ref": "#/components/schemas/RecordId" @@ -8963,37 +10101,25 @@ ] } }, - "/didcomm/credentials/propose-credential": { + "/didcomm/proofs/propose-proof": { "post": { - "operationId": "ProposeCredential", + "operationId": "ProposeProof", "responses": { "200": { - "description": "CredentialExchangeRecord", + "description": "ProofRecord", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DidCommCredentialExchangeRecord" + "$ref": "#/components/schemas/DidCommProofExchangeRecord" }, "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": [], + "metadata": {}, "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": [], + "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", + "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", "protocolVersion": "v1" } } @@ -9002,9 +10128,9 @@ } } }, - "description": "Initiate a new credential exchange as holder by sending a propose credential message\nto the connection with a specified connection id.", + "description": "Initiate a new presentation exchange as prover by sending a presentation proposal request\nto the connection with the specified connection id.", "tags": [ - "DIDComm - Credentials" + "DIDComm - Proofs" ], "security": [ { @@ -9020,44 +10146,32 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposeCredentialOptions" + "$ref": "#/components/schemas/RequestProofProposalOptions" } } } } } }, - "/didcomm/credentials/accept-proposal": { + "/didcomm/proofs/accept-proposal": { "post": { "operationId": "AcceptProposal", "responses": { "200": { - "description": "CredentialExchangeRecord", + "description": "ProofRecord", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DidCommCredentialExchangeRecord" + "$ref": "#/components/schemas/DidCommProofExchangeRecord" }, "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": [], + "metadata": {}, "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": [], + "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", + "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", "protocolVersion": "v1" } } @@ -9066,9 +10180,9 @@ } } }, - "description": "Accept a credential proposal as issuer by sending an accept proposal message\nto the connection associated with the credential exchange record.", + "description": "Accept a presentation proposal as verifier by sending an accept proposal message\nto the connection associated with the proof record.", "tags": [ - "DIDComm - Credentials" + "DIDComm - Proofs" ], "security": [ { @@ -9084,44 +10198,32 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AcceptCredentialProposalOptions" + "$ref": "#/components/schemas/AcceptProofProposal" } } } } } }, - "/didcomm/credentials/create-offer": { + "/didcomm/proofs/request-proof": { "post": { - "operationId": "CreateOffer", + "operationId": "RequestProof", "responses": { "200": { - "description": "AgentMessage, CredentialExchangeRecord", + "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DidCommCredentialExchangeRecord" + "$ref": "#/components/schemas/DidCommProofExchangeRecord" }, "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": [], + "metadata": {}, "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": [], + "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", + "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", "protocolVersion": "v1" } } @@ -9130,9 +10232,9 @@ } } }, - "description": "Initiate a new credential exchange as issuer by creating a credential offer\nwithout specifying a connection id", + "description": "Creates a presentation request bound to existing connection", "tags": [ - "DIDComm - Credentials" + "DIDComm - Proofs" ], "security": [ { @@ -9148,16 +10250,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateOfferOptions" + "$ref": "#/components/schemas/RequestProofOptions" } } } } } }, - "/didcomm/credentials/create-offer-oob": { + "/didcomm/proofs/create-request-oob": { "post": { - "operationId": "CreateOfferOob", + "operationId": "CreateRequest", "responses": { "200": { "description": "Ok", @@ -9165,13 +10267,13 @@ "application/json": { "schema": { "properties": { - "invitationDid": { + "proofMessageId": { "type": "string" }, - "credentialRequestThId": { + "proofRecordThId": { "type": "string" }, - "outOfBandRecordId": { + "invitationDid": { "type": "string" }, "outOfBandRecord": { @@ -9185,74 +10287,23 @@ } }, "required": [ + "proofMessageId", + "proofRecordThId", "invitationDid", - "credentialRequestThId", - "outOfBandRecordId", "outOfBandRecord", "invitation", "invitationUrl" ], "type": "object" - } - } - } - } - }, - "tags": [ - "DIDComm - Credentials" - ], - "security": [ - { - "jwt": [ - "tenant", - "dedicated" - ] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateOfferOobOptions" - } - } - } - } - } - }, - "/didcomm/credentials/accept-offer": { - "post": { - "operationId": "AcceptOffer", - "responses": { - "200": { - "description": "CredentialExchangeRecord", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/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": [], + "metadata": {}, "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": [], + "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", + "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", "protocolVersion": "v1" } } @@ -9261,9 +10312,9 @@ } } }, - "description": "Accept a credential offer as holder by sending an accept offer message\nto the connection associated with the credential exchange record.", + "description": "Creates a presentation request not bound to any proposal or existing connection", "tags": [ - "DIDComm - Credentials" + "DIDComm - Proofs" ], "security": [ { @@ -9279,44 +10330,32 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CredentialOfferOptions" + "$ref": "#/components/schemas/CreateProofRequestOobOptions" } } } } } }, - "/didcomm/credentials/accept-request": { + "/didcomm/proofs/{proofRecordId}/accept-request": { "post": { "operationId": "AcceptRequest", "responses": { "200": { - "description": "CredentialExchangeRecord", + "description": "ProofRecord", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DidCommCredentialExchangeRecord" + "$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": [], + "metadata": {}, "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": [], + "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", + "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", "protocolVersion": "v1" } } @@ -9325,9 +10364,9 @@ } } }, - "description": "Accept a credential request as issuer by sending an accept request message\nto the connection associated with the credential exchange record.", + "description": "Accept a presentation request as prover by sending an accept request message\nto the connection associated with the proof record.", "tags": [ - "DIDComm - Credentials" + "DIDComm - Proofs" ], "security": [ { @@ -9337,50 +10376,58 @@ ] } ], - "parameters": [], + "parameters": [ + { + "in": "path", + "name": "proofRecordId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AcceptCredentialRequestOptions" + "properties": { + "comment": { + "type": "string" + }, + "filterByNonRevocationRequirements": { + "type": "boolean" + }, + "filterByPresentationPreview": { + "type": "boolean" + } + }, + "type": "object" } } } } } }, - "/didcomm/credentials/accept-credential": { + "/didcomm/proofs/{proofRecordId}/accept-presentation": { "post": { - "operationId": "AcceptCredential", + "operationId": "AcceptPresentation", "responses": { "200": { - "description": "CredentialExchangeRecord", + "description": "ProofRecord", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DidCommCredentialExchangeRecord" + "$ref": "#/components/schemas/DidCommProofExchangeRecord" }, "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": [], + "metadata": {}, "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": [], + "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", + "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", "protocolVersion": "v1" } } @@ -9389,9 +10436,9 @@ } } }, - "description": "Accept a credential as holder by sending an accept credential message\nto the connection associated with the credential exchange record.", + "description": "Accept a presentation as prover by sending an accept presentation message\nto the connection associated with the proof record.", "tags": [ - "DIDComm - Credentials" + "DIDComm - Proofs" ], "security": [ { @@ -9401,37 +10448,48 @@ ] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AcceptCredential" - } + "parameters": [ + { + "in": "path", + "name": "proofRecordId", + "required": true, + "schema": { + "type": "string" } } - } + ] } }, - "/didcomm/credentials/{credentialRecordId}/form-data": { + "/didcomm/proofs/{proofRecordId}/form-data": { "get": { - "operationId": "CredentialFormData", + "operationId": "ProofFormData", "responses": { "200": { - "description": "credentialRecord", + "description": "ProofRecord", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetCredentialFormatDataReturn__40_LegacyIndyCredentialFormat-or-DidCommJsonLdCredentialFormat-or-AnonCredsDidCommCredentialFormat_41_-Array_" + "$ref": "#/components/schemas/GetProofFormatDataReturn__40_LegacyIndyDidCommProofFormat-or-AnonCredsDidCommProofFormat-or-DidCommDifPresentationExchangeProofFormat_41_-Array_" + }, + "examples": { + "Example 1": { + "value": { + "metadata": {}, + "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", + "createdAt": "2022-01-01T00:00:00.000Z", + "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", + "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", + "protocolVersion": "v1" + } + } } } } } }, - "description": "Return credentialRecord", + "description": "Return proofRecord", "tags": [ - "DIDComm - Credentials" + "DIDComm - Proofs" ], "security": [ { @@ -9444,7 +10502,7 @@ "parameters": [ { "in": "path", - "name": "credentialRecordId", + "name": "proofRecordId", "required": true, "schema": { "type": "string"