-
Notifications
You must be signed in to change notification settings - Fork 42
TypeError: suite.ensureSuiteContext is not a function #142
Comments
has any progress been made on any of these issues? I am running into the same problem |
^ this implementation supports it... feel free to help port it here. |
Hi @OR13 thanks for the link! I'm trying to understand the differences between these two implementations. Is there a specific reason the Transmute implementation requires the Mainly asking because I don't see any mention of this context in the BBS spec either. |
The function is required by digital bazaar, the context url is in the form
we agreed to use during the did WG.
…On Sat, Apr 2, 2022, 2:11 PM Karim Stekelenburg ***@***.***> wrote:
Hi @OR13 <https://github.com/OR13> thanks for the link! I'm trying to
understand the differences between these two implementations. Is there a
specific reason the Transmute implementation requires the
https://w3id.org/security/suites/bls12381-2020/v1 context on the input
doc and this MATTR one doesn't?
Mainly asking because I don't see any mention of this context in the BBS
spec either.
—
Reply to this email directly, view it on GitHub
<#142 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB7JLMAYMW6NQXLOQMAZKILVDCLXXANCNFSM5AEQHRQA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This seems to be caused by the fact that This is why the |
Once I add the missing ensureContext function, I get into another issue with context collision. jsonld.SyntaxError: Invalid JSON-LD syntax; tried to redefine a protected term. The issued is caused by "Ed25519Signature2018". Any idea/workaround for getting that solved ? Thanks |
probably you have too many contexts in your JSON-LD... and they both define the same term, |
Yes, but the strange thing is that term is only defined in the "https://www.w3.org/2018/credentials/v1" context for this sample. I don't have them anywhere else. Thanks |
Past the example you are trying to sign. |
Thanks for looking into this. It is the sample in this repo. https://github.com/mattrglobal/jsonld-signatures-bbs/tree/master/sample/ts-node/src/demo_single.ts. I only updated the jsonld and jsonld-signatures packages to be the latest available version, and provided an empty implementation for ensureSuiteContext. |
what is the plan for this? Do I have to downgrade json-ld from 9 to 5 or is there a way to go around this? |
@cre8 I am not sure, but I would guess you would need to downgrade |
From what I can tell, support for the method @OR13 the context URL in your implementation differs from the one in the Mattr example: https://w3id.org/security/bbs/v1 vs https://w3id.org/security/suites/bls12381-2020/v1, however they are both the same in content. Are both acceptable? Or should one prevail over the other? What is the reason, if you know, why there are 2 URLs? I suppose the My quite hacky solution at this moment is to do something like this:
But that way I can maintain this package as a dependency and not downgrade jsonld-signatures. To improve devX we could also just append the missing context URL to the |
@lemoustachiste the context IRI should not matter, as long as it produces the same nquads. My opinion is that an error should be thrown when attempting to sign a document with invalid context, and no "just in time patching / mutation" should be applied. Also the documentLoader should always be an argument to the functions that require it (any that produce nquads). |
After more time spent on the matter, verification proved difficult on 2 aspects:
|
This is caused by recent changes in https://github.com/digitalbazaar/jsonld-signatures
Here is an example implementation that would remove this error:
The text was updated successfully, but these errors were encountered: