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

# useTransferFundsModal

> 送金モーダルの状態と設定を管理するためのフックです

## インポート

```tsx theme={null}
import { useTransferFundsModal } from '@0xsequence/checkout'
```

## 使い方

```tsx theme={null}
import { useTransferFundsModal } from '@0xsequence/checkout'
import { useAccount } from 'wagmi'

function App() {
  const { openTransferFundsModal } = useTransferFundsModal()
  const { address } = useAccount()
  
  const handleOpenTransfer = () => {
    openTransferFundsModal({ walletAddress: address || '' })
  }
  
  return (
    <div>
      <button onClick={handleOpenTransfer}>
        Receive Funds
      </button>
    </div>
  )
}
```

## 戻り値の型：`UseTransferFundsModalReturnType`

このフックは以下のプロパティを持つオブジェクトを返します。

```tsx theme={null}
type UseTransferFundsModalReturnType = {
  openTransferFundsModal: (settings: TransferFundsSettings) => void
  closeTransferFundsModal: () => void
  transferFundsSettings: TransferFundsSettings | null
}
```

### プロパティ

#### openTransferFundsModal

`(settings: TransferFundsSettings) => void`

```tsx theme={null}
interface TransferFundsSettings {
  walletAddress: string | Hex
  onClose?: () => void
}
```

指定した設定で送金モーダルを開く関数です。

**パラメータ：**

| パラメータ      | 型                       | 説明              |
| ---------- | ----------------------- | --------------- |
| `settings` | `TransferFundsSettings` | 送金モーダルの設定オブジェクト |

#### closeTransferFundsModal

`() => void`

送金モーダルを閉じる関数です。

#### transferFundsSettings

`TransferFundsSettings | null`

```tsx theme={null}
    interface TransferFundsSettings {
        walletAddress: string | Hex
        onClose?: () => void
    }
```

送金モーダルの現在の設定。モーダルが閉じている場合は`null`になります。
