Skip to content

Commit d59e238

Browse files
Document solver permission levels in admin-add-solver
1 parent 97db418 commit d59e238

1 file changed

Lines changed: 40 additions & 3 deletions

File tree

src/admin_add_solver.md

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,32 @@
11
# Admin add solver
22

3-
Solvers are users appointed by the Mostro administrator and are responsible for resolving disputes.
3+
Solvers are users appointed by the Mostro administrator and are responsible for helping resolve disputes.
44

55
The administrator can add or remove them at any time.
66

77
The administrator can also solve disputes.
88

9-
To add a solver the admin will need to send an `order` message to Mostro with action `admin-add-solver`:
9+
To add a solver the admin sends an `order` message to Mostro with action `admin-add-solver`.
10+
11+
## Payload format
12+
13+
The payload uses `text_message`.
14+
15+
Supported formats:
16+
17+
- `npub1...` -> register solver with `read-write` permission (default)
18+
- `npub1...:read` -> register solver with `read` permission only
19+
- `npub1...:read-write` -> register solver with `read-write` permission
20+
- `npub1...:write` -> alias for `read-write`
21+
22+
Permission meanings:
23+
24+
- `read`: solver can take disputes, receive dispute context, and communicate with users, but cannot execute `admin-settle` or `admin-cancel`
25+
- `read-write`: solver can do everything above and can also execute `admin-settle` and `admin-cancel`
26+
27+
The default remains `read-write` for backward compatibility.
28+
29+
## Example: default read-write solver
1030

1131
```json
1232
[
@@ -23,9 +43,26 @@ To add a solver the admin will need to send an `order` message to Mostro with ac
2343
]
2444
```
2545

46+
## Example: read-only solver
47+
48+
```json
49+
[
50+
{
51+
"order": {
52+
"version": 1,
53+
"action": "admin-add-solver",
54+
"payload": {
55+
"text_message": "npub1qqq884wtp2jn96lqhqlnarl4kk3rmvrc9z2nmrvqujx3m4l2ea5qd5d0fq:read"
56+
}
57+
}
58+
},
59+
null
60+
]
61+
```
62+
2663
## Mostro response
2764

28-
Mostro will send this message to the admin:
65+
Mostro sends this message to the admin:
2966

3067
```json
3168
[

0 commit comments

Comments
 (0)