When you try to create a sign (verifiable) credential with Bls12381G2KeyPair / BbsBlsSignature2020 (rather than Ed25519VerificationKey2018 + Ed25519Signature2018) then it fails during verification process. I needed to use BbsBlsSignature2020 in my case as it allows deriving proofs and do selective disclosure in general.
In ProofSet.ts, line 143 tries to do const matchFound = s.type.replace("sec:", "") === proof.type; while s.type is undefined.
Then the result2 variable contains the following object:
{
verified: false,
error: VerificationError: Verification error(s).
at /test-project/node_modules/@transmute/linked-data-proof/dist/linked-data-proof.cjs.development.js:912:26
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at _testBls (/test-project/transmute.js:322:19)
at /test-project/transmute.js:144:3 {
errors: [
TypeError: Cannot read properties of undefined (reading 'replace')
at map (/test-project/node_modules/@transmute/linked-data-proof/src/ProofSet.ts:146:15)
at Array.map (<anonymous>)
at /test-project/node_modules/@transmute/linked-data-proof/src/ProofSet.ts:135:17
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at _testBls (/test-project/transmute.js:322:19)
at /test-project/transmute.js:144:3
]
}
}
Interestingly, when I use json-ld package to verify result1 I can successfully verify it:
When you try to create a sign (verifiable) credential with
Bls12381G2KeyPair
/BbsBlsSignature2020
(rather thanEd25519VerificationKey2018
+Ed25519Signature2018
) then it fails during verification process. I needed to useBbsBlsSignature2020
in my case as it allows deriving proofs and do selective disclosure in general.In
ProofSet.ts
, line 143 tries to doconst matchFound = s.type.replace("sec:", "") === proof.type;
whiles.type
is undefined.Steps to reproduce:
Then the
result2
variable contains the following object:Interestingly, when I use
json-ld
package to verifyresult1
I can successfully verify it:In that case the
verifiedResult
variable is: