Network guides
NEAR: block and tx
NEAR uses its own JSON-RPC method names (block, tx, query, …). Prefer finality: "final" for settled reads.
Steps
- Create a near endpoint.
- Call block with finality final (or a block_id).
- Use tx / EXPERIMENTAL_tx_status style methods as listed in the NEAR catalog for transaction lookup.
- Use query for view-state / view-function reads.
Latest final block (curl)
curl
curl https://holy-burned-sky-near-mainnet.rpcnode.dev/7c9e6679-7425-40de-944b-e07fc1f90ae7 \
-X POST \
-H 'content-type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "block",
"params": [
{
"finality": "final"
}
]
}'Latest final block (JavaScript)
fetch
const response = await fetch('https://holy-burned-sky-near-mainnet.rpcnode.dev/7c9e6679-7425-40de-944b-e07fc1f90ae7', {
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({
jsonrpc: '2.0',
id: 1,
method: 'block',
params: [
{
"finality": "final"
}
],
}),
});
const data = await response.json();
console.log(data);Tips
- Account IDs are human-readable (e.g. example.near), not 0x addresses.
- Check /near for the exact method list enabled on RpcNode.