> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sudont.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Drop-in RPC Integration

> Sudont does not require a custom SDK. Point your standard Web3 libraries at our RPC endpoint and the bare-metal firewall handles the rest.

## Overview

Sudont does not require a custom SDK. It is a **drop-in dual-engine RPC proxy**. Point your
existing Web3 client at our endpoint and every transaction is automatically dropped into a local
LiteSVM or revm memory sandbox, evaluated against your Constitution, and either signed or
returned as a deterministic JSON ReAct error. Your integration is a single URL change.

<Note>
  There is no package to install and no client library to wrap. The proxy infers the chain from
  the JSON-RPC method and routes to the correct engine automatically.
</Note>

***

## Swap Your RPC URL

Replace your mainnet RPC endpoint with your Sudont RPC endpoint. Your API key scopes the
Constitution, rate limits, and attestation signer.

<CodeGroup>
  ```javascript title="Solana — @solana/web3.js" theme={null}
  import { Connection } from "@solana/web3.js";

  // Before
  const connection = new Connection("https://api.mainnet-beta.solana.com");

  // After
  const connection = new Connection("https://rpc.sudont.xyz/v1/YOUR_API_KEY");
  ```

  ```javascript title="EVM — ethers.js" theme={null}
  import { JsonRpcProvider } from "ethers";

  // Before
  const provider = new JsonRpcProvider("https://mainnet.base.org");

  // After
  const provider = new JsonRpcProvider("https://rpc.sudont.xyz/v1/YOUR_API_KEY");
  ```
</CodeGroup>

That is the entire integration. Continue using your standard client API —
`connection.sendTransaction`, `provider.send`, `wallet.sendTransaction`, anything else — without
modification.

***

## What Happens on Send

When your swarm submits a transaction through the proxy:

<Steps>
  <Step title="Canonicalise" icon="brain">
    The Cortex parses the raw transaction into a `CanonicalIntent`.
  </Step>

  <Step title="Simulate" icon="bolt">
    The Cage drops the transaction into a local LiteSVM or revm sandbox and computes the exact
    mathematical State-Diff.
  </Step>

  <Step title="Enforce" icon="scale-balanced">
    The Judge compares the State-Diff against your Constitution's mathematical bounds.
  </Step>

  <Step title="Dispatch" icon="arrow-right">
    On approval, the transaction is broadcast and a signed `ExecutionAttestation` is returned.
    On block, a deterministic JSON ReAct error is returned inline.
  </Step>
</Steps>

***

## Reading Blocked Transactions

Blocked transactions are returned as standard JSON-RPC errors with a `data.sudont` payload your
agentic ReAct loop consumes directly:

```json title="Blocked Transaction Response" theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32010,
    "message": "Sudont policy violation",
    "data": {
      "sudont": {
        "violations": [
          {
            "rule_id": "MAX_SLIPPAGE_EXCEEDED",
            "simulated_reality": "99.9% loss due to malicious PDA drain",
            "actionable_feedback": "RECALCULATE_ROUTE_OR_SIZE"
          }
        ],
        "latency_us": 122
      }
    }
  }
}
```

See [ReAct Error Payload](/react-loop) for every `rule_id` and the full `actionable_feedback`
token set.

***

## Custom Diagnosis Methods

Beyond standard JSON-RPC, Sudont exposes diagnosis methods you can call directly through your
existing client:

<CodeGroup>
  ```javascript title="Get Policy Snapshot" theme={null}
  const policy = await provider.send("sudont_getPolicySnapshot", []);
  console.log("Max slippage bps:", policy.max_slippage_bps);
  ```

  ```javascript title="Diagnose Without Sending" theme={null}
  const diagnosis = await provider.send(
    "sudont_diagnoseRawTransaction",
    [base64SignedSolanaTx]
  );
  console.log("Verdict:", diagnosis.verdict);
  console.log("Sim outcome:", diagnosis.outcome);
  ```
</CodeGroup>

***

<Card title="Book a Live Demo" icon="calendar" href="https://cal.com/sudont">
  See Sudont block a live Mythos-class attack against an autonomous swarm in under one second.
</Card>
