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.
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.
Explained in the Starknet API Quickstart Guide.
We currently support
v0.5. To access
v0.4 you can use the following URLs to make requests:
v0.5 you can use the following URLs to make requests:
You can also directly try these APIs from browser in our API references for Starknet
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.
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.
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!
Several libraries are available for Starknet development and interaction, including:
starknet.py: A Python SDK for Starknet
starknet.rs: A Rust SDK for Starknet
Caigo: A Golang SDK for Starknet
starknet.php: A PHP SDK for Starknet
Additionally, Protostar is a development framework for StarkNet smart contract development.
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.
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.
You can find the list of all the methods Alchemy support for the Starknet API on the Starknet API Endpoints page.
Don't worry, we got you. Check out our discord and feel free to post any questions you have!