# Wallet auto-connect

### How to implement the wallet auto-connect[​](https://docs.1inch.io/docs/wallet-auto-connect#how-to-implement-the-wallet-auto-connect) <a href="#how-to-implement-the-wallet-auto-connect" id="how-to-implement-the-wallet-auto-connect"></a>

Web3 browser in Vulpe Wallet injects JavaScript code/objects when opening a webpage.

So first it is necessary to find out if the provider has been injected:

```javascript
export function isOneInchWalletProviderInjected(): boolean {
        return Boolean(ethereum?.isOneInchIOSWallet || ethereum?.isOneInchAndroidWallet);
}
```

The next step is to retrieve the net/address, thus it would be classified as a connection.

```javascript
// Retrieving accounts: eth_requestAccounts returns the current one, it gives an array containing single address
const accounts = await ethereum.request({ method: 'eth_requestAccounts' });
```

```javascript
// returns id of the network in hex-format
const currentChain = await ethereum.request({ method: 'eth_chainId' });
```


---

# 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.vulpefi.com/wallet-vulpefi/wallet-auto-connect.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.
