For the complete documentation index, see llms.txt. This page is also available as Markdown.

Connect a Browser Wallet

Connect an XL1 browser wallet through the public React client SDK.

Use the React providers and hooks exported by @xyo-network/xl1-react-client-sdk.

import {
  GatewayProvider,
  InPageGatewaysProvider,
  WalletGatewayProvider,
  useProvidedGateway,
} from '@xyo-network/xl1-react-client-sdk'
  1. Wrap the application with the appropriate gateway and wallet providers.

  2. Read the selected gateway through useProvidedGateway().

  3. Treat a missing gateway as a normal disconnected or loading state.

  4. Display the selected account and network before requesting approval.

  5. Use the read-only gateway for browsing and the wallet-backed gateway only for user-approved writes.

Last updated