Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 40 additions & 3 deletions src/admin_add_solver.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
# Admin add solver

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

The administrator can add or remove them at any time.

The administrator can also solve disputes.

To add a solver the admin will need to send an `order` message to Mostro with action `admin-add-solver`:
To add a solver the admin sends an `order` message to Mostro with action `admin-add-solver`.

## Payload format

The payload uses `text_message`.

Supported formats:

- `npub1...` -> register solver with `read-write` permission (default)
- `npub1...:read` -> register solver with `read` permission only
- `npub1...:read-write` -> register solver with `read-write` permission
- `npub1...:write` -> alias for `read-write`

Permission meanings:

- `read`: solver can take disputes, receive dispute context, and communicate with users, but cannot execute `admin-settle` or `admin-cancel`
- `read-write`: solver can do everything above and can also execute `admin-settle` and `admin-cancel`

The default remains `read-write` for backward compatibility.

## Example: default read-write solver

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

## Example: read-only solver

```json
[
{
"order": {
"version": 1,
"action": "admin-add-solver",
"payload": {
"text_message": "npub1qqq884wtp2jn96lqhqlnarl4kk3rmvrc9z2nmrvqujx3m4l2ea5qd5d0fq:read"
}
}
},
null
]
```

## Mostro response

Mostro will send this message to the admin:
Mostro sends this message to the admin:

```json
[
Expand Down