> For the complete documentation index, see [llms.txt](/llms.txt).

# useWalletServicesPlugin

Hook to access the Wallet Services plugin context. It returns the plugin instance and its connection state. For common actions, prefer the dedicated hooks: [useWalletUI](/embedded-wallets/sdk/react/hooks/useWalletUI/), [useCheckout](/embedded-wallets/sdk/react/hooks/useCheckout/), [useSwap](/embedded-wallets/sdk/react/hooks/useSwap/), [useFunding](/embedded-wallets/sdk/react/hooks/useFunding/), [useReceive](/embedded-wallets/sdk/react/hooks/useReceive/), and [useWalletConnectScanner](/embedded-wallets/sdk/react/hooks/useWalletConnectScanner/).

info

Please note that this hook doesn't work for external wallet logins. It only works for social login embedded wallets.

### Import

```tsx
import { useWalletServicesPlugin } from '@web3auth/modal/react'

```

### Usage

```tsx
import { useWalletServicesPlugin } from '@web3auth/modal/react'

function WalletServicesExample() {
  const { plugin, ready, connecting } = useWalletServicesPlugin()

  return (
    <div>
      <button onClick={() => plugin?.showWalletConnectScanner()} disabled={!ready}>
        Show WalletConnect Scanner
      </button>
      <button onClick={() => plugin?.showCheckout()} disabled={!ready}>
        Show Checkout
      </button>
      <button onClick={() => plugin?.showWalletUi()} disabled={!ready}>
        Show Wallet UI
      </button>
      {connecting && <div>Connecting Wallet Services...</div>}
    </div>
  )
}

```

### Return type

```tsx
import { type IWalletServicesContext } from '@web3auth/modal/react'

```

#### `ready`

`boolean`

Whether the Wallet Services plugin is connected and ready to use.

#### `connecting`

`boolean`

Whether the Wallet Services plugin is currently connecting.

#### `plugin`

`WalletServicesPluginType | null`

The Wallet Services plugin instance, or `null` if it's not available. The plugin exposes `showWalletUi`, `showCheckout`, `showSwap`, `showFunding`, `showReceive`, and `showWalletConnectScanner`. Each method throws if the plugin isn't connected.
