Getting started | Starknet

📘

Feeder gateway deprecation on December 11, 2023

All the methods listed here are working example counterparts to the upcoming feeder gateway deprecation. The interactive APIs are done based on the Pathfinder node.

Try out the Pathfinder-based interactive examples in each section and see the respective counterpart at the end of each section.

Starknet JSON-RPC version endpoints

Chainstack Starknet endpoints support sending requests to different JSON-RPC API versions. For versions, see the Pathfinder GitHub repository.

To send a request to a specific version, append your Chainstack Starknet endpoint with the version URL suffix. For example, /rpc/v0_6.

Check the following examples.

curl --request POST \
     --url https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d/rpc/v0_4 \
     --header 'content-type: application/json' \
     --data '
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "starknet_getNonce",
  "params": [
    {
      "block_number": 385940
    },
    "0x0569b13e8164bc8000c0bbcf4887856516643af123c5bc3b01e229e92f9cfd10"
  ]
}
'
curl --request POST \
     --url https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d/rpc/v0_5 \
     --header 'content-type: application/json' \
     --data '
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "starknet_getNonce",
  "params": [
    {
      "block_number": 385940
    },
    "0x0569b13e8164bc8000c0bbcf4887856516643af123c5bc3b01e229e92f9cfd10"
  ]
}
'
curl --request POST \
     --url https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d/rpc/v0_6 \
     --header 'content-type: application/json' \
     --data '
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "starknet_getNonce",
  "params": [
    {
      "block_number": 385940
    },
    "0x0569b13e8164bc8000c0bbcf4887856516643af123c5bc3b01e229e92f9cfd10"
  ]
}
'

What is the Starknet

Starknet is a decentralized, permissionless and scalable zk-rollup, extending the Ethereum blockchain's capabilities. It is designed to enhance scalability, reduce gas fees, and maintain a high level of security. Starknet uses zk-STARKs technology to achieve these goals, providing a scalable and decentralized solution for Layer-2 scaling.

Starknet provides a robust and efficient network with cross-chain bridges for seamless interactions.

What is the Starknet API

The StarkNet API allows developers to communicate with the Starknet network.

👍

Get you own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.

You can sign up with your GitHub, X, Google, or Microsoft account.

How to start using the Starknet API

To use the Starknet API, you need access to a Starknet RPC node.

Follow these steps to deploy a Starknet RPC node, and find your endpoint credentials:

  1. Sign up with Chainstack.
  2. Deploy a node.
  3. View node access and credentials.

Now you are ready to connect to Starknet and use the Starknet API to build.