Open dlongley opened 1 year ago
There are some other issues for some basic APIs (#14, #15, #16), but we should also consider having any common transforms provided here for reuse by cryptosuites. If it turns out that those are best left to the cryptosuites, we can omit them.
In order to reduce somewhat semi-circular dependencies / the need for peer dependencies on this library by cryptosuite libs, we could create a separate library for data integrity primitive functions that suites will call -- and have this library just provide the basic add proof / verify proof / derive proof, etc. higher order functions. Then the creation of a suite will be through the individual cryptosuites: createSuite()
... and the suite will be passed to this library's higher order functions.
Core functions should be extracted from jsonld-signatures and provided as exports in this package for use in cryptosuites. Then the jsonld-signatures package could potentially be deprecated, relying instead on a simpler compositional interface and reuse of core transformation functions instead of OOP classes / design for cryptosuites.