> ## Documentation Index
> Fetch the complete documentation index at: https://injectivelabs-docs-ai-sdk.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Tendermint

Example code snippets to query for chain node related data.

## Using HTTP REST

### Fetch the latest block info

```ts theme={null}
import { getNetworkEndpoints, Network } from "@injectivelabs/networks";
import { ChainRestTendermintApi } from "@injectivelabs/sdk-ts/client/chain";

const endpoints = getNetworkEndpoints(Network.Testnet);
const chainRestTendermintApi = new ChainRestTendermintApi(endpoints.rest);

const latestBlock = await chainRestTendermintApi.fetchLatestBlock();

console.log(latestBlock);
```

### Fetch chain node info

```ts theme={null}
import { getNetworkEndpoints, Network } from "@injectivelabs/networks";
import { ChainRestTendermintApi } from "@injectivelabs/sdk-ts/client/chain";

const endpoints = getNetworkEndpoints(Network.Testnet);
const chainRestTendermintApi = new ChainRestTendermintApi(endpoints.rest);

const nodeInfo = await chainRestTendermintApi.fetchNodeInfo();

console.log(nodeInfo);
```
