prepare_contest_signature
Returns the exact payload a principal must sign to contest a logged action, so you can sign it and submit the contest without writing anything.
Instructions
Return the exact bytes a principal must sign to contest a logged action.
Nothing is written. The principal signs payload (UTF-8 bytes; payload_b64url is the same bytes) with its Ed25519 key, then calls contest_action with the same arguments plus principal_signature and this signed_at.
Args: mandate_id: UUID of the mandate the action was logged under. action_id: action_id returned by log_action. reason: Why the act is contested, as it will be recorded (1 to 500 characters). response_days: Days until respond_by (1 to 365), chosen by the operator. contested_by: The contesting principal. Default: the mandate's principal. signed_at: ISO 8601 timestamp with timezone. Default: now (UTC).
Returns: JSON string with keys: payload (str), payload_b64url, signed_at, contested_by. On error: {"error": "...", "code": "..."}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | Yes | ||
| action_id | Yes | ||
| signed_at | No | ||
| mandate_id | Yes | ||
| contested_by | No | ||
| response_days | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |