> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# NEAR tooling

> Set up NEAR CLI and development tools to interact with your NEAR Protocol nodes deployed on Chainstack. NEAR support is now deprecated on the platform.

<Warning>
  ### No NEAR support

  Chainstack deprecated support for NEAR nodes. This page here is for legacy and in case you may find it useful.
</Warning>

## NEAR CLI

1. Install the [NEAR CLI](https://docs.near.org/tools/near-cli).
2. Use the `--node_url` flag to operate through your NEAR node:

<CodeGroup>
  ```bash Shell theme={"system"}
  near COMMAND --node_url YOUR_CHAINSTACK_ENDPOINT
  ```
</CodeGroup>

where

* COMMAND — a supported [NEAR CLI](https://docs.near.org/tools/near-cli) command
* NEAR\_ENDPOINT — your node HTTPS or WSS endpoint.

## JSON-RPC API

Interact with your NEAR node using [JSON-RPC API](https://docs.near.org/api/rpc/introduction).

Use [curl](https://curl.haxx.se) or [Postman](https://www.getpostman.com).

Example to get the latest block:

<CodeGroup>
  ```bash cURL theme={"system"}
  curl -H "Content-Type: application/json" \
    -d '{"jsonrpc": "2.0", "id": "1", "method": "block", "params": {"finality": "final"}}' \
    NEAR_ENDPOINT
  ```
</CodeGroup>

where

NEAR\_ENDPOINT is your node HTTPS or WSS endpoint.

## near-api-js

1. Install [near-api-js](https://docs.near.org/tools/near-api-js/quick-reference).
2. Use `JsonRpcProvider` to connect to your NEAR node.

<CodeGroup>
  ```javascript Javascript theme={"system"}
  const nearAPI = require("near-api-js");
  const connectionInfo = {
      url: "NEAR_ENDPOINT"
  };
  const provider = new nearAPI.providers.JsonRpcProvider(connectionInfo);
  async function main() {
      const response = await provider.block({
          finality: "final",
      });
      console.log(response)
  }
  main();
  ```
</CodeGroup>

where NEAR\_ENDPOINT is your node HTTPS or WSS endpoint.
