@dxos/credentials 0.6.3-main.d007b87 → 0.6.3-main.d76104f
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/lib/browser/index.mjs +7 -1
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +7 -1
- package/dist/lib/node/index.cjs.map +2 -2
- package/dist/lib/node/meta.json +1 -1
- package/dist/types/src/presentations/verifier.d.ts.map +1 -1
- package/package.json +16 -16
- package/src/presentations/verifier.test.ts +41 -0
- package/src/presentations/verifier.ts +14 -2
|
@@ -560,7 +560,13 @@ var verifyPresentationChain = async (presentation, proof) => {
|
|
|
560
560
|
]
|
|
561
561
|
};
|
|
562
562
|
}
|
|
563
|
-
|
|
563
|
+
let chainVerification;
|
|
564
|
+
const assertion = getCredentialAssertion(credential);
|
|
565
|
+
if (assertion["@type"] === "dxos.halo.credentials.ServiceAccess") {
|
|
566
|
+
chainVerification = await verifyChain(proof.chain, assertion.identityKey, proof.signer);
|
|
567
|
+
} else {
|
|
568
|
+
chainVerification = await verifyChain(proof.chain, credential.issuer, proof.signer);
|
|
569
|
+
}
|
|
564
570
|
if (chainVerification.kind === "fail") {
|
|
565
571
|
return chainVerification;
|
|
566
572
|
}
|