@sphereon/ssi-sdk-ext.identifier-resolution 0.36.1-next.70 → 0.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1088,9 +1088,9 @@ var require_plugin_schema = __commonJS({
1088
1088
  type: "object"
1089
1089
  },
1090
1090
  DidDocumentJwks: {
1091
- $ref: '#/components/schemas/Record<Exclude<DIDDocumentSection,("publicKey"|"service")>,def-interface-.ts-36172-36897-.ts-0-63936[]>'
1091
+ $ref: '#/components/schemas/Record<Exclude<DIDDocumentSection,("publicKey"|"service")>,def-interface-.ts-36172-36897-.ts-0-64138[]>'
1092
1092
  },
1093
- 'Record<Exclude<DIDDocumentSection,("publicKey"|"service")>,def-interface-.ts-36172-36897-.ts-0-63936[]>': {
1093
+ 'Record<Exclude<DIDDocumentSection,("publicKey"|"service")>,def-interface-.ts-36172-36897-.ts-0-64138[]>': {
1094
1094
  type: "object",
1095
1095
  properties: {
1096
1096
  verificationMethod: {
@@ -5299,7 +5299,13 @@ async function resolveExternalDidIdentifier(opts, context) {
5299
5299
  }).resolve(did);
5300
5300
  const didDocument = didResolutionResult.didDocument ?? void 0;
5301
5301
  const didJwks = didDocument ? (0, import_ssi_sdk_ext4.didDocumentToJwks)(didDocument) : void 0;
5302
- const jwks = didJwks ? Array.from(new Set(Array.from(Object.values(didJwks).filter((jwks2) => (0, import_utils.isDefined)(jwks2) && jwks2.length > 0).flatMap((jwks2) => jwks2)).flatMap((jwk) => {
5302
+ const jwks = didJwks ? Array.from(new Set(Array.from(Object.values(didJwks).filter((jwks2) => (0, import_utils.isDefined)(jwks2) && jwks2.length > 0).flatMap((jwks2) => jwks2)).filter((jwk) => {
5303
+ if (!didParsed.fragment) {
5304
+ return true;
5305
+ }
5306
+ const fullKid = `${didParsed.did}#${didParsed.fragment}`;
5307
+ return jwk.kid === fullKid || jwk.kid === didParsed.fragment;
5308
+ }).flatMap((jwk) => {
5303
5309
  return {
5304
5310
  jwk,
5305
5311
  jwkThumbprint: (0, import_ssi_sdk_ext5.calculateJwkThumbprint)({