{
  "externalDocs": {
    "description": "Challenger AI / MCP Setup Guide",
    "url": "https://challenger.lukejudges.com/ai"
  },
  "info": {
    "description": "Verified XRPL Mainnet reads, in-process Rust tx simulation, ephemeral Mainnet-fork sandboxes, and key-free signing handoff. Never requires private keys or broadcasts live transactions.",
    "license": {
      "name": "MIT",
      "url": "https://github.com/LJ-XRPL/challenger/blob/main/LICENSE"
    },
    "title": "Challenger AI-Native XRPL Node",
    "version": "0.1.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/tools/xrpl_account_summary": {
      "post": {
        "description": "Get a human-readable XRPL account summary (XRP balance, sequence, owner count, trustlines, and optional account objects) with validated ledger provenance.",
        "operationId": "xrpl_account_summary",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "account": {
                    "description": "Classic XRPL r-address (e.g. rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh)",
                    "type": "string"
                  },
                  "include_lines": {
                    "default": true,
                    "type": "boolean"
                  },
                  "include_objects": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "account"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Structured XRPL tool output"
          }
        },
        "summary": "Inspect XRPL Account",
        "x-openai-isConsequential": false
      }
    },
    "/tools/xrpl_explain_tx": {
      "post": {
        "description": "Fetch and decode a validated XRPL transaction by hash, returning its type, accounts, fee, TER result, and delivered amount.",
        "operationId": "xrpl_explain_tx",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "tx_hash": {
                    "description": "64-character hex transaction hash",
                    "type": "string"
                  }
                },
                "required": [
                  "tx_hash"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Structured XRPL tool output"
          }
        },
        "summary": "Explain XRPL Transaction",
        "x-openai-isConsequential": false
      }
    },
    "/tools/xrpl_network_status": {
      "post": {
        "description": "Get live XRPL network health, validated ledger tip, base/median fees, reserves, UNL quorum, and peer count from Challenger.",
        "operationId": "xrpl_network_status",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {},
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Structured XRPL tool output"
          }
        },
        "summary": "Check XRPL Network Status",
        "x-openai-isConsequential": false
      }
    },
    "/tools/xrpl_orderbook": {
      "post": {
        "description": "Query live XRPL DEX order book offers for a currency pair at the validated ledger.",
        "operationId": "xrpl_orderbook",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "limit": {
                    "default": 20,
                    "maximum": 100,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "taker_gets": {
                    "description": "Issue object, e.g. {\"currency\":\"USD\",\"issuer\":\"r...\"}",
                    "type": "object"
                  },
                  "taker_pays": {
                    "description": "Issue object, e.g. {\"currency\":\"XRP\"} or {\"currency\":\"USD\",\"issuer\":\"r...\"}",
                    "type": "object"
                  }
                },
                "required": [
                  "taker_pays",
                  "taker_gets"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Structured XRPL tool output"
          }
        },
        "summary": "Query XRPL DEX Order Book",
        "x-openai-isConsequential": false
      }
    },
    "/tools/xrpl_prepare_tx": {
      "post": {
        "description": "Safely prepare a transaction for human wallet signing (Xaman, Crossmark, Ledger). Simulates the tx first, encodes the canonical unsigned binary blob and STX signing digest, and refuses any private key/seed input.",
        "operationId": "xrpl_prepare_tx",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "tx_json": {
                    "description": "Unsigned XRPL transaction JSON.",
                    "type": "object"
                  }
                },
                "required": [
                  "tx_json"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Structured XRPL tool output"
          }
        },
        "summary": "Prepare Unsigned Signing Payload",
        "x-openai-isConsequential": false
      }
    },
    "/tools/xrpl_sandbox_create": {
      "post": {
        "description": "Create an ephemeral in-memory Mainnet-fork sandbox pinned to the live validated tip. Optionally mint test XRP into existing or newly generated test accounts so an LLM can run multi-step strategies safely.",
        "operationId": "xrpl_sandbox_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "fund_accounts": {
                    "description": "Optional list of accounts to fund with test XRP inside the fork (omit `account` to generate a fresh test r-address).",
                    "items": {
                      "properties": {
                        "account": {
                          "type": "string"
                        },
                        "xrp": {
                          "default": 1000,
                          "minimum": 1,
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    },
                    "type": "array"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Structured XRPL tool output"
          }
        },
        "summary": "Create Mainnet-Fork Sandbox",
        "x-openai-isConsequential": false
      }
    },
    "/tools/xrpl_sandbox_drop": {
      "post": {
        "description": "Destroy an ephemeral Mainnet-fork sandbox immediately.",
        "operationId": "xrpl_sandbox_drop",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "sandbox_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "sandbox_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Structured XRPL tool output"
          }
        },
        "summary": "Drop Ephemeral Sandbox",
        "x-openai-isConsequential": false
      }
    },
    "/tools/xrpl_sandbox_exec": {
      "post": {
        "description": "Execute one or more XRPL transactions sequentially inside an ephemeral Mainnet-fork sandbox and inspect exact TER results and cumulative state diffs.",
        "operationId": "xrpl_sandbox_exec",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "advance_ledger": {
                    "default": true,
                    "type": "boolean"
                  },
                  "sandbox_id": {
                    "type": "string"
                  },
                  "tx_json": {
                    "description": "Single XRPL transaction JSON (shorthand for 1-element `txs`).",
                    "type": "object"
                  },
                  "txs": {
                    "description": "Ordered list of XRPL transaction JSON objects to execute.",
                    "items": {
                      "type": "object"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "sandbox_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Structured XRPL tool output"
          }
        },
        "summary": "Execute Transaction in Sandbox",
        "x-openai-isConsequential": false
      }
    },
    "/tools/xrpl_sandbox_inspect": {
      "post": {
        "description": "Compare an account's current forked state inside a sandbox against its live Mainnet baseline.",
        "operationId": "xrpl_sandbox_inspect",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "account": {
                    "type": "string"
                  },
                  "sandbox_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "sandbox_id",
                  "account"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Structured XRPL tool output"
          }
        },
        "summary": "Inspect Sandbox Account Diff",
        "x-openai-isConsequential": false
      }
    },
    "/tools/xrpl_simulate_tx": {
      "post": {
        "description": "Dry-run any unsigned XRPL transaction in-process using Challenger's Rust xrpl-tx-engine against live Mainnet state. Returns exact TER result, fee, and before/after balance diffs without spending XRP or requiring private keys.",
        "operationId": "xrpl_simulate_tx",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "tx_json": {
                    "description": "XRPL transaction JSON (TransactionType, Account, Destination, Amount, etc.). Fee and Sequence are auto-filled if omitted.",
                    "type": "object"
                  }
                },
                "required": [
                  "tx_json"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Structured XRPL tool output"
          }
        },
        "summary": "Simulate XRPL Transaction",
        "x-openai-isConsequential": false
      }
    }
  },
  "servers": [
    {
      "url": "https://challenger.lukejudges.com"
    }
  ]
}