Skip to content
Logo

cartesi_getNodeInfo

Fetches the chain ID, the semantic node version and the blockchain block tag the node reads the base layer at, in a single call.

It replaces cartesi_getChainId and cartesi_getNodeVersion, which are both deprecated.

Usage

import {  } from "@cartesi/rpc";
 
const  = ({ : "http://127.0.0.1:6751/rpc" });
 
const { :  } = await .("cartesi_getNodeInfo");

Return Type

import { type , type  } from "@cartesi/rpc";
// NodeInfo = {
//   chain_id: HexNumber;
//   version: string;
//   default_block: DefaultBlock; // FINALIZED | SAFE | LATEST | PENDING
// }