{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/signo-fi/json-schema/signo-fi-reencode-response-schema.json",
  "title": "ReencodeResponse",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/signo-fi-openapi.yaml#/components/schemas/ReencodeResponse",
  "type": "object",
  "required": [
    "ok"
  ],
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "data": {
      "type": "string",
      "description": "Freshly encoded EVM calldata."
    },
    "amount_raw": {
      "type": "string"
    },
    "value": {
      "type": "string"
    },
    "solana_tx": {
      "type": "string",
      "description": "Re-built base64 Solana transaction (Solana steps)."
    },
    "solana_format": {
      "type": "string",
      "enum": [
        "legacy",
        "v0"
      ]
    },
    "unsupported_reason": {
      "type": "string",
      "description": "Set with `ok: false` when the step can't be re-encoded. HARD-FAIL: never fall back to signing plan-time calldata — it embeds quote-time amounts and deadlines. Show this reason in the UI and stop (re-plan to continue)."
    },
    "unsupported_code": {
      "type": "string",
      "enum": [
        "invalid_request",
        "unknown_target",
        "step_type_unsupported",
        "protocol_unsupported",
        "quote_failed",
        "target_changed",
        "step_incomplete"
      ],
      "description": "The machine-readable half of `unsupported_reason`, present on every `ok: false`. Branch on this instead of parsing the prose, which is written for people and may change. `quote_failed` is usually worth one retry; `target_changed` means the protocol answered with a different contract than the user reviewed, so re-plan; the rest describe the step or the request and will not improve on retry."
    },
    "quoted_at": {
      "type": "string",
      "format": "date-time",
      "description": "When this quote was priced. Quotes are perishable — the embedded minimum output is set at quote time, so open the wallet immediately and call reencode again if the user idles (~30s+)."
    }
  },
  "additionalProperties": true
}