Skip to content

Commit

Permalink
update service endpoint section (#296)
Browse files Browse the repository at this point in the history
* update service endpoint section

* add note about did resolution recursion

* Apply suggestions from code review

Co-authored-by: Ted Thibodeau Jr <[email protected]>

---------

Co-authored-by: Ted Thibodeau Jr <[email protected]>
  • Loading branch information
LiranCohen and TallTed authored May 15, 2024
1 parent a5b3058 commit 50bbf4e
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions spec/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,37 @@ Object Signing / Encryption |

## Service Endpoints

::: warning
This will be updated
:::
The following DID Document Service Endpoint entries ****MUST**** be present in the DID Document of a target DID for resolution to properly locate the URI for addressing a DID owner's Decentralized Web Nodes:

```json
{
"id": "did:example:alice",
"service": [{
"id": "#dwn",
"type": "DecentralizedWebNode",
"enc": [
"#dwn-enc"
],
"sig": [
"#dwn-sig"
],
"serviceEndpoint": [
"did:example:host",
"https://dwn.example.com"
]
}]
}
```

- Service Endpoints ****MUST**** contain an `id` property and it ****MUST**** be set to `#dwn`.
- Service Endpoints ****MUST**** contain a `type` property and it ****MUST**** be set to `DecentralizedWebNode`.
- Service Endpoints ****MUST**** contain a `serviceEndpoint` property and it ****MUST**** be set to one of the following:
- a `string` value which represents the `URL` associated with the `DWN`
- an array of `string` values, each of which represents the `URL` associated with a `DWN`
- If a Service Endpoint `URL` is a `DID`, it ****MUST NOT**** not be followed more than 1 level deep when resolving.
- Service Endpoints ****MUST**** contain an `enc` property which ****MUST**** be a `string` value or an array of `string` values, each of which represents a `keyId` associated with `encrypting` data.
- Service Endpoints ****MUST**** contain a `sig` property which ****MUST**** be a `string` value or an array of `string` values, each of which represents a `keyId` associated with `signing` data.


## Messages

Expand Down

0 comments on commit 50bbf4e

Please sign in to comment.