> ## 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 synchronous and works the same way in React. Use it inside callbacks or effects to check a wallet account 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';
import { useRef } from 'react';

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](https://docs.dynamic.xyz/docs/javascript/reference/waas/creating-waas-wallet-accounts.md)
* [Exporting WaaS Private Key](https://docs.dynamic.xyz/docs/javascript/reference/waas/exporting-waas-private-key.md)
* [Importing WaaS Private Key](https://docs.dynamic.xyz/docs/javascript/reference/waas/importing-waas-private-key.md)
* [Checking if WaaS is enabled](https://docs.dynamic.xyz/docs/javascript/reference/waas/checking-if-waas-is-enabled.md)
* [Adding EVM Extensions](https://docs.dynamic.xyz/docs/javascript/reference/evm/adding-evm-extensions.md)
* [Adding Solana Extensions](https://docs.dynamic.xyz/docs/javascript/reference/solana/adding-solana-extensions.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.