EIPs
EIP-1102 — Opt-in account exposure
A wallet does not expose its accounts until the dapp explicitly requests them. eth_requestAccounts is that request. The wallet opens a connection prompt, the user picks which account(s) to expose, and the wallet returns them.
import { eth_request_accounts } from "@ethernauta/eip/1102";
const accounts = await eth_request_accounts()(
signer({ chain_id: eip155_1.chain_id }),
);
// → Address[] Surface
| Export | Type | Purpose |
|---|---|---|
eth_request_accounts | Signable<Addresses> | Trigger account exposure flow. |
Difference from eth_accounts
eth_accounts— wallet-state, cached, returns whatever’s currently exposed (possibly empty). No popup.eth_requestAccounts— signable, opens a popup if nothing is exposed yet, returns the new exposure.
Dapps typically call eth_accounts first (silent), and fall back to eth_requestAccounts (interactive) only when nothing is exposed yet:
let accounts = await eth_accounts()(provider.reader({ chain_id: 1 }));
if (accounts.length === 0) {
accounts = await eth_request_accounts()(provider.signer({ chain_id: 1 }));
} What the wallet does
The Ethernauta wallet’s connect view runs on first request. The user picks accounts from their stored vault, the picks get persisted as an EIP-2255 permission, and subsequent eth_accounts calls return immediately from cache.
See also
- EIP-2255 — the permission record that backs the persistent exposure.
- Wallet → connect view — the UI side.