@credo-ts/openid4vc 0.6.0-pr-2195-20250226100854 → 0.6.0-pr-2209-20250321171013

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 (99) hide show
  1. package/build/openid4vc-holder/OpenId4VcHolderApi.d.ts +14 -119
  2. package/build/openid4vc-holder/OpenId4VcHolderApi.js +9 -24
  3. package/build/openid4vc-holder/OpenId4VcHolderApi.js.map +1 -1
  4. package/build/openid4vc-holder/OpenId4VcHolderModule.js +1 -1
  5. package/build/openid4vc-holder/OpenId4VcHolderModule.js.map +1 -1
  6. package/build/openid4vc-holder/OpenId4VciHolderService.d.ts +8 -7
  7. package/build/openid4vc-holder/OpenId4VciHolderService.js +21 -19
  8. package/build/openid4vc-holder/OpenId4VciHolderService.js.map +1 -1
  9. package/build/openid4vc-holder/OpenId4VciHolderServiceOptions.d.ts +4 -4
  10. package/build/openid4vc-holder/OpenId4VciHolderServiceOptions.js +2 -2
  11. package/build/openid4vc-holder/OpenId4VciHolderServiceOptions.js.map +1 -1
  12. package/build/openid4vc-holder/OpenId4vcSiopHolderService.d.ts +15 -116
  13. package/build/openid4vc-holder/OpenId4vcSiopHolderService.js +233 -239
  14. package/build/openid4vc-holder/OpenId4vcSiopHolderService.js.map +1 -1
  15. package/build/openid4vc-holder/OpenId4vcSiopHolderServiceOptions.d.ts +9 -25
  16. package/build/openid4vc-issuer/OpenId4VcIssuerApi.d.ts +44 -194
  17. package/build/openid4vc-issuer/OpenId4VcIssuerEvents.d.ts +1 -1
  18. package/build/openid4vc-issuer/OpenId4VcIssuerModule.d.ts +1 -1
  19. package/build/openid4vc-issuer/OpenId4VcIssuerModule.js +1 -1
  20. package/build/openid4vc-issuer/OpenId4VcIssuerModule.js.map +1 -1
  21. package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.d.ts +8 -8
  22. package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.js +10 -2
  23. package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.js.map +1 -1
  24. package/build/openid4vc-issuer/OpenId4VcIssuerService.d.ts +48 -198
  25. package/build/openid4vc-issuer/OpenId4VcIssuerService.js +27 -39
  26. package/build/openid4vc-issuer/OpenId4VcIssuerService.js.map +1 -1
  27. package/build/openid4vc-issuer/OpenId4VcIssuerServiceOptions.d.ts +6 -11
  28. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.d.ts +2 -2
  29. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.js +1 -0
  30. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.js.map +1 -1
  31. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRepository.d.ts +1 -1
  32. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRecord.d.ts +1 -1
  33. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRecord.js +3 -3
  34. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRecord.js.map +1 -1
  35. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRepository.d.ts +1 -1
  36. package/build/openid4vc-issuer/router/accessTokenEndpoint.d.ts +2 -2
  37. package/build/openid4vc-issuer/router/accessTokenEndpoint.js +1 -1
  38. package/build/openid4vc-issuer/router/accessTokenEndpoint.js.map +1 -1
  39. package/build/openid4vc-issuer/router/authorizationChallengeEndpoint.js +1 -1
  40. package/build/openid4vc-issuer/router/authorizationChallengeEndpoint.js.map +1 -1
  41. package/build/openid4vc-issuer/router/authorizationServerMetadataEndpoint.js +1 -1
  42. package/build/openid4vc-issuer/router/authorizationServerMetadataEndpoint.js.map +1 -1
  43. package/build/openid4vc-issuer/router/credentialEndpoint.d.ts +1 -1
  44. package/build/openid4vc-issuer/router/credentialEndpoint.js +3 -3
  45. package/build/openid4vc-issuer/router/credentialEndpoint.js.map +1 -1
  46. package/build/openid4vc-issuer/router/credentialOfferEndpoint.d.ts +1 -1
  47. package/build/openid4vc-issuer/router/issuerMetadataEndpoint.js +1 -1
  48. package/build/openid4vc-issuer/router/issuerMetadataEndpoint.js.map +1 -1
  49. package/build/openid4vc-issuer/router/jwksEndpoint.d.ts +1 -1
  50. package/build/openid4vc-issuer/router/nonceEndpoint.d.ts +1 -1
  51. package/build/openid4vc-issuer/util/txCode.d.ts +1 -1
  52. package/build/openid4vc-verifier/OpenId4VcSiopVerifierService.d.ts +13 -25
  53. package/build/openid4vc-verifier/OpenId4VcSiopVerifierService.js +326 -579
  54. package/build/openid4vc-verifier/OpenId4VcSiopVerifierService.js.map +1 -1
  55. package/build/openid4vc-verifier/OpenId4VcSiopVerifierServiceOptions.d.ts +20 -36
  56. package/build/openid4vc-verifier/OpenId4VcVerifierApi.d.ts +2 -2
  57. package/build/openid4vc-verifier/OpenId4VcVerifierApi.js +1 -1
  58. package/build/openid4vc-verifier/OpenId4VcVerifierApi.js.map +1 -1
  59. package/build/openid4vc-verifier/OpenId4VcVerifierEvents.d.ts +1 -1
  60. package/build/openid4vc-verifier/OpenId4VcVerifierModule.d.ts +1 -1
  61. package/build/openid4vc-verifier/OpenId4VcVerifierModule.js +4 -1
  62. package/build/openid4vc-verifier/OpenId4VcVerifierModule.js.map +1 -1
  63. package/build/openid4vc-verifier/OpenId4VcVerifierModuleConfig.d.ts +2 -2
  64. package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartyEventEmitter.d.ts +49 -0
  65. package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartyEventEmitter.js +230 -0
  66. package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartyEventEmitter.js.map +1 -0
  67. package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartySessionManager.d.ts +19 -0
  68. package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartySessionManager.js +144 -0
  69. package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartySessionManager.js.map +1 -0
  70. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRecord.d.ts +11 -20
  71. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRecord.js +7 -18
  72. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRecord.js.map +1 -1
  73. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRepository.d.ts +1 -1
  74. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRecord.d.ts +1 -1
  75. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRepository.d.ts +1 -1
  76. package/build/openid4vc-verifier/router/authorizationEndpoint.js +103 -5
  77. package/build/openid4vc-verifier/router/authorizationEndpoint.js.map +1 -1
  78. package/build/openid4vc-verifier/router/authorizationRequestEndpoint.js +16 -3
  79. package/build/openid4vc-verifier/router/authorizationRequestEndpoint.js.map +1 -1
  80. package/build/shared/callbacks.d.ts +6 -14
  81. package/build/shared/callbacks.js +14 -102
  82. package/build/shared/callbacks.js.map +1 -1
  83. package/build/shared/issuerMetadataUtils.d.ts +144 -102
  84. package/build/shared/models/OpenId4VcJwtIssuer.d.ts +3 -2
  85. package/build/shared/models/index.d.ts +10 -10
  86. package/build/shared/models/index.js +5 -5
  87. package/build/shared/models/index.js.map +1 -1
  88. package/build/shared/router/context.d.ts +3 -3
  89. package/build/shared/router/context.js +4 -4
  90. package/build/shared/router/context.js.map +1 -1
  91. package/build/shared/router/express.js +1 -2
  92. package/build/shared/router/express.js.map +1 -1
  93. package/build/shared/transform.d.ts +5 -0
  94. package/build/shared/transform.js +69 -0
  95. package/build/shared/transform.js.map +1 -0
  96. package/build/shared/utils.d.ts +8 -6
  97. package/build/shared/utils.js +105 -34
  98. package/build/shared/utils.js.map +1 -1
  99. package/package.json +8 -6
@@ -1,117 +1,38 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getOid4vcJwtVerifyCallback = getOid4vcJwtVerifyCallback;
4
- exports.getOid4vcEncryptJweCallback = getOid4vcEncryptJweCallback;
5
- exports.getOid4vcDecryptJweCallback = getOid4vcDecryptJweCallback;
6
- exports.getOid4vcJwtSignCallback = getOid4vcJwtSignCallback;
7
- exports.getOid4vcCallbacks = getOid4vcCallbacks;
3
+ exports.getOid4vciJwtVerifyCallback = getOid4vciJwtVerifyCallback;
4
+ exports.getOid4vciJwtSignCallback = getOid4vciJwtSignCallback;
5
+ exports.getOid4vciCallbacks = getOid4vciCallbacks;
8
6
  exports.dynamicOid4vciClientAuthentication = dynamicOid4vciClientAuthentication;
7
+ const oauth2_1 = require("@animo-id/oauth2");
9
8
  const core_1 = require("@credo-ts/core");
10
- const oauth2_1 = require("@openid4vc/oauth2");
11
9
  const utils_1 = require("./utils");
12
- function getOid4vcJwtVerifyCallback(agentContext, trustedCertificates) {
10
+ function getOid4vciJwtVerifyCallback(agentContext) {
13
11
  const jwsService = agentContext.dependencyManager.resolve(core_1.JwsService);
14
12
  return async (signer, { compact }) => {
15
- const { isValid, signerKeys } = await jwsService.verifyJws(agentContext, {
13
+ const { isValid } = await jwsService.verifyJws(agentContext, {
16
14
  jws: compact,
17
- trustedCertificates,
18
15
  // Only handles kid as did resolution. JWK is handled by jws service
19
16
  jwkResolver: async () => {
20
17
  if (signer.method === 'jwk') {
21
18
  return (0, core_1.getJwkFromJson)(signer.publicJwk);
22
19
  }
23
- else if (signer.method === 'did') {
20
+ if (signer.method === 'did') {
24
21
  const key = await (0, utils_1.getKeyFromDid)(agentContext, signer.didUrl);
25
22
  return (0, core_1.getJwkFromKey)(key);
26
23
  }
27
24
  throw new core_1.CredoError(`Unexpected call to jwk resolver for signer method ${signer.method}`);
28
25
  },
29
26
  });
30
- if (!isValid) {
31
- return { verified: false, signerJwk: undefined };
32
- }
33
- const signerKey = signerKeys[0];
34
- const signerJwk = (0, core_1.getJwkFromKey)(signerKey).toJson();
35
- if (signer.method === 'did') {
36
- signerJwk.kid = signer.didUrl;
37
- }
38
- return { verified: true, signerJwk };
39
- };
40
- }
41
- function getOid4vcEncryptJweCallback(agentContext) {
42
- return async (jweEncryptor, compact) => {
43
- if (jweEncryptor.method !== 'jwk') {
44
- throw new core_1.CredoError(`Jwt encryption method '${jweEncryptor.method}' is not supported for jwt signer. Only 'jwk' is supported.`);
45
- }
46
- const jwk = (0, core_1.getJwkFromJson)(jweEncryptor.publicJwk);
47
- const key = jwk.key;
48
- if (jweEncryptor.alg !== 'ECDH-ES') {
49
- throw new core_1.CredoError("Only 'ECDH-ES' is supported as 'alg' value for JARM response encryption");
50
- }
51
- if (jweEncryptor.enc !== 'A256GCM' && jweEncryptor.enc !== 'A128GCM' && jweEncryptor.enc !== 'A128CBC-HS256') {
52
- throw new core_1.CredoError("Only 'A256GCM', 'A128GCM', and 'A128CBC-HS256' is supported as 'enc' value for JARM response encryption");
53
- }
54
- if (key.keyType !== core_1.KeyType.P256) {
55
- throw new core_1.CredoError(`Only '${core_1.KeyType.P256}' key type is supported for JARM response encryption`);
56
- }
57
- if (!agentContext.wallet.directEncryptCompactJweEcdhEs) {
58
- throw new core_1.CredoError('Cannot decrypt Jarm Response, wallet does not support directEncryptCompactJweEcdhEs. You need to upgrade your wallet implementation.');
59
- }
60
- const jwe = await agentContext.wallet.directEncryptCompactJweEcdhEs({
61
- data: core_1.Buffer.from(compact),
62
- recipientKey: key,
63
- header: { kid: jweEncryptor.publicJwk.kid },
64
- encryptionAlgorithm: jweEncryptor.enc,
65
- apu: jweEncryptor.apu ? core_1.TypedArrayEncoder.toBase64URL(core_1.TypedArrayEncoder.fromString(jweEncryptor.apu)) : undefined,
66
- apv: jweEncryptor.apv ? core_1.TypedArrayEncoder.toBase64URL(core_1.TypedArrayEncoder.fromString(jweEncryptor.apv)) : undefined,
67
- });
68
- return { encryptionJwk: jweEncryptor.publicJwk, jwe };
69
- };
70
- }
71
- function getOid4vcDecryptJweCallback(agentContext) {
72
- return async (jwe, options) => {
73
- const [header] = jwe.split('.');
74
- const decodedHeader = core_1.JsonEncoder.fromBase64(header);
75
- const key = core_1.Key.fromFingerprint(options?.jwk.kid ?? decodedHeader.kid);
76
- if (!agentContext.wallet.directDecryptCompactJweEcdhEs) {
77
- throw new core_1.CredoError('Cannot decrypt Jarm Response, wallet does not support directDecryptCompactJweEcdhEs');
78
- }
79
- let decryptedPayload;
80
- try {
81
- const decrypted = await agentContext.wallet.directDecryptCompactJweEcdhEs({ compactJwe: jwe, recipientKey: key });
82
- decryptedPayload = core_1.TypedArrayEncoder.toUtf8String(decrypted.data);
83
- }
84
- catch (error) {
85
- return {
86
- decrypted: false,
87
- encryptionJwk: options?.jwk,
88
- payload: undefined,
89
- header: decodedHeader,
90
- };
91
- }
92
- return {
93
- decrypted: true,
94
- decryptionJwk: (0, core_1.getJwkFromKey)(key).toJson(),
95
- payload: decryptedPayload,
96
- header: decodedHeader,
97
- };
27
+ return isValid;
98
28
  };
99
29
  }
100
- function getOid4vcJwtSignCallback(agentContext) {
30
+ function getOid4vciJwtSignCallback(agentContext) {
101
31
  const jwsService = agentContext.dependencyManager.resolve(core_1.JwsService);
102
32
  return async (signer, { payload, header }) => {
103
- if (signer.method === 'custom' || signer.method === 'trustChain') {
33
+ if (signer.method === 'custom' || signer.method === 'x5c') {
104
34
  throw new core_1.CredoError(`Jwt signer method 'custom' and 'x5c' are not supported for jwt signer.`);
105
35
  }
106
- if (signer.method === 'x5c') {
107
- const leafCertificate = core_1.X509Service.getLeafCertificate(agentContext, { certificateChain: signer.x5c });
108
- const jws = await jwsService.createJwsCompact(agentContext, {
109
- protectedHeaderOptions: { ...header, alg: signer.alg, jwk: undefined },
110
- payload: core_1.JwtPayload.fromJson(payload),
111
- key: leafCertificate.publicKey,
112
- });
113
- return { jwt: jws, signerJwk: (0, core_1.getJwkFromKey)(leafCertificate.publicKey).toJson() };
114
- }
115
36
  const key = signer.method === 'did' ? await (0, utils_1.getKeyFromDid)(agentContext, signer.didUrl) : (0, core_1.getJwkFromJson)(signer.publicJwk).key;
116
37
  const jwk = (0, core_1.getJwkFromKey)(key);
117
38
  if (!jwk.supportsSignatureAlgorithm(signer.alg)) {
@@ -125,26 +46,17 @@ function getOid4vcJwtSignCallback(agentContext) {
125
46
  payload: core_1.JsonEncoder.toBuffer(payload),
126
47
  key,
127
48
  });
128
- return { jwt, signerJwk: (0, core_1.getJwkFromKey)(key).toJson() };
49
+ return jwt;
129
50
  };
130
51
  }
131
- function getOid4vcCallbacks(agentContext, trustedCertificates) {
52
+ function getOid4vciCallbacks(agentContext) {
132
53
  return {
133
54
  hash: (data, alg) => core_1.Hasher.hash(data, alg.toLowerCase()),
134
55
  generateRandom: (length) => agentContext.wallet.getRandomValues(length),
135
- signJwt: getOid4vcJwtSignCallback(agentContext),
56
+ signJwt: getOid4vciJwtSignCallback(agentContext),
136
57
  clientAuthentication: (0, oauth2_1.clientAuthenticationNone)(),
137
- verifyJwt: getOid4vcJwtVerifyCallback(agentContext, trustedCertificates),
58
+ verifyJwt: getOid4vciJwtVerifyCallback(agentContext),
138
59
  fetch: agentContext.config.agentDependencies.fetch,
139
- encryptJwe: getOid4vcEncryptJweCallback(agentContext),
140
- decryptJwe: getOid4vcDecryptJweCallback(agentContext),
141
- getX509CertificateMetadata: (certificate) => {
142
- const leafCertificate = core_1.X509Service.getLeafCertificate(agentContext, { certificateChain: [certificate] });
143
- return {
144
- sanDnsNames: leafCertificate.sanDnsNames,
145
- sanUriNames: leafCertificate.sanUriNames,
146
- };
147
- },
148
60
  };
149
61
  }
150
62
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"callbacks.js","sourceRoot":"","sources":["../../src/shared/callbacks.ts"],"names":[],"mappings":";;AA6BA,gEAmCC;AAED,kEA0CC;AAED,kEA+BC;AAED,4DAuCC;AAED,gDAkBC;AAMD,gFA4BC;AAjOD,yCAauB;AACvB,8CAAyF;AAEzF,mCAAuC;AAEvC,SAAgB,0BAA0B,CACxC,YAA0B,EAC1B,mBAA8B;IAE9B,MAAM,UAAU,GAAG,YAAY,CAAC,iBAAiB,CAAC,OAAO,CAAC,iBAAU,CAAC,CAAA;IAErE,OAAO,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACnC,MAAM,EAAE,OAAO,EAAE,UA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}
@@ -1,5 +1,5 @@
1
1
  import type { OpenId4VciCredentialConfigurationsSupported, OpenId4VciCredentialConfigurationsSupportedWithFormats } from './models';
2
- import { type CredentialConfigurationsSupported } from '@openid4vc/openid4vci';
2
+ import { type CredentialConfigurationsSupported } from '@animo-id/oid4vci';
3
3
  /**
4
4
  * Returns all entries from the credential offer with the associated metadata resolved.
5
5
  */
@@ -12,105 +12,147 @@ export declare function getAllowedAndRequestedScopeValues(options: {
12
12
  allowedScopes: string[];
13
13
  }): string[];
14
14
  export declare function getCredentialConfigurationsSupportedForScopes(credentialConfigurationsSupported: CredentialConfigurationsSupported, scopes: string[]): {
15
- [k: string]: import("zod").objectOutputType<{
16
- format: import("zod").ZodString;
17
- scope: import("zod").ZodOptional<import("zod").ZodString>;
18
- cryptographic_binding_methods_supported: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
19
- credential_signing_alg_values_supported: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
20
- proof_types_supported: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodUnion<[import("zod").ZodLiteral<"jwt">, import("zod").ZodLiteral<"attestation">, import("zod").ZodString]>, import("zod").ZodObject<{
21
- proof_signing_alg_values_supported: import("zod").ZodArray<import("zod").ZodString, "many">;
22
- key_attestations_required: import("zod").ZodOptional<import("zod").ZodObject<{
23
- key_storage: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEnum<["iso_18045_high", "iso_18045_moderate", "iso_18045_enhanced-basic", "iso_18045_basic"]>, import("zod").ZodString]>, "many">>;
24
- user_authentication: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEnum<["iso_18045_high", "iso_18045_moderate", "iso_18045_enhanced-basic", "iso_18045_basic"]>, import("zod").ZodString]>, "many">>;
25
- }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
26
- key_storage: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEnum<["iso_18045_high", "iso_18045_moderate", "iso_18045_enhanced-basic", "iso_18045_basic"]>, import("zod").ZodString]>, "many">>;
27
- user_authentication: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEnum<["iso_18045_high", "iso_18045_moderate", "iso_18045_enhanced-basic", "iso_18045_basic"]>, import("zod").ZodString]>, "many">>;
28
- }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
29
- key_storage: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEnum<["iso_18045_high", "iso_18045_moderate", "iso_18045_enhanced-basic", "iso_18045_basic"]>, import("zod").ZodString]>, "many">>;
30
- user_authentication: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEnum<["iso_18045_high", "iso_18045_moderate", "iso_18045_enhanced-basic", "iso_18045_basic"]>, import("zod").ZodString]>, "many">>;
31
- }, import("zod").ZodTypeAny, "passthrough">>>;
32
- }, "strip", import("zod").ZodTypeAny, {
33
- proof_signing_alg_values_supported: string[];
34
- key_attestations_required?: import("zod").objectOutputType<{
35
- key_storage: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEnum<["iso_18045_high", "iso_18045_moderate", "iso_18045_enhanced-basic", "iso_18045_basic"]>, import("zod").ZodString]>, "many">>;
36
- user_authentication: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEnum<["iso_18045_high", "iso_18045_moderate", "iso_18045_enhanced-basic", "iso_18045_basic"]>, import("zod").ZodString]>, "many">>;
37
- }, import("zod").ZodTypeAny, "passthrough"> | undefined;
38
- }, {
39
- proof_signing_alg_values_supported: string[];
40
- key_attestations_required?: import("zod").objectInputType<{
41
- key_storage: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEnum<["iso_18045_high", "iso_18045_moderate", "iso_18045_enhanced-basic", "iso_18045_basic"]>, import("zod").ZodString]>, "many">>;
42
- user_authentication: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEnum<["iso_18045_high", "iso_18045_moderate", "iso_18045_enhanced-basic", "iso_18045_basic"]>, import("zod").ZodString]>, "many">>;
43
- }, import("zod").ZodTypeAny, "passthrough"> | undefined;
44
- }>>>;
45
- display: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
46
- name: import("zod").ZodString;
47
- locale: import("zod").ZodOptional<import("zod").ZodString>;
48
- logo: import("zod").ZodOptional<import("zod").ZodObject<{
49
- uri: import("zod").ZodOptional<import("zod").ZodString>;
50
- alt_text: import("zod").ZodOptional<import("zod").ZodString>;
51
- }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
52
- uri: import("zod").ZodOptional<import("zod").ZodString>;
53
- alt_text: import("zod").ZodOptional<import("zod").ZodString>;
54
- }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
55
- uri: import("zod").ZodOptional<import("zod").ZodString>;
56
- alt_text: import("zod").ZodOptional<import("zod").ZodString>;
57
- }, import("zod").ZodTypeAny, "passthrough">>>;
58
- description: import("zod").ZodOptional<import("zod").ZodString>;
59
- background_color: import("zod").ZodOptional<import("zod").ZodString>;
60
- background_image: import("zod").ZodOptional<import("zod").ZodObject<{
61
- uri: import("zod").ZodOptional<import("zod").ZodString>;
62
- }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
63
- uri: import("zod").ZodOptional<import("zod").ZodString>;
64
- }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
65
- uri: import("zod").ZodOptional<import("zod").ZodString>;
66
- }, import("zod").ZodTypeAny, "passthrough">>>;
67
- text_color: import("zod").ZodOptional<import("zod").ZodString>;
68
- }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
69
- name: import("zod").ZodString;
70
- locale: import("zod").ZodOptional<import("zod").ZodString>;
71
- logo: import("zod").ZodOptional<import("zod").ZodObject<{
72
- uri: import("zod").ZodOptional<import("zod").ZodString>;
73
- alt_text: import("zod").ZodOptional<import("zod").ZodString>;
74
- }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
75
- uri: import("zod").ZodOptional<import("zod").ZodString>;
76
- alt_text: import("zod").ZodOptional<import("zod").ZodString>;
77
- }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
78
- uri: import("zod").ZodOptional<import("zod").ZodString>;
79
- alt_text: import("zod").ZodOptional<import("zod").ZodString>;
80
- }, import("zod").ZodTypeAny, "passthrough">>>;
81
- description: import("zod").ZodOptional<import("zod").ZodString>;
82
- background_color: import("zod").ZodOptional<import("zod").ZodString>;
83
- background_image: import("zod").ZodOptional<import("zod").ZodObject<{
84
- uri: import("zod").ZodOptional<import("zod").ZodString>;
85
- }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
86
- uri: import("zod").ZodOptional<import("zod").ZodString>;
87
- }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
88
- uri: import("zod").ZodOptional<import("zod").ZodString>;
89
- }, import("zod").ZodTypeAny, "passthrough">>>;
90
- text_color: import("zod").ZodOptional<import("zod").ZodString>;
91
- }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
92
- name: import("zod").ZodString;
93
- locale: import("zod").ZodOptional<import("zod").ZodString>;
94
- logo: import("zod").ZodOptional<import("zod").ZodObject<{
95
- uri: import("zod").ZodOptional<import("zod").ZodString>;
96
- alt_text: import("zod").ZodOptional<import("zod").ZodString>;
97
- }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
98
- uri: import("zod").ZodOptional<import("zod").ZodString>;
99
- alt_text: import("zod").ZodOptional<import("zod").ZodString>;
100
- }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
101
- uri: import("zod").ZodOptional<import("zod").ZodString>;
102
- alt_text: import("zod").ZodOptional<import("zod").ZodString>;
103
- }, import("zod").ZodTypeAny, "passthrough">>>;
104
- description: import("zod").ZodOptional<import("zod").ZodString>;
105
- background_color: import("zod").ZodOptional<import("zod").ZodString>;
106
- background_image: import("zod").ZodOptional<import("zod").ZodObject<{
107
- uri: import("zod").ZodOptional<import("zod").ZodString>;
108
- }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
109
- uri: import("zod").ZodOptional<import("zod").ZodString>;
110
- }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
111
- uri: import("zod").ZodOptional<import("zod").ZodString>;
112
- }, import("zod").ZodTypeAny, "passthrough">>>;
113
- text_color: import("zod").ZodOptional<import("zod").ZodString>;
114
- }, import("zod").ZodTypeAny, "passthrough">>, "many">>;
115
- }, import("zod").ZodTypeAny, "passthrough">;
15
+ [k: string]: ({
16
+ vct: string;
17
+ format: "vc+sd-jwt";
18
+ claims?: ({
19
+ mandatory?: boolean | undefined;
20
+ value_type?: string | undefined;
21
+ display?: ({
22
+ name?: string | undefined;
23
+ locale?: string | undefined;
24
+ } & {
25
+ [key: string]: unknown;
26
+ }) | undefined;
27
+ } & {
28
+ [key: string]: unknown;
29
+ }) | undefined;
30
+ order?: string[] | undefined;
31
+ } | {
32
+ format: "mso_mdoc";
33
+ doctype: string;
34
+ claims?: ({
35
+ mandatory?: boolean | undefined;
36
+ value_type?: string | undefined;
37
+ display?: ({
38
+ name?: string | undefined;
39
+ locale?: string | undefined;
40
+ } & {
41
+ [key: string]: unknown;
42
+ }) | undefined;
43
+ } & {
44
+ [key: string]: unknown;
45
+ }) | undefined;
46
+ order?: string[] | undefined;
47
+ } | {
48
+ format: "jwt_vc_json-ld";
49
+ credential_definition: {
50
+ type: string[];
51
+ '@context': string[];
52
+ credentialSubject?: {
53
+ [x: string]: any[] | {
54
+ [x: string]: any;
55
+ } | ({
56
+ mandatory: boolean;
57
+ value_type?: string | undefined;
58
+ display?: ({
59
+ name?: string | undefined;
60
+ locale?: string | undefined;
61
+ } & {
62
+ [key: string]: unknown;
63
+ })[] | undefined;
64
+ } & {
65
+ [key: string]: unknown;
66
+ });
67
+ } | undefined;
68
+ } & {
69
+ [key: string]: unknown;
70
+ };
71
+ order?: string[] | undefined;
72
+ } | {
73
+ format: "ldp_vc";
74
+ credential_definition: {
75
+ type: string[];
76
+ '@context': string[];
77
+ credentialSubject?: {
78
+ [x: string]: any[] | {
79
+ [x: string]: any;
80
+ } | ({
81
+ mandatory: boolean;
82
+ value_type?: string | undefined;
83
+ display?: ({
84
+ name?: string | undefined;
85
+ locale?: string | undefined;
86
+ } & {
87
+ [key: string]: unknown;
88
+ })[] | undefined;
89
+ } & {
90
+ [key: string]: unknown;
91
+ });
92
+ } | undefined;
93
+ } & {
94
+ [key: string]: unknown;
95
+ };
96
+ order?: string[] | undefined;
97
+ } | {
98
+ format: "jwt_vc_json";
99
+ credential_definition: {
100
+ type: string[];
101
+ credentialSubject?: {
102
+ [x: string]: any[] | {
103
+ [x: string]: any;
104
+ } | ({
105
+ mandatory: boolean;
106
+ value_type?: string | undefined;
107
+ display?: ({
108
+ name?: string | undefined;
109
+ locale?: string | undefined;
110
+ } & {
111
+ [key: string]: unknown;
112
+ })[] | undefined;
113
+ } & {
114
+ [key: string]: unknown;
115
+ });
116
+ } | undefined;
117
+ } & {
118
+ [key: string]: unknown;
119
+ };
120
+ order?: string[] | undefined;
121
+ } | ({
122
+ format: string;
123
+ } & {
124
+ [key: string]: unknown;
125
+ })) & {
126
+ format: string;
127
+ display?: ({
128
+ name: string;
129
+ description?: string | undefined;
130
+ locale?: string | undefined;
131
+ logo?: ({
132
+ uri?: string | undefined;
133
+ alt_text?: string | undefined;
134
+ } & {
135
+ [key: string]: unknown;
136
+ }) | undefined;
137
+ background_color?: string | undefined;
138
+ background_image?: ({
139
+ uri?: string | undefined;
140
+ } & {
141
+ [key: string]: unknown;
142
+ }) | undefined;
143
+ text_color?: string | undefined;
144
+ } & {
145
+ [key: string]: unknown;
146
+ })[] | undefined;
147
+ scope?: string | undefined;
148
+ cryptographic_binding_methods_supported?: string[] | undefined;
149
+ credential_signing_alg_values_supported?: string[] | undefined;
150
+ proof_types_supported?: {
151
+ [x: string]: {
152
+ proof_signing_alg_values_supported: string[];
153
+ };
154
+ } | undefined;
155
+ } & {
156
+ [key: string]: unknown;
157
+ };
116
158
  };
@@ -1,5 +1,5 @@
1
1
  import type { Jwk } from '@credo-ts/core';
2
- export interface OpenId4VcJwtIssuerDid {
2
+ interface OpenId4VcJwtIssuerDid {
3
3
  method: 'did';
4
4
  didUrl: string;
5
5
  }
@@ -20,8 +20,9 @@ export interface OpenId4VcIssuerX5c {
20
20
  */
21
21
  issuer: string;
22
22
  }
23
- export interface OpenId4VcJwtIssuerJwk {
23
+ interface OpenId4VcJwtIssuerJwk {
24
24
  method: 'jwk';
25
25
  jwk: Jwk;
26
26
  }
27
27
  export type OpenId4VcJwtIssuer = OpenId4VcJwtIssuerDid | OpenId4VcIssuerX5c | OpenId4VcJwtIssuerJwk;
28
+ export {};
@@ -1,8 +1,7 @@
1
- import type { AccessTokenResponse } from '@openid4vc/oauth2';
2
- import type { CredentialConfigurationSupported, CredentialConfigurationSupportedWithFormats, CredentialIssuerMetadata, CredentialIssuerMetadataDisplayEntry, CredentialOfferObject, CredentialOfferPreAuthorizedCodeGrantTxCode, CredentialRequest, CredentialRequestFormatSpecific, CredentialRequestWithFormats, IssuerMetadataResult, ParseCredentialRequestReturn } from '@openid4vc/openid4vci';
3
- import type { Openid4vpAuthorizationResponse, ResolvedOpenid4vpAuthRequest, Openid4vpAuthorizationRequest, Openid4vpAuthorizationRequestDcApi } from '@openid4vc/openid4vp';
4
- export { authorizationCodeGrantIdentifier, preAuthorizedCodeGrantIdentifier } from '@openid4vc/oauth2';
5
- export { Openid4vpAuthorizationRequest } from '@openid4vc/openid4vp';
1
+ import type { AccessTokenResponse } from '@animo-id/oauth2';
2
+ import type { CredentialConfigurationSupported, CredentialConfigurationSupportedWithFormats, CredentialIssuerMetadata, CredentialIssuerMetadataDisplayEntry, CredentialOfferObject, CredentialOfferPreAuthorizedCodeGrantTxCode, CredentialRequest, CredentialRequestFormatSpecific, CredentialRequestWithFormats, IssuerMetadataResult, ParseCredentialRequestReturn } from '@animo-id/oid4vci';
3
+ import type { AuthorizationRequestPayload, AuthorizationResponsePayload, IDTokenPayload, VerifiedAuthorizationRequest } from '@sphereon/did-auth-siop';
4
+ export { preAuthorizedCodeGrantIdentifier, authorizationCodeGrantIdentifier } from '@animo-id/oauth2';
6
5
  export type OpenId4VciCredentialConfigurationSupportedWithFormats = CredentialConfigurationSupportedWithFormats;
7
6
  export type OpenId4VciCredentialConfigurationSupported = CredentialConfigurationSupported;
8
7
  export type OpenId4VciCredentialConfigurationsSupported = Record<string, OpenId4VciCredentialConfigurationSupported>;
@@ -17,10 +16,11 @@ export type OpenId4VciCredentialIssuerMetadataDisplay = CredentialIssuerMetadata
17
16
  export type OpenId4VciCredentialRequest = CredentialRequest;
18
17
  export type OpenId4VciCredentialRequestWithFormats = CredentialRequestWithFormats;
19
18
  export type OpenId4VciCredentialOfferPayload = CredentialOfferObject;
20
- export type OpenId4VcSiopVerifiedAuthorizationRequest = ResolvedOpenid4vpAuthRequest;
21
- export type OpenId4VcSiopAuthorizationRequestPayload = Openid4vpAuthorizationRequest | Openid4vpAuthorizationRequestDcApi;
22
- export type OpenId4VcSiopAuthorizationResponsePayload = Openid4vpAuthorizationResponse;
19
+ export type OpenId4VcSiopVerifiedAuthorizationRequest = VerifiedAuthorizationRequest;
20
+ export type OpenId4VcSiopAuthorizationRequestPayload = AuthorizationRequestPayload;
21
+ export type OpenId4VcSiopAuthorizationResponsePayload = AuthorizationResponsePayload;
22
+ export type OpenId4VcSiopIdTokenPayload = IDTokenPayload;
23
+ export * from './OpenId4VcJwtIssuer';
23
24
  export * from './CredentialHolderBinding';
24
- export * from './OpenId4VciAuthorizationServerConfig';
25
25
  export * from './OpenId4VciCredentialFormatProfile';
26
- export * from './OpenId4VcJwtIssuer';
26
+ export * from './OpenId4VciAuthorizationServerConfig';
@@ -14,12 +14,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.preAuthorizedCodeGrantIdentifier = exports.authorizationCodeGrantIdentifier = void 0;
18
- var oauth2_1 = require("@openid4vc/oauth2");
19
- Object.defineProperty(exports, "authorizationCodeGrantIdentifier", { enumerable: true, get: function () { return oauth2_1.authorizationCodeGrantIdentifier; } });
17
+ exports.authorizationCodeGrantIdentifier = exports.preAuthorizedCodeGrantIdentifier = void 0;
18
+ var oauth2_1 = require("@animo-id/oauth2");
20
19
  Object.defineProperty(exports, "preAuthorizedCodeGrantIdentifier", { enumerable: true, get: function () { return oauth2_1.preAuthorizedCodeGrantIdentifier; } });
20
+ Object.defineProperty(exports, "authorizationCodeGrantIdentifier", { enumerable: true, get: function () { return oauth2_1.authorizationCodeGrantIdentifier; } });
21
+ __exportStar(require("./OpenId4VcJwtIssuer"), exports);
21
22
  __exportStar(require("./CredentialHolderBinding"), exports);
22
- __exportStar(require("./OpenId4VciAuthorizationServerConfig"), exports);
23
23
  __exportStar(require("./OpenId4VciCredentialFormatProfile"), exports);
24
- __exportStar(require("./OpenId4VcJwtIssuer"), exports);
24
+ __exportStar(require("./OpenId4VciAuthorizationServerConfig"), exports);
25
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/shared/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAqBA,4CAAsG;AAA7F,0HAAA,gCAAgC,OAAA;AAAE,0HAAA,gCAAgC,OAAA;AAkC3E,4DAAyC;AACzC,wEAAqD;AACrD,sEAAmD;AACnD,uDAAoC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/shared/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAqBA,2CAAqG;AAA5F,0HAAA,gCAAgC,OAAA;AAAE,0HAAA,gCAAgC,OAAA;AAgC3E,uDAAoC;AACpC,4DAAyC;AACzC,sEAAmD;AACnD,wEAAqD"}
@@ -1,7 +1,7 @@
1
+ import type { Oauth2ErrorCodes, Oauth2ServerErrorResponseError } from '@animo-id/oauth2';
1
2
  import type { AgentContext, Logger } from '@credo-ts/core';
2
- import type { Oauth2ErrorCodes, Oauth2ServerErrorResponseError } from '@openid4vc/oauth2';
3
- import type { Response, Request, NextFunction } from 'express';
4
- import { Oauth2ResourceUnauthorizedError } from '@openid4vc/oauth2';
3
+ import type { NextFunction, Request, Response } from 'express';
4
+ import { Oauth2ResourceUnauthorizedError } from '@animo-id/oauth2';
5
5
  export interface OpenId4VcRequest<RC extends Record<string, unknown> = Record<string, never>> extends Request {
6
6
  requestContext?: RC & OpenId4VcRequestContext;
7
7
  }
@@ -7,8 +7,8 @@ exports.sendNotFoundResponse = sendNotFoundResponse;
7
7
  exports.sendErrorResponse = sendErrorResponse;
8
8
  exports.sendJsonResponse = sendJsonResponse;
9
9
  exports.getRequestContext = getRequestContext;
10
+ const oauth2_1 = require("@animo-id/oauth2");
10
11
  const core_1 = require("@credo-ts/core");
11
- const oauth2_1 = require("@openid4vc/oauth2");
12
12
  function sendUnauthorizedError(response, next, logger, error, status) {
13
13
  const errorMessage = error instanceof Error ? error.message : error;
14
14
  logger.warn(`[OID4VC] Sending authorization error response: ${JSON.stringify(errorMessage)}`, {
@@ -34,7 +34,7 @@ function sendOauth2ErrorResponse(response, next, logger, error) {
34
34
  next(error);
35
35
  }
36
36
  function sendUnknownServerErrorResponse(response, next, logger, error) {
37
- logger.error(`[OID4VC] Sending unknown server error response`, {
37
+ logger.error('[OID4VC] Sending unknown server error response', {
38
38
  error,
39
39
  });
40
40
  response.status(500).json({
@@ -58,7 +58,7 @@ function sendErrorResponse(response, next, logger, status, message, error, addit
58
58
  next(throwError);
59
59
  }
60
60
  function sendJsonResponse(response, next,
61
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
61
+ // biome-ignore lint/suspicious/noExplicitAny: <explanation>
62
62
  body, contentType, status) {
63
63
  response
64
64
  .setHeader('Content-Type', contentType ?? 'application/json')
@@ -66,7 +66,7 @@ body, contentType, status) {
66
66
  .send(JSON.stringify(body));
67
67
  next();
68
68
  }
69
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
69
+ // biome-ignore lint/suspicious/noExplicitAny: <explanation>
70
70
  function getRequestContext(request) {
71
71
  const requestContext = request.requestContext;
72
72
  if (!requestContext)
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/shared/router/context.ts"],"names":[],"mappings":";;AAeA,sDAyBC;AAED,0DAYC;AACD,wEAYC;AAED,oDAKC;AAED,8CAmBC;AAED,4CAcC;AAGD,8CAKC;AAnHD,yCAA2C;AAC3C,8CAAkG;AAUlG,SAAgB,qBAAqB,CACnC,QAAkB,EAClB,IAAkB,EAClB,MAAc,EACd,KAAgD,EAChD,MAAe;IAEf,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAA;IACnE,MAAM,CAAC,IAAI,CAAC,kDAAkD,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,EAAE;QAC5F,KAAK;KACN,CAAC,CAAA;IAEF,MAAM,gBAAgB,GACpB,KAAK,YAAY,wCAA+B;QAC9C,CAAC,CAAC,KAAK;QACP,CAAC,CAAC,IAAI,wCAA+B,CAAC,uBAAuB,EAAE;YAC3D,EAAE,MAAM,EAAE,sCAA6B,CAAC,IAAI,EAAE;YAC9C,EAAE,MAAM,EAAE,sCAA6B,CAAC,MAAM,EAAE;SACjD,CAAC,CAAA;IAER,QAAQ;SACL,SAAS,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,aAAa,EAAE,CAAC;SAC/D,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC;SACrB,IAAI,EAAE,CAAA;I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B,EAClB,IAAkB;AAClB,4DAA4D;AAC5D,IAAS,EACT,WAAoB,EACpB,MAAe;IAEf,QAAQ;SACL,SAAS,CAAC,cAAc,EAAE,WAAW,IAAI,kBAAkB,CAAC;SAC5D,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC;SACrB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAA;IAE7B,IAAI,EAAE,CAAA;AACR,CAAC;AAED,4DAA4D;AAC5D,SAAgB,iBAAiB,CAAkC,OAAU;IAC3E,MAAM,cAAc,GAAG,OAAO,CAAC,cAAc,CAAA;IAC7C,IAAI,CAAC,cAAc;QAAE,MAAM,IAAI,iBAAU,CAAC,0BAA0B,CAAC,CAAA;IAErE,OAAO,cAAc,CAAA;AACvB,CAAC"}
@@ -4,11 +4,10 @@ exports.importExpress = importExpress;
4
4
  function importExpress() {
5
5
  try {
6
6
  // NOTE: 'express' is added as a peer-dependency, and is required when using this module
7
- // eslint-disable-next-line import/no-extraneous-dependencies, @typescript-eslint/no-var-requires
8
7
  const express = require('express');
9
8
  return express;
10
9
  }
11
- catch (error) {
10
+ catch (_error) {
12
11
  throw new Error('Express must be installed as a peer dependency');
13
12
  }
14
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"express.js","sourceRoot":"","sources":["../../../src/shared/router/express.ts"],"names":[],"mappings":";;AAEA,sCASC;AATD,SAAgB,aAAa;IAC3B,IAAI,CAAC;QACH,wFAAwF;QACxF,iGAAiG;QACjG,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAmB,CAAA;QACpD,OAAO,OAAO,CAAA;IAChB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAA;IACnE,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"express.js","sourceRoot":"","sources":["../../../src/shared/router/express.ts"],"names":[],"mappings":";;AAEA,sCAQC;AARD,SAAgB,aAAa;IAC3B,IAAI,CAAC;QACH,wFAAwF;QACxF,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAmB,CAAA;QACpD,OAAO,OAAO,CAAA;IAChB,CAAC;IAAC,OAAO,MAAM,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAA;IACnE,CAAC;AACH,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { VerifiableCredential, VerifiablePresentation } from '@credo-ts/core';
2
+ import type { CompactSdJwtVc as SphereonCompactSdJwtVc, W3CVerifiableCredential as SphereonW3cVerifiableCredential, W3CVerifiablePresentation as SphereonW3cVerifiablePresentation, WrappedVerifiablePresentation } from '@sphereon/ssi-types';
3
+ export declare function getSphereonVerifiableCredential(verifiableCredential: VerifiableCredential): SphereonW3cVerifiableCredential | SphereonCompactSdJwtVc | string;
4
+ export declare function getSphereonVerifiablePresentation(verifiablePresentation: VerifiablePresentation): SphereonW3cVerifiablePresentation | SphereonCompactSdJwtVc | string;
5
+ export declare function getVerifiablePresentationFromSphereonWrapped(wrappedVerifiablePresentation: WrappedVerifiablePresentation): VerifiablePresentation;