> ## 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 Aptos Wallet Account Type

# Checking Aptos Wallet Account Type

When working with multiple blockchain types, you may need to check if a wallet account is specifically an Aptos wallet account. The `isAptosWalletAccount` type guard function helps you narrow down the type safely.

## Usage

```javascript theme={"system"}
import { isAptosWalletAccount } from '@dynamic-labs-sdk/aptos';
import { getPrimaryWalletAccount } from '@dynamic-labs-sdk/client';

const walletAccount = getPrimaryWalletAccount();

if (walletAccount && isAptosWalletAccount(walletAccount)) {
  // walletAccount is now typed as AptosWalletAccount
  console.log('Aptos address:', walletAccount.address);
}
```

## Parameters

| Parameter       | Type            | Description                 |
| --------------- | --------------- | --------------------------- |
| `walletAccount` | `WalletAccount` | The wallet account to check |

## Returns

`boolean` - Returns `true` if the wallet account is an Aptos wallet account, `false` otherwise. Also acts as a TypeScript type guard, narrowing the type to `AptosWalletAccount`.

## React

`isAptosWalletAccount` is a synchronous type guard that works the same in React. Use it to filter wallet accounts reactively:

```tsx theme={"system"}
import { isAptosWalletAccount } from '@dynamic-labs-sdk/aptos';
import { useGetWalletAccounts } from '@dynamic-labs-sdk/react-hooks';

function AptosWalletDisplay() {
  const { data: walletAccounts = [] } = useGetWalletAccounts();
  const aptosAccount = walletAccounts.find(isAptosWalletAccount);

  if (!aptosAccount) return <p>No Aptos wallet connected</p>;
  return <p>Aptos address: {aptosAccount.address}</p>;
}
```

## Related functions

* [getAptosClient](/docs/javascript/reference/aptos/get-aptos-client) - Get the Aptos client from a wallet account
