What's the API endpoint for Starknet?

What’s the root API URL being used by the Starknet CLI? Can we call it ourselves directly?

4 Likes

And is there a documentation somewhere of all the API endpoints that are available?

I don’t think there’s any public documentation about the StarkNet API endpoint. I believe the best place to look for this information at the moment is the starknet.js repo, specifically the default provider.

6 Likes

I see the API documentation in Starknet.js. The code is quite good, seems we can figure it out easily from there.

Is there a base URL defined somewhere? That’s the one thing I couldn’t find.

Here ya go: starknet.js/default.ts at 0a302e1eac60d9dd1f8442efd51fc8244ebdf5be · seanjameshan/starknet.js · GitHub

https://alpha4.starknet.io

Note that this url often changes with new Cairo releases

5 Likes

Hello,

Using the current sequencer as an API endpoint is temporary, and will be deprecated in the future; this is why we did not take much time to document it.
In the future you’ll query an RPC endpoint through a library, ala web3 .
Let me see if I can find more info in the meanwhile

The URL is documented here -
https://starknet.io/docs/hello_starknet/index.html#starknet-alpha-on-mainnet

7 Likes