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

# useSolanaAddress

```ts theme={null}
function useSolanaAddress(): {
  solanaAddress: null | string;
};
```

Hook to access the user's primary Solana address.
Returns the first Solana address associated with the user's account.
If the user has no Solana accounts, this will return null.

**Note:** This hook always returns the first account (index 0) as the "primary" address.
If your users may have multiple Solana accounts and need to select between them, use
`useSolanaAccounts()` instead to get all accounts with metadata.

## Returns

```ts theme={null}
{
  solanaAddress: null | string;
}
```

| Name            | Type               |
| --------------- | ------------------ |
| `solanaAddress` | `null` \| `string` |

## Example

```tsx lines theme={null}
function SolanaWalletInfo() {
  const { solanaAddress } = useSolanaAddress();

  if (!solanaAddress) {
    return <p>No Solana wallet connected</p>;
  }

  return (
    <div>
      <h3>Your Solana Wallet</h3>
      <p>Address: {solanaAddress}</p>
    </div>
  );
}
```

## See

useSolanaAccounts for multi-account support
