-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add experimental support for ServiceEndpoint JSON #163
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
@@ -217,10 +217,16 @@ export class EthrDidResolver { | |||
} | |||
case 'svc': | |||
serviceCount++ | |||
let endpoint | |||
try { | |||
endpoint = JSON.parse(Buffer.from(currentEvent.value.slice(2), 'hex').toString()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this works, it isn't a good reference implementation.
I think a better approach is to be specific about what is being added, and specifying an encoding.
So, instead of saying did/svc/<service name>
, one would say did/svc/<serviceName>/j
Or something along these lines.
We need a small adjustment to the spec to make this happen, so I'll approve this as an experimental feature for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in your example the j
stands for json
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it does.
But it's just an example.
See also #110
# [6.1.0](6.0.2...6.1.0) (2022-08-04) ### Features * add experimental support for ServiceEndpoint objects ([#163](#163)) ([3919a25](3919a25))
🎉 This PR is included in version 6.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
No description provided.