# Connection

### connect

{% tabs %}
{% tab title="window\.fewcha" %}

```typescript
async window.fewcha.connect(): Promise<Response<PublicAccount>>
```

Response

```typescript
{
    "method": "connect",
    "status": 200,
    "data": {
        "address": "0x20364f4121f608f2a09830bc0ab6980fdccff45c2f5df6c41c17f40e511fe80e",
        "publicKey": "0x89a10bded6d812d21299ee129410d53a74f12f91183989c19282fa24ce629b49"
    }
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
Learn more about **Response** and **PublicAccount** type at [response-format-and-types](https://docs.fewcha.app/response-format-and-types "mention")
{% endhint %}

### disconnect

{% tabs %}
{% tab title="window\.fewcha" %}

```typescript
async window.fewcha.disconnect(): Promise<Response<boolean>>
```

Response

```typescript
{
    "method": "disconnect",
    "status": 200,
    "data": true
}
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
Disconnect the current website with the wallet, the website will get status `403`if the website call to legacy methods
{% endhint %}

### isConnected

{% tabs %}
{% tab title="window\.fewcha" %}

```typescript
async window.fewcha.isConnected(): Promise<Response<boolean>>
```

Response

```typescript
{
    "method": "isConnected",
    "status": 200,
    "data": true
}
```

{% endtab %}
{% endtabs %}
