mutual_cancel
Cancel an active or pending contract by mutual agreement, returning payment to requester and collateral to worker in one transaction.
Instructions
Cancel an Active or AwaitingApproval contract by mutual agreement, with everyone made whole.
The contract requires signatures from BOTH the requester and the worker on one transaction. In the current implementation both signatures come from this wallet, so mutual cancel works when the same wallet holds both roles (self dealing tests, or contracts where both pubkeys were derived from this wallet). True cross wallet co signing is not implemented yet.
On success the payment returns to the requester and the collateral to the worker in the cancel transaction itself; there is no separate claim step. The contract reaches the terminal Cancelled state. Not allowed from Open (nothing to mutually cancel) or Disputed (the arbitrator owns the outcome).
Args: job_id: The contract ID to cancel.
Returns confirmation of cancellation, or error message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |