> ## 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.

# Starknet tooling

> Starknet development tools guide using Pathfinder client. Includes Starknet.js, Starknet.py, Starkli CLI, and JSON-RPC API examples for blockchain interaction.

Get started with a [reliable Starknet RPC endpoint](https://chainstack.com/build-better-with-starknet/) to use the tools below.

Pathfinder currently supports querying the Starknet network for state.

For the full list of available queries, see [Pathfinder API](https://github.com/eqlabs/pathfinder#api).

## JSON-RPC API

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

<CodeGroup>
  ```bash cURL theme={"system"}
  curl -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":"0","method":"METHOD","params":[PARAMS]}' YOUR_CHAINSTACK_ENDPOINT
  ```
</CodeGroup>

where

* METHOD — a supported JSON-RPC API method
* PARAMS — request parameters if any
* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS endpoint protected either with the key or password

## Starknet.js

1. Install Starknet.js. See [Starknet.js guide](https://www.starknetjs.com).

2. Use `RpcProvider` to connect to your Starknet node and get the latest block:

   ```javascript theme={"system"}
   import { RpcProvider } from 'starknet';
   const provider = new RpcProvider({
     nodeUrl: 'YOUR_CHAINSTACK_ENDPOINT',
   })
   provider.getBlockNumber().then(console.log);
   ```

   where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either with the key or password. See also [node access details](/docs/manage-your-node#view-node-access-and-credentials).

## Starknet.py

1. Install Starknet.py. See [Starknet.py guide](https://Starknetpy.readthedocs.io/en/latest/installation.html).

2. Use `FullNodeClient` to connect to your Starknet node and retrieve a transaction by hash:

   ```python theme={"system"}
   from starknet_py.net.full_node_client import FullNodeClient
   from starknet_py.net.networks import MAINNET

   node_url = "YOUR_CHAINSTACK_ENDPOINT"
   full_node_client = FullNodeClient(node_url=node_url, net=MAINNET)
   call_result = full_node_client.get_transaction_sync(tx_hash="0x50c1941ab13ccc5d9785ceda1d0d7a47be01865eecb795a62f4e589ddca0258")
   print(call_result)
   ```

   where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either with the key or password. See also [node access details](/docs/manage-your-node#view-node-access-and-credentials).

## Starkli

Rust-based CLI tool to interact with the Starknet blockchain.

1. Install Starkli. See [Starkli Book](https://book.starkli.rs/installation).

2. In a terminal run commands with the `--rpc` flag:

   ```bash theme={"system"}
   starkli block-number --rpc YOUR_CHAINSTACK_ENDPOINT
   ```

   where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either with the key or password. See also [node access details](/docs/manage-your-node#view-node-access-and-credentials).

Find more JSON-RPC methods on the [Starkli](https://book.starkli.rs/providers) documentation.
