Skip to content
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

method 3 service id property encoding/decoding #39

Closed
TimoGlastra opened this issue Jan 16, 2022 · 2 comments
Closed

method 3 service id property encoding/decoding #39

TimoGlastra opened this issue Jan 16, 2022 · 2 comments

Comments

@TimoGlastra
Copy link

I'm currently implementing the peer did spec in aries framework javascript and wondering how service ids should be encoded/decoded when using method 3 did documents.

The spec mentions:

Add id attribute according to the form
#service

It seems incomplete, or maybe I'm just not sure how to interpet this. Looking at the example did document, the id is not included in the service block before being encoded, but the decoded did document contains the service id of #didcommmessaging-0.

Is there a process to generate consistent ids for peer did documents?

@dhh1128
Copy link
Collaborator

dhh1128 commented Jan 19, 2022

Tagging @TelegramSam , who may have a clearer idea about the intentions of this verbiage.

@TimoGlastra
Copy link
Author

Question answered by looking at the python peer did implementation!

The service id should be lowercase variant of the service type + index:

peer_did + "#" + service_type.lower() + "-" + str(i)

Will try to make a PR to clarify this in the spec soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants