Skip to content

useInjectedConnectors

Hook for discovering injected wallets.

Usage

import { useInjectedConnectors, argent, braavos } from "@starknet-react/core";
 
const { connectors } = useInjectedConnectors({
  // Show these connectors if the user has no connector installed.
  recommended: [argent(), braavos()],
  // Hide recommended connectors if the user has any connector installed.
  includeRecommended: "onlyIfNoConnectors",
  // Randomize the order of the connectors.
  order: "random",
});

Arguments

recommended

  • Type: Connector[]

Connectors recommended by Starknet React.

includeRecommended

  • Type: "always" | "onlyIfNoConnectors"

Whether to include recommended connectors in the list.

order

  • Type: "random" | "alphabetical"

How to order connectors.

Returns

connectors

  • Type: Connector[]

List of injected wallets.