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

# Crypto deposit addresses

> Use the useDepositAddress hook from @privy-io/react-auth to let users fund wallets by bridging or swapping crypto from any supported chain

<Info>This feature is experimental and may change as we iterate.</Info>

<img src="https://mintcdn.com/privy-c2af3412/P6ZrU_Y_jnZwwn3s/images/funding/depaddys1.png?fit=max&auto=format&n=P6ZrU_Y_jnZwwn3s&q=85&s=0d75bc1e0e1c72b246176b3aa6aa3a6e" alt="Funding overview" width="3686" height="2633" data-path="images/funding/depaddys1.png" />

## Overview

Privy provides a `useDepositAddress` hook in `@privy-io/react-auth` that opens a deposit address flow in the Privy modal.

Your app can use this hook to let authenticated users fund a wallet by sending crypto from any supported source chain. Privy generates a unique deposit address, and when the user sends tokens to it, the funds are automatically bridged or swapped and delivered to the destination wallet.

This is useful when users already hold crypto on a different chain than the one your app uses, or in a different wallet, app, or exchange.

## Prerequisites

Before using the deposit address hooks, enable the deposit address feature for your app in the [Privy Dashboard](https://dashboard.privy.io). See [here](/wallets/funding/configuration) for full guidance.

## Access the hook

Import and initialize `useDepositAddress`:

```tsx theme={"system"}
import {useDepositAddress} from '@privy-io/react-auth';

const {createDepositAddress} = useDepositAddress();
```

## Start a deposit address flow

Call `createDepositAddress` with a destination chain, currency, and wallet address:

```tsx theme={"system"}
await createDepositAddress({
  destinationChain: 'eip155:8453',
  destinationCurrency: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
  destinationAddress: '0x1234...abcd'
});
```

The method opens the Privy modal where the user selects a source token and network. Privy displays a unique deposit address for the user to send funds to. Once the deposit is detected, the tokens will be bridged and swapped as needed and delivered to the destination address.

`createDepositAddress` returns a `Promise<void>` that resolves when the deposit completes successfully, and rejects if an error occurs or the user exits the flow.

<Note>
  `destinationChain` accepts a CAIP-2 identifier. For example, use `eip155:4217` for Tempo,
  `eip155:8453` for Base, or `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` for Solana mainnet.
</Note>

## Parameters

`createDepositAddress` accepts an object with the following fields:

<ParamField body="destinationChain" type="string" required>
  CAIP-2 chain identifier for the destination (e.g. `eip155:4217` for Tempo, `eip155:8453` for Base,
  or `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` for Solana mainnet).
</ParamField>

<ParamField body="destinationCurrency" type="string" required>
  Token contract address on the destination chain. Use the zero address for native tokens.
</ParamField>

<ParamField body="destinationAddress" type="string" required>
  Wallet address to receive the deposited funds.
</ParamField>

## Returns

`createDepositAddress` returns a `Promise<void>` that resolves when the deposit completes successfully. The promise rejects if an error occurs or the user exits the flow.

## Supported chains

### Destination chains

Your app specifies the destination chain when calling `createDepositAddress`. The following destination chains are supported:

| Chain     | CAIP-2 identifier                         |
| --------- | ----------------------------------------- |
| Abstract  | `eip155:2741`                             |
| Arbitrum  | `eip155:42161`                            |
| Base      | `eip155:8453`                             |
| BNB Chain | `eip155:56`                               |
| Ethereum  | `eip155:1`                                |
| HyperEVM  | `eip155:999`                              |
| Hypercore | `eip155:1337`                             |
| Monad     | `eip155:143`                              |
| Optimism  | `eip155:10`                               |
| Polygon   | `eip155:137`                              |
| Solana    | `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` |
| Tempo     | `eip155:4217`                             |
| Tron      | `tron:20191129`                           |

### Source chains

Users can deposit from a wide range of chains and assets, including Bitcoin, Solana, and other tokens. The Privy modal automatically presents available source options based on the destination configuration.

## Example

```tsx theme={"system"}
import {useDepositAddress} from '@privy-io/react-auth';

function FundWallet() {
  const {createDepositAddress} = useDepositAddress();

  const handleDeposit = async () => {
    try {
      await createDepositAddress({
        destinationAddress: '<your-wallet-address>',
        // Base
        destinationChain: 'eip155:8453',
        // USDC
        destinationCurrency: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
      });
      console.log('Deposit completed');
    } catch (error) {
      console.error('Deposit failed:', error);
    }
  };

  return <button onClick={handleDeposit}>Fund with crypto</button>;
}
```

## Refunds

When a deposit order cannot be completed, the deposited funds are returned (less gas) to the user's embedded wallet. If the user does not have an existing embedded wallet on the source chain, Privy creates one to serve as the refund address. For apps using on-device execution, Privy creates this wallet using TEE infrastructure.

## Related

<CardGroup cols={2}>
  <Card title="Funding overview" icon="wallet" href="/wallets/funding/overview">
    All available methods for funding wallets.
  </Card>

  <Card title="Fiat onramp" icon="credit-card" href="/wallets/funding/fiat-onramp">
    Fund wallets with fiat via card, Apple Pay, or Google Pay.
  </Card>
</CardGroup>
