{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/theblueprint-xyz/json-schema/theblueprint-xyz-transaction-response-schema.json",
  "title": "TransactionResponse",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/theblueprint-xyz-openapi.json#/components/schemas/TransactionResponse",
  "type": "object",
  "properties": {
    "transaction": {
      "type": "string",
      "description": "Base64 encoded unsigned transaction"
    },
    "stakeAccountAddress": {
      "type": "string",
      "description": "New stake account address (only for create stake)"
    },
    "message": {
      "type": "string",
      "description": "Human/agent-readable instruction"
    },
    "signers": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Public keys that need to sign"
    },
    "estimatedFeeSol": {
      "type": "number",
      "description": "Estimated network fee in SOL (0.00001 for stake, 0.000005 for unstake/withdraw)"
    },
    "expiresAt": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 timestamp when this transaction expires (~60s after creation). Solana blockhashes are short-lived — sign and submit before this time or request a new transaction."
    },
    "epochTiming": {
      "$ref": "#/$defs/EpochTiming"
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Warnings including blockhash expiry and balance checks"
    },
    "rewardsEstimate": {
      "type": "object",
      "description": "Estimated staking rewards (included in stake transaction responses when epoch timing is available)",
      "properties": {
        "note": {
          "type": "string"
        },
        "estimatedAnnualSol": {
          "type": "number",
          "description": "Estimated annual reward in SOL"
        },
        "estimatedPerEpochSol": {
          "type": "number",
          "description": "Estimated reward per epoch in SOL"
        },
        "basedOnApy": {
          "type": "string",
          "description": "APY rate used for the estimate"
        }
      }
    },
    "_meta": {
      "$ref": "#/$defs/ResponseMeta"
    }
  },
  "$defs": {
    "EpochTiming": {
      "type": "object",
      "description": "Current epoch timing information with estimated end time",
      "properties": {
        "currentEpoch": {
          "type": "integer",
          "description": "Current Solana epoch number"
        },
        "slotsRemaining": {
          "type": "integer",
          "description": "Slots remaining in current epoch"
        },
        "estimatedSecondsRemaining": {
          "type": "integer",
          "description": "Estimated seconds until epoch end"
        },
        "estimatedEpochEnd": {
          "type": "string",
          "format": "date-time",
          "description": "Estimated epoch end timestamp"
        },
        "note": {
          "type": "string",
          "description": "Explanation of epoch timing relevance"
        }
      }
    },
    "ResponseMeta": {
      "type": "object",
      "description": "Navigation metadata included in most responses",
      "properties": {
        "endpoint": {
          "type": "string",
          "description": "The endpoint that generated this response"
        },
        "description": {
          "type": "string",
          "description": "Brief description of the response"
        },
        "timestamp": {
          "type": "string",
          "format": "date-time",
          "description": "ISO 8601 timestamp when this response was generated"
        },
        "relatedEndpoints": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Related REST endpoints for next actions"
        },
        "relatedTools": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Related MCP tool names (MCP responses only)"
        },
        "nextSteps": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Contextual next steps based on response data"
        },
        "verifyThisCode": {
          "type": "string",
          "description": "Endpoint to verify code integrity"
        },
        "cacheTtlSeconds": {
          "type": "integer",
          "description": "Cache TTL for this response"
        },
        "documentation": {
          "type": "string",
          "description": "Link to documentation"
        },
        "support": {
          "type": "object",
          "description": "Optional donation info — Blueprint is free, donation-supported infrastructure",
          "properties": {
            "address": {
              "type": "string",
              "description": "Solana address for donations"
            },
            "message": {
              "type": "string",
              "description": "Context about why donations help"
            },
            "donate": {
              "type": "string",
              "description": "How to build a donation transaction via API/MCP"
            }
          }
        }
      }
    }
  }
}