Document solver_pubkey in restore-session response#41
Conversation
Clarifies that orders currently in dispute are reported solely through the `disputes` array, not `orders`. Introduces the `solver_pubkey` field to the dispute object, indicating the assigned solver for a dispute and its use for chat key derivation. Updates field descriptions and examples to accurately reflect the new structure and the `solver_pubkey` field.
WalkthroughDocumentation update to the restore-session endpoint that restructures dispute representation. Disputed orders are relocated from the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/restore_session.md`:
- Line 90: Update the `solver_pubkey` field description in the
restore_session.md diff to remove the incorrect claim that it is "used to derive
the ECDH shared key for the dispute chat"; keep that it is the hex pubkey of the
assigned solver (or null) and is set via `admin-add-solver`, and if needed add a
clarifying note that the dispute chat ECDH shared key is derived from the
admin's pubkey (see `admin-took-dispute` / dispute_chat.md) rather than from
`solver_pubkey`.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ecf38a3c-c5e7-401e-a1fa-aeb27d14f1ae
📒 Files selected for processing (1)
src/restore_session.md
| * `trade_index`: trade index of that order. Used with the mnemonic seed to derive the same trade key pair already subscribed to it. | ||
| * `status`: current state of the dispute (e.g., `initiated`, `in-progress`). | ||
| * `initiator`: party that opened the dispute (`buyer` or `seller`). Tells the client whether the user or the counterparty started it. | ||
| * `solver_pubkey`: hex pubkey of the assigned solver, or `null` if none yet. Set once an admin assigns one via `admin-add-solver`. Also used to derive the ECDH shared key for the dispute chat. |
There was a problem hiding this comment.
no need to tell that the solver pubkey was added once via admin-add-solver because a mostro node can have many solvers added that way, what it should say is the solver_pubkey value is the pubkey of one of the solvers previously added that took that dispute via admin-take-dispute
disputesarray, notorders.solver_pubkeyfield to the dispute object, indicating the assigned solver for a dispute and its use for chat key derivation.solver_pubkeyfield.Summary by CodeRabbit
disputessection instead oforders.solver_pubkeyfield to dispute objects with explicit status values (initiated,in-progress) and initiator indicators (buyer,seller).