@verana-labs/vs-agent-plugin-openid4vc 1.12.0-oidc4vc.7 → 2.0.0-dev.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +127 -157
- package/build/config.d.ts +12 -3
- package/build/config.js +115 -237
- package/build/config.js.map +1 -1
- package/build/index.d.ts +19 -12
- package/build/index.js +36 -16
- package/build/index.js.map +1 -1
- package/build/nestjs/OpenId4VcPlugin.js +18 -43
- package/build/nestjs/OpenId4VcPlugin.js.map +1 -1
- package/build/nestjs/V2OpenId4VcCredentialExchangesController.d.ts +19 -0
- package/build/nestjs/V2OpenId4VcCredentialExchangesController.js +161 -0
- package/build/nestjs/V2OpenId4VcCredentialExchangesController.js.map +1 -0
- package/build/nestjs/V2OpenId4VcPresentationsController.d.ts +19 -0
- package/build/nestjs/V2OpenId4VcPresentationsController.js +147 -0
- package/build/nestjs/V2OpenId4VcPresentationsController.js.map +1 -0
- package/build/nestjs/V2OpenId4VcSigningCertificatesController.d.ts +17 -0
- package/build/nestjs/V2OpenId4VcSigningCertificatesController.js +58 -0
- package/build/nestjs/V2OpenId4VcSigningCertificatesController.js.map +1 -0
- package/build/nestjs/dto/credential-exchange.dto.d.ts +31 -0
- package/build/nestjs/dto/credential-exchange.dto.js +150 -0
- package/build/nestjs/dto/credential-exchange.dto.js.map +1 -0
- package/build/nestjs/dto/index.d.ts +3 -0
- package/build/nestjs/dto/index.js +20 -0
- package/build/nestjs/dto/index.js.map +1 -0
- package/build/nestjs/dto/presentation.dto.d.ts +56 -0
- package/build/nestjs/dto/presentation.dto.js +234 -0
- package/build/nestjs/dto/presentation.dto.js.map +1 -0
- package/build/nestjs/dto/signing-certificate.dto.d.ts +8 -0
- package/build/nestjs/dto/signing-certificate.dto.js +40 -0
- package/build/nestjs/dto/signing-certificate.dto.js.map +1 -0
- package/build/nestjs/mappers.d.ts +5 -0
- package/build/nestjs/mappers.js +31 -0
- package/build/nestjs/mappers.js.map +1 -0
- package/build/sdk/setupOpenId4Vc.d.ts +8 -12
- package/build/sdk/setupOpenId4Vc.js +94 -80
- package/build/sdk/setupOpenId4Vc.js.map +1 -1
- package/build/services/CertificateService.d.ts +5 -22
- package/build/services/CertificateService.js +90 -84
- package/build/services/CertificateService.js.map +1 -1
- package/build/services/IssuerService.d.ts +31 -44
- package/build/services/IssuerService.js +133 -107
- package/build/services/IssuerService.js.map +1 -1
- package/build/services/VerifierService.d.ts +37 -44
- package/build/services/VerifierService.js +150 -226
- package/build/services/VerifierService.js.map +1 -1
- package/build/services/presentationRequest.d.ts +51 -0
- package/build/services/presentationRequest.js +67 -0
- package/build/services/presentationRequest.js.map +1 -0
- package/build/services/presentationVerification.d.ts +12 -0
- package/build/services/presentationVerification.js +13 -0
- package/build/services/presentationVerification.js.map +1 -0
- package/build/trust/CertificateTrust.d.ts +1 -4
- package/build/trust/CertificateTrust.js +10 -15
- package/build/trust/CertificateTrust.js.map +1 -1
- package/build/trust/keyBinding.d.ts +4 -17
- package/build/trust/keyBinding.js +34 -144
- package/build/trust/keyBinding.js.map +1 -1
- package/build/trust/types.d.ts +5 -16
- package/build/trust/types.js +8 -0
- package/build/trust/types.js.map +1 -1
- package/build/types.d.ts +21 -51
- package/build/types.js +3 -0
- package/build/types.js.map +1 -1
- package/build/utils/isRecord.d.ts +1 -0
- package/build/utils/isRecord.js +7 -0
- package/build/utils/isRecord.js.map +1 -0
- package/build/utils/serviceDisplay.d.ts +8 -0
- package/build/utils/serviceDisplay.js +11 -0
- package/build/utils/serviceDisplay.js.map +1 -0
- package/package.json +10 -8
- package/build/nestjs/CertificatesController.d.ts +0 -11
- package/build/nestjs/CertificatesController.js +0 -58
- package/build/nestjs/CertificatesController.js.map +0 -1
- package/build/nestjs/IssuerController.d.ts +0 -8
- package/build/nestjs/IssuerController.js +0 -66
- package/build/nestjs/IssuerController.js.map +0 -1
- package/build/nestjs/VerifierController.d.ts +0 -8
- package/build/nestjs/VerifierController.js +0 -66
- package/build/nestjs/VerifierController.js.map +0 -1
- package/build/nestjs/dto.d.ts +0 -7
- package/build/nestjs/dto.js +0 -34
- package/build/nestjs/dto.js.map +0 -1
- package/build/services/StatusListService.d.ts +0 -42
- package/build/services/StatusListService.js +0 -132
- package/build/services/StatusListService.js.map +0 -1
- package/build/trust/TrustClient.d.ts +0 -12
- package/build/trust/TrustClient.js +0 -120
- package/build/trust/TrustClient.js.map +0 -1
- package/build/trust/verdict.d.ts +0 -2
- package/build/trust/verdict.js +0 -13
- package/build/trust/verdict.js.map +0 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Page } from '@verana-labs/vs-agent-sdk';
|
|
2
|
+
import { IssuerService } from '../services/IssuerService';
|
|
3
|
+
import { OpenId4VcCredentialExchangeRecordDto, OpenId4VcCreateCredentialOfferBodyDto, OpenId4VcCredentialOfferResponseDto, OpenId4VcListCredentialExchangesQueryDto } from './dto';
|
|
4
|
+
/**
|
|
5
|
+
* This controller has the credential exchanges of this agent on OpenID4VCI.
|
|
6
|
+
* Refer to [VSA-ADM-OID-CE].
|
|
7
|
+
*
|
|
8
|
+
* `createCredentialOffer` mints a pre-authorized offer for one credential configuration. The
|
|
9
|
+
* wallet redeems that offer on the issuer endpoints of the agent, and the read methods show the
|
|
10
|
+
* issuance session that the agent tracks for it. The offer expires after `ttlSeconds`.
|
|
11
|
+
*/
|
|
12
|
+
export declare class V2OpenId4VcCredentialExchangesController {
|
|
13
|
+
private readonly issuerService;
|
|
14
|
+
constructor(issuerService: IssuerService);
|
|
15
|
+
createCredentialOffer(body: OpenId4VcCreateCredentialOfferBodyDto): Promise<OpenId4VcCredentialOfferResponseDto>;
|
|
16
|
+
listCredentialExchanges(query: OpenId4VcListCredentialExchangesQueryDto): Promise<Page<OpenId4VcCredentialExchangeRecordDto>>;
|
|
17
|
+
getCredentialExchange(credentialExchangeId: string): Promise<OpenId4VcCredentialExchangeRecordDto>;
|
|
18
|
+
deleteCredentialExchange(credentialExchangeId: string): Promise<void>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.V2OpenId4VcCredentialExchangesController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
18
|
+
const vs_agent_sdk_1 = require("@verana-labs/vs-agent-sdk");
|
|
19
|
+
const IssuerService_1 = require("../services/IssuerService");
|
|
20
|
+
const dto_1 = require("./dto");
|
|
21
|
+
const mappers_1 = require("./mappers");
|
|
22
|
+
/**
|
|
23
|
+
* This controller has the credential exchanges of this agent on OpenID4VCI.
|
|
24
|
+
* Refer to [VSA-ADM-OID-CE].
|
|
25
|
+
*
|
|
26
|
+
* `createCredentialOffer` mints a pre-authorized offer for one credential configuration. The
|
|
27
|
+
* wallet redeems that offer on the issuer endpoints of the agent, and the read methods show the
|
|
28
|
+
* issuance session that the agent tracks for it. The offer expires after `ttlSeconds`.
|
|
29
|
+
*/
|
|
30
|
+
let V2OpenId4VcCredentialExchangesController = class V2OpenId4VcCredentialExchangesController {
|
|
31
|
+
constructor(issuerService) {
|
|
32
|
+
this.issuerService = issuerService;
|
|
33
|
+
}
|
|
34
|
+
async createCredentialOffer(body) {
|
|
35
|
+
const offer = await this.issuerService.createOffer({
|
|
36
|
+
jsonSchemaCredentialId: body.jsonSchemaCredentialId,
|
|
37
|
+
claims: body.claims,
|
|
38
|
+
ttlSeconds: body.ttlSeconds,
|
|
39
|
+
statusListId: body.statusListId,
|
|
40
|
+
statusListIndex: body.statusListIndex,
|
|
41
|
+
});
|
|
42
|
+
return { credentialExchangeId: offer.issuanceSessionId, url: offer.credentialOffer };
|
|
43
|
+
}
|
|
44
|
+
async listCredentialExchanges(query) {
|
|
45
|
+
const filters = {
|
|
46
|
+
jsonSchemaCredentialId: query.jsonSchemaCredentialId,
|
|
47
|
+
state: query.state,
|
|
48
|
+
};
|
|
49
|
+
const sessions = await this.issuerService.listIssuanceSessions(filters);
|
|
50
|
+
const page = (0, vs_agent_sdk_1.paginate)(sessions, query, { method: 'openid4vc.listCredentialExchanges', filters }, vs_agent_sdk_1.createdAtKey);
|
|
51
|
+
return (0, vs_agent_sdk_1.mapPage)(page, mappers_1.toCredentialExchangeDto);
|
|
52
|
+
}
|
|
53
|
+
async getCredentialExchange(credentialExchangeId) {
|
|
54
|
+
return (0, mappers_1.toCredentialExchangeDto)(await this.issuerService.getIssuanceSession(credentialExchangeId));
|
|
55
|
+
}
|
|
56
|
+
async deleteCredentialExchange(credentialExchangeId) {
|
|
57
|
+
await this.issuerService.deleteIssuanceSession(credentialExchangeId);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
exports.V2OpenId4VcCredentialExchangesController = V2OpenId4VcCredentialExchangesController;
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, common_1.Post)('credential-offer'),
|
|
63
|
+
(0, swagger_1.ApiOperation)({
|
|
64
|
+
summary: 'Create a credential offer',
|
|
65
|
+
description: 'Creates a pre-authorized OpenID4VCI credential offer for one credential configuration. The credential expires after ttlSeconds.',
|
|
66
|
+
}),
|
|
67
|
+
(0, swagger_1.ApiBody)({
|
|
68
|
+
type: dto_1.OpenId4VcCreateCredentialOfferBodyDto,
|
|
69
|
+
examples: {
|
|
70
|
+
employee: {
|
|
71
|
+
summary: 'Employee credential',
|
|
72
|
+
value: {
|
|
73
|
+
jsonSchemaCredentialId: 'employee',
|
|
74
|
+
claims: { name: 'Ada Lovelace', role: 'engineer' },
|
|
75
|
+
ttlSeconds: 3600,
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
statusList: {
|
|
79
|
+
summary: 'Credential registered on a status list',
|
|
80
|
+
value: {
|
|
81
|
+
jsonSchemaCredentialId: 'employee',
|
|
82
|
+
claims: { name: 'Ada Lovelace', role: 'engineer' },
|
|
83
|
+
ttlSeconds: 7776000,
|
|
84
|
+
statusListId: 'list-1',
|
|
85
|
+
statusListIndex: 42,
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
}),
|
|
90
|
+
(0, swagger_1.ApiCreatedResponse)({ description: 'The credential offer', type: dto_1.OpenId4VcCredentialOfferResponseDto }),
|
|
91
|
+
(0, swagger_1.ApiNotFoundResponse)({ description: 'The agent cannot resolve the credential type or the status list' }),
|
|
92
|
+
__param(0, (0, common_1.Body)()),
|
|
93
|
+
__metadata("design:type", Function),
|
|
94
|
+
__metadata("design:paramtypes", [dto_1.OpenId4VcCreateCredentialOfferBodyDto]),
|
|
95
|
+
__metadata("design:returntype", Promise)
|
|
96
|
+
], V2OpenId4VcCredentialExchangesController.prototype, "createCredentialOffer", null);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, common_1.Get)('credential-exchanges'),
|
|
99
|
+
(0, swagger_1.ApiOperation)({
|
|
100
|
+
summary: 'List credential exchanges',
|
|
101
|
+
description: 'Returns the OpenID4VCI issuance sessions that the agent tracks.',
|
|
102
|
+
}),
|
|
103
|
+
(0, swagger_1.ApiOkResponse)({
|
|
104
|
+
description: 'A page of credential exchange records',
|
|
105
|
+
type: dto_1.OpenId4VcCredentialExchangeRecordPageDto,
|
|
106
|
+
}),
|
|
107
|
+
__param(0, (0, common_1.Query)()),
|
|
108
|
+
__metadata("design:type", Function),
|
|
109
|
+
__metadata("design:paramtypes", [dto_1.OpenId4VcListCredentialExchangesQueryDto]),
|
|
110
|
+
__metadata("design:returntype", Promise)
|
|
111
|
+
], V2OpenId4VcCredentialExchangesController.prototype, "listCredentialExchanges", null);
|
|
112
|
+
__decorate([
|
|
113
|
+
(0, common_1.Get)('credential-exchanges/:credentialExchangeId'),
|
|
114
|
+
(0, swagger_1.ApiOperation)({
|
|
115
|
+
summary: 'Get a credential exchange',
|
|
116
|
+
description: 'Retrieves one issuance session by identifier.',
|
|
117
|
+
}),
|
|
118
|
+
(0, swagger_1.ApiParam)({
|
|
119
|
+
name: 'credentialExchangeId',
|
|
120
|
+
type: String,
|
|
121
|
+
description: 'Identifier of the issuance session',
|
|
122
|
+
example: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
|
|
123
|
+
}),
|
|
124
|
+
(0, swagger_1.ApiOkResponse)({
|
|
125
|
+
description: 'The credential exchange record',
|
|
126
|
+
type: dto_1.OpenId4VcCredentialExchangeRecordDto,
|
|
127
|
+
}),
|
|
128
|
+
(0, swagger_1.ApiNotFoundResponse)({ description: 'No credential exchange with the given id' }),
|
|
129
|
+
__param(0, (0, common_1.Param)('credentialExchangeId')),
|
|
130
|
+
__metadata("design:type", Function),
|
|
131
|
+
__metadata("design:paramtypes", [String]),
|
|
132
|
+
__metadata("design:returntype", Promise)
|
|
133
|
+
], V2OpenId4VcCredentialExchangesController.prototype, "getCredentialExchange", null);
|
|
134
|
+
__decorate([
|
|
135
|
+
(0, common_1.Delete)('credential-exchanges/:credentialExchangeId'),
|
|
136
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
|
|
137
|
+
(0, swagger_1.ApiOperation)({
|
|
138
|
+
summary: 'Delete a credential exchange',
|
|
139
|
+
description: 'Deletes an issuance session record. It does not delete a credential that a wallet holds.',
|
|
140
|
+
}),
|
|
141
|
+
(0, swagger_1.ApiParam)({
|
|
142
|
+
name: 'credentialExchangeId',
|
|
143
|
+
type: String,
|
|
144
|
+
description: 'Identifier of the issuance session',
|
|
145
|
+
example: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
|
|
146
|
+
}),
|
|
147
|
+
(0, swagger_1.ApiNoContentResponse)({ description: 'The credential exchange record is deleted' }),
|
|
148
|
+
(0, swagger_1.ApiNotFoundResponse)({ description: 'No credential exchange with the given id' }),
|
|
149
|
+
__param(0, (0, common_1.Param)('credentialExchangeId')),
|
|
150
|
+
__metadata("design:type", Function),
|
|
151
|
+
__metadata("design:paramtypes", [String]),
|
|
152
|
+
__metadata("design:returntype", Promise)
|
|
153
|
+
], V2OpenId4VcCredentialExchangesController.prototype, "deleteCredentialExchange", null);
|
|
154
|
+
exports.V2OpenId4VcCredentialExchangesController = V2OpenId4VcCredentialExchangesController = __decorate([
|
|
155
|
+
(0, swagger_1.ApiTags)('v2/openid4vc'),
|
|
156
|
+
(0, common_1.Controller)({ path: 'openid4vc', version: '2' }),
|
|
157
|
+
(0, common_1.UsePipes)(new common_1.ValidationPipe({ whitelist: true, forbidNonWhitelisted: true, transform: true })),
|
|
158
|
+
__param(0, (0, common_1.Inject)(IssuerService_1.IssuerService)),
|
|
159
|
+
__metadata("design:paramtypes", [IssuerService_1.IssuerService])
|
|
160
|
+
], V2OpenId4VcCredentialExchangesController);
|
|
161
|
+
//# sourceMappingURL=V2OpenId4VcCredentialExchangesController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"V2OpenId4VcCredentialExchangesController.js","sourceRoot":"","sources":["../../src/nestjs/V2OpenId4VcCredentialExchangesController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAauB;AACvB,6CASwB;AACxB,4DAAiF;AAEjF,6DAAyD;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GAAG,EAAE,CAAC;IAC/C,IAAA,iBAAQ,EAAC,IAAI,uBAAc,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,oBAAoB,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAEzE,WAAA,IAAA,eAAM,EAAC,6BAAa,CAAC,CAAA;qCAAiC,6BAAa;GAD5E,wCAAwC,CAoHpD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Page } from '@verana-labs/vs-agent-sdk';
|
|
2
|
+
import { VerifierService } from '../services/VerifierService';
|
|
3
|
+
import { OpenId4VcListPresentationsQueryDto, OpenId4VcPresentationRecordDto, OpenId4VcCreatePresentationRequestBodyDto, OpenId4VcPresentationRequestResponseDto } from './dto';
|
|
4
|
+
/**
|
|
5
|
+
* This controller has the presentations of this agent on OpenID4VP.
|
|
6
|
+
* Refer to [VSA-ADM-OID-PR].
|
|
7
|
+
*
|
|
8
|
+
* `createPresentationRequest` makes the authorization request for one credential type, and for
|
|
9
|
+
* the claims of that type the caller asks the wallet to disclose. The read methods show the
|
|
10
|
+
* verification session, with the trust verdict the agent reached once the wallet answered.
|
|
11
|
+
*/
|
|
12
|
+
export declare class V2OpenId4VcPresentationsController {
|
|
13
|
+
private readonly verifierService;
|
|
14
|
+
constructor(verifierService: VerifierService);
|
|
15
|
+
createPresentationRequest(body: OpenId4VcCreatePresentationRequestBodyDto): Promise<OpenId4VcPresentationRequestResponseDto>;
|
|
16
|
+
listPresentations(query: OpenId4VcListPresentationsQueryDto): Promise<Page<OpenId4VcPresentationRecordDto>>;
|
|
17
|
+
getPresentation(proofExchangeId: string): Promise<OpenId4VcPresentationRecordDto>;
|
|
18
|
+
deletePresentation(proofExchangeId: string): Promise<void>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.V2OpenId4VcPresentationsController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
18
|
+
const vs_agent_sdk_1 = require("@verana-labs/vs-agent-sdk");
|
|
19
|
+
const VerifierService_1 = require("../services/VerifierService");
|
|
20
|
+
const dto_1 = require("./dto");
|
|
21
|
+
const mappers_1 = require("./mappers");
|
|
22
|
+
/**
|
|
23
|
+
* This controller has the presentations of this agent on OpenID4VP.
|
|
24
|
+
* Refer to [VSA-ADM-OID-PR].
|
|
25
|
+
*
|
|
26
|
+
* `createPresentationRequest` makes the authorization request for one credential type, and for
|
|
27
|
+
* the claims of that type the caller asks the wallet to disclose. The read methods show the
|
|
28
|
+
* verification session, with the trust verdict the agent reached once the wallet answered.
|
|
29
|
+
*/
|
|
30
|
+
let V2OpenId4VcPresentationsController = class V2OpenId4VcPresentationsController {
|
|
31
|
+
constructor(verifierService) {
|
|
32
|
+
this.verifierService = verifierService;
|
|
33
|
+
}
|
|
34
|
+
async createPresentationRequest(body) {
|
|
35
|
+
const request = await this.verifierService.createRequest({
|
|
36
|
+
jsonSchemaCredentialId: body.jsonSchemaCredentialId,
|
|
37
|
+
requestedClaims: body.requestedClaims,
|
|
38
|
+
queryLanguage: body.queryLanguage,
|
|
39
|
+
requestSigner: body.requestSigner,
|
|
40
|
+
});
|
|
41
|
+
return { proofExchangeId: request.verificationSessionId, url: request.authorizationRequest };
|
|
42
|
+
}
|
|
43
|
+
async listPresentations(query) {
|
|
44
|
+
const filters = { jsonSchemaCredentialId: query.jsonSchemaCredentialId, state: query.state };
|
|
45
|
+
const sessions = await this.verifierService.listVerificationSessions(filters);
|
|
46
|
+
const page = (0, vs_agent_sdk_1.paginate)(sessions, query, { method: 'openid4vc.listPresentations', filters }, vs_agent_sdk_1.createdAtKey);
|
|
47
|
+
return (0, vs_agent_sdk_1.mapPage)(page, mappers_1.toPresentationDto);
|
|
48
|
+
}
|
|
49
|
+
async getPresentation(proofExchangeId) {
|
|
50
|
+
return (0, mappers_1.toPresentationDto)(await this.verifierService.getVerificationSession(proofExchangeId));
|
|
51
|
+
}
|
|
52
|
+
async deletePresentation(proofExchangeId) {
|
|
53
|
+
await this.verifierService.deleteVerificationSession(proofExchangeId);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
exports.V2OpenId4VcPresentationsController = V2OpenId4VcPresentationsController;
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, common_1.Post)('presentation-request'),
|
|
59
|
+
(0, swagger_1.ApiOperation)({
|
|
60
|
+
summary: 'Create a presentation request',
|
|
61
|
+
description: 'Creates an OpenID4VP authorization request for one credential type, and for the claims of that type the caller asks the wallet to disclose.',
|
|
62
|
+
}),
|
|
63
|
+
(0, swagger_1.ApiBody)({
|
|
64
|
+
type: dto_1.OpenId4VcCreatePresentationRequestBodyDto,
|
|
65
|
+
examples: {
|
|
66
|
+
everyClaim: {
|
|
67
|
+
summary: 'Every claim of the type',
|
|
68
|
+
value: { jsonSchemaCredentialId: 'employee' },
|
|
69
|
+
},
|
|
70
|
+
selectedClaims: {
|
|
71
|
+
summary: 'Selected claims, for a wallet without DCQL',
|
|
72
|
+
value: {
|
|
73
|
+
jsonSchemaCredentialId: 'employee',
|
|
74
|
+
requestedClaims: ['name', 'role'],
|
|
75
|
+
queryLanguage: 'presentation_exchange',
|
|
76
|
+
requestSigner: 'x5c',
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
}),
|
|
81
|
+
(0, swagger_1.ApiCreatedResponse)({
|
|
82
|
+
description: 'The presentation request',
|
|
83
|
+
type: dto_1.OpenId4VcPresentationRequestResponseDto,
|
|
84
|
+
}),
|
|
85
|
+
(0, swagger_1.ApiNotFoundResponse)({ description: 'The agent cannot resolve the credential type' }),
|
|
86
|
+
(0, swagger_1.ApiConflictResponse)({ description: 'The DID does not publish the signing key' }),
|
|
87
|
+
__param(0, (0, common_1.Body)()),
|
|
88
|
+
__metadata("design:type", Function),
|
|
89
|
+
__metadata("design:paramtypes", [dto_1.OpenId4VcCreatePresentationRequestBodyDto]),
|
|
90
|
+
__metadata("design:returntype", Promise)
|
|
91
|
+
], V2OpenId4VcPresentationsController.prototype, "createPresentationRequest", null);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, common_1.Get)('presentations'),
|
|
94
|
+
(0, swagger_1.ApiOperation)({
|
|
95
|
+
summary: 'List presentations',
|
|
96
|
+
description: 'Returns the OpenID4VP verification sessions that the agent created.',
|
|
97
|
+
}),
|
|
98
|
+
(0, swagger_1.ApiOkResponse)({ description: 'A page of presentation records', type: dto_1.OpenId4VcPresentationRecordPageDto }),
|
|
99
|
+
__param(0, (0, common_1.Query)()),
|
|
100
|
+
__metadata("design:type", Function),
|
|
101
|
+
__metadata("design:paramtypes", [dto_1.OpenId4VcListPresentationsQueryDto]),
|
|
102
|
+
__metadata("design:returntype", Promise)
|
|
103
|
+
], V2OpenId4VcPresentationsController.prototype, "listPresentations", null);
|
|
104
|
+
__decorate([
|
|
105
|
+
(0, common_1.Get)('presentations/:proofExchangeId'),
|
|
106
|
+
(0, swagger_1.ApiOperation)({
|
|
107
|
+
summary: 'Get a presentation',
|
|
108
|
+
description: 'Retrieves one verification session by identifier, with its trust result once the wallet answered.',
|
|
109
|
+
}),
|
|
110
|
+
(0, swagger_1.ApiParam)({
|
|
111
|
+
name: 'proofExchangeId',
|
|
112
|
+
type: String,
|
|
113
|
+
description: 'Identifier of the verification session',
|
|
114
|
+
example: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
|
|
115
|
+
}),
|
|
116
|
+
(0, swagger_1.ApiOkResponse)({ description: 'The presentation record', type: dto_1.OpenId4VcPresentationRecordDto }),
|
|
117
|
+
(0, swagger_1.ApiNotFoundResponse)({ description: 'No presentation with the given id' }),
|
|
118
|
+
__param(0, (0, common_1.Param)('proofExchangeId')),
|
|
119
|
+
__metadata("design:type", Function),
|
|
120
|
+
__metadata("design:paramtypes", [String]),
|
|
121
|
+
__metadata("design:returntype", Promise)
|
|
122
|
+
], V2OpenId4VcPresentationsController.prototype, "getPresentation", null);
|
|
123
|
+
__decorate([
|
|
124
|
+
(0, common_1.Delete)('presentations/:proofExchangeId'),
|
|
125
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
|
|
126
|
+
(0, swagger_1.ApiOperation)({ summary: 'Delete a presentation', description: 'Deletes a verification session record.' }),
|
|
127
|
+
(0, swagger_1.ApiParam)({
|
|
128
|
+
name: 'proofExchangeId',
|
|
129
|
+
type: String,
|
|
130
|
+
description: 'Identifier of the verification session',
|
|
131
|
+
example: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
|
|
132
|
+
}),
|
|
133
|
+
(0, swagger_1.ApiNoContentResponse)({ description: 'The presentation record is deleted' }),
|
|
134
|
+
(0, swagger_1.ApiNotFoundResponse)({ description: 'No presentation with the given id' }),
|
|
135
|
+
__param(0, (0, common_1.Param)('proofExchangeId')),
|
|
136
|
+
__metadata("design:type", Function),
|
|
137
|
+
__metadata("design:paramtypes", [String]),
|
|
138
|
+
__metadata("design:returntype", Promise)
|
|
139
|
+
], V2OpenId4VcPresentationsController.prototype, "deletePresentation", null);
|
|
140
|
+
exports.V2OpenId4VcPresentationsController = V2OpenId4VcPresentationsController = __decorate([
|
|
141
|
+
(0, swagger_1.ApiTags)('v2/openid4vc'),
|
|
142
|
+
(0, common_1.Controller)({ path: 'openid4vc', version: '2' }),
|
|
143
|
+
(0, common_1.UsePipes)(new common_1.ValidationPipe({ whitelist: true, forbidNonWhitelisted: true, transform: true })),
|
|
144
|
+
__param(0, (0, common_1.Inject)(VerifierService_1.VerifierService)),
|
|
145
|
+
__metadata("design:paramtypes", [VerifierService_1.VerifierService])
|
|
146
|
+
], V2OpenId4VcPresentationsController);
|
|
147
|
+
//# sourceMappingURL=V2OpenId4VcPresentationsController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"V2OpenId4VcPresentationsController.js","sourceRoot":"","sources":["../../src/nestjs/V2OpenId4VcPresentationsController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAauB;AACvB,6CAUwB;AACxB,4DAAiF;AAEjF,iEAA6D;AAE7D,+BAMc;AACd,uCAA6C;AAE7C;;;;;;;GAOG;AAII,IAAM,kCAAkC,GAAxC,MAAM,kCAAkC;IAC7C,YAA6D,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;IAAG,CAAC;IAgCpF,AAAN,KAAK,CAAC,yBAAyB,CAC5B,IAA+C;QAEvD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC;YACvD,sBAAsB,EAAE,IAAI,CAAC,sBAAsB;YACnD,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,aAAa,EAAE,IAAI,CAAC,aAAa;SAClC,CAAC,CAAA;QACF,OAAO,EAAE,eAAe,EAAE,OAAO,CAAC,qBAAqB,EAAE,GAAG,EAAE,OAAO,CAAC,oBAAoB,EAAE,CAAA;IAC9F,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,UAAU,CAAC;IAC/B,IAAA,sBAAY,EAAC,EAAE,OAAO,EAAE,uBAAuB,EAAE,WAAW,EAAE,wCAAwC,EAAE,CAAC;IACzG,IAAA,kBAAQ,EAAC;QACR,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,wCAAwC;QACrD,OAAO,EAAE,sCAAsC;KAChD,CAAC;IACD,IAAA,8BAAoB,EAAC,EAAE,WAAW,EAAE,oCAAoC,EAAE,CAAC;IAC3E,IAAA,6BAAmB,EAAC,EAAE,WAAW,EAAE,mCAAmC,EAAE,CAAC;IACzC,WAAA,IAAA,cAAK,EAAC,iBAAiB,CAAC,CAAA;;;;4EAExD;6CA/FU,kCAAkC;IAH9C,IAAA,iBAAO,EAAC,cAAc,CAAC;IACvB,IAAA,mBAAU,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;IAC/C,IAAA,iBAAQ,EAAC,IAAI,uBAAc,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,oBAAoB,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAEzE,WAAA,IAAA,eAAM,EAAC,iCAAe,CAAC,CAAA;qCAAmC,iCAAe;GADlF,kCAAkC,CAgG9C"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IssuerService } from '../services/IssuerService';
|
|
2
|
+
import { VerifierService } from '../services/VerifierService';
|
|
3
|
+
import { OpenId4VcSigningCertificateDto } from './dto';
|
|
4
|
+
/**
|
|
5
|
+
* This controller has the signing certificates of the two OpenID4VC capabilities of this agent.
|
|
6
|
+
* Refer to [VSA-ADM-OID-CS].
|
|
7
|
+
*
|
|
8
|
+
* The issuer signs the credentials it mints and the verifier signs the requests it sends, each
|
|
9
|
+
* with its own certificate. An operator reads the public certificate of a capability here to pin
|
|
10
|
+
* its fingerprint on a peer.
|
|
11
|
+
*/
|
|
12
|
+
export declare class V2OpenId4VcSigningCertificatesController {
|
|
13
|
+
private readonly issuerService;
|
|
14
|
+
private readonly verifierService;
|
|
15
|
+
constructor(issuerService: IssuerService, verifierService: VerifierService);
|
|
16
|
+
listSigningCertificates(): Promise<OpenId4VcSigningCertificateDto[]>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.V2OpenId4VcSigningCertificatesController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
18
|
+
const IssuerService_1 = require("../services/IssuerService");
|
|
19
|
+
const VerifierService_1 = require("../services/VerifierService");
|
|
20
|
+
const dto_1 = require("./dto");
|
|
21
|
+
/**
|
|
22
|
+
* This controller has the signing certificates of the two OpenID4VC capabilities of this agent.
|
|
23
|
+
* Refer to [VSA-ADM-OID-CS].
|
|
24
|
+
*
|
|
25
|
+
* The issuer signs the credentials it mints and the verifier signs the requests it sends, each
|
|
26
|
+
* with its own certificate. An operator reads the public certificate of a capability here to pin
|
|
27
|
+
* its fingerprint on a peer.
|
|
28
|
+
*/
|
|
29
|
+
let V2OpenId4VcSigningCertificatesController = class V2OpenId4VcSigningCertificatesController {
|
|
30
|
+
constructor(issuerService, verifierService) {
|
|
31
|
+
this.issuerService = issuerService;
|
|
32
|
+
this.verifierService = verifierService;
|
|
33
|
+
}
|
|
34
|
+
async listSigningCertificates() {
|
|
35
|
+
return Promise.all([this.issuerService.getCertificateInfo(), this.verifierService.getCertificateInfo()]);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
exports.V2OpenId4VcSigningCertificatesController = V2OpenId4VcSigningCertificatesController;
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, common_1.Get)('signing-certificates'),
|
|
41
|
+
(0, swagger_1.ApiOperation)({
|
|
42
|
+
summary: 'List signing certificates',
|
|
43
|
+
description: 'Returns the public signing certificate of each capability, so that an operator can pin a fingerprint on a peer verifier. Not paginated: one record for the issuer and one for the verifier.',
|
|
44
|
+
}),
|
|
45
|
+
(0, swagger_1.ApiOkResponse)({ description: 'The signing certificates', type: [dto_1.OpenId4VcSigningCertificateDto] }),
|
|
46
|
+
__metadata("design:type", Function),
|
|
47
|
+
__metadata("design:paramtypes", []),
|
|
48
|
+
__metadata("design:returntype", Promise)
|
|
49
|
+
], V2OpenId4VcSigningCertificatesController.prototype, "listSigningCertificates", null);
|
|
50
|
+
exports.V2OpenId4VcSigningCertificatesController = V2OpenId4VcSigningCertificatesController = __decorate([
|
|
51
|
+
(0, swagger_1.ApiTags)('v2/openid4vc'),
|
|
52
|
+
(0, common_1.Controller)({ path: 'openid4vc', version: '2' }),
|
|
53
|
+
__param(0, (0, common_1.Inject)(IssuerService_1.IssuerService)),
|
|
54
|
+
__param(1, (0, common_1.Inject)(VerifierService_1.VerifierService)),
|
|
55
|
+
__metadata("design:paramtypes", [IssuerService_1.IssuerService,
|
|
56
|
+
VerifierService_1.VerifierService])
|
|
57
|
+
], V2OpenId4VcSigningCertificatesController);
|
|
58
|
+
//# sourceMappingURL=V2OpenId4VcSigningCertificatesController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"V2OpenId4VcSigningCertificatesController.js","sourceRoot":"","sources":["../../src/nestjs/V2OpenId4VcSigningCertificatesController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAwD;AACxD,6CAAsE;AACtE,6DAAyD;AACzD,iEAA6D;AAE7D,+BAAsD;AAEtD;;;;;;;GAOG;AAGI,IAAM,wCAAwC,GAA9C,MAAM,wCAAwC;IACnD,YAC0C,aAA4B,EAC1B,eAAgC;QADlC,kBAAa,GAAb,aAAa,CAAe;QAC1B,oBAAe,GAAf,eAAe,CAAiB;IACzE,CAAC;IASS,AAAN,KAAK,CAAC,uBAAuB;QAClC,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,kBAAkB,EAAE,EAAE,IAAI,CAAC,eAAe,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAA;IAC1G,CAAC;CACF,CAAA;AAhBY,4FAAwC;AAatC;IAPZ,IAAA,YAAG,EAAC,sBAAsB,CAAC;IAC3B,IAAA,sBAAY,EAAC;QACZ,OAAO,EAAE,2BAA2B;QACpC,WAAW,EACT,6LAA6L;KAChM,CAAC;IACD,IAAA,uBAAa,EAAC,EAAE,WAAW,EAAE,0BAA0B,EAAE,IAAI,EAAE,CAAC,oCAA8B,CAAC,EAAE,CAAC;;;;uFAGlG;mDAfU,wCAAwC;IAFpD,IAAA,iBAAO,EAAC,cAAc,CAAC;IACvB,IAAA,mBAAU,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;IAG3C,WAAA,IAAA,eAAM,EAAC,6BAAa,CAAC,CAAA;IACrB,WAAA,IAAA,eAAM,EAAC,iCAAe,CAAC,CAAA;qCAD+B,6BAAa;QACT,iCAAe;GAHjE,wCAAwC,CAgBpD"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { OpenId4VcIssuanceSessionState } from '@credo-ts/openid4vc';
|
|
2
|
+
import { PaginationQueryDto } from '@verana-labs/vs-agent-sdk';
|
|
3
|
+
/** Request body of [VSA-ADM-OID-CE] createCredentialOffer. */
|
|
4
|
+
export declare class OpenId4VcCreateCredentialOfferBodyDto {
|
|
5
|
+
jsonSchemaCredentialId: string;
|
|
6
|
+
claims: Record<string, unknown>;
|
|
7
|
+
ttlSeconds: number;
|
|
8
|
+
statusListId?: string;
|
|
9
|
+
statusListIndex?: number;
|
|
10
|
+
}
|
|
11
|
+
/** Response of [VSA-ADM-OID-CE] createCredentialOffer. */
|
|
12
|
+
export declare class OpenId4VcCredentialOfferResponseDto {
|
|
13
|
+
credentialExchangeId: string;
|
|
14
|
+
url: string;
|
|
15
|
+
}
|
|
16
|
+
/** Query of [VSA-ADM-OID-CE] listCredentialExchanges. */
|
|
17
|
+
export declare class OpenId4VcListCredentialExchangesQueryDto extends PaginationQueryDto {
|
|
18
|
+
jsonSchemaCredentialId?: string;
|
|
19
|
+
state?: OpenId4VcIssuanceSessionState;
|
|
20
|
+
}
|
|
21
|
+
/** A credential exchange record, as returned by listCredentialExchanges and getCredentialExchange. */
|
|
22
|
+
export declare class OpenId4VcCredentialExchangeRecordDto {
|
|
23
|
+
credentialExchangeId: string;
|
|
24
|
+
jsonSchemaCredentialId: string;
|
|
25
|
+
state: OpenId4VcIssuanceSessionState;
|
|
26
|
+
createdAt: Date;
|
|
27
|
+
updatedAt: Date;
|
|
28
|
+
expiresAt?: Date;
|
|
29
|
+
errorMessage?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare const OpenId4VcCredentialExchangeRecordPageDto: import("@nestjs/common").Type<import("@verana-labs/vs-agent-sdk").Page<OpenId4VcCredentialExchangeRecordDto>>;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.OpenId4VcCredentialExchangeRecordPageDto = exports.OpenId4VcCredentialExchangeRecordDto = exports.OpenId4VcListCredentialExchangesQueryDto = exports.OpenId4VcCredentialOfferResponseDto = exports.OpenId4VcCreateCredentialOfferBodyDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const openid4vc_1 = require("@credo-ts/openid4vc");
|
|
15
|
+
const vs_agent_sdk_1 = require("@verana-labs/vs-agent-sdk");
|
|
16
|
+
const class_validator_1 = require("class-validator");
|
|
17
|
+
const config_1 = require("../../config");
|
|
18
|
+
/** Request body of [VSA-ADM-OID-CE] createCredentialOffer. */
|
|
19
|
+
class OpenId4VcCreateCredentialOfferBodyDto {
|
|
20
|
+
}
|
|
21
|
+
exports.OpenId4VcCreateCredentialOfferBodyDto = OpenId4VcCreateCredentialOfferBodyDto;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, swagger_1.ApiProperty)({
|
|
24
|
+
description: 'Credential type of the offer. The agent derives no credential type yet, so every identifier answers UNKNOWN_ID.',
|
|
25
|
+
example: 'employee',
|
|
26
|
+
}),
|
|
27
|
+
(0, class_validator_1.IsString)(),
|
|
28
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], OpenId4VcCreateCredentialOfferBodyDto.prototype, "jsonSchemaCredentialId", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, swagger_1.ApiProperty)({
|
|
33
|
+
type: 'object',
|
|
34
|
+
additionalProperties: true,
|
|
35
|
+
description: 'Claim values of the offered credential. Any subset of the configured claims, at least one, each non-empty; an omitted claim is left out of the credential.',
|
|
36
|
+
example: { name: 'Ada Lovelace', role: 'engineer' },
|
|
37
|
+
}),
|
|
38
|
+
(0, class_validator_1.IsObject)(),
|
|
39
|
+
__metadata("design:type", Object)
|
|
40
|
+
], OpenId4VcCreateCredentialOfferBodyDto.prototype, "claims", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, swagger_1.ApiProperty)({
|
|
43
|
+
type: Number,
|
|
44
|
+
minimum: config_1.OFFER_TTL_SECONDS_MIN,
|
|
45
|
+
maximum: config_1.OFFER_TTL_SECONDS_MAX,
|
|
46
|
+
description: 'Lifetime of the credential in seconds, from 60 up to 7776000 (90 days). Nothing revokes the credential, so this lifetime is its only bound.',
|
|
47
|
+
example: 3600,
|
|
48
|
+
}),
|
|
49
|
+
(0, class_validator_1.IsInt)(),
|
|
50
|
+
(0, class_validator_1.Min)(config_1.OFFER_TTL_SECONDS_MIN),
|
|
51
|
+
(0, class_validator_1.Max)(config_1.OFFER_TTL_SECONDS_MAX),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], OpenId4VcCreateCredentialOfferBodyDto.prototype, "ttlSeconds", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
56
|
+
description: 'Status list the credential is registered on, with statusListIndex. The agent hosts no status list yet, so every identifier answers UNKNOWN_ID.',
|
|
57
|
+
example: 'list-1',
|
|
58
|
+
}),
|
|
59
|
+
(0, class_validator_1.IsOptional)(),
|
|
60
|
+
(0, class_validator_1.IsString)(),
|
|
61
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], OpenId4VcCreateCredentialOfferBodyDto.prototype, "statusListId", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
66
|
+
type: Number,
|
|
67
|
+
minimum: 0,
|
|
68
|
+
description: 'Index of the credential on that status list. Required whenever statusListId is present.',
|
|
69
|
+
example: 42,
|
|
70
|
+
}),
|
|
71
|
+
(0, class_validator_1.IsOptional)(),
|
|
72
|
+
(0, class_validator_1.IsInt)(),
|
|
73
|
+
(0, class_validator_1.Min)(0),
|
|
74
|
+
__metadata("design:type", Number)
|
|
75
|
+
], OpenId4VcCreateCredentialOfferBodyDto.prototype, "statusListIndex", void 0);
|
|
76
|
+
/** Response of [VSA-ADM-OID-CE] createCredentialOffer. */
|
|
77
|
+
class OpenId4VcCredentialOfferResponseDto {
|
|
78
|
+
}
|
|
79
|
+
exports.OpenId4VcCredentialOfferResponseDto = OpenId4VcCredentialOfferResponseDto;
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, swagger_1.ApiProperty)({
|
|
82
|
+
description: 'Identifier of the issuance session, for later tracking',
|
|
83
|
+
example: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
|
|
84
|
+
}),
|
|
85
|
+
__metadata("design:type", String)
|
|
86
|
+
], OpenId4VcCredentialOfferResponseDto.prototype, "credentialExchangeId", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, swagger_1.ApiProperty)({
|
|
89
|
+
description: 'Credential offer URI, ready to render as a QR code or to send as a link',
|
|
90
|
+
example: 'openid-credential-offer://?credential_offer_uri=https%3A%2F%2Fagent.example%2Foid4vci%2Fissuer%2Foffers%2F1',
|
|
91
|
+
}),
|
|
92
|
+
__metadata("design:type", String)
|
|
93
|
+
], OpenId4VcCredentialOfferResponseDto.prototype, "url", void 0);
|
|
94
|
+
/** Query of [VSA-ADM-OID-CE] listCredentialExchanges. */
|
|
95
|
+
class OpenId4VcListCredentialExchangesQueryDto extends vs_agent_sdk_1.PaginationQueryDto {
|
|
96
|
+
}
|
|
97
|
+
exports.OpenId4VcListCredentialExchangesQueryDto = OpenId4VcListCredentialExchangesQueryDto;
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Filter by credential type', example: 'employee' }),
|
|
100
|
+
(0, class_validator_1.IsOptional)(),
|
|
101
|
+
(0, class_validator_1.IsString)(),
|
|
102
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
103
|
+
__metadata("design:type", String)
|
|
104
|
+
], OpenId4VcListCredentialExchangesQueryDto.prototype, "jsonSchemaCredentialId", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
107
|
+
enum: openid4vc_1.OpenId4VcIssuanceSessionState,
|
|
108
|
+
description: 'Filter by issuance session state',
|
|
109
|
+
}),
|
|
110
|
+
(0, class_validator_1.IsOptional)(),
|
|
111
|
+
(0, class_validator_1.IsEnum)(openid4vc_1.OpenId4VcIssuanceSessionState),
|
|
112
|
+
__metadata("design:type", String)
|
|
113
|
+
], OpenId4VcListCredentialExchangesQueryDto.prototype, "state", void 0);
|
|
114
|
+
/** A credential exchange record, as returned by listCredentialExchanges and getCredentialExchange. */
|
|
115
|
+
class OpenId4VcCredentialExchangeRecordDto {
|
|
116
|
+
}
|
|
117
|
+
exports.OpenId4VcCredentialExchangeRecordDto = OpenId4VcCredentialExchangeRecordDto;
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, swagger_1.ApiProperty)({
|
|
120
|
+
description: 'Identifier of the issuance session',
|
|
121
|
+
example: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
|
|
122
|
+
}),
|
|
123
|
+
__metadata("design:type", String)
|
|
124
|
+
], OpenId4VcCredentialExchangeRecordDto.prototype, "credentialExchangeId", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
(0, swagger_1.ApiProperty)({ description: 'Credential type of the offer', example: 'employee' }),
|
|
127
|
+
__metadata("design:type", String)
|
|
128
|
+
], OpenId4VcCredentialExchangeRecordDto.prototype, "jsonSchemaCredentialId", void 0);
|
|
129
|
+
__decorate([
|
|
130
|
+
(0, swagger_1.ApiProperty)({ enum: openid4vc_1.OpenId4VcIssuanceSessionState, description: 'State of the issuance session' }),
|
|
131
|
+
__metadata("design:type", String)
|
|
132
|
+
], OpenId4VcCredentialExchangeRecordDto.prototype, "state", void 0);
|
|
133
|
+
__decorate([
|
|
134
|
+
(0, swagger_1.ApiProperty)({ type: String, format: 'date-time', description: 'When the agent created the offer' }),
|
|
135
|
+
__metadata("design:type", Date)
|
|
136
|
+
], OpenId4VcCredentialExchangeRecordDto.prototype, "createdAt", void 0);
|
|
137
|
+
__decorate([
|
|
138
|
+
(0, swagger_1.ApiProperty)({ type: String, format: 'date-time', description: 'When the session last changed' }),
|
|
139
|
+
__metadata("design:type", Date)
|
|
140
|
+
], OpenId4VcCredentialExchangeRecordDto.prototype, "updatedAt", void 0);
|
|
141
|
+
__decorate([
|
|
142
|
+
(0, swagger_1.ApiPropertyOptional)({ type: String, format: 'date-time', description: 'When the offer stops being valid' }),
|
|
143
|
+
__metadata("design:type", Date)
|
|
144
|
+
], OpenId4VcCredentialExchangeRecordDto.prototype, "expiresAt", void 0);
|
|
145
|
+
__decorate([
|
|
146
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Error message on the session. The agent sets it if the flow stops.' }),
|
|
147
|
+
__metadata("design:type", String)
|
|
148
|
+
], OpenId4VcCredentialExchangeRecordDto.prototype, "errorMessage", void 0);
|
|
149
|
+
exports.OpenId4VcCredentialExchangeRecordPageDto = (0, vs_agent_sdk_1.PageDto)(OpenId4VcCredentialExchangeRecordDto);
|
|
150
|
+
//# sourceMappingURL=credential-exchange.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-exchange.dto.js","sourceRoot":"","sources":["../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