This app runs inside the BotSurf browser. Don't have it yet? Get the app or extension now!

BGWallet.subscribe(cb) // cb({isConnected,address,chainId})

Developer Tools · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — try it free, no account needed.
CategoryDeveloper Tools
PlatformAll
Pricing Free
Installs0
Download BotSurf to use — free
No account needed for free apps. Once BotSurf is open, find this app in Apps from the + menu.

About this app

WHAT IT DOES

This tool detects and monitors wallet state changes on any webpage in real-time. It captures the current wallet connection status (isConnected), the connected account address, the chain ID and network name, and any visible token balance. The panel displays a live status indicator at the top showing whether the wallet is connected or disconnected, the account address (truncated for privacy), the current network name and chain ID, and the detected token balance if available. All wallet state elements on the page are listed with their detected type (status, address, network, balance, account) and content preview. A search filter lets you find specific state elements by type, content, or element selector. You can copy account addresses, chain IDs, network names, or balances to your clipboard with one click. The inspector mode lets you click any wallet state element on the page to see its detected address, chain ID, network name, balance, and connection status in a detailed alert dialog. The tool automatically subscribes to wallet state changes by monitoring DOM mutations and re-scanning for updated state values every 2 seconds, providing near-real-time updates as the wallet state changes. The wallet state persists across page navigation, maintaining your connection context as you browse.

WHERE IT RUNS

The script runs on every website and web application you visit. It works with all blockchain and cryptocurrency sites including dApps, DeFi platforms, NFT marketplaces, exchange interfaces, blockchain explorers, and wallet dashboards. It works regardless of framework—React, Vue, Angular, Svelte, or plain HTML—and captures wallet state elements rendered server-side or client-side.

HOW TO USE

Upon installation, a floating panel appears with the tool interface. The panel shows the current wallet state at the top: a status indicator (green dot for connected, red for disconnected), the account address (truncated with a copy button), the network name and chain ID, and any detected balance. Click "Scan" to manually refresh the wallet state detection. Click "Watch" to start automatic monitoring of wallet state changes (enabled by default). The tool will detect and display wallet state elements from the page and group them by type (status, address, network, balance, account). Use the search box to filter results by type, content, or element selector. Click "Copy Address", "Copy Chain", or "Copy Balance" on any entry to copy that specific value. Click "Inspect" to enter inspector mode, then click any wallet state element on the page to see a detailed report including its detected address, chain ID, network name, balance, and connection status. Click "Inspect" again or press Escape to exit inspector mode.

TECHNICAL MECHANISM: REAL-TIME WALLET STATE SUBSCRIPTION

This tool implements a subscription-based wallet state monitoring system. It scans the DOM for wallet state indicators using a multi-strategy detection approach: address extraction via regex (0x + 40 hex chars), chain ID extraction via pattern matching (chainId: X or network name mapping), balance extraction via token symbol patterns (ETH, BTC, SOL, USDC, etc.), and connection status detection via text analysis ("connected", "disconnected"). The state is synthesized from all detected elements to produce a unified wallet state object (isConnected, address, chainId, networkName, balance). The tool uses a MutationObserver to watch for DOM changes and automatically re-scans when the page updates. A 2-second interval provides continuous polling for state changes that may not trigger DOM mutations. The subscribe() API is exposed globally (BGWallet.subscribe(cb)) allowing other scripts to receive wallet state updates. Each callback receives a state object with isConnected, address, chainId, networkName, and balance.

THE PANEL

The panel is fully draggable and remembers its position per website using GM_setValue. It automatically snaps to the nearest screen edge when released for a clean workspace. Click the collapse button to minimize it to a small floating bubble that takes minimal space. Click the bubble to expand the panel back. The panel can be resized by dragging any edge or corner. Press the Escape key to close the panel temporarily, and click the extension icon to reopen it.

PLEASE NOTE

This script requires the free BotGentz extension to function. As websites frequently update their structure and wallet integration patterns, scripts may need occasional updates to maintain compatibility. All data processing happens locally in your browser—no information about your pages, wallet states, addresses, or browsing habits is ever transmitted or stored externally. The tool accesses page content solely for the purpose of wallet state detection and monitoring, and does not modify or persist any page data. Wallet state detection is heuristic-based and may not work perfectly on all sites; results should be verified against the actual wallet state. This tool is designed for debugging and development purposes only.

Similar Apps

Log in to BotGentz

Suggest an App

Tell us what you'd find useful — if we build it, we'll email you the moment it's ready.