Starknet testnet is migrating to Sepolia. Read more.

Docs
RPC Providers

RPC Providers

You need to configure an RPC provider to allow your dapp to fetch data from Starknet.

Starknet React providers are factories that, given a chain, return a Starknet.js ProviderInterface object.

Providers

This section provides an alphabetical list of RPC Providers supported by Starknet React.

Public

Starknet React ships with a public provider that you can use for quick demos. This provider is kindly provided by Lava network. For any project that makes more than an handful of requests, you should use one of the providers below.

JSON-RPC

This is generic RPC provider. Use it to connect to private endpoints or to services not yet supported by Starknet React. The value returned by the rpc function is passed to the RpcProvider constructor.


_10
import { jsonRpcProvider } from "@starknet-react/core";
_10
import { Chain } from "@starknet-react/chains";
_10
_10
function rpc(chain: Chain) {
_10
return {
_10
nodeUrl: `https://${chain.network}.example.org`
_10
}
_10
}
_10
_10
const provider = jsonRpcProvider({ rpc });

Alchemy

Create an Alchemy API key from the dashboard.


_10
import { alchemyProvider } from "@starknet-react/core";
_10
_10
const provider = alchemyProvider({ apiKey });

Blast

Create a Bast API key from the dashboard.


_10
import { blastProvider } from "@starknet-react/core";
_10
_10
const provider = blastProvider({ apiKey });

Infura

Create an Infura API key from the dashboard.


_10
import { infuraProvider } from "@starknet-react/core";
_10
_10
const provider = infuraProvider({ apiKey });

Lava

Create a Lava API key from the dashboard.


_10
import { lavaProvider } from "@starknet-react/core";
_10
_10
const provider = lavaProvider({ apiKey });

Nethermind

Create a Nethermind API key from the dashboard.


_10
import { nethermindProvider } from "@starknet-react/core";
_10
_10
const provider = nethermindProvider({ apiKey });

Reddio

Create a Reddio API key from the dashboard.


_10
import { reddioProvider } from "@starknet-react/core";
_10
_10
const provider = reddioProvider({ apiKey });