@credo-ts/core 0.6.0-pr-2100-20241124131043 → 0.6.0-pr-2094-20241124155338

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 (60) hide show
  1. package/build/agent/AgentModules.d.ts +0 -2
  2. package/build/agent/AgentModules.js +0 -2
  3. package/build/agent/AgentModules.js.map +1 -1
  4. package/build/index.d.ts +0 -1
  5. package/build/index.js +0 -1
  6. package/build/index.js.map +1 -1
  7. package/build/modules/dif-presentation-exchange/utils/transform.d.ts +2 -4
  8. package/build/modules/dif-presentation-exchange/utils/transform.js +19 -2
  9. package/build/modules/dif-presentation-exchange/utils/transform.js.map +1 -1
  10. package/build/modules/mdoc/Mdoc.d.ts +0 -9
  11. package/build/modules/mdoc/Mdoc.js +0 -13
  12. package/build/modules/mdoc/Mdoc.js.map +1 -1
  13. package/build/modules/mdoc/MdocDeviceResponse.d.ts +1 -14
  14. package/build/modules/mdoc/MdocDeviceResponse.js +4 -31
  15. package/build/modules/mdoc/MdocDeviceResponse.js.map +1 -1
  16. package/build/modules/mdoc/MdocOptions.d.ts +0 -12
  17. package/build/modules/mdoc/repository/MdocRecord.d.ts +0 -8
  18. package/build/modules/mdoc/repository/MdocRecord.js +0 -12
  19. package/build/modules/mdoc/repository/MdocRecord.js.map +1 -1
  20. package/build/modules/sd-jwt-vc/SdJwtVcApi.d.ts +0 -2
  21. package/build/modules/sd-jwt-vc/SdJwtVcService.d.ts +0 -11
  22. package/build/modules/sd-jwt-vc/SdJwtVcService.js +0 -5
  23. package/build/modules/sd-jwt-vc/SdJwtVcService.js.map +1 -1
  24. package/build/modules/sd-jwt-vc/decodeSdJwtVc.d.ts +7 -2
  25. package/build/modules/sd-jwt-vc/decodeSdJwtVc.js +0 -3
  26. package/build/modules/sd-jwt-vc/decodeSdJwtVc.js.map +1 -1
  27. package/build/modules/sd-jwt-vc/repository/SdJwtVcRecord.d.ts +1 -8
  28. package/build/modules/sd-jwt-vc/repository/SdJwtVcRecord.js +1 -10
  29. package/build/modules/sd-jwt-vc/repository/SdJwtVcRecord.js.map +1 -1
  30. package/build/modules/vc/repository/W3cCredentialRecord.d.ts +0 -4
  31. package/build/modules/vc/repository/W3cCredentialRecord.js +0 -6
  32. package/build/modules/vc/repository/W3cCredentialRecord.js.map +1 -1
  33. package/package.json +1 -2
  34. package/build/modules/dcql/DcqlError.d.ts +0 -8
  35. package/build/modules/dcql/DcqlError.js +0 -12
  36. package/build/modules/dcql/DcqlError.js.map +0 -1
  37. package/build/modules/dcql/DcqlModule.d.ts +0 -10
  38. package/build/modules/dcql/DcqlModule.js +0 -23
  39. package/build/modules/dcql/DcqlModule.js.map +0 -1
  40. package/build/modules/dcql/DcqlService.d.ts +0 -140
  41. package/build/modules/dcql/DcqlService.js +0 -253
  42. package/build/modules/dcql/DcqlService.js.map +0 -1
  43. package/build/modules/dcql/index.d.ts +0 -5
  44. package/build/modules/dcql/index.js +0 -22
  45. package/build/modules/dcql/index.js.map +0 -1
  46. package/build/modules/dcql/models/DcqlCredentialsForRequest.d.ts +0 -20
  47. package/build/modules/dcql/models/DcqlCredentialsForRequest.js +0 -3
  48. package/build/modules/dcql/models/DcqlCredentialsForRequest.js.map +0 -1
  49. package/build/modules/dcql/models/index.d.ts +0 -20
  50. package/build/modules/dcql/models/index.js +0 -18
  51. package/build/modules/dcql/models/index.js.map +0 -1
  52. package/build/modules/dcql/utils/DcqlPresentationsToCreate.d.ts +0 -31
  53. package/build/modules/dcql/utils/DcqlPresentationsToCreate.js +0 -36
  54. package/build/modules/dcql/utils/DcqlPresentationsToCreate.js.map +0 -1
  55. package/build/modules/dcql/utils/index.d.ts +0 -1
  56. package/build/modules/dcql/utils/index.js +0 -18
  57. package/build/modules/dcql/utils/index.js.map +0 -1
  58. package/build/modules/mdoc/mdocUtil.d.ts +0 -1
  59. package/build/modules/mdoc/mdocUtil.js +0 -7
  60. package/build/modules/mdoc/mdocUtil.js.map +0 -1
@@ -1,20 +0,0 @@
1
- export * from './DcqlCredentialsForRequest';
2
- import type { VerifiablePresentation } from '../../dif-presentation-exchange';
3
- import type { MdocRecord } from '../../mdoc';
4
- import type { SdJwtVcRecord } from '../../sd-jwt-vc';
5
- import type { W3cCredentialRecord } from '../../vc';
6
- import type { DcqlQueryResult as _DcqlQueryResult, DcqlQuery as _DcqlQuery, DcqlCredential as _DcqlCredential, DcqlMdocCredential as _DcqlMdocCredential, DcqlW3cVcCredential as _DcqlW3cVcCredential, DcqlSdJwtVcCredential as _DcqlSdJwtVcCredential, DcqlPresentation as _DcqlPresentation, DcqlPresentationResult as _DcqlPresentationResult } from 'dcql';
7
- export type DcqlQuery = _DcqlQuery.Input;
8
- export type DcqlCredential = _DcqlCredential.Model['Input'];
9
- export type DcqlMdocCredential = _DcqlMdocCredential.Model['Input'];
10
- export type DcqlSdJwtVcCredential = _DcqlSdJwtVcCredential.Model['Input'];
11
- export type DcqlW3cVcCredential = _DcqlW3cVcCredential.Model['Input'];
12
- export type DcqlMatchWithRecord = {
13
- record: W3cCredentialRecord | SdJwtVcRecord | MdocRecord;
14
- } & _DcqlQueryResult['credential_matches'][number];
15
- export type DcqlQueryResult = Omit<_DcqlQueryResult.Input, 'credential_matches'> & {
16
- credential_matches: Record<string, DcqlMatchWithRecord>;
17
- };
18
- export type DcqlEncodedPresentations = _DcqlPresentation.Input;
19
- export type DcqlPresentation = Record<string, VerifiablePresentation>;
20
- export type DcqlPresentationResult = _DcqlPresentationResult.Input;
@@ -1,18 +0,0 @@
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("./DcqlCredentialsForRequest"), exports);
18
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/dcql/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA2C"}
@@ -1,31 +0,0 @@
1
- import type { SdJwtVcRecord } from '../../sd-jwt-vc';
2
- import type { DcqlCredentialsForRequest } from '../models';
3
- import type { DcqlSdJwtVcCredential, DcqlMdocCredential, DcqlW3cVcCredential } from 'dcql';
4
- import { MdocRecord } from '../../mdoc';
5
- import { W3cCredentialRecord, ClaimFormat } from '../../vc';
6
- export interface DcqlSdJwtVcPresentationToCreate {
7
- claimFormat: ClaimFormat.SdJwtVc;
8
- subjectIds: [];
9
- credentialRecord: SdJwtVcRecord;
10
- disclosedPayload: DcqlSdJwtVcCredential.Claims;
11
- }
12
- export interface DcqlJwtVpPresentationToCreate {
13
- claimFormat: ClaimFormat.JwtVp;
14
- subjectIds: [string];
15
- credentialRecord: W3cCredentialRecord;
16
- disclosedPayload: DcqlW3cVcCredential.Claims;
17
- }
18
- export interface DcqlLdpVpPresentationToCreate {
19
- claimFormat: ClaimFormat.LdpVp;
20
- subjectIds: undefined | [string];
21
- credentialRecord: W3cCredentialRecord;
22
- disclosedPayload: DcqlW3cVcCredential.Claims;
23
- }
24
- export interface DcqlMdocPresentationToCreate {
25
- claimFormat: ClaimFormat.MsoMdoc;
26
- subjectIds: [];
27
- credentialRecord: MdocRecord;
28
- disclosedPayload: DcqlMdocCredential.NameSpaces;
29
- }
30
- export type DcqlPresentationToCreate = Record<string, DcqlSdJwtVcPresentationToCreate | DcqlJwtVpPresentationToCreate | DcqlLdpVpPresentationToCreate | DcqlMdocPresentationToCreate>;
31
- export declare function dcqlGetPresentationsToCreate(credentialsForInputDescriptor: DcqlCredentialsForRequest): DcqlPresentationToCreate;
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dcqlGetPresentationsToCreate = dcqlGetPresentationsToCreate;
4
- const mdoc_1 = require("../../mdoc");
5
- const vc_1 = require("../../vc");
6
- function dcqlGetPresentationsToCreate(credentialsForInputDescriptor) {
7
- const presentationsToCreate = {};
8
- for (const [credentialQueryId, match] of Object.entries(credentialsForInputDescriptor)) {
9
- if (match.credentialRecord instanceof vc_1.W3cCredentialRecord) {
10
- presentationsToCreate[credentialQueryId] = {
11
- claimFormat: match.credentialRecord.credential.claimFormat === vc_1.ClaimFormat.JwtVc ? vc_1.ClaimFormat.JwtVp : vc_1.ClaimFormat.LdpVp,
12
- subjectIds: [match.credentialRecord.credential.credentialSubjectIds[0]],
13
- credentialRecord: match.credentialRecord,
14
- disclosedPayload: match.disclosedPayload,
15
- };
16
- }
17
- else if (match.credentialRecord instanceof mdoc_1.MdocRecord) {
18
- presentationsToCreate[credentialQueryId] = {
19
- claimFormat: vc_1.ClaimFormat.MsoMdoc,
20
- subjectIds: [],
21
- credentialRecord: match.credentialRecord,
22
- disclosedPayload: match.disclosedPayload,
23
- };
24
- }
25
- else {
26
- presentationsToCreate[credentialQueryId] = {
27
- claimFormat: vc_1.ClaimFormat.SdJwtVc,
28
- subjectIds: [],
29
- credentialRecord: match.credentialRecord,
30
- disclosedPayload: match.disclosedPayload,
31
- };
32
- }
33
- }
34
- return presentationsToCreate;
35
- }
36
- //# sourceMappingURL=DcqlPresentationsToCreate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DcqlPresentationsToCreate.js","sourceRoot":"","sources":["../../../../src/modules/dcql/utils/DcqlPresentationsToCreate.ts"],"names":[],"mappings":";;AA8CA,oEA+BC;AAzED,qCAAuC;AACvC,iCAA2D;AAyC3D,SAAgB,4BAA4B,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 @@
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("./DcqlPresentationsToCreate"), exports);
18
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/dcql/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA2C"}
@@ -1 +0,0 @@
1
- export declare function nameSpacesRecordToMap<NamespaceValue extends unknown, NameSpaces extends Record<string, Record<string, NamespaceValue>>>(nameSpaces: NameSpaces): Map<string, Map<string, NamespaceValue>>;
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.nameSpacesRecordToMap = nameSpacesRecordToMap;
4
- function nameSpacesRecordToMap(nameSpaces) {
5
- return new Map(Object.entries(nameSpaces).map(([key, value]) => [key, new Map(Object.entries(value))]));
6
- }
7
- //# sourceMappingURL=mdocUtil.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mdocUtil.js","sourceRoot":"","sources":["../../../src/modules/mdoc/mdocUtil.ts"],"names":[],"mappings":";;AAAA,sDAMC;AAND,SAAgB,qBAAqB,CAInC,UAAsB;IACtB,OAAO,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAU,CAAC,CAAC,CAAA;AAClH,CAAC"}