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

# Deposit from a wallet

> Connect a wallet inside the deposit widget or reuse a wallet your app already connected.

The connected-wallet flow lets users select a source chain and token, enter an amount, and submit the deposit. The wallet is only the payment source: the service-managed deposit account is derived from your configured recipient, target chain, and target token.

Complete the shared [widget quickstart](/deposits/overview/widget/quickstart) and [backend setup](/deposits/overview/widget/backend-setup) first.

## Let the widget connect a wallet

The user connects their own wallet through Reown (WalletConnect). The widget manages the connection UI internally. Use this when your app has no wallet infrastructure of its own.

```tsx theme={null}
import { DepositModal } from "@rhinestone/deposit-modal";
import "@rhinestone/deposit-modal/styles.css";

<DepositModal
  isOpen={isOpen}
  onClose={() => setIsOpen(false)}
  targetChain={8453}
  targetToken="0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
  recipient="0xYOUR_RECIPIENT_ADDRESS"
  backendUrl={process.env.NEXT_PUBLIC_DEPOSIT_PROXY_URL}
  reownAppId="YOUR_REOWN_PROJECT_ID"
  onLifecycle={(event) => event.type === "complete" && console.log(event)}
/>
```

The widget-managed path requires the Reown and Solana peer dependencies listed in the [quickstart](/deposits/overview/widget/quickstart).

To disconnect a wallet the widget connected, call the exported `disconnectWallet()`. It no-ops with a warning if `@reown/appkit` is not installed.

## Supply your app's wallet

If your app already connected a wallet through Privy, Dynamic, Turnkey, wagmi, or another integration, pass its viem `walletClient`. The widget reuses that session instead of opening its own connect step.

The widget reads the address from `walletClient.account`, so its connected identity cannot disagree with your app.

```tsx theme={null}
import { DepositModal } from "@rhinestone/deposit-modal";
import "@rhinestone/deposit-modal/styles.css";

<DepositModal
  isOpen={isOpen}
  onClose={() => setIsOpen(false)}
  targetChain={8453}
  targetToken="0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
  recipient="0xYOUR_RECIPIENT_ADDRESS"
  backendUrl={process.env.NEXT_PUBLIC_DEPOSIT_PROXY_URL}
  walletClient={walletClient}
  publicClient={publicClient}
  onLifecycle={(event) => event.type === "complete" && console.log(event)}
/>
```

Pass `onRequestConnect` as well if your app needs to run a login flow when the user selects the wallet row before one is connected.

<Tip>
  `walletClient={undefined}` is not the same as omitting the prop. Passing it while your wallet connects tells the widget that a wallet is coming, so it waits instead of deciding there is none.
</Tip>

Set `enableWallet={false}` to hide wallet funding even when you provide `walletClient` or `reownAppId`.

## Deposit without connecting a wallet

A wallet is optional. To accept a manual transfer from any wallet or exchange, show a deposit address instead; see [deposit addresses and QR codes](/deposits/crypto/deposit-addresses-and-qr-codes).

## Track the deposit

Use [callbacks and error handling](/deposits/overview/widget/callbacks-and-error-handling) while the widget is open and [webhooks](/deposits/headless/processing-and-tracking/webhooks) for backend completion. See [widget configuration](/deposits/overview/widget/widget-configuration) for destination, routing, and the full props reference.
