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

# signAndConnect

Sign and connect to Towns using a Signer and a random delegate wallet every time

## Imports

```ts theme={null}
import { signAndConnect } from '@towns-protocol/react-sdk'
```

## Definition

```ts theme={null}
function signAndConnect(
  signer: ethers.Signer,
  config: Omit<SyncAgentConfig, "context">,
): Promise<SyncAgent>
```

**Source:** [signAndConnect](https://github.com/towns-protocol/towns/blob/main/packages/react-sdk/src/connectTowns.ts)

## Parameters

### signer

* **Type:** `ethers.Signer`

The signer to use

### config

* **Type:** `Omit<SyncAgentConfig, "context">`

The configuration for the sync agent

## Return Type

The sync agent

```ts theme={null}
Promise<SyncAgent>
```
