> For the complete documentation index, see [llms.txt](https://docs.minervachain.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.minervachain.org/build/json-rpc.md). Agents can also search and read this documentation through its [MCP server](https://docs.minervachain.org/~gitbook/mcp).

# JSON-RPC reference

A Minerva node serves the standard Ethereum namespaces (`eth`, `net`, `web3`, `txpool`) plus a `minerva` namespace. The public endpoints accept POST only and are rate limited per IP.

| Network   | Endpoint                                                              |
| --------- | --------------------------------------------------------------------- |
| Mainnet   | `https://mainnet.minervachain.org/rpc`                                |
| Testnet   | `https://testnet.minervachain.org/rpc`                                |
| Your node | `http://127.0.0.1:8545` with `--http.api eth,net,web3,minerva,txpool` |

```sh
curl -s -X POST https://mainnet.minervachain.org/rpc -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}'
# {"jsonrpc":"2.0","id":1,"result":"0x12d53"}
```

## Standard methods

Everything a go-ethereum node offers for reads: `eth_blockNumber`, `eth_getBlockByNumber`, `eth_getBalance`, `eth_getCode`, `eth_call`, `eth_estimateGas`, `eth_getLogs`, `eth_getTransactionByHash`, `eth_getTransactionReceipt`, `eth_getTransactionCount`, `eth_feeHistory`, `eth_gasPrice`, `eth_maxPriorityFeePerGas`, `net_version`, `net_peerCount`, `web3_clientVersion`, `txpool_status`.

Differences from Ethereum:

* `eth_sendRawTransaction` accepts only type `0x4d` payloads. Legacy and EIP-1559 raw transactions are rejected.
* `eth_sendTransaction`, `eth_sign`, `eth_accounts` are not useful: nodes hold no accounts.
* Transactions returned by `eth_getTransactionByHash` carry `"type":"0x4d"` and the PQ fields (`accountAddress`, `factorySalt`, `pqPublicKey`, `pqAlgorithm`, `policyVersion`). `from` is the account address.

## `minerva` namespace

| Method                                   | Params                          | Returns                                                                                                                                      |
| ---------------------------------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `minerva_sendRawPQTransaction`           | `[rawTx]`                       | hash; refuses non-PQ payloads                                                                                                                |
| `minerva_getAccountControl`              | `[address, block?]`             | `{exists, deployed, commitment, algorithm, policyVersion, controlRuleActive}`                                                                |
| `minerva_getSmartAccountDeploymentState` | `[address, block?]`             | counterfactual or deployed, factory and salt binding                                                                                         |
| `minerva_getAccountSecurityMode`         | `[address, block?]`             | the mode recorded in `SecurityModeRegistry`                                                                                                  |
| `minerva_getAccountReadiness`            | `[address, block?]`             | the readiness record                                                                                                                         |
| `minerva_getDeviceKey`                   | `[address, commitment, block?]` | the device key record and the account's current policy version                                                                               |
| `minerva_getMiningStatus`                | `[]`                            | `{chainId, networkId, blockNumber, blockTimestamp, difficulty, mining, hashrate, peerCount, syncing, averageBlockTimeSeconds, sampleBlocks}` |
| `minerva_getDifficulty`                  | `[]`                            | current difficulty                                                                                                                           |
| `minerva_getHashrate`                    | `[]`                            | this node's hashrate                                                                                                                         |
| `minerva_getNetworkSecurityStatus`       | `[]`                            | `{genesisHash, headNumber, pqRequired, ecdsaControl, accountControlEnforced, defaultAccountModel, defaultSecurityMode, exactClaim, …}`       |

Example:

```sh
curl -s -X POST https://mainnet.minervachain.org/rpc -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"minerva_getNetworkSecurityStatus","params":[]}'
```

returns, among other fields, `"pqRequired":true`, `"ecdsaControl":false` and `"accountControlEnforced":true` for the mainnet.

## PQ relayer HTTP endpoints

The relayer is a thin HTTPS front for wallets, served from the same hosts:

| Endpoint                          | Body or query                | Returns                          |
| --------------------------------- | ---------------------------- | -------------------------------- |
| `POST /pq-dev/send-raw`           | `{"rawTransaction":"0x4d…"}` | `{hash}`                         |
| `GET /pq-dev/account?address=0x…` |                              | nonce, balance, deployment state |
| `GET /pq-dev/status`              |                              | service health                   |

The testnet additionally serves the faucet at `GET /faucet/status` and `POST /faucet/request` (1 MRV per request, rate limited, can deploy the requester's account).

## Error strings you may see

| Error                            | Meaning                                                                  |
| -------------------------------- | ------------------------------------------------------------------------ |
| `ErrMinervaStaleControlKey`      | the signature is from a rotated-out key, or the policy version is behind |
| `ErrMinervaDeviceKeyScope`       | a device key tried something other than a zero-value self-call           |
| `ErrMinervaDeviceKeyRevoked`     | the device key was revoked                                               |
| `transaction type not supported` | a legacy transaction reached the node                                    |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.minervachain.org/build/json-rpc.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
