starknet-io / starknet.js

JavaScript library for StarkNet
https://www.starknetjs.com
MIT License
1.22k stars 746 forks source link

Add support for multiple RPC providers #872

Open jereldlimjy opened 10 months ago

jereldlimjy commented 10 months ago

Currently supports a single choice of RPC provider. To add support for failing over from a primary to a secondary RPC provider, based on an error response/no response from the primary

tabaktoni commented 10 months ago

One could do this localy by creating multiple Providers but we can create it also in the lib./ I'm marking this as only dust, his should be simple to do. we could call it fallbackRpcProvider or it could be implemented inside existing rpc provider?

ivpavici commented 10 months ago

Ethers.js has a rather complex logic regarding this IIRC, we could try and go with something simple