# 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](/response-format-and-types.md)
{% 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fewcha.app/reference/wallet-methods/connection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
