jsonld-signatures-bbs: TypeError: suite.ensureSuiteContext is not a function
This is caused by recent changes in https://github.com/digitalbazaar/jsonld-signatures
Here is an example implementation that would remove this error:
import sec from '@transmute/security-context';
ensureSuiteContext({ document }: any) {
const contextUrl = sec.constants.BLS12381_2020_V1_URL;
if (
document['@context'] === contextUrl ||
(Array.isArray(document['@context']) &&
document['@context'].includes(contextUrl))
) {
// document already includes the required context
return;
}
throw new TypeError(
`The document to be signed must contain this suite's @context, ` +
`"${contextUrl}".`
);
}
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 2
- Comments: 15
https://github.com/transmute-industries/verifiable-data/blob/main/packages/bbs-bls12381-signature-2020/src/BbsBlsSignature2020.ts#L48
^ this implementation supports it… feel free to help port it here.
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: