Skip to main content

RPC API reference

The Mina Rust node exposes HTTP RPC endpoints for monitoring, debugging, and interacting with the node. These endpoints are separate from the GraphQL API and provide lower-level access to node internals.

note

These RPC endpoints are specific to the Mina Rust node and differ from the OCaml node's RPC interface. The Rust node exposes its own set of HTTP endpoints designed for its state machine architecture.

This documentation complements the node dashboard by explaining the RPC endpoints that the dashboard uses to retrieve node information.

You can also use one of the nodes deployed by o1Labs. See the Infrastructure section for available nodes and connection details.

Endpoint reference

Accounts

GET /accounts

Get all accounts from the best tip ledger (slim format with public key, balance, and nonce).

scripts/rpc-api/curl/accounts.sh
#!/bin/bash
# Usage: $0 [RPC_ENDPOINT]
# RPC_ENDPOINT: RPC endpoint URL (default: http://mina-rust-plain-3.gcp.o1test.net)

RPC_ENDPOINT="${1:-http://mina-rust-plain-3.gcp.o1test.net}"

curl -s -X GET "$RPC_ENDPOINT/accounts" \
-H "Content-Type: application/json"

For the complete response structure, see AccountSlim in the Rust API documentation.

Discovery

GET /discovery/routing_table

Get the Kademlia DHT routing table.

scripts/rpc-api/curl/discovery-routing-table.sh
#!/bin/bash
# Usage: $0 [RPC_ENDPOINT]
# RPC_ENDPOINT: RPC endpoint URL (default: http://mina-rust-plain-3.gcp.o1test.net)

RPC_ENDPOINT="${1:-http://mina-rust-plain-3.gcp.o1test.net}"

curl -s -X GET "$RPC_ENDPOINT/discovery/routing_table" \
-H "Content-Type: application/json"

For the complete response structure, see RpcDiscoveryRoutingTable in the Rust API documentation.

GET /discovery/bootstrap_stats

Get bootstrap process statistics.

scripts/rpc-api/curl/discovery-bootstrap-stats.sh
#!/bin/bash
# Usage: $0 [RPC_ENDPOINT]
# RPC_ENDPOINT: RPC endpoint URL (default: http://mina-rust-plain-3.gcp.o1test.net)

RPC_ENDPOINT="${1:-http://mina-rust-plain-3.gcp.o1test.net}"

curl -s -X GET "$RPC_ENDPOINT/discovery/bootstrap_stats" \
-H "Content-Type: application/json"

For the complete response structure, see P2pNetworkKadBootstrapStats in the Rust API documentation.

Health and readiness

GET /healthz

Health check endpoint for load balancers and orchestration systems. Returns empty response with status code 200 if healthy, 503 if unhealthy.

scripts/rpc-api/curl/healthz.sh
#!/bin/bash
# Usage: $0 [RPC_ENDPOINT]
# RPC_ENDPOINT: RPC endpoint URL (default: http://mina-rust-plain-3.gcp.o1test.net)

RPC_ENDPOINT="${1:-http://mina-rust-plain-3.gcp.o1test.net}"

curl -s -X GET "$RPC_ENDPOINT/healthz" \
-H "Content-Type: application/json"

This endpoint returns no body, only an HTTP status code.

GET /readyz

Readiness check endpoint. Returns 200 when the node is ready to serve requests, 503 otherwise.

scripts/rpc-api/curl/readyz.sh
#!/bin/bash
# Usage: $0 [RPC_ENDPOINT]
# RPC_ENDPOINT: RPC endpoint URL (default: http://mina-rust-plain-3.gcp.o1test.net)

RPC_ENDPOINT="${1:-http://mina-rust-plain-3.gcp.o1test.net}"

curl -s -X GET "$RPC_ENDPOINT/readyz" \
-H "Content-Type: application/json"

This endpoint returns no body, only an HTTP status code.

Node status

GET /status

Get comprehensive node status including sync state, peer information, and resource usage.

scripts/rpc-api/curl/status.sh
#!/bin/bash
# Usage: $0 [RPC_ENDPOINT]
# RPC_ENDPOINT: RPC endpoint URL (default: http://mina-rust-plain-3.gcp.o1test.net)

RPC_ENDPOINT="${1:-http://mina-rust-plain-3.gcp.o1test.net}"

curl -s -X GET "$RPC_ENDPOINT/status" \
-H "Content-Type: application/json"

For the complete response structure, see RpcNodeStatus in the Rust API documentation.

GET /build_env

Get build environment information including version and compilation details.

scripts/rpc-api/curl/build-env.sh
#!/bin/bash
# Usage: $0 [RPC_ENDPOINT]
# RPC_ENDPOINT: RPC endpoint URL (default: http://mina-rust-plain-3.gcp.o1test.net)

RPC_ENDPOINT="${1:-http://mina-rust-plain-3.gcp.o1test.net}"

curl -s -X GET "$RPC_ENDPOINT/build_env" \
-H "Content-Type: application/json"

For the complete response structure, see BuildEnv in the Rust API documentation.

Peers

GET /state/peers

Get detailed information about connected peers.

scripts/rpc-api/curl/peers.sh
#!/bin/bash
# Usage: $0 [RPC_ENDPOINT]
# RPC_ENDPOINT: RPC endpoint URL (default: http://mina-rust-plain-3.gcp.o1test.net)

RPC_ENDPOINT="${1:-http://mina-rust-plain-3.gcp.o1test.net}"

curl -s -X GET "$RPC_ENDPOINT/state/peers" \
-H "Content-Type: application/json"

For the complete response structure, see RpcPeerInfo in the Rust API documentation.

GET /state/message-progress

Get message synchronization progress with peers.

scripts/rpc-api/curl/message-progress.sh
#!/bin/bash
# Usage: $0 [RPC_ENDPOINT]
# RPC_ENDPOINT: RPC endpoint URL (default: http://mina-rust-plain-3.gcp.o1test.net)

RPC_ENDPOINT="${1:-http://mina-rust-plain-3.gcp.o1test.net}"

curl -s -X GET "$RPC_ENDPOINT/state/message-progress" \
-H "Content-Type: application/json"

For the complete response structure, see RpcMessageProgressResponse in the Rust API documentation.

Scan state

GET /scan-state/summary

Get scan state summary for the best tip.

scripts/rpc-api/curl/scan-state-summary.sh
#!/bin/bash
# Usage: $0 [RPC_ENDPOINT]
# RPC_ENDPOINT: RPC endpoint URL (default: http://mina-rust-plain-3.gcp.o1test.net)

RPC_ENDPOINT="${1:-http://mina-rust-plain-3.gcp.o1test.net}"

curl -s -X GET "$RPC_ENDPOINT/scan-state/summary" \
-H "Content-Type: application/json"

For the complete response structure, see RpcScanStateSummary in the Rust API documentation.

GET /scan-state/summary/:block

Get scan state summary for a specific block (by height or state hash).

# By height
curl http://localhost:3000/scan-state/summary/12345

# By state hash
curl http://localhost:3000/scan-state/summary/3NKx...

For the complete response structure, see RpcScanStateSummary in the Rust API documentation.

SNARK pool

GET /snark-pool/jobs

Get summary of all SNARK pool jobs.

scripts/rpc-api/curl/snark-pool-jobs.sh
#!/bin/bash
# Usage: $0 [RPC_ENDPOINT]
# RPC_ENDPOINT: RPC endpoint URL (default: http://mina-rust-plain-3.gcp.o1test.net)

RPC_ENDPOINT="${1:-http://mina-rust-plain-3.gcp.o1test.net}"

curl -s -X GET "$RPC_ENDPOINT/snark-pool/jobs" \
-H "Content-Type: application/json"

For the complete response structure, see RpcSnarkPoolJobSummary in the Rust API documentation.

GET /snark-pool/job/:job_id

Get detailed information about a specific SNARK job.

curl http://localhost:3000/snark-pool/job/JOB_ID

For the complete response structure, see RpcSnarkPoolJobFull in the Rust API documentation.

SNARK worker

GET /snarker/workers

Get information about configured SNARK workers.

scripts/rpc-api/curl/snarker-workers.sh
#!/bin/bash
# Usage: $0 [RPC_ENDPOINT]
# RPC_ENDPOINT: RPC endpoint URL (default: http://mina-rust-plain-3.gcp.o1test.net)

RPC_ENDPOINT="${1:-http://mina-rust-plain-3.gcp.o1test.net}"

curl -s -X GET "$RPC_ENDPOINT/snarker/workers" \
-H "Content-Type: application/json"

For the complete response structure, see RpcSnarkWorker in the Rust API documentation.

GET /snarker/config

Get SNARK worker configuration.

scripts/rpc-api/curl/snarker-config.sh
#!/bin/bash
# Usage: $0 [RPC_ENDPOINT]
# RPC_ENDPOINT: RPC endpoint URL (default: http://mina-rust-plain-3.gcp.o1test.net)

RPC_ENDPOINT="${1:-http://mina-rust-plain-3.gcp.o1test.net}"

curl -s -X GET "$RPC_ENDPOINT/snarker/config" \
-H "Content-Type: application/json"

For the complete response structure, see RpcSnarkerConfig in the Rust API documentation.

POST /snarker/job/commit

Commit to working on a SNARK job. Used by external SNARK workers.

curl -X POST http://localhost:3000/snarker/job/commit \
-d "JOB_ID"

For the complete response structure, see RpcSnarkerJobCommitResponse in the Rust API documentation.

GET /snarker/job/spec?id=JOB_ID

Get the specification for a SNARK job.

curl "http://localhost:3000/snarker/job/spec?id=JOB_ID"

For the complete response structure, see RpcSnarkerJobSpecResponse in the Rust API documentation.

State inspection

GET /state

Get the full node state (large response, use with caution).

scripts/rpc-api/curl/state.sh
#!/bin/bash
# Usage: $0 [RPC_ENDPOINT] [FILTER]
# RPC_ENDPOINT: RPC endpoint URL (default: http://mina-rust-plain-3.gcp.o1test.net)
# FILTER: Optional JSONPath filter (e.g., "$.p2p")

RPC_ENDPOINT="${1:-http://mina-rust-plain-3.gcp.o1test.net}"
FILTER="${2:-}"

if [ -n "$FILTER" ]; then
curl -s -X GET "$RPC_ENDPOINT/state?filter=$FILTER" \
-H "Content-Type: application/json"
else
curl -s -X GET "$RPC_ENDPOINT/state" \
-H "Content-Type: application/json"
fi

Query parameters:

  • filter - JSONPath filter expression to select specific state fields

Example with filter:

# Get only P2P state
curl "http://localhost:3000/state?filter=\$.p2p"

# Get transition frontier best tip
curl "http://localhost:3000/state?filter=\$.transition_frontier.best_tip"

POST /state

Alternative to GET for state queries with filter in request body.

curl -X POST http://localhost:3000/state \
-H "Content-Type: application/json" \
-d '{"filter": "$.p2p"}'

The response is a JSON representation of the node's internal State structure, filtered by the JSONPath expression if provided.

Statistics

GET /stats/sync

Get synchronization statistics and history.

scripts/rpc-api/curl/stats-sync.sh
#!/bin/bash
# Usage: $0 [RPC_ENDPOINT]
# RPC_ENDPOINT: RPC endpoint URL (default: http://mina-rust-plain-3.gcp.o1test.net)

RPC_ENDPOINT="${1:-http://mina-rust-plain-3.gcp.o1test.net}"

curl -s -X GET "$RPC_ENDPOINT/stats/sync" \
-H "Content-Type: application/json"

Query parameters:

  • limit - Maximum number of sync snapshots to return

For the complete response structure, see SyncStatsSnapshot in the Rust API documentation.

GET /stats/block_producer

Get block production statistics (only available on block producer nodes).

scripts/rpc-api/curl/stats-block-producer.sh
#!/bin/bash
# Usage: $0 [RPC_ENDPOINT]
# RPC_ENDPOINT: RPC endpoint URL (default: http://mina-rust-plain-3.gcp.o1test.net)

RPC_ENDPOINT="${1:-http://mina-rust-plain-3.gcp.o1test.net}"

curl -s -X GET "$RPC_ENDPOINT/stats/block_producer" \
-H "Content-Type: application/json"

For the complete response structure, see RpcBlockProducerStats in the Rust API documentation.

GET /stats/actions

Get action statistics for debugging state machine behavior.

Query parameters:

  • id - Block ID or "latest" for the most recent block

For the complete response structure, see ActionStatsResponse in the Rust API documentation.

Transaction pool

GET /transaction-pool

Get all transactions in the transaction pool.

scripts/rpc-api/curl/transaction-pool.sh
#!/bin/bash
# Usage: $0 [RPC_ENDPOINT]
# RPC_ENDPOINT: RPC endpoint URL (default: http://mina-rust-plain-3.gcp.o1test.net)

RPC_ENDPOINT="${1:-http://mina-rust-plain-3.gcp.o1test.net}"

curl -s -X GET "$RPC_ENDPOINT/transaction-pool" \
-H "Content-Type: application/json"

For the complete response structure, see ValidCommandWithHash in the Rust API documentation.

Next steps