Source
minimum_ledger_slotThis value may increase over time if the node is configured to purge older
ledger data.
Parameters
NoneResult
result
The minimum ledger slot number
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
RPC methods
CLI reference
Network constants
curl https://api.devnet.solana.com -s -X POST \
-H "Content-Type: application/json" \
-d '
{
"jsonrpc": "2.0",
"id": 1,
"method": "minimumLedgerSlot"
}
'
import { createSolanaRpc } from "@solana/kit";
const rpc_url = "https://api.devnet.solana.com";
const rpc = createSolanaRpc(rpc_url);
let minLedgerSlot = await rpc.minimumLedgerSlot().send();
console.log(minLedgerSlot);
import { Connection, clusterApiUrl } from "@solana/web3.js";
const connection = new Connection(clusterApiUrl("devnet"), "confirmed");
let minLedgerSlot = await connection.getMinimumLedgerSlot();
console.log(minLedgerSlot);
use anyhow::Result;
use solana_client::nonblocking::rpc_client::RpcClient;
use solana_commitment_config::CommitmentConfig;
#[tokio::main]
async fn main() -> Result<()> {
let client = RpcClient::new_with_commitment(
String::from("https://api.devnet.solana.com"),
CommitmentConfig::confirmed(),
);
let min_ledger_slot = client.minimum_ledger_slot().await?;
println!("{}", min_ledger_slot);
Ok(())
}
{
"jsonrpc": "2.0",
"result": 1234,
"id": 1
}
Returns the lowest slot still present in this node’s local ledger.
curl https://api.devnet.solana.com -s -X POST \
-H "Content-Type: application/json" \
-d '
{
"jsonrpc": "2.0",
"id": 1,
"method": "minimumLedgerSlot"
}
'
import { createSolanaRpc } from "@solana/kit";
const rpc_url = "https://api.devnet.solana.com";
const rpc = createSolanaRpc(rpc_url);
let minLedgerSlot = await rpc.minimumLedgerSlot().send();
console.log(minLedgerSlot);
import { Connection, clusterApiUrl } from "@solana/web3.js";
const connection = new Connection(clusterApiUrl("devnet"), "confirmed");
let minLedgerSlot = await connection.getMinimumLedgerSlot();
console.log(minLedgerSlot);
use anyhow::Result;
use solana_client::nonblocking::rpc_client::RpcClient;
use solana_commitment_config::CommitmentConfig;
#[tokio::main]
async fn main() -> Result<()> {
let client = RpcClient::new_with_commitment(
String::from("https://api.devnet.solana.com"),
CommitmentConfig::confirmed(),
);
let min_ledger_slot = client.minimum_ledger_slot().await?;
println!("{}", min_ledger_slot);
Ok(())
}
{
"jsonrpc": "2.0",
"result": 1234,
"id": 1
}
minimum_ledger_slot