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 getChainId and getNodeVersion, which are both deprecated.
Usage
import { } from "viem";
import { } from "@cartesi/client";
const = ({
: ("http://127.0.0.1:6751/rpc"),
});
const { , , } = await .();Return Type
import type { , } from "@cartesi/client";
// NodeInfo = {
// chainId: number;
// version: string;
// defaultBlock: DefaultBlock; // FINALIZED | SAFE | LATEST | PENDING
// }