Skip to content
Starknet Start

StarknetConfig

The React Context provider for Starknet.

Usage

"use client";
import React from "react";
 
import {  } from "@starknetfoundation/starknet-start-chains";
import {  } from "@starknetfoundation/starknet-start-providers";
import {  } from "@starknetfoundation/starknet-start-react";
 
function () {
  return (
    < ={[]} ={()}>
      {/* your app here */}
    </>
  );
}

Arguments

chains

  • Type: Chain[]

List of supported chains.

provider

  • Type: ChainProviderFactory

The JSON-RPC provider you want to use. See the RPC providers page for more information.

recommendedWallets

  • Type: WalletInformation[] | undefined

Metadata of wallets to suggest, including wallets the user has not installed yet. Defaults to every wallet known to get-starknet. See recommended wallets for more information.

extraWallets

  • Type: WalletWithStarknetFeatures[] | undefined

Additional wallets to show alongside the wallets discovered in the user's browser, such as a wallet injected under a custom key. See extra wallets for more information.

store

  • Type: Store | undefined

Wallet discovery store created with createStore from @starknet-io/get-starknet-core. Defaults to a shared store that discovers Wallet Standard, legacy injected and MetaMask Snap wallets. See custom discovery store for more information.

paymasterProvider

  • Type: ChainPaymasterFactory | undefined

Paymaster provider to use for gasless transactions. Defaults to the AVNU paymaster.

explorer

  • Type: ExplorerFactory

Explorer factory to use. See the explorers page for more information.

queryClient

  • Type: QueryClient

React Query client to use.

defaultChainId

  • Type: bigint | undefined

Default chain to use when no wallet is connected. If the provided id is not in chains, Starknet Start falls back to the first configured chain.