Supported ChainStarknet
Starknet API
Access Starknet blockchain data through the Spectrum API. Starknet is a permissionless ZK-rollup that runs the Cairo VM and settles to Ethereum.
| Property | Value |
|---|---|
| Slug | starknet |
| Type | Cairo VM (ZK-rollup) |
| Native Token | STRK |
| Address Format | Felt-252 hex (0x..., up to 64 hex chars) |
Available methods
| Method | Description |
|---|---|
| getBlockHeight | Latest Starknet block number |
| getBlockByNumber | Block by number |
| getBlockByHash | Block by hash |
| getBlockTransactions | Transactions in a block (via starknet_getBlockWithTxs) |
| getTransactionByHash | Transaction lookup by hash |
| getReceipt | Transaction receipt (accepts both EVM and Starknet chains) |
| getBalance | Native ETH balance (and ERC-20 balances via getTokenBalance) |
| getTokenBalance | Cairo ERC-20 balance |
| rpcProxy | Raw Starknet JSON-RPC passthrough |
| getChainHealth | Starknet node health check |
Quick start
curl -X POST https://your-endpoint.simplystaking.xyz/v1 \ -H "Content-Type: application/json" \
{ "jsonrpc": "2.0", "method": "getBlockHeight", "params": { "chain": "starknet" }, "id": 1 }
{
"jsonrpc": "2.0",
"result": {
"chain": "starknet",
"height": 1234567
},
"id": 1
}Get a Starknet native ETH balance
Starknet addresses are felt-252 hex values that share Ethereum’s 0x prefix but are up to 64 hex characters wide.
curl -X POST https://your-endpoint.simplystaking.xyz/v1 \ -H "Content-Type: application/json" \
{ "jsonrpc": "2.0", "method": "getBalance", "params": { "chain": "starknet", "address": "0x04681402a7ab16c41f7e5d091f0b0fb5b8df3f1f1c1cba1f8b8a2f5d3c6f8a72" }, "id": 1 }
SDK
import { Spectrum } from "@spectrumnodes/sdk";
const spectrum = new Spectrum({
api: "https://your-endpoint.simplystaking.xyz/YOUR_API_KEY/",
});
const block = await spectrum.core.getBlockHeight("starknet");
const balance = await spectrum.tokens.getBalance(
"starknet",
"0x04681402a7ab16c41f7e5d091f0b0fb5b8df3f1f1c1cba1f8b8a2f5d3c6f8a72",
);
// Raw starknet_call passthrough
const result = await spectrum.rpc.call("starknet", "starknet_call", [
{
contract_address: "0x...",
entry_point_selector: "0x...",
calldata: [],
},
"latest",
]);JSON-RPC passthrough
The rpcProxy endpoint exposes the full Starknet JSON-RPC surface (starknet_getBlockWithTxs, starknet_call, starknet_estimateFee, starknet_traceTransaction, starknet_getEvents, etc.). For safety, transaction-submission methods are blocked at the gateway:
starknet_addDeclareTransactionstarknet_addDeployAccountTransactionstarknet_addInvokeTransaction
If you need to submit transactions, sign and broadcast through your own infrastructure.
Endpoint differences from EVM chains
- Block height comes from
starknet_blockNumberrather thaneth_blockNumber. - Addresses are felt-252 values. They share the
0xprefix with EVM but can be up to 64 hex characters and do not follow EIP-55 checksumming. - Receipts are normalized via the shared
getTransactionReceiptdispatcher. The response shape mirrors Starknet’sstarknet_getTransactionReceipt, not EVM logs. - Native balance is read from the STRK ERC-20 contract on Starknet;
getTokenBalancereads any Cairo ERC-20. - Logs/transfers indexer, ENS, NFTs, ERC-20 metadata,
getCode, gas estimation, andsimulateCallare not supported. Use the JSON-RPC passthrough withstarknet_callfor contract reads.
Related pages
- API Reference: Full endpoint documentation
- JSON-RPC: Raw RPC passthrough details
- Receipts: EVM + Starknet receipt dispatcher
- Supported Chains: All networks