-
Notifications
You must be signed in to change notification settings - Fork 90
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
[Bug] Service definition does not match DID spec for type and serviceEndpoint #447
Comments
Hi, thank you for opening an issue. Would you mind detailing the exact functionality you require from a
The main problem is that It's unclear how options other than a single url interact with the service dereferencing API: https://w3c-ccg.github.io/did-resolution/#service-endpoint-construction |
In our case we store a set, with alternative endpoints to query if one is down. |
A Sample code using the Wasm bindings to add a new let serviceJSON = {
id: doc.id + "#linked-domain",
type: "LinkedDomains",
serviceEndpoint: ["https://iota.org/", "https://example.com/"],
};
doc.insertService(Service.fromJSON(serviceJSON)); or with a map: let serviceJSON = {
id: doc.id + "#linked-domain",
type: "LinkedDomains",
serviceEndpoint: {
"origins": ["https://iota.org/", "https://example.com/"]
},
};
doc.insertService(Service.fromJSON(serviceJSON)); Please comment here or open a new issue if there are any problems. Thank you. |
I forgot this was even a problem! Thanks for the report, will open a PR for it SoonTM. |
Should be addressed by #944. |
Bug description
The definition of the service type currently defines the
type
field as a string, and theserviceEndpoint
as a Urlidentity.rs/identity-did/src/service/service.rs
Lines 25 to 27 in 8a97e95
The spec defines these properties to also allow set of elements
https://www.w3.org/TR/did-core/#service-properties
Expected behaviour
The service type should match the spec.
Actual behaviour
The service type only supports single strings.
The text was updated successfully, but these errors were encountered: