input-output-hk / prism-did-method-spec

Apache License 2.0
15 stars 1 forks source link

Add @context to JSON-LD construction rules #22

Closed EzequielPostan closed 1 year ago

EzequielPostan commented 1 year ago

Fixes #13

EzequielPostan commented 1 year ago

thank you for the suggestions ~This brings a question related to extensibility. Our protocol is not letting people manage the @context they intend to use in a JSON-LD representation. How would a resolver could know what to add during translation process when it finds unknown types/fields?~

edit: moved comment to a thread above

EzequielPostan commented 1 year ago

I incorporated the suggestions, with a slight difference. I removed the context related to secp keys from the mandatory section. This is because our protocol actually allows to have no verification methods, meaning that the context is not needed if no key of a related type is in the document. Please correct if this is not the proper way to do this

Note, it is still unresolved in the spec, how the resolver will decide which context adds to any arbitrary service/verification method type. I am not sure if we should refine this, or if this is fine

peacekeeper commented 1 year ago

Note, it is still unresolved in the spec, how the resolver will decide which context adds

Yes that's still a bit of an open question, see my comment here https://github.com/input-output-hk/prism-did-method-spec/pull/22/files#r1109043445.

But I think this is now a great step forward, how about we merge it and then see if we can improve this further in a separate issue/PR.