@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 +9 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/package.json +13 -13
- package/plugin.schema.json +2 -2
- package/src/functions/externalIdentifierFunctions.ts +7 -0
package/dist/index.js
CHANGED
|
@@ -1062,9 +1062,9 @@ var require_plugin_schema = __commonJS({
|
|
|
1062
1062
|
type: "object"
|
|
1063
1063
|
},
|
|
1064
1064
|
DidDocumentJwks: {
|
|
1065
|
-
$ref: '#/components/schemas/Record<Exclude<DIDDocumentSection,("publicKey"|"service")>,def-interface-.ts-36172-36897-.ts-0-
|
|
1065
|
+
$ref: '#/components/schemas/Record<Exclude<DIDDocumentSection,("publicKey"|"service")>,def-interface-.ts-36172-36897-.ts-0-64138[]>'
|
|
1066
1066
|
},
|
|
1067
|
-
'Record<Exclude<DIDDocumentSection,("publicKey"|"service")>,def-interface-.ts-36172-36897-.ts-0-
|
|
1067
|
+
'Record<Exclude<DIDDocumentSection,("publicKey"|"service")>,def-interface-.ts-36172-36897-.ts-0-64138[]>': {
|
|
1068
1068
|
type: "object",
|
|
1069
1069
|
properties: {
|
|
1070
1070
|
verificationMethod: {
|
|
@@ -5213,7 +5213,13 @@ async function resolveExternalDidIdentifier(opts, context) {
|
|
|
5213
5213
|
}).resolve(did);
|
|
5214
5214
|
const didDocument = didResolutionResult.didDocument ?? void 0;
|
|
5215
5215
|
const didJwks = didDocument ? didDocumentToJwks(didDocument) : void 0;
|
|
5216
|
-
const jwks = didJwks ? Array.from(new Set(Array.from(Object.values(didJwks).filter((jwks2) => isDefined(jwks2) && jwks2.length > 0).flatMap((jwks2) => jwks2)).
|
|
5216
|
+
const jwks = didJwks ? Array.from(new Set(Array.from(Object.values(didJwks).filter((jwks2) => isDefined(jwks2) && jwks2.length > 0).flatMap((jwks2) => jwks2)).filter((jwk) => {
|
|
5217
|
+
if (!didParsed.fragment) {
|
|
5218
|
+
return true;
|
|
5219
|
+
}
|
|
5220
|
+
const fullKid = `${didParsed.did}#${didParsed.fragment}`;
|
|
5221
|
+
return jwk.kid === fullKid || jwk.kid === didParsed.fragment;
|
|
5222
|
+
}).flatMap((jwk) => {
|
|
5217
5223
|
return {
|
|
5218
5224
|
jwk,
|
|
5219
5225
|
jwkThumbprint: calculateJwkThumbprint2({
|