This PR brings support for different formats for Service Endpoints that are being used by some DID methods, to improve compatibility with other systems out there. More specifically, after this change, Service entries that are themselves an array are treated as individual entries in the service array of the DID document (flat-mapping). Additionally, if they are encoded in did:peer shorthand, their properties are expanded to the regular expanded form.
All the endpoints and associated transports are being used to send a message, instead of just the first one that matches. This is debatable, but since there is no clear way of determining if a transport was successful, it may be the more lenient option.
The message.to property is now an array and it is optional. This is a BREAKING CHANGE, but it is closer to the spec.
Quality
Check all that apply:
[X] I want these changes to be integrated
[X] I successfully ran pnpm i, pnpm build, pnpm test, pnpm test:browser locally.
[X] I allow my PR to be updated by the reviewers (to speed up the review process).
[ ] I added unit tests.
[ ] I added integration tests.
[ ] I did not add automated tests because _____, and I am aware that a PR without tests will likely get rejected.
What is being changed
Service
entries that are themselves an array are treated as individual entries in theservice
array of the DID document (flat-mapping). Additionally, if they are encoded in did:peer shorthand, their properties are expanded to the regular expanded form.message.to
property is now an array and it is optional. This is a BREAKING CHANGE, but it is closer to the spec.Quality
Check all that apply:
pnpm i
,pnpm build
,pnpm test
,pnpm test:browser
locally.