Closed Tschuck closed 1 month ago
Thank you! We'll take a look at this. We might merge it into another branch and make some stylistic tweaks. We might also make it so that you have to call a new function createConfirmCryptosuite
(instead of createVerifyCryptosuite
to clearly differentiate between something that will accept a base proof from something that will accept a derived one.
Perfect, thanks! Looking forward to it :)
@Tschuck, version 3.4 has been released that exposes createConfirmCryptosuite()
which can be used to confirm a base proof.
Works well, thanks! :)
When trying to verify credentials with base proof created using the
ecdsa-sd-2023-cryptosuite
library, verification fails because only derived proofs can be verified. Since theproof.cryptosuite
of the base proof is alreadyecdsa-sd-2023
, it would be beneficial to use the same library for verifying both the base proof and the derived proof.This pull request (PR) splits the
_createBaseProofVerifyData
function into two parts: one for base proofs and one for derived proofs.Details
Added new functions to
lib/proofValue.js
:checkForValidProof
: Checks ifproofValue
is a string and ensures it is base64url encoded.isBaseProofValue
isDerivedProofValue
Added new functions to
lib/verify
:_createVerifyData
: UsesisBaseProofValue
andisDerivedProofValue
to call either_createBaseProofVerifyData
or_createDerivedProofVerifyData
._createBaseProofVerifyData
: Parses the base proof value and determines required and non-required n-quads._createDerivedProofVerifyData
: Original verify function.Adjusted tests to accommodate changes.
Questions
I hope these changes align with the interests of the repository. Please let me know if you need any further adjustments.