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

# Checking Stellar Wallet Account Type

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

## Usage

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

const walletAccount = getPrimaryWalletAccount();

if (walletAccount && isStellarWalletAccount(walletAccount)) {
  // walletAccount is now typed as StellarWalletAccount
  console.log('Stellar address:', walletAccount.address);
}
```

## Parameters

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

## Returns

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

## React

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

```tsx theme={"system"}
import { isStellarWalletAccount } from '@dynamic-labs-sdk/stellar';
import { useWalletAccounts } from '@dynamic-labs-sdk/react-hooks';

function StellarWalletDisplay() {
  const walletAccounts = useWalletAccounts();
  const stellarAccount = walletAccounts.find(isStellarWalletAccount);

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

## Related functions

* [addStellarExtension](/javascript/reference/stellar/adding-stellar-extension) - Add Stellar support to your client
* [signTransaction](/javascript/reference/stellar/sign-transaction) - Sign a Stellar transaction
