> For the complete documentation index, see [llms.txt](https://docs.megaeth.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.megaeth.com/moss-docs/react-sdk/installation.md).

# Installation

The React wrapper is `@megaeth-labs/wallet-sdk-react`. It depends on the core SDK and TanStack Query. Use it for React 19+ products; for React apps already using wagmi, use the [Wagmi Connector](/moss-docs/react-sdk/wagmi-connector.md) instead. The wagmi connector also works with RainbowKit, ConnectKit, and Reown AppKit.

```bash
# pick your package manager
npm install @megaeth-labs/wallet-sdk-react @megaeth-labs/wallet-sdk @tanstack/react-query
pnpm add @megaeth-labs/wallet-sdk-react @megaeth-labs/wallet-sdk @tanstack/react-query
yarn add @megaeth-labs/wallet-sdk-react @megaeth-labs/wallet-sdk @tanstack/react-query
```

## Peer Requirements

* `react@^19`
* `@tanstack/react-query@^5`

The React wrapper depends on:

* `@megaeth-labs/wallet-sdk` — core wallet methods and types.
* `@tanstack/react-query` — query/mutation lifecycle used by hooks.

## Published Packages

* [`@megaeth-labs/wallet-sdk-react`](https://www.npmjs.com/package/@megaeth-labs/wallet-sdk-react)
* [`@megaeth-labs/wallet-sdk`](https://www.npmjs.com/package/@megaeth-labs/wallet-sdk)
* [`@megaeth-labs/wallet-wagmi-connector`](https://www.npmjs.com/package/@megaeth-labs/wallet-wagmi-connector)

## Already Managing a React Query Client?

If your app already instantiates a shared `QueryClient`, review the [Provider Setup](/moss-docs/react-sdk/provider-setup.md) page before integrating — the React SDK instantiates its own `QueryClient` internally.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.megaeth.com/moss-docs/react-sdk/installation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
