@verana-labs/vs-agent-plugin-openid4vc 1.12.0-oidc4vc.7 → 2.0.0-dev.100

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.
Files changed (109) hide show
  1. package/README.md +175 -164
  2. package/build/config.d.ts +19 -3
  3. package/build/config.js +161 -242
  4. package/build/config.js.map +1 -1
  5. package/build/events/openId4VcEvents.d.ts +6 -0
  6. package/build/events/openId4VcEvents.js +17 -0
  7. package/build/events/openId4VcEvents.js.map +1 -0
  8. package/build/index.d.ts +20 -12
  9. package/build/index.js +39 -16
  10. package/build/index.js.map +1 -1
  11. package/build/nestjs/OpenId4VcPlugin.js +27 -43
  12. package/build/nestjs/OpenId4VcPlugin.js.map +1 -1
  13. package/build/nestjs/V2OpenId4VcCredentialExchangesController.d.ts +19 -0
  14. package/build/nestjs/V2OpenId4VcCredentialExchangesController.js +161 -0
  15. package/build/nestjs/V2OpenId4VcCredentialExchangesController.js.map +1 -0
  16. package/build/nestjs/V2OpenId4VcPresentationsController.d.ts +19 -0
  17. package/build/nestjs/V2OpenId4VcPresentationsController.js +147 -0
  18. package/build/nestjs/V2OpenId4VcPresentationsController.js.map +1 -0
  19. package/build/nestjs/V2OpenId4VcSigningCertificatesController.d.ts +17 -0
  20. package/build/nestjs/V2OpenId4VcSigningCertificatesController.js +58 -0
  21. package/build/nestjs/V2OpenId4VcSigningCertificatesController.js.map +1 -0
  22. package/build/nestjs/dto/credential-exchange.dto.d.ts +31 -0
  23. package/build/nestjs/dto/credential-exchange.dto.js +150 -0
  24. package/build/nestjs/dto/credential-exchange.dto.js.map +1 -0
  25. package/build/nestjs/dto/index.d.ts +3 -0
  26. package/build/nestjs/dto/index.js +20 -0
  27. package/build/nestjs/dto/index.js.map +1 -0
  28. package/build/nestjs/dto/presentation.dto.d.ts +57 -0
  29. package/build/nestjs/dto/presentation.dto.js +246 -0
  30. package/build/nestjs/dto/presentation.dto.js.map +1 -0
  31. package/build/nestjs/dto/signing-certificate.dto.d.ts +8 -0
  32. package/build/nestjs/dto/signing-certificate.dto.js +40 -0
  33. package/build/nestjs/dto/signing-certificate.dto.js.map +1 -0
  34. package/build/nestjs/mappers.d.ts +5 -0
  35. package/build/nestjs/mappers.js +31 -0
  36. package/build/nestjs/mappers.js.map +1 -0
  37. package/build/sdk/credentialConfigurationHandlers.d.ts +4 -0
  38. package/build/sdk/credentialConfigurationHandlers.js +57 -0
  39. package/build/sdk/credentialConfigurationHandlers.js.map +1 -0
  40. package/build/sdk/setupOpenId4Vc.d.ts +8 -12
  41. package/build/sdk/setupOpenId4Vc.js +88 -80
  42. package/build/sdk/setupOpenId4Vc.js.map +1 -1
  43. package/build/services/CertificateService.d.ts +5 -22
  44. package/build/services/CertificateService.js +90 -84
  45. package/build/services/CertificateService.js.map +1 -1
  46. package/build/services/IssuerService.d.ts +57 -44
  47. package/build/services/IssuerService.js +284 -103
  48. package/build/services/IssuerService.js.map +1 -1
  49. package/build/services/VerifierService.d.ts +44 -44
  50. package/build/services/VerifierService.js +227 -223
  51. package/build/services/VerifierService.js.map +1 -1
  52. package/build/services/credentialConfigurationBuilder.d.ts +10 -0
  53. package/build/services/credentialConfigurationBuilder.js +88 -0
  54. package/build/services/credentialConfigurationBuilder.js.map +1 -0
  55. package/build/services/presentationRequest.d.ts +51 -0
  56. package/build/services/presentationRequest.js +72 -0
  57. package/build/services/presentationRequest.js.map +1 -0
  58. package/build/services/presentationVerification.d.ts +12 -0
  59. package/build/services/presentationVerification.js +13 -0
  60. package/build/services/presentationVerification.js.map +1 -0
  61. package/build/services/typeMetadataIntegrity.d.ts +6 -0
  62. package/build/services/typeMetadataIntegrity.js +32 -0
  63. package/build/services/typeMetadataIntegrity.js.map +1 -0
  64. package/build/trust/CertificateTrust.d.ts +1 -4
  65. package/build/trust/CertificateTrust.js +10 -15
  66. package/build/trust/CertificateTrust.js.map +1 -1
  67. package/build/trust/keyBinding.d.ts +15 -16
  68. package/build/trust/keyBinding.js +54 -174
  69. package/build/trust/keyBinding.js.map +1 -1
  70. package/build/trust/presentedIssuer.d.ts +9 -0
  71. package/build/trust/presentedIssuer.js +23 -0
  72. package/build/trust/presentedIssuer.js.map +1 -0
  73. package/build/trust/trustDecision.d.ts +31 -0
  74. package/build/trust/trustDecision.js +204 -0
  75. package/build/trust/trustDecision.js.map +1 -0
  76. package/build/trust/types.d.ts +7 -16
  77. package/build/trust/types.js +8 -0
  78. package/build/trust/types.js.map +1 -1
  79. package/build/types.d.ts +29 -51
  80. package/build/types.js +4 -0
  81. package/build/types.js.map +1 -1
  82. package/build/utils/isRecord.d.ts +1 -0
  83. package/build/utils/isRecord.js +7 -0
  84. package/build/utils/isRecord.js.map +1 -0
  85. package/build/utils/serviceDisplay.d.ts +8 -0
  86. package/build/utils/serviceDisplay.js +11 -0
  87. package/build/utils/serviceDisplay.js.map +1 -0
  88. package/package.json +10 -8
  89. package/build/nestjs/CertificatesController.d.ts +0 -11
  90. package/build/nestjs/CertificatesController.js +0 -58
  91. package/build/nestjs/CertificatesController.js.map +0 -1
  92. package/build/nestjs/IssuerController.d.ts +0 -8
  93. package/build/nestjs/IssuerController.js +0 -66
  94. package/build/nestjs/IssuerController.js.map +0 -1
  95. package/build/nestjs/VerifierController.d.ts +0 -8
  96. package/build/nestjs/VerifierController.js +0 -66
  97. package/build/nestjs/VerifierController.js.map +0 -1
  98. package/build/nestjs/dto.d.ts +0 -7
  99. package/build/nestjs/dto.js +0 -34
  100. package/build/nestjs/dto.js.map +0 -1
  101. package/build/services/StatusListService.d.ts +0 -42
  102. package/build/services/StatusListService.js +0 -132
  103. package/build/services/StatusListService.js.map +0 -1
  104. package/build/trust/TrustClient.d.ts +0 -12
  105. package/build/trust/TrustClient.js +0 -120
  106. package/build/trust/TrustClient.js.map +0 -1
  107. package/build/trust/verdict.d.ts +0 -2
  108. package/build/trust/verdict.js +0 -13
  109. package/build/trust/verdict.js.map +0 -1
@@ -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":["../../../src/nestjs/dto/credential-exchange.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAkE;AAClE,mDAAmE;AACnE,4DAAuE;AACvE,qDAAqG;AAErG,yCAA2E;AAE3E,8DAA8D;AAC9D,MAAa,qCAAqC;CAqDjD;AArDD,sFAqDC;AA7CC;IAPC,IAAA,qBAAW,EAAC;QACX,WAAW,EACT,iHAAiH;QACnH,OAAO,EAAE,UAAU;KACpB,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qFACkB;AAU/B;IARC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,QAAQ;QACd,oBAAoB,EAAE,IAAI;QAC1B,WAAW,EACT,4JAA4J;QAC9J,OAAO,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,UAAU,EAAE;KACpD,CAAC;IACD,IAAA,0BAAQ,GAAE;;qEACqB;AAahC;IAXC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,8BAAqB;QAC9B,OAAO,EAAE,8BAAqB;QAC9B,WAAW,EACT,6IAA6I;QAC/I,OAAO,EAAE,IAAI;KACd,CAAC;IACD,IAAA,uBAAK,GAAE;IACP,IAAA,qBAAG,EAAC,8BAAqB,CAAC;IAC1B,IAAA,qBAAG,EAAC,8BAAqB,CAAC;;yEACR;AAUnB;IARC,IAAA,6BAAmB,EAAC;QACnB,WAAW,EACT,gJAAgJ;QAClJ,OAAO,EAAE,QAAQ;KAClB,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;2EACQ;AAWrB;IATC,IAAA,6BA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,EAAE,+BAA+B,EAAE,CAAC;;mEAC9D;AAGrC;IADC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;8BACxF,IAAI;uEAAA;AAGhB;IADC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,+BAA+B,EAAE,CAAC;8BACrF,IAAI;uEAAA;AAGhB;IADC,IAAA,6BAAmB,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;8BAChG,IAAI;uEAAA;AAGhB;IADC,IAAA,6BAAmB,EAAC,EAAE,WAAW,EAAE,oEAAoE,EAAE,CAAC;;0EACtF;AAGV,QAAA,wCAAwC,GAAG,IAAA,sBAAO,EAAC,oCAAoC,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './credential-exchange.dto';
2
+ export * from './presentation.dto';
3
+ export * from './signing-certificate.dto';
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./credential-exchange.dto"), exports);
18
+ __exportStar(require("./presentation.dto"), exports);
19
+ __exportStar(require("./signing-certificate.dto"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nestjs/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAAyC;AACzC,qDAAkC;AAClC,4DAAyC"}
@@ -0,0 +1,57 @@
1
+ import type { OpenId4VcQueryLanguage } from '../../services/presentationRequest';
2
+ import type { OpenId4VcRequestSigner } from '../../services/VerifierService';
3
+ import type { TrustVerdictName, VeranaTrustStatus } from '../../trust/types';
4
+ import { OpenId4VcVerificationSessionState } from '@credo-ts/openid4vc';
5
+ import { PaginationQueryDto } from '@verana-labs/vs-agent-sdk';
6
+ /** Request body of [VSA-ADM-OID-PR] createPresentationRequest. */
7
+ export declare class OpenId4VcCreatePresentationRequestBodyDto {
8
+ jsonSchemaCredentialId: string;
9
+ requestedClaims?: string[];
10
+ queryLanguage?: OpenId4VcQueryLanguage;
11
+ requestSigner?: OpenId4VcRequestSigner;
12
+ }
13
+ /** Response of [VSA-ADM-OID-PR] createPresentationRequest. */
14
+ export declare class OpenId4VcPresentationRequestResponseDto {
15
+ proofExchangeId: string;
16
+ url: string;
17
+ }
18
+ /** Query of [VSA-ADM-OID-PR] listPresentations. */
19
+ export declare class OpenId4VcListPresentationsQueryDto extends PaginationQueryDto {
20
+ jsonSchemaCredentialId?: string;
21
+ state?: OpenId4VcVerificationSessionState;
22
+ }
23
+ /** What the agent read from the resolver to reach a trust verdict on a presentation. */
24
+ export declare class OpenId4VcTrustEvidenceDto {
25
+ did: string | null;
26
+ trustStatus: VeranaTrustStatus | null;
27
+ jsonSchemaCredentialId: string | null;
28
+ credentialSchemaId: number | null;
29
+ authorized: boolean | null;
30
+ queries: string[];
31
+ note?: string;
32
+ }
33
+ /** The trust verdict on a presentation, on the record of [VSA-ADM-OID-PR] getPresentation. */
34
+ export declare class OpenId4VcTrustVerdictDto {
35
+ verdict: TrustVerdictName;
36
+ evidence: OpenId4VcTrustEvidenceDto;
37
+ }
38
+ /** The credential a wallet presented, on the record of [VSA-ADM-OID-PR] getPresentation. */
39
+ export declare class OpenId4VcPresentedCredentialDto {
40
+ vct: string;
41
+ disclosedClaims: Record<string, unknown>;
42
+ }
43
+ /** A presentation record, as returned by listPresentations and getPresentation. */
44
+ export declare class OpenId4VcPresentationRecordDto {
45
+ proofExchangeId: string;
46
+ jsonSchemaCredentialId?: string;
47
+ requestedClaims?: string[];
48
+ state: OpenId4VcVerificationSessionState;
49
+ createdAt: Date;
50
+ updatedAt: Date;
51
+ errorMessage?: string;
52
+ cryptographicVerified: boolean;
53
+ accepted: boolean;
54
+ trust?: OpenId4VcTrustVerdictDto;
55
+ credential?: OpenId4VcPresentedCredentialDto;
56
+ }
57
+ export declare const OpenId4VcPresentationRecordPageDto: import("@nestjs/common").Type<import("@verana-labs/vs-agent-sdk").Page<OpenId4VcPresentationRecordDto>>;
@@ -0,0 +1,246 @@
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.OpenId4VcPresentationRecordPageDto = exports.OpenId4VcPresentationRecordDto = exports.OpenId4VcPresentedCredentialDto = exports.OpenId4VcTrustVerdictDto = exports.OpenId4VcTrustEvidenceDto = exports.OpenId4VcListPresentationsQueryDto = exports.OpenId4VcPresentationRequestResponseDto = exports.OpenId4VcCreatePresentationRequestBodyDto = void 0;
13
+ const openid4vc_1 = require("@credo-ts/openid4vc");
14
+ const swagger_1 = require("@nestjs/swagger");
15
+ const vs_agent_sdk_1 = require("@verana-labs/vs-agent-sdk");
16
+ const class_validator_1 = require("class-validator");
17
+ const presentationRequest_1 = require("../../services/presentationRequest");
18
+ const VerifierService_1 = require("../../services/VerifierService");
19
+ const types_1 = require("../../trust/types");
20
+ /** Request body of [VSA-ADM-OID-PR] createPresentationRequest. */
21
+ class OpenId4VcCreatePresentationRequestBodyDto {
22
+ }
23
+ exports.OpenId4VcCreatePresentationRequestBodyDto = OpenId4VcCreatePresentationRequestBodyDto;
24
+ __decorate([
25
+ (0, swagger_1.ApiProperty)({
26
+ description: 'Credential type the request asks for: the jsonSchemaCredentialId of a VTJSC whose CredentialSchema the agent holds an active VERIFIER Participant for.',
27
+ example: 'employee',
28
+ }),
29
+ (0, class_validator_1.IsString)(),
30
+ (0, class_validator_1.IsNotEmpty)(),
31
+ __metadata("design:type", String)
32
+ ], OpenId4VcCreatePresentationRequestBodyDto.prototype, "jsonSchemaCredentialId", void 0);
33
+ __decorate([
34
+ (0, swagger_1.ApiPropertyOptional)({
35
+ type: [String],
36
+ description: 'Claim names the request asks the wallet to disclose, without a duplicate. Defaults to every claim of the type.',
37
+ example: ['name', 'role'],
38
+ }),
39
+ (0, class_validator_1.IsOptional)(),
40
+ (0, class_validator_1.IsArray)(),
41
+ (0, class_validator_1.IsString)({ each: true }),
42
+ (0, class_validator_1.IsNotEmpty)({ each: true }),
43
+ (0, class_validator_1.ArrayUnique)(),
44
+ __metadata("design:type", Array)
45
+ ], OpenId4VcCreatePresentationRequestBodyDto.prototype, "requestedClaims", void 0);
46
+ __decorate([
47
+ (0, swagger_1.ApiPropertyOptional)({
48
+ enum: presentationRequest_1.OPENID4VC_QUERY_LANGUAGES,
49
+ description: 'Query language of the request. Defaults to dcql; presentation_exchange serves a wallet that never implemented DCQL.',
50
+ }),
51
+ (0, class_validator_1.IsOptional)(),
52
+ (0, class_validator_1.IsIn)(presentationRequest_1.OPENID4VC_QUERY_LANGUAGES),
53
+ __metadata("design:type", String)
54
+ ], OpenId4VcCreatePresentationRequestBodyDto.prototype, "queryLanguage", void 0);
55
+ __decorate([
56
+ (0, swagger_1.ApiPropertyOptional)({
57
+ enum: VerifierService_1.OPENID4VC_REQUEST_SIGNERS,
58
+ description: 'Signer of this request only. x5c yields an x509_hash client identifier for a wallet that cannot resolve a DID, or x509_san_dns on a presentation_exchange request, whose draft predates x509_hash.',
59
+ }),
60
+ (0, class_validator_1.IsOptional)(),
61
+ (0, class_validator_1.IsIn)(VerifierService_1.OPENID4VC_REQUEST_SIGNERS),
62
+ __metadata("design:type", String)
63
+ ], OpenId4VcCreatePresentationRequestBodyDto.prototype, "requestSigner", void 0);
64
+ /** Response of [VSA-ADM-OID-PR] createPresentationRequest. */
65
+ class OpenId4VcPresentationRequestResponseDto {
66
+ }
67
+ exports.OpenId4VcPresentationRequestResponseDto = OpenId4VcPresentationRequestResponseDto;
68
+ __decorate([
69
+ (0, swagger_1.ApiProperty)({
70
+ description: 'Identifier of the verification session, for later tracking',
71
+ example: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
72
+ }),
73
+ __metadata("design:type", String)
74
+ ], OpenId4VcPresentationRequestResponseDto.prototype, "proofExchangeId", void 0);
75
+ __decorate([
76
+ (0, swagger_1.ApiProperty)({
77
+ description: 'Authorization request URI, ready to render as a QR code or to send as a link',
78
+ example: 'openid4vp://authorize?request_uri=https%3A%2F%2Fagent.example%2Foid4vp%2Fverifier%2Fauthorization-requests%2F1',
79
+ }),
80
+ __metadata("design:type", String)
81
+ ], OpenId4VcPresentationRequestResponseDto.prototype, "url", void 0);
82
+ /** Query of [VSA-ADM-OID-PR] listPresentations. */
83
+ class OpenId4VcListPresentationsQueryDto extends vs_agent_sdk_1.PaginationQueryDto {
84
+ }
85
+ exports.OpenId4VcListPresentationsQueryDto = OpenId4VcListPresentationsQueryDto;
86
+ __decorate([
87
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Filter by credential type', example: 'employee' }),
88
+ (0, class_validator_1.IsOptional)(),
89
+ (0, class_validator_1.IsString)(),
90
+ (0, class_validator_1.IsNotEmpty)(),
91
+ __metadata("design:type", String)
92
+ ], OpenId4VcListPresentationsQueryDto.prototype, "jsonSchemaCredentialId", void 0);
93
+ __decorate([
94
+ (0, swagger_1.ApiPropertyOptional)({
95
+ enum: openid4vc_1.OpenId4VcVerificationSessionState,
96
+ description: 'Filter by verification session state',
97
+ }),
98
+ (0, class_validator_1.IsOptional)(),
99
+ (0, class_validator_1.IsEnum)(openid4vc_1.OpenId4VcVerificationSessionState),
100
+ __metadata("design:type", String)
101
+ ], OpenId4VcListPresentationsQueryDto.prototype, "state", void 0);
102
+ /** What the agent read from the resolver to reach a trust verdict on a presentation. */
103
+ class OpenId4VcTrustEvidenceDto {
104
+ }
105
+ exports.OpenId4VcTrustEvidenceDto = OpenId4VcTrustEvidenceDto;
106
+ __decorate([
107
+ (0, swagger_1.ApiProperty)({
108
+ type: String,
109
+ nullable: true,
110
+ description: 'DID of the issuer: iss when it is a DID, else the URI SAN of the leaf certificate',
111
+ }),
112
+ __metadata("design:type", Object)
113
+ ], OpenId4VcTrustEvidenceDto.prototype, "did", void 0);
114
+ __decorate([
115
+ (0, swagger_1.ApiProperty)({
116
+ enum: types_1.VERANA_TRUST_STATUSES,
117
+ nullable: true,
118
+ description: 'Trust status the resolver returned',
119
+ }),
120
+ __metadata("design:type", Object)
121
+ ], OpenId4VcTrustEvidenceDto.prototype, "trustStatus", void 0);
122
+ __decorate([
123
+ (0, swagger_1.ApiProperty)({ type: String, nullable: true, description: 'Credential type of the request' }),
124
+ __metadata("design:type", Object)
125
+ ], OpenId4VcTrustEvidenceDto.prototype, "jsonSchemaCredentialId", void 0);
126
+ __decorate([
127
+ (0, swagger_1.ApiProperty)({
128
+ type: Number,
129
+ nullable: true,
130
+ description: 'CredentialSchema of the request, which the authorized read names',
131
+ }),
132
+ __metadata("design:type", Object)
133
+ ], OpenId4VcTrustEvidenceDto.prototype, "credentialSchemaId", void 0);
134
+ __decorate([
135
+ (0, swagger_1.ApiProperty)({
136
+ type: Boolean,
137
+ nullable: true,
138
+ description: 'Whether the resolver authorizes the issuer for the credential type',
139
+ }),
140
+ __metadata("design:type", Object)
141
+ ], OpenId4VcTrustEvidenceDto.prototype, "authorized", void 0);
142
+ __decorate([
143
+ (0, swagger_1.ApiProperty)({ type: [String], description: 'Resolver queries the agent ran' }),
144
+ __metadata("design:type", Array)
145
+ ], OpenId4VcTrustEvidenceDto.prototype, "queries", void 0);
146
+ __decorate([
147
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Why the verdict was not TRUSTED_AUTHORIZED' }),
148
+ __metadata("design:type", String)
149
+ ], OpenId4VcTrustEvidenceDto.prototype, "note", void 0);
150
+ /** The trust verdict on a presentation, on the record of [VSA-ADM-OID-PR] getPresentation. */
151
+ class OpenId4VcTrustVerdictDto {
152
+ }
153
+ exports.OpenId4VcTrustVerdictDto = OpenId4VcTrustVerdictDto;
154
+ __decorate([
155
+ (0, swagger_1.ApiProperty)({ enum: types_1.TRUST_VERDICT_NAMES, description: 'The trust verdict' }),
156
+ __metadata("design:type", String)
157
+ ], OpenId4VcTrustVerdictDto.prototype, "verdict", void 0);
158
+ __decorate([
159
+ (0, swagger_1.ApiProperty)({ type: OpenId4VcTrustEvidenceDto, description: 'The basis of the verdict' }),
160
+ __metadata("design:type", OpenId4VcTrustEvidenceDto)
161
+ ], OpenId4VcTrustVerdictDto.prototype, "evidence", void 0);
162
+ /** The credential a wallet presented, on the record of [VSA-ADM-OID-PR] getPresentation. */
163
+ class OpenId4VcPresentedCredentialDto {
164
+ }
165
+ exports.OpenId4VcPresentedCredentialDto = OpenId4VcPresentedCredentialDto;
166
+ __decorate([
167
+ (0, swagger_1.ApiProperty)({
168
+ description: 'SD-JWT VC type of the presented credential',
169
+ example: 'https://ecosystem.example/vt/vct/144',
170
+ }),
171
+ __metadata("design:type", String)
172
+ ], OpenId4VcPresentedCredentialDto.prototype, "vct", void 0);
173
+ __decorate([
174
+ (0, swagger_1.ApiProperty)({
175
+ type: 'object',
176
+ additionalProperties: true,
177
+ description: 'The claims the wallet disclosed',
178
+ example: { name: 'Ada Lovelace' },
179
+ }),
180
+ __metadata("design:type", Object)
181
+ ], OpenId4VcPresentedCredentialDto.prototype, "disclosedClaims", void 0);
182
+ /** A presentation record, as returned by listPresentations and getPresentation. */
183
+ class OpenId4VcPresentationRecordDto {
184
+ }
185
+ exports.OpenId4VcPresentationRecordDto = OpenId4VcPresentationRecordDto;
186
+ __decorate([
187
+ (0, swagger_1.ApiProperty)({
188
+ description: 'Identifier of the verification session',
189
+ example: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
190
+ }),
191
+ __metadata("design:type", String)
192
+ ], OpenId4VcPresentationRecordDto.prototype, "proofExchangeId", void 0);
193
+ __decorate([
194
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Credential type of the request', example: 'employee' }),
195
+ __metadata("design:type", String)
196
+ ], OpenId4VcPresentationRecordDto.prototype, "jsonSchemaCredentialId", void 0);
197
+ __decorate([
198
+ (0, swagger_1.ApiPropertyOptional)({
199
+ type: [String],
200
+ description: 'Claim names the request asked for',
201
+ example: ['name', 'role'],
202
+ }),
203
+ __metadata("design:type", Array)
204
+ ], OpenId4VcPresentationRecordDto.prototype, "requestedClaims", void 0);
205
+ __decorate([
206
+ (0, swagger_1.ApiProperty)({ enum: openid4vc_1.OpenId4VcVerificationSessionState, description: 'State of the verification session' }),
207
+ __metadata("design:type", String)
208
+ ], OpenId4VcPresentationRecordDto.prototype, "state", void 0);
209
+ __decorate([
210
+ (0, swagger_1.ApiProperty)({ type: String, format: 'date-time', description: 'When the agent created the request' }),
211
+ __metadata("design:type", Date)
212
+ ], OpenId4VcPresentationRecordDto.prototype, "createdAt", void 0);
213
+ __decorate([
214
+ (0, swagger_1.ApiProperty)({ type: String, format: 'date-time', description: 'When the session last changed' }),
215
+ __metadata("design:type", Date)
216
+ ], OpenId4VcPresentationRecordDto.prototype, "updatedAt", void 0);
217
+ __decorate([
218
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Error message on the session. The agent sets it if the flow stops.' }),
219
+ __metadata("design:type", String)
220
+ ], OpenId4VcPresentationRecordDto.prototype, "errorMessage", void 0);
221
+ __decorate([
222
+ (0, swagger_1.ApiProperty)({
223
+ description: 'True once the agent verified the response, the holder binding, the signature and the chain',
224
+ }),
225
+ __metadata("design:type", Boolean)
226
+ ], OpenId4VcPresentationRecordDto.prototype, "cryptographicVerified", void 0);
227
+ __decorate([
228
+ (0, swagger_1.ApiProperty)({ description: 'True only for the verdict TRUSTED_AUTHORIZED' }),
229
+ __metadata("design:type", Boolean)
230
+ ], OpenId4VcPresentationRecordDto.prototype, "accepted", void 0);
231
+ __decorate([
232
+ (0, swagger_1.ApiPropertyOptional)({
233
+ type: OpenId4VcTrustVerdictDto,
234
+ description: 'The trust verdict, once the agent verified the response',
235
+ }),
236
+ __metadata("design:type", OpenId4VcTrustVerdictDto)
237
+ ], OpenId4VcPresentationRecordDto.prototype, "trust", void 0);
238
+ __decorate([
239
+ (0, swagger_1.ApiPropertyOptional)({
240
+ type: OpenId4VcPresentedCredentialDto,
241
+ description: 'The presented credential, once verified',
242
+ }),
243
+ __metadata("design:type", OpenId4VcPresentedCredentialDto)
244
+ ], OpenId4VcPresentationRecordDto.prototype, "credential", void 0);
245
+ exports.OpenId4VcPresentationRecordPageDto = (0, vs_agent_sdk_1.PageDto)(OpenId4VcPresentationRecordDto);
246
+ //# sourceMappingURL=presentation.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presentation.dto.js","sourceRoot":"","sources":["../../../src/nestjs/dto/presentation.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA,mDAAuE;AACvE,6CAAkE;AAClE,4DAAuE;AACvE,qDAAsG;AAEtG,4EAA8E;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,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,oCAAoC,EAAE,CAAC;8BAC1F,IAAI;iEAAA;AAGhB;IADC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,+BAA+B,EAAE,CAAC;8BACrF,IAAI;iEAAA;AAGhB;IADC,IAAA,6BAAmB,EAAC,EAAE,WAAW,EAAE,oEAAoE,EAAE,CAAC;;oEACtF;AAKrB;IAHC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,4FAA4F;KAC1G,CAAC;;6EAC6B;AAG/B;IADC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,8CAA8C,EAAE,CAAC;;gEAC3D;AAMlB;IAJC,IAAA,6BAAmB,EAAC;QACnB,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,yDAAyD;KACvE,CAAC;8BACM,wBAAwB;6DAAA;AAMhC;IAJC,IAAA,6BAAmB,EAAC;QACnB,IAAI,EAAE,+BAA+B;QACrC,WAAW,EAAE,yCAAyC;KACvD,CAAC;8BACW,+BAA+B;kEAAA;AAGjC,QAAA,kCAAkC,GAAG,IAAA,sBAAO,EAAC,8BAA8B,CAAC,CAAA"}
@@ -0,0 +1,8 @@
1
+ import type { SigningRole } from '../../services/CertificateService';
2
+ /** One entry of [VSA-ADM-OID-CS] listSigningCertificates. */
3
+ export declare class OpenId4VcSigningCertificateDto {
4
+ role: SigningRole;
5
+ development: boolean;
6
+ fingerprint: string;
7
+ certificateChain: string[];
8
+ }
@@ -0,0 +1,40 @@
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.OpenId4VcSigningCertificateDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ /** One entry of [VSA-ADM-OID-CS] listSigningCertificates. */
15
+ class OpenId4VcSigningCertificateDto {
16
+ }
17
+ exports.OpenId4VcSigningCertificateDto = OpenId4VcSigningCertificateDto;
18
+ __decorate([
19
+ (0, swagger_1.ApiProperty)({
20
+ enum: ['issuer', 'verifier'],
21
+ description: 'The capability that signs with this certificate',
22
+ }),
23
+ __metadata("design:type", String)
24
+ ], OpenId4VcSigningCertificateDto.prototype, "role", void 0);
25
+ __decorate([
26
+ (0, swagger_1.ApiProperty)({ description: 'True when the agent generated the certificate itself (development signing)' }),
27
+ __metadata("design:type", Boolean)
28
+ ], OpenId4VcSigningCertificateDto.prototype, "development", void 0);
29
+ __decorate([
30
+ (0, swagger_1.ApiProperty)({
31
+ description: 'SHA-256 fingerprint of the leaf, for an operator to pin it on a peer verifier',
32
+ example: `SHA256:${'0'.repeat(64)}`,
33
+ }),
34
+ __metadata("design:type", String)
35
+ ], OpenId4VcSigningCertificateDto.prototype, "fingerprint", void 0);
36
+ __decorate([
37
+ (0, swagger_1.ApiProperty)({ type: [String], description: 'Certificate chain, base64 DER, leaf first' }),
38
+ __metadata("design:type", Array)
39
+ ], OpenId4VcSigningCertificateDto.prototype, "certificateChain", void 0);
40
+ //# sourceMappingURL=signing-certificate.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signing-certificate.dto.js","sourceRoot":"","sources":["../../../src/nestjs/dto/signing-certificate.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,6CAA6C;AAE7C,6DAA6D;AAC7D,MAAa,8BAA8B;CAkB1C;AAlBD,wEAkBC;AAbC;IAJC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC;QAC5B,WAAW,EAAE,iDAAiD;KAC/D,CAAC;;4DACgB;AAGlB;IADC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,4EAA4E,EAAE,CAAC;;mEACtF;AAMrB;IAJC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,+EAA+E;QAC5F,OAAO,EAAE,UAAU,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE;KACpC,CAAC;;mEACkB;AAGpB;IADC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,2CAA2C,EAAE,CAAC;;wEAC/D"}
@@ -0,0 +1,5 @@
1
+ import type { OpenId4VcIssuanceSessionSummary } from '../services/IssuerService';
2
+ import type { OpenId4VcVerificationSessionSummary } from '../services/VerifierService';
3
+ import type { OpenId4VcCredentialExchangeRecordDto, OpenId4VcPresentationRecordDto } from './dto';
4
+ export declare function toCredentialExchangeDto(session: OpenId4VcIssuanceSessionSummary): OpenId4VcCredentialExchangeRecordDto;
5
+ export declare function toPresentationDto(session: OpenId4VcVerificationSessionSummary): OpenId4VcPresentationRecordDto;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toCredentialExchangeDto = toCredentialExchangeDto;
4
+ exports.toPresentationDto = toPresentationDto;
5
+ function toCredentialExchangeDto(session) {
6
+ return {
7
+ credentialExchangeId: session.id,
8
+ jsonSchemaCredentialId: session.jsonSchemaCredentialId,
9
+ state: session.state,
10
+ createdAt: session.createdAt,
11
+ updatedAt: session.updatedAt,
12
+ expiresAt: session.expiresAt,
13
+ errorMessage: session.errorMessage,
14
+ };
15
+ }
16
+ function toPresentationDto(session) {
17
+ return {
18
+ proofExchangeId: session.id,
19
+ jsonSchemaCredentialId: session.jsonSchemaCredentialId,
20
+ requestedClaims: session.requestedClaims,
21
+ state: session.state,
22
+ createdAt: session.createdAt,
23
+ updatedAt: session.updatedAt,
24
+ errorMessage: session.errorMessage,
25
+ cryptographicVerified: session.cryptographicVerified,
26
+ accepted: session.accepted,
27
+ trust: session.trust,
28
+ credential: session.credential,
29
+ };
30
+ }
31
+ //# sourceMappingURL=mappers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mappers.js","sourceRoot":"","sources":["../../src/nestjs/mappers.ts"],"names":[],"mappings":";;AAIA,0DAYC;AAED,8CAgBC;AA9BD,SAAgB,uBAAuB,CACrC,OAAwC;IAExC,OAAO;QACL,oBAAoB,EAAE,OAAO,CAAC,EAAE;QAChC,sBAAsB,EAAE,OAAO,CAAC,sBAAsB;QACtD,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,YAAY,EAAE,OAAO,CAAC,YAAY;KACnC,CAAA;AACH,CAAC;AAED,SAAgB,iBAAiB,CAC/B,OAA4C;IAE5C,OAAO;QACL,eAAe,EAAE,OAAO,CAAC,EAAE;QAC3B,sBAAsB,EAAE,OAAO,CAAC,sBAAsB;QACtD,eAAe,EAAE,OAAO,CAAC,eAAe;QACxC,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,qBAAqB,EAAE,OAAO,CAAC,qBAAqB;QACpD,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,UAAU,EAAE,OAAO,CAAC,UAAU;KAC/B,CAAA;AACH,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { OpenId4VcIssuerRuntime, OpenId4VcPluginOptions } from '../types';
2
+ import type { IndexerHandlerRegistry } from '@verana-labs/vs-agent-sdk';
3
+ /** Call after the default registry is built and overridden so the originals are preserved. */
4
+ export declare function registerCredentialConfigurationHandlers(registry: IndexerHandlerRegistry, options: Pick<OpenId4VcPluginOptions, 'credentialConfigurations'>, getIssuerService: () => OpenId4VcIssuerRuntime | undefined): void;