The Starknet API is a collection of JSON-RPC methods that allow developers to interact with the Starknet network. By using the endpoints provided by the API, developers can access up-to-date network data and submit transactions to it.
Endpoints
Method | Description |
---|---|
starknet_getClassHashAt | Get the contract class hash in the given block for the contract deployed at the given address. |
starknet_addDeployAccountTransaction | Submit a new deploy account transaction. |
starknet_addDeclareTransaction | Submit a new class declaration transaction. |
starknet_blockHashAndNumber | Get the most recent accepted block hash and number. |
starknet_getStorageAt | Get the value of the storage at the given address and key. |
starknet_blockNumber | Get the most recent accepted block number. |
starknet_getStateUpdate | Get the information about the result of executing the requested block. |
starknet_getTransactionByBlockIdAndIndex | Get the transaction details given by the identified block and index in that block. |
starknet_getTransactionReceipt | Get the transaction receipt by the transaction hash. |
starknet_getBlockTransactionCount | Returns the number of transactions in the designated block. |
starknet_call | Calls a function in a contract and returns the return value. Using this call will not create a transaction; hence, it will not change the state. |
starknet_estimateFee | Estimates the resources required by transactions when applied on a given state. |
starknet_getNonce | Get the nonce associated with the given address in the given block. |
starknet_chainId | Return the currently configured StarkNet chain id. |
starknet_getTransactionByHash | Get the details and status of a submitted transaction. |
starknet_syncing | Returns an object about the sync status or false if the node is not syncing. |
starknet_getBlockWithTxHashes | Get block information with transaction hashes given the block id. |
starknet_getEvents | Returns all event objects matching the conditions in the provided filter. |
starknet_pendingTransactions | Returns the transactions in the transaction pool, recognized by this sequencer. |
starknet_getClass | Get the contract class definition in the given block associated with the given hash. |
starknet_getBlockWithTxs | Get block information with full transactions given the block id. |
starknet_addInvokeTransaction | Submit a new transaction to be added to the chain. |
starknet_getClassAt | Get the contract class definition in the given block at the given address. |
starknet_estimateMessageFee | Estimates the resources required by the l1_handler transaction induced by the message |