Summary
This PR makes big internal changes to the library so that it gives uniform output for all profiles, regardless of whether it was created with OpenPGP or ASP. The new Profile and Persona class should also work fine for future profiles created with new methods such as the envisioned cryptography-less "domain" profiles.
Compliance
This PR makes doip-js compliant with https://spec.keyoxide.org/spec/2/. The spec is still WIP as additional info is needed but what is there should remain the same.
Rationale
I wish this transition could have been smoother and more progressive, but the fact is that it's a big update that changes many internal aspects.
The big underlying issue that doip-js in its current state is extremely OpenPGP-centric. Profile data is stored within a JSON property named "keyData". That is fine within the OpenPGP world but for any other type of profile, this will not work. Using ASPE, the profile data is stored and transmitted along with the key data, not inside of it. And future "domain" profiles may not even have a key at all.
And there were many other such grievances with the codebase that made it ill-suited to work with ASP profiles.
As I saw no clear progressive path, I have decided to make a big PR that contains all the necessary changes to fix doip-js internal logic. The logic that this PR includes is much more sound and should last for a while. Which is why this PR will trigger the v1 release of the library. This is how doip-js should work and any changes to that should be clearly communicated to the user via semantic versioning.
## Summary
This PR makes big internal changes to the library so that it gives uniform output for all profiles, regardless of whether it was created with OpenPGP or ASP. The new Profile and Persona class should also work fine for future profiles created with new methods such as the envisioned cryptography-less "domain" profiles.
## Compliance
This PR makes doip-js compliant with https://spec.keyoxide.org/spec/2/. The spec is still WIP as additional info is needed but what is there should remain the same.
## Rationale
I wish this transition could have been smoother and more progressive, but the fact is that it's a big update that changes many internal aspects.
The big underlying issue that doip-js in its current state is extremely OpenPGP-centric. Profile data is stored within a JSON property named "keyData". That is fine within the OpenPGP world but for any other type of profile, this will not work. Using ASPE, the profile data is stored and transmitted *along with* the key data, not inside of it. And future "domain" profiles may not even have a key at all.
And there were many other such grievances with the codebase that made it ill-suited to work with ASP profiles.
As I saw no clear progressive path, I have decided to make a big PR that contains all the necessary changes to fix doip-js internal logic. The logic that this PR includes is much more sound and should last for a while. Which is why this PR will trigger the v1 release of the library. This is how doip-js should work and any changes to that should be clearly communicated to the user via semantic versioning.