Documentation index

getRecentBlockhashConfig

Deprecated: The getRecentBlockhash method is deprecated. Use getLatestBlockhash instead.

Note: This is not a standard Solana JSON-RPC method. It is a configuration reference helper. See the linked method above for the actual RPC endpoint.

This is not a standard Solana JSON-RPC method. It serves as a configuration reference for the deprecated getRecentBlockhash method. Since getRecentBlockhash itself is deprecated, new applications should use getLatestBlockhash which provides blockhash validity information through lastValidBlockHeight.

Parameters

This method does not accept any parameters.

Configuration object fields:

FieldTypeDescription
commitmentstringCommitment level: processed, confirmed, or finalized

Response

This is a configuration reference. See getRecentBlockhash for the response format (deprecated).

Code Examples

cURL

Terminal
curl http://88.216.36.108:7999 -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getRecentBlockhash",
  "params": [
    { "commitment": "finalized" }
  ]
}'

TypeScript

TypeScript
const response = await fetch("http://88.216.36.108:7999", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    jsonrpc: "2.0",
    id: 1,
    method: "getRecentBlockhash",
    params: [
      { commitment: "finalized" }
    ]
  }),
});
const { result } = await response.json();
console.log("Blockhash:", result.value.blockhash);

Python

Python
import requests

response = requests.post("http://88.216.36.108:7999", json={
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getRecentBlockhash",
    "params": [
        {"commitment": "finalized"}
    ]
})
result = response.json()["result"]
print(f"Blockhash: {result['value']['blockhash']}")

Rust

Rust
use reqwest::Client;
use serde_json::json;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new();
    let res = client.post("http://88.216.36.108:7999")
        .json(&json!({
            "jsonrpc": "2.0",
            "id": 1,
            "method": "getRecentBlockhash",
            "params": [
                {"commitment": "finalized"}
            ]
        }))
        .send().await?
        .text().await?;
    println!("{}", res);
    Ok(())
}

Example Response

JSON
{
  "jsonrpc": "2.0",
  "result": {
    "context": { "slot": 123456789 },
    "value": {
      "blockhash": "GJxqhuxcgfn5Tcj6y3f8X4FeCDd2RQ6SnEMo1AAxrPRZ",
      "feeCalculator": { "lamportsPerSignature": 5000 }
    }
  },
  "id": 1
}