> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://www.openfort.io/api/mcp` to find what you need.
>
> **Have feedback?** Use `submit_feedback` on the same MCP server.

# eth\_accounts

Returns the Account addresses the user has already connected to the Application.

:::info
`eth_accounts` reads connection state; it does not open the Wallet UI. Use [`eth_requestAccounts`](https://www.openfort.io/docs/products/cross-app-wallet/rpc/eth_requestAccounts) to connect, then `eth_accounts` on later page loads to read the result back.
:::

## Request

```ts
type Request = {
  method: "eth_accounts";
};
```

## Response

Array of connected Account addresses. The array is empty while the Application is not connected, so treat a zero-length result as "not connected yet" rather than an error.

```ts
type Response = `0x${string}`[];
```

A connected Application receives, for example:

```json
["0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef"]
```

## Example

An interactive demo, runnable on this page.

:::warning
To make these instructions concrete, we have created a sample cross-app wallet called **Rapidfire ID**. To interact with it, you can find its SDK in the NPM package directory: [@rapidfire/id](https://www.npmjs.com/package/@rapidfire/id).

You can check out the GitHub [repository for Rapidfire Wallet](https://github.com/openfort-xyz/ecosystem-sample) to learn how to create your own wallet.
:::

```ts
import RapidfireID from "@rapidfire/id";

const rapidfire = new RapidfireID();
const provider = rapidfire.getEthereumProvider();
const accounts = await provider.request({ method: "eth_accounts" }); // [!code focus]
```

### With wagmi

When the wallet is wired up as a [wagmi connector](https://www.openfort.io/docs/products/cross-app-wallet/usage/web-app-wagmi), take the provider from the active connector:

```ts
import { useAccount } from "wagmi";

const { connector } = useAccount();

const provider = await connector.getProvider();
const accounts = await provider.request({ method: "eth_accounts" }); // [!code focus]
```

viem's [`getAddresses`](https://viem.sh/docs/actions/wallet/getAddresses) wraps the same method if you prefer a wallet client over raw `request` calls.

## Common issues

* **Empty array on load.** The Application has not been connected in this session. Run [`eth_requestAccounts`](https://www.openfort.io/docs/products/cross-app-wallet/rpc/eth_requestAccounts) and read the addresses from its response, or from `eth_accounts` afterwards.
* **`4100` Unauthorized.** The provider did not authorize the Application for the method. Connect first; the [RPC overview](https://www.openfort.io/docs/products/cross-app-wallet/rpc#errors) lists the EIP-1193 errors a cross-app wallet returns.
* **Address is not the browser-extension account you expected.** The value belongs to the cross-app wallet the user signed into, and it is the account [`wallet_sendCalls`](https://www.openfort.io/docs/products/cross-app-wallet/rpc/wallet_sendCalls) fills into `from` when you omit that field.

## Related

* [`eth_requestAccounts`](https://www.openfort.io/docs/products/cross-app-wallet/rpc/eth_requestAccounts) — connect the Application and get the addresses back.
* [`personal_sign`](https://www.openfort.io/docs/products/cross-app-wallet/rpc/personal_sign) — the returned address is the `address` parameter when signing.
* [RPC methods overview](https://www.openfort.io/docs/products/cross-app-wallet/rpc) — every method the cross-app wallet provider supports, and the EIP-1193 errors it returns.
