Starknet API FAQ

Frequently asked questions about the Starknet API

What is Starknet?

Starknet is a decentralized Validity-Rollup (often referred to as ZK-Rollup). It operates as a Layer 2 network over Ethereum, enabling any app to achieve massive scale without compromising Ethereum's composability and security.

What is the Starknet API?

The Starknet API allows applications to connect to a Starknet node that is part of the Starknet network. Developers can interact with on-chain data and send different types of transactions to the network by utilizing the endpoints provided by the API. The API follows a JSON-RPC standard. JSON-RPC is a stateless, lightweight, remote procedure call (RPC) protocol encoded in JSON.

How can I get started using the Starknet API?

Explained in the Starknet API Quickstart Guide.

What versions of Starknet API are supported?

We currently support v0.4, v0.5, v0.6 and v0_7. We strongly recommend using v0_7.

To access v0.4 (soon deprecated) you can use the following URLs to make requests:

To access v0.5 (soon deprecated) you can use the following URLs to make requests:

To access v0.6 you can use the following URLs to make requests:

To access v0_7 (notice the underscore) you can use the following URLs to make requests:

You can also directly try these APIs from browser in our API references for Starknet

Is Starknet EVM compatible?

Starknet is not compatible with the Ethereum Virtual Machine (EVM). It uses Cairo, a Turing-complete programming language, which can be used to write smart contracts and compile them to run on Starknet.

StarkNet also has a tool called Warp, developed by the Nethermind team, which is a transpiler that translates Solidity to Cairo. This allows StarkNet to be compatible with Solidity and support smart contract deployment written in Solidity, although it is not directly EVM-compatible​.

What API does Starknet use?

Starknet uses the JSON-RPC API standard as its API. The Starknet JSON-RPC API serves as the backbone for the Starknet network and powers any blockchain interaction.

In aggregate, this API suite allows users to read block/transaction data, query chain information, execute smart contracts, store data on-chain, etc. Developers and consumers alike interact with Starknet’s base JSON-RPC APIs to communicate with its decentralized network of nodes.

What is a Starknet API key?

When accessing the Starknet network via a node provider like Alchemy, Starknet developers use an API key to send and receive transactions from the network.

For the best development experience, we recommend that you sign up for a free API key!

Which libraries support Starknet?

Several libraries are available for Starknet development and interaction, including:

Additionally, Protostar is a development framework for StarkNet smart contract development.

What programming languages work with Starknet?

Many programming languages work with Starknet including, Javascript, Python, Cairo, and Shell. Javascript and Cairo are some of the best languages to use, Cairo for smart contracts and Javascript for off-chain requests.

What does Starknet use for gas?

Starknet does not have its own separate native token. Instead, it uses ETH, the native token of the Ethereum network, for transactions, gas fees, and other network activities. Users can bridge their ETH tokens from Ethereum to Starknet using a dedicated bridge.

What testnet should I use for Starknet?

The testnet you should use for Starknet is the Starknet Goerli testnet. By connecting to this testnet, you can launch smart contracts, execute transactions, and test applications on the StarkNet network.

Additionally, you can obtain test tokens from the Goerli testnet and use the StarkGate bridge to transfer these tokens to the Starknet testnet. This process allows you to test out the capabilities of the Starknet network in a testnet environment before deploying to the mainnet.

What methods does Alchemy support for the Starknet API?

You can find the list of all the methods Alchemy support for the Starknet API on the Starknet API Endpoints page.

My question isn't here, where can I get help?

Don't worry, we got you. Check out our discord and feel free to post any questions you have!

ReadMe