{
  "openapi": "3.1.0",
  "info": {
    "title": "Reclaim Public Wallet Preview",
    "version": "1.0.0",
    "description": "Non-signing mainnet preview with public-address input only; no wallet enrollment or referral creation. Shared capacity is 120 requests per fixed minute across preview and enrollment endpoints. Amounts are lamport strings. Network fees are unknown. Observations span RPC context slots; refresh after 30 seconds and before signing. The service does not promise a balance increase. See /developers for data handling and supported cases."
  },
  "servers": [
    {
      "url": "https://reclaim.mwh.app"
    }
  ],
  "paths": {
    "/api/v1/preview": {
      "get": {
        "operationId": "previewSolanaRent",
        "summary": "Preview a Solana wallet using only its public address",
        "security": [],
        "parameters": [
          {
            "name": "publicKey",
            "in": "query",
            "required": true,
            "description": "Canonical base58 address; exactly one parameter. No private key, referral, or additional query fields accepted.",
            "schema": {
              "type": "string",
              "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A complete preview, including blocked and empty-wallet outcomes. Eligibility is provisional, not a simulated transaction.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Preview"
                },
                "example": {
                  "schemaVersion": "1.0",
                  "publicKey": "AuPp4YTMTyqxYXQnHc5KUc6pUuCSsHQpBJhgnD45yqrf",
                  "network": "mainnet-beta",
                  "observation": {
                    "commitment": "confirmed",
                    "minSlot": 101,
                    "maxSlot": 102,
                    "observedAt": "2026-09-09T12:00:00.000Z",
                    "expiresAt": "2026-09-09T12:00:30.000Z"
                  },
                  "accounts": {
                    "scanned": 2,
                    "empty": 2,
                    "candidates": 2,
                    "protected": 0
                  },
                  "amounts": {
                    "walletBalanceLamports": "1000000000",
                    "grossRentLamports": "4078560",
                    "deductions": {
                      "serviceLamports": "244713",
                      "referralPortionLamports": "163142",
                      "referralRecipient": "service",
                      "subsidyLamports": "0",
                      "serviceAccountRentLamports": "0",
                      "networkFeeLamports": null
                    },
                    "estimatedNetLamports": "3670705",
                    "estimatedNetIncludesNetworkFee": false
                  },
                  "eligibility": {
                    "status": "eligible",
                    "reasonCodes": []
                  },
                  "warnings": [
                    "ESTIMATE_NOT_SIMULATED",
                    "NETWORK_FEE_UNKNOWN",
                    "BATCH_ROUNDING_MAY_DIFFER"
                  ],
                  "continueUrl": "https://reclaim.mwh.app/"
                }
              }
            }
          },
          "400": {
            "description": "Missing, duplicate, extra, or invalid public-address input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreviewError"
                }
              }
            }
          },
          "422": {
            "description": "More than 5,000 token accounts or over 6 MiB aggregate RPC response data. No partial result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreviewError"
                }
              }
            }
          },
          "429": {
            "description": "Shared capacity exhausted. Retry-After gives seconds until the next window.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreviewError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 60
                }
              }
            }
          },
          "503": {
            "description": "RPC or rate-limit service unavailable; fail closed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreviewError"
                }
              }
            }
          },
          "504": {
            "description": "The 12-second total RPC deadline expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreviewError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Preview": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schemaVersion",
          "publicKey",
          "network",
          "observation",
          "accounts",
          "amounts",
          "eligibility",
          "warnings",
          "continueUrl"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string",
            "const": "1.0"
          },
          "publicKey": {
            "type": "string",
            "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
          },
          "network": {
            "type": "string",
            "const": "mainnet-beta"
          },
          "observation": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "commitment",
              "minSlot",
              "maxSlot",
              "observedAt",
              "expiresAt"
            ],
            "properties": {
              "commitment": {
                "type": "string",
                "const": "confirmed"
              },
              "minSlot": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "maxSlot": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "observedAt": {
                "type": "string",
                "format": "date-time"
              },
              "expiresAt": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "accounts": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "scanned",
              "empty",
              "candidates",
              "protected"
            ],
            "properties": {
              "scanned": {
                "type": "integer",
                "minimum": 0,
                "maximum": 5000
              },
              "empty": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "candidates": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "protected": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1
              }
            }
          },
          "amounts": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "walletBalanceLamports",
              "grossRentLamports",
              "deductions",
              "estimatedNetLamports",
              "estimatedNetIncludesNetworkFee"
            ],
            "properties": {
              "walletBalanceLamports": {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]*)$",
                "description": "Exact lamports encoded as an unsigned decimal string."
              },
              "grossRentLamports": {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]*)$",
                "description": "Exact lamports encoded as an unsigned decimal string."
              },
              "deductions": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "serviceLamports",
                  "referralPortionLamports",
                  "referralRecipient",
                  "subsidyLamports",
                  "serviceAccountRentLamports",
                  "networkFeeLamports"
                ],
                "properties": {
                  "serviceLamports": {
                    "type": "string",
                    "pattern": "^(0|[1-9][0-9]*)$",
                    "description": "Exact lamports encoded as an unsigned decimal string."
                  },
                  "referralPortionLamports": {
                    "type": "string",
                    "pattern": "^(0|[1-9][0-9]*)$",
                    "description": "Exact lamports encoded as an unsigned decimal string."
                  },
                  "referralRecipient": {
                    "type": "string",
                    "const": "service"
                  },
                  "subsidyLamports": {
                    "type": "string",
                    "pattern": "^(0|[1-9][0-9]*)$",
                    "description": "Exact lamports encoded as an unsigned decimal string."
                  },
                  "serviceAccountRentLamports": {
                    "type": "string",
                    "pattern": "^(0|[1-9][0-9]*)$",
                    "description": "Exact lamports encoded as an unsigned decimal string."
                  },
                  "networkFeeLamports": {
                    "type": "null",
                    "description": "Unknown; not zero. No transaction is prepared to estimate its network fee."
                  }
                }
              },
              "estimatedNetLamports": {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]*)$",
                "description": "Exact lamports encoded as an unsigned decimal string."
              },
              "estimatedNetIncludesNetworkFee": {
                "type": "boolean",
                "const": false
              }
            }
          },
          "eligibility": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "status",
              "reasonCodes"
            ],
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "eligible",
                  "blocked",
                  "no_accounts"
                ]
              },
              "reasonCodes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "NO_EMPTY_ACCOUNTS",
                    "ONLY_PROTECTED_NATIVE_ACCOUNT",
                    "MISSING_NATIVE_SOL_ACCOUNT",
                    "UNSUPPORTED_CLOSE_AUTHORITY",
                    "NO_POSITIVE_ESTIMATE"
                  ]
                }
              }
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "continueUrl": {
            "type": "string",
            "const": "https://reclaim.mwh.app/"
          }
        }
      },
      "PreviewError": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schemaVersion",
          "error"
        ],
        "properties": {
          "schemaVersion": {
            "const": "1.0",
            "type": "string"
          },
          "error": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "code",
              "message",
              "retryable",
              "retryAfterSeconds"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "INVALID_REQUEST",
                  "INVALID_PUBLIC_KEY",
                  "RATE_LIMITED",
                  "RPC_UNAVAILABLE",
                  "RPC_TIMEOUT",
                  "WALLET_TOO_LARGE",
                  "SERVICE_UNAVAILABLE"
                ]
              },
              "message": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              },
              "retryAfterSeconds": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 1,
                "description": "Seconds until retry for throttling, otherwise null."
              }
            }
          }
        }
      }
    }
  }
}
