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

# Checking WaaS Wallet Account Type

Most WaaS-specific methods require you to pass a WaaS WalletAccount object. If you want to check if a certain wallet account is a
WaaS WalletAccount, you can use the `isWaasWalletAccount` helper method to avoid type errors.

```javascript theme={"system"}
import { isWaasWalletAccount } from '@dynamic-labs-sdk/client/waas';

const someAction = async (walletAccount) => {
  if (!isWaasWalletAccount(walletAccount)) {
    throw new Error('This wallet account is not a WaaS wallet account');
  }

  // Do something with WaaS, like export a private key
  // ...
}

```

## React

`isWaasWalletAccount` is a synchronous type guard that works the same way in React. Use it inside callbacks or effects to narrow wallet account types before calling WaaS-specific functions:

```tsx theme={"system"}
import { isWaasWalletAccount } from '@dynamic-labs-sdk/client/waas';
import { exportWaasPrivateKey } from '@dynamic-labs-sdk/client/waas';
import { useGetWalletAccounts } from '@dynamic-labs-sdk/react-hooks';

function ExportButton() {
  const containerRef = useRef(null);
  const { data: walletAccounts = [] } = useGetWalletAccounts();
  const walletAccount = walletAccounts[0];

  const handleExport = async () => {
    if (!walletAccount || !isWaasWalletAccount(walletAccount) || !containerRef.current) return;
    await exportWaasPrivateKey({ walletAccount, displayContainer: containerRef.current });
  };

  return (
    <div>
      <button onClick={handleExport}>Export Key</button>
      <div ref={containerRef} />
    </div>
  );
}
```

## Related functions

* [Creating WaaS Wallet Accounts](/javascript/reference/waas/creating-waas-wallet-accounts)
* [Exporting WaaS Private Key](/javascript/reference/waas/exporting-waas-private-key)
* [Importing WaaS Private Key](/javascript/reference/waas/importing-waas-private-key)
* [Checking if WaaS is enabled](/javascript/reference/waas/checking-if-waas-is-enabled)
* [Adding EVM Extensions](/javascript/reference/evm/adding-evm-extensions)
* [Adding Solana Extensions](/javascript/reference/solana/adding-solana-extensions)
