> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abs.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# AbstractWalletProvider

> The AbstractWalletProvider component is a wrapper component that provides the Abstract Global Wallet context to your application, allowing you to use hooks and components.

Wrap your application in the `AbstractWalletProvider` component to enable the use of the package's hooks and components
throughout your application.
[Learn more on the Native Integration guide](/abstract-global-wallet/agw-react/native-integration).

```tsx theme={null}
import { AbstractWalletProvider } from "@abstract-foundation/agw-react";
import { abstractTestnet, abstract } from "viem/chains"; // Use abstract for mainnet

const App = () => {
  return (
    <AbstractWalletProvider
      chain={abstractTestnet} // Use abstract for mainnet
      // Optionally, provide your own RPC URL
      // transport={http("https://.../rpc")}
      // Optionally, provide your own QueryClient
      // queryClient={queryClient}
    >
      {/* Your application components */}
    </AbstractWalletProvider>
  );
};
```

## Props

<ResponseField name="chain" type="Chain" required>
  The chain to connect to. Must be either `abstractTestnet` or `abstract` (for
  mainnet). The provider will throw an error if an unsupported chain is
  provided.
</ResponseField>

<ResponseField name="transport" type="Transport">
  Optional. A [Viem Transport](https://viem.sh/docs/clients/transports/http.html) instance to use if you
  want to connect to a custom RPC URL.

  If not provided, the default HTTP transport will be used.
</ResponseField>

<ResponseField name="queryClient" type="QueryClient">
  Optional. A [@tanstack/react-query QueryClient](https://tanstack.com/query/latest/docs/reference/QueryClient#queryclient) instance
  to use for data fetching.

  If not provided, a new QueryClient instance will be created with default settings.
</ResponseField>
