# Wallet Connection Architecture

AirdropDesk supports browser-injected EVM wallets and WalletConnect v2 through Reown AppKit. It supports the EIP-1193 provider interface and discovers multiple installed extensions through EIP-6963 where available.

This works for MetaMask, Coinbase Wallet, Binance Wallet, Base Wallet, and OKX Wallet when their browser extension or in-app browser injects an Ethereum provider.

## Why Other dApps Show a QR Code

Desktop-to-mobile QR connection usually uses WalletConnect v2, now commonly integrated through Reown AppKit or the WalletConnect Ethereum Provider.

The QR code contains a WalletConnect session URI. A mobile wallet scans the URI, negotiates an encrypted session through a relay, and returns approved accounts and chains to the dApp. The website never receives a seed phrase or private key.

## Activate QR and Mobile Connections

1. Create a project at <https://dashboard.reown.com>.
2. Add `airdropdesk.com` and `www.airdropdesk.com` as allowed domains.
3. Copy the public Project ID into `wallet-config.js`:

```js
projectId: "YOUR_REOWN_PROJECT_ID",
```

4. Changing only the Project ID does not require rebuilding. When changing the SDK entry file, run `npm install && npm run build`.
5. Deploy `wallet-config.js` and `walletconnect.bundle.js` with the static site.

The AppKit bundle is loaded only after a user selects WalletConnect. It supports QR pairing, mobile deep links, reconnection, account changes, chain changes, and session disconnects on Ethereum, BNB Chain, Arbitrum, and Base.

Reown analytics, social/email login, swaps, and on-ramp features are disabled. Only wallet connection and supported network switching are enabled.
