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

# connectAccount

Connect account for signing transactions. Accepts either a private key or wallet provider (EIP-1193). Automatically performs SIWE authentication.

## Signature

```typescript theme={null}
connectAccount(account: string | any, chainId?: SupportedChainId): Promise<Address>
```

## Parameters

| Parameter | Type               | Required | Description                            |                                              |
| --------- | ------------------ | -------- | -------------------------------------- | -------------------------------------------- |
| `account` | `string`           | `any`    | ✅                                      | Private key string or wallet provider object |
| `chainId` | `SupportedChainId` | ❌        | Target chain ID (default: 8453 - Base) |                                              |

## Returns

The connected EOA address

## Return Type

```typescript theme={null}
type Address = `0x${string}`;
```

## Example

```typescript theme={null}
// With private key
const address = await sdk.connectAccount('0x...');

// With wallet provider (e.g., from wagmi, web3-react)
const provider = await connector.getProvider();
const address = await sdk.connectAccount(provider, 8453);
```
