Skip to content

About

An address book for resolving blockchain addresses to labels in scanner websites

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

Chain Address Book

A browser extension (Chrome + Firefox, Manifest V3) that finds blockchain addresses on block explorers and labels them from your own address book:

9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM  →  9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM (Tom's Wallet)

Recognized (addresses and transactions alike can be labelled):

Chain Addresses Transactions
EVM (Ethereum + L2s) 0x + 40 hex 0x + 64 hex
Solana base58, decodes to 32 bytes base58 signature, decodes to 64 bytes
Bitcoin legacy 1… / 3… (Base58Check verified), bc1q… / bc1p… (bech32/bech32m verified) 64 hex

Values shown truncated are still recognized when their link has the full one (etherscan's /address/0x…, solscan's /tx/…, mempool.space's /address/bc1…, …).

Sites enabled by default: the Etherscan family (Ethereum, OP, Base, Arbitrum, Polygon, Linea, Scroll, Blast, Mantle, Taiko, Unichain, World Chain, Abstract, Berachain, Sonic, BNB, Gnosis, Celo), Snowtrace/Routescan, Blockscout, zkSync, Zora, Mode, Ink, Ethplorer; Solana Explorer, Solscan, Solana FM, Solana Beach; mempool.space, Blockstream, BlockCypher, btcscan, blockchain.com; Blockchair and OKLink. To add one, add it to both content_scripts.matches and web_accessible_resources.matches in manifest.json.

Using it

Every recognized value gets a faint tag icon (or its label, once it has one). Click either to add, edit or delete the label right on the page. The toolbar popup lists the whole book and can also add, edit (click an entry) or delete. Import accepts either the JSON export or pasted lines such as:

# comments are ignored
0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045  Vitalik
Tom's Wallet: 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM

Export copies or downloads:

{ "version": 1, "entries": [{ "chain": "evm", "address": "0x…", "label": "Vitalik", "note": "optional" }] }

Importing merges into the existing book; matching addresses take the imported label. File import opens the page in a tab, because Firefox closes popups when a file picker opens.

Layout

File Purpose
src/detect.js Address / tx recognition (pure, node-testable)
src/encoding.js base58, SHA-256, bech32 checksums (pure)
src/addressbook.js Parse / serialize / merge the book (pure, node-testable)
src/storage.js storage.local persistence and change events
src/defaults.js Entries shipped with the extension, added once per user (deleting one is permanent)
src/content.js Walks explorer pages, inserts labels / tag icons and the inline editor
popup/ Toolbar popup, also used as the options page
test/ node:test suite: npm test
playground/ Fake explorer page with an API shim: npm run serve, then open http://localhost:8000/playground/

Development

Chrome: chrome://extensions → Developer mode → Load unpacked → this folder. Click ↻ on the card after edits and reload the explorer tab. Chrome warns about browser_specific_settings and gecko_android; both are Firefox-only and harmless.

Firefox: about:debugging#/runtime/this-firefox → Load Temporary Add-on… → manifest.json, or npm run run:firefox for an auto-reloading instance. If nothing happens on a site, grant the add-on access from the extensions (puzzle) menu.

Tests: npm test (or node --test --watch "test/*.test.js").

Known limitations

  • An address split across elements (0xabc<b>def…</b>) isn't detected.
  • Bitcoin is mainnet only (no tb1… / testnet addresses).
  • A bare 64-hex value is treated as a Bitcoin txid wherever it appears.
  • The whole page is rescanned (throttled to 250 ms) on DOM changes, which is simple and fast enough for explorer pages.

Publishing

npm run package → web-ext-artifacts/chain_address_book-<version>.zip, which is accepted by both stores. Bump version in manifest.json for every upload.

Firefox AMO (free): npm run lint:firefox reports 0 errors and 3 warnings, all about the dynamic import()s in content.js (needed because content scripts can't be ES modules). The imported paths are fixed extension URLs, so explain that in the reviewer notes if asked. The gecko.id must never change after the first upload. data_collection_permissions is declared as none.

Chrome Web Store ($5 one-time): in Privacy practices, state the single purpose, justify storage and the host permissions (explorer sites only, to annotate addresses), and declare no data collection. You also need a 1280×800 screenshot, and you should replace the placeholder icons in icons/.

About

An address book for resolving blockchain addresses to labels in scanner websites

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages