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

# useWallet

> The only hook you need for connection and signing.

The `useWallet` hook is the primary way to interact with a user's account. It abstracts away the differences between various wallet SDKs.

### Usage

```tsx theme={null}
import { useWallet } from "@sorokit/wallet-adapter";

function WalletSection() {
  const { address, isConnected, connect, disconnect } = useWallet();

  if (!isConnected) {
    return <button onClick={() => connect()}>Connect Wallet</button>;
  }

  return (
    <div>
      <p>Connected as: {address}</p>
      <button onClick={() => disconnect()}>Logout</button>
    </div>
  );
}
```

## Properties

| Field             | Type       | Description                                                     |
| ----------------- | ---------- | --------------------------------------------------------------- |
| `address`         | `string`   | The user's public key (`G...`). `undefined` if disconnected.    |
| `isConnected`     | `boolean`  | Helper to quickly check connection status.                      |
| `network`         | `string`   | The network passphrase the wallet is currently using.           |
| `connect`         | `Function` | Triggers the connector's login/modal flow.                      |
| `disconnect`      | `Function` | Clears the session and disconnects the wallet.                  |
| `signTransaction` | `Function` | Headless signing function used internally by `useContractSend`. |
