Skip to content

Commit 411e188

Browse files
committed
add user manual
Signed-off-by: Patrick St-Louis <[email protected]>
1 parent ad7937e commit 411e188

File tree

3 files changed

+91
-78
lines changed

3 files changed

+91
-78
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,23 @@ The following policy variables can be used to enforce parameters from the did:we
7474

7575
### Exploring the resources
7676

77-
Have a look at the demo directory for instructions on how to browse the explorer.
77+
Have a look at the demo directory for instructions on how to browse the explorer.
78+
79+
## Documentation
80+
81+
The documentation is built with [Zensical](https://zensical.org/). To view the documentation locally:
82+
83+
```bash
84+
# Install Zensical
85+
pip install zensical
86+
87+
# Navigate to the project root (where zensical.toml is located)
88+
cd /path/to/didwebvh-server-py
89+
90+
# Start the documentation server
91+
zensical serve
92+
```
93+
94+
The documentation will be available at `http://localhost:8000` (or the port specified in `zensical.toml`).
95+
96+
For comprehensive documentation, see the [User Manual](docs/user-manual.md) in the `docs/` directory.

docs/guides/protocols.md

Lines changed: 67 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@ Witnesses advertise their onboarding invitations through the server's DID docume
99
### Protocol Flow
1010

1111
1. **Collect Inputs**
12-
- WebVH server base URL (e.g., `https://did.example.org`)
13-
- Witness DID (`did:key:z6Mk...`)
12+
- WebVH server base URL (e.g., `https://did.example.org`)
13+
- Witness DID (`did:key:z6Mk...`)
1414

1515
2. **Resolve the Server DID**
16-
- **GET** `https://did.example.org/.well-known/did.json`
17-
- The document contains a `service` array generated from the known witness registry
18-
- Each service entry represents an available witness
16+
- **GET** `https://did.example.org/.well-known/did.json`
17+
- The document contains a `service` array generated from the known witness registry
18+
- Each service entry represents an available witness
1919

2020
3. **Locate the Witness Entry**
21-
- Find the service object whose `id` matches the witness DID
22-
- Verify the service `type` is `WitnessInvitation`
23-
- Extract the `serviceEndpoint` URL
21+
- Find the service object whose `id` matches the witness DID
22+
- Verify the service `type` is `WitnessInvitation`
23+
- Extract the `serviceEndpoint` URL
2424

2525
4. **Retrieve the Invitation**
26-
- The `serviceEndpoint` is a short URL: `https://{domain}/api/invitations?_oobid={witness_key}`
27-
- **GET** the short URL to retrieve the full invitation as JSON
28-
- The invitation contains a DIDComm Out-of-Band invitation payload
26+
- The `serviceEndpoint` is a short URL: `https://{domain}/api/invitations?_oobid={witness_key}`
27+
- **GET** the short URL to retrieve the full invitation as JSON
28+
- The invitation contains a DIDComm Out-of-Band invitation payload
2929

3030
5. **Establish Connection**
31-
- Use the invitation URL with your agent/connector to initiate the DIDComm relationship
32-
- The witness service will handle the connection protocol
31+
- Use the invitation URL with your agent/connector to initiate the DIDComm relationship
32+
- The witness service will handle the connection protocol
3333

3434
### Example
3535

@@ -69,29 +69,29 @@ This protocol enables clients to request DID creation parameters from the server
6969
### Protocol Flow
7070

7171
1. **Request Parameters**
72-
- **GET** `/?namespace={namespace}&alias={alias}`
73-
- Both `namespace` and `alias` are required query parameters
74-
- The server validates that the namespace is not reserved
75-
- The server checks if the alias is already in use
72+
- **GET** `/?namespace={namespace}&alias={alias}`
73+
- Both `namespace` and `alias` are required query parameters
74+
- The server validates that the namespace is not reserved
75+
- The server checks if the alias is already in use
7676

7777
2. **Server Response**
78-
- Returns policy-driven parameters including:
79-
- `versionId`: SCID placeholder for the DID
80-
- `versionTime`: Current timestamp
81-
- `parameters`: Policy-driven configuration
82-
- `method`: WebVH method version
83-
- `witness`: Witness requirements (threshold and witness list)
84-
- `portable`: Portability setting
85-
- `updateKeys`: Required update keys
86-
- `nextKeyHashes`: Prerotation requirements
87-
- `watchers`: Optional watcher URLs
88-
- `state`: Initial DID document state
89-
- `proof`: Proof options for signing
78+
- Returns policy-driven parameters including:
79+
- `versionId`: SCID placeholder for the DID
80+
- `versionTime`: Current timestamp
81+
- `parameters`: Policy-driven configuration
82+
- `method`: WebVH method version
83+
- `witness`: Witness requirements (threshold and witness list)
84+
- `portable`: Portability setting
85+
- `updateKeys`: Required update keys
86+
- `nextKeyHashes`: Prerotation requirements
87+
- `watchers`: Optional watcher URLs
88+
- `state`: Initial DID document state
89+
- `proof`: Proof options for signing
9090

9191
3. **Use Parameters**
92-
- Client uses these parameters to construct the initial log entry
93-
- Client must sign the log entry according to the proof options
94-
- Client must obtain witness signatures if required by policy
92+
- Client uses these parameters to construct the initial log entry
93+
- Client must sign the log entry according to the proof options
94+
- Client must obtain witness signatures if required by policy
9595

9696
### Example
9797

@@ -140,49 +140,49 @@ This protocol enables clients to create or update DIDs by submitting log entries
140140
### Protocol Flow
141141

142142
1. **Prepare Log Entry**
143-
- Construct a log entry using parameters from "Requesting a DID Path"
144-
- Include:
145-
- `versionId`: Unique identifier for this log entry
146-
- `versionTime`: Timestamp for this entry
147-
- `parameters`: Policy parameters (may differ from initial request for updates)
148-
- `state`: DID document state at this point
149-
- `proof`: Data Integrity Proof signed by the DID controller
143+
- Construct a log entry using parameters from "Requesting a DID Path"
144+
- Include:
145+
- `versionId`: Unique identifier for this log entry
146+
- `versionTime`: Timestamp for this entry
147+
- `parameters`: Policy parameters (may differ from initial request for updates)
148+
- `state`: DID document state at this point
149+
- `proof`: Data Integrity Proof signed by the DID controller
150150

151151
2. **Obtain Witness Signature** (if required)
152-
- If server policy requires witnesses, request signatures from witness services
153-
- Witness signs the log entry using their witness key
154-
- Include witness signature in the request
152+
- If server policy requires witnesses, request signatures from witness services
153+
- Witness signs the log entry using their witness key
154+
- Include witness signature in the request
155155

156156
3. **Submit Log Entry**
157-
- **POST** `/{namespace}/{alias}`
158-
- **Body**:
159-
```json
160-
{
161-
"logEntry": {
162-
"versionId": "...",
163-
"versionTime": "...",
164-
"parameters": {...},
165-
"state": {...},
166-
"proof": {...}
167-
},
168-
"witnessSignature": {
169-
"versionId": "...",
170-
"proof": [...]
171-
}
172-
}
173-
```
157+
- **POST** `/{namespace}/{alias}`
158+
- **Body**:
159+
```json
160+
{
161+
"logEntry": {
162+
"versionId": "...",
163+
"versionTime": "...",
164+
"parameters": {...},
165+
"state": {...},
166+
"proof": {...}
167+
},
168+
"witnessSignature": {
169+
"versionId": "...",
170+
"proof": [...]
171+
}
172+
}
173+
```
174174

175175
4. **Server Processing**
176-
- Server validates the log entry structure
177-
- Server verifies the controller's proof
178-
- Server verifies witness signatures (if required)
179-
- Server enforces policy compliance
180-
- Server updates or creates the DID record
176+
- Server validates the log entry structure
177+
- Server verifies the controller's proof
178+
- Server verifies witness signatures (if required)
179+
- Server enforces policy compliance
180+
- Server updates or creates the DID record
181181

182182
5. **Response**
183-
- **201 Created**: New DID created successfully
184-
- **200 OK**: DID updated successfully
185-
- **400 Bad Request**: Validation error or policy violation
183+
- **201 Created**: New DID created successfully
184+
- **200 OK**: DID updated successfully
185+
- **400 Bad Request**: Validation error or policy violation
186186

187187
### Example
188188

zensical.toml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ site_url = "https://identity.foundation/didwebvh-server-py"
66
dev_addr = "localhost:8000"
77
docs_dir = "docs"
88
site_dir = "site"
9-
copyright: "Copyright &copy; 2025 DIF"
10-
# Custom CSS for brand colors
11-
# extra_css = ["stylesheets/custom.css"]
12-
# Custom JavaScript for top navigation (temporarily disabled)
13-
# extra_javascript = ["javascripts/top-nav.js"]
9+
copyright = "Copyright &copy; 2025 DIF"
1410

1511
nav = [
1612
{ Home = "index.md" },
@@ -67,10 +63,6 @@ logo = "lucide/smile"
6763
previous = "fontawesome/solid/angle-left"
6864
next = "fontawesome/solid/angle-right"
6965

70-
[project.theme.palette]
71-
primary = "indigo"
72-
accent = "indigo"
73-
7466
[[project.theme.palette]]
7567
media = "(prefers-color-scheme)"
7668
toggle.icon = "lucide/sun-moon"
@@ -82,13 +74,15 @@ scheme = "default"
8274
toggle.icon = "lucide/sun"
8375
toggle.name = "Switch to dark mode"
8476
primary = "indigo"
85-
accent = "indigo"
77+
accent = "blue"
8678

8779
[[project.theme.palette]]
8880
media = "(prefers-color-scheme: dark)"
8981
scheme = "slate"
9082
toggle.icon = "lucide/moon"
9183
toggle.name = "Switch to light mode"
84+
primary = "indigo"
85+
accent = "blue"
9286

9387
[project.extra]
9488
generator = false

0 commit comments

Comments
 (0)