{"id":"EIP-1193","name":"Ethereum Provider JavaScript API","status":"Final","chain":"both","category":{"id":"onboarding","name":"Onboarding & Access","description":"Getting users into web3 without friction"},"journeyStages":[{"id":"discovery","name":"Discovery & Connection","description":"Finding and connecting wallet to dApp"}],"uxImpact":"Users interact with dApps through a standardized wallet JavaScript API — all wallets expose the same request/response pattern. Design implications: build one connection flow that works with any EIP-1193 wallet, handle standard error codes (4001 for user rejection, 4100 for unauthorized, 4900 for disconnected) with consistent error messaging, listen for accountsChanged and chainChanged events to update UI state automatically. Design decisions: decide whether to show explicit 'connecting' vs 'connected' states, handle network switching prompts gracefully, consider how to surface RPC errors in human-readable form without exposing technical details.","hasDetailedContent":true,"content":{"id":"EIP-1193","summary":"EIP-1193 is the \"Connect Wallet\" standard. It defines how websites talk to browser wallet extensions like MetaMask. Every dApp that shows a connect button uses this — it specifies the window.ethereum object, how to request accounts, and how to send transactions. Without this standard, every wallet would need custom integration code.","applicability":{"whenToUse":["Web apps need a standard Connect Wallet flow with browser extensions.","You listen for accountsChanged and chainChanged to keep UI in sync.","You show truncated addresses or ENS names after connection."],"whenToAvoid":["Mobile-only flows use WalletConnect with no window.ethereum.","Embedded wallets hide provider choice entirely.","You trigger eth_requestAccounts on page load without user action."]},"designerTakeaways":["You can use one Connect Wallet pattern that works across MetaMask-class extensions.","You can react to account and network switches with clear reconnect or warning states.","You can pair EIP-1193 with EIP-6963 so users pick among multiple injected wallets."],"designDecisions":[{"question":"When do you call eth_requestAccounts?","recommendation":"Trigger on explicit Connect Wallet click, not on page load.","rationale":"Surprise wallet popups erode trust and increase rejection rates."},{"question":"How do you map provider errors?","recommendation":"Map 4001, 4100, 4900, and 4901 to consistent, human-readable messages.","rationale":"Raw error codes are meaningless to designers and users alike."},{"question":"What happens on chain change?","recommendation":"Pause actions and prompt reload or auto-refresh contract-dependent state.","rationale":"Stale chain state causes wrong balances and failed transactions."},{"question":"How is the connected account shown?","recommendation":"Truncated address, network name, and a clear disconnect control.","rationale":"Users must always know which identity and chain the app is using."}],"statesToDesign":[{"state":"No provider","trigger":"window.ethereum is missing (no extension).","userNeed":"Install or choose a wallet path.","designResponse":"Explain install steps; link to WalletConnect or mobile if supported."},{"state":"Disconnected","trigger":"User has not approved eth_requestAccounts.","userNeed":"Start the session safely.","designResponse":"Primary Connect Wallet CTA; no gated content that requires guessing."},{"state":"Connected","trigger":"Accounts array non-empty.","userNeed":"See active address and network.","designResponse":"Account chip with network badge and disconnect."},{"state":"User rejected (4001)","trigger":"User closes wallet prompt without approving.","userNeed":"Retry without feeling blocked.","designResponse":"Neutral copy: \"Connection cancelled\" with retry button."},{"state":"Wrong network","trigger":"chainId does not match app requirement.","userNeed":"Switch network or understand mismatch.","designResponse":"Block actions; offer Switch network when wallet supports it."}],"problemsSolved":[{"problem":"No standard way for dApps to communicate with wallets","oldWay":"Each wallet invented their own API, dApps wrote custom code for each","newWay":"Standard window.ethereum interface works with any wallet","impact":"critical"},{"problem":"Users couldn't use their preferred wallet","oldWay":"dApp only supports MetaMask? Too bad for Coinbase Wallet users","newWay":"Any EIP-1193 wallet works with any dApp","impact":"high"},{"problem":"Inconsistent connection experience","oldWay":"Different buttons, flows, and errors for each wallet","newWay":"Standard \"Connect Wallet\" flow everywhere","impact":"high"}],"uxPatterns":[{"name":"Connect Wallet Button","description":"The ubiquitous entry point to web3","mockup":"concept/wallet","userFlow":["User sees Connect Wallet button","Click triggers eth_requestAccounts","Wallet popup asks for permission","User approves connection","dApp receives account address"]},{"name":"Connected State","description":"Show connected wallet with truncated address","mockup":"concept/wallet","userFlow":["User connected successfully","Show truncated address","Display network name","Provide disconnect option"]}],"uiComponents":[{"name":"ConnectWalletButton","description":"Primary CTA for initiating wallet connection","states":["idle","connecting","connected","error"],"props":["onConnect","onDisconnect"]},{"name":"AddressPill","description":"Truncated address with optional ENS","states":["address-only","with-ens","loading"],"props":["address","ensName","onClick"]},{"name":"NetworkBadge","description":"Shows current connected network","states":["mainnet","testnet","unknown","wrong-network"],"props":["chainId","expectedChainId"]}],"antiPatterns":[{"pattern":"Auto-connecting without user action","why":"Privacy violation, users didn't consent to share address","instead":"Always require explicit \"Connect\" click first","severity":"critical"},{"pattern":"Not handling account/chain changes","why":"User switches account in wallet, dApp still shows old one","instead":"Listen to accountsChanged and chainChanged events","severity":"high"},{"pattern":"Showing full 42-character addresses","why":"Unreadable, wastes space, looks intimidating","instead":"Truncate: 0x7a3...f9c2 or show ENS name","severity":"medium"}],"onMonad":[{"aspect":"Provider Interface","ethereum":"window.ethereum is the standard","monad":"Same interface, different chainId","designImplication":"Works identically, just detect Monad chain"}],"keyTakeaways":["EIP-1193 = the \"Connect Wallet\" standard","Never auto-connect without user action","Listen for account and chain change events","Truncate addresses or show ENS names","Handle connection errors gracefully"],"technicalNotes":"EIP-1193 defines a Provider interface with request() method for JSON-RPC calls. Standard methods: eth_requestAccounts (connect), eth_accounts (get connected), eth_chainId (get network). Events: accountsChanged, chainChanged, connect, disconnect. The provider is typically injected as window.ethereum."},"sources":[{"label":"Official specification","url":"https://eips.ethereum.org/EIPS/eip-1193","type":"official-spec"},{"label":"Discussion","url":"https://ethereum-magicians.org/search?q=EIP-1193","type":"discussion"}],"urls":{"canonical":"https://www.eipsfordesigners.com/standards/EIP-1193","markdown":"https://www.eipsfordesigners.com/standards/EIP-1193/content.md","agent":"https://www.eipsfordesigners.com/standards/EIP-1193/agent.md","api":"https://www.eipsfordesigners.com/api/standards/EIP-1193","official":"https://eips.ethereum.org/EIPS/eip-1193","discussion":"https://ethereum-magicians.org/search?q=EIP-1193"},"freshness":{"lastReviewed":"2026-04-05","lastUpdated":"2026-04-05"}}