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

# Checking Bitcoin Wallet Account Type

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

## Usage

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

const walletAccount = getPrimaryWalletAccount();

if (walletAccount && isBitcoinWalletAccount(walletAccount)) {
  // walletAccount is now typed as BitcoinWalletAccount
  console.log('Bitcoin address:', walletAccount.address);
}
```

## Parameters

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

## Returns

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

## React

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

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

function BitcoinAddress() {
  const { data: walletAccounts = [] } = useGetWalletAccounts();
  const btcAccount = walletAccounts.find(isBitcoinWalletAccount);

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

## Related functions

* [sendBitcoin](/javascript/reference/bitcoin/send-bitcoin) - Send a Bitcoin transaction
