Let us show you how to connect to the Starknet network via Gateway / Feeder Gateway API and JSON-RPC endpoints on full nodes.
Today we will introduce two ways to connect to the Starknet network, namely through the:
Note: We want to emphasize at the very beginning that we strongly encourage you to use the JSON-RPC endpoints, since the Feeder Gateway API will be deprecated in the near future!
The old way to communicate with Starknet was via classic HTTP calls, using the Feeder Gateway and Gateway API endpoints.
Basically, through the Gateway, your DAPP communicates directly with the Starknet Sequencer. Don’t know what the Sequencer is? Take a look at our article on exploring Starknet sequencers and nodes.
Note: Deprecation warning! This part of the article should just be used for information purposes! You should not build your DAPP to rely on the Feeder Gateway!
But why two names? To clarify, Feeder Gateway is used for HTTP GET requests and the Gateway is for POST requests! The endpoints are not documented, and you must take a look at the repo in order to get a better feel about them. This article can also provide more information!
StarkNet will become decentralized at some point and DAPP-s will communicate ONLY via the JSON-RPC protocol to the network… Similar to how it is on Ethereum!
Here we have a specification for it (yay!)
We hope this article has clarified the difference between the two connection methods to Starknet! And once again, please use the JSON-RPC in your DAPP!
See you soon again🙂
*This article is also available on SpaceShard Medium.