useRpcProviders
hook
that allows direct access to RPC providers for EVM & Solana.
Rpc providers can be used to make RPC calls to the blockchain while also providing convenience
methods without going through a wallet.
Each provider will use the RPC configured in the Dashboard if present,
otherwise they fall back to public RPCs urls. By default, all EVM and Solana
networks have public default providers as shown in this table:
Network | Public RPC Url |
---|---|
Ethereum | https://cloudflare-eth.com |
Solana | https://api.mainnet-beta.solana.com |
Optimism | https://mainnet.optimism.io |
Gnosis Chain | https://rpc.gnosischain.com |
Aurora | https://mainnet.aurora.dev |
Polygon | https://polygon-rpc.com |
Palm | https://palm-mainnet.infura.io/v3 |
BNB Smart Chain | https://arb1.arbitrum.io/rpc |
useRpcProviders
hook
to obtain an object with rpc providers, and this hook expects a selector parameter
that you must use to select either EVM or Solana rpc providers.