Bitcoin Forum
November 23, 2026, 12:00:48 PM *
News: Latest Bitcoin Core release: 32.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Monitor BTC – open-source watch-only Bitcoin wallet (MIT)  (Read 32 times)
Rael Ales (OP)
Newbie
*
Offline

Activity: 3
Merit: 0


View Profile WWW
November 22, 2026, 04:27:59 PM
 #1

I'm sharing Monitor BTC, an open-source, watch-only Bitcoin wallet that runs on Cloudflare Workers. It shows balance, receive addresses and history from an xpub, without ever handling private keys.

How it works

The user pastes an xpub/zpub/ypub. The server derives the addresses (BIP44, 49, 84 and 86) and reads balance and history from Electrum servers over TLS.
It builds unsigned PSBTs with fee and change calculation, and can accelerate a pending transaction via CPFP.
Signing is done offline in Cofre BTC, a single HTML file that runs in the browser. Before signing, it checks the account, derivation, script, outputs and fee.
Only after signing is the transaction broadcast. The Monitor checks that the inputs belong to the xpub and are finalized.

Design decisions

No database and no storage. The session lives in a Durable Object that discards everything when the last screen closes.
The xpub never appears in logs or URLs.
Cofre has an optional BIP39 passphrase field. Whoever loses that passphrase loses the wallet it defines.

Known limitations

Full rescan on each new session, with a gap limit of 50 addresses.
No monitoring with the page closed.
Mainnet only. No RBF.
The Electrum servers see the scripthashes you query.
No external audit yet. Security reviews are welcome.

Source (MIT): https://github.com/RaelAles/BTC
Live: https://btc.raelales.com

Questions and criticism are welcome. If you find a problem, please open an issue on GitHub.
ABCbits
Legendary
*
Offline

Activity: 3794
Merit: 10514



View Profile
Today at 08:50:06 AM
 #2

With assumption you build it for your personal usage, i have these question. Why don't you just create and use watch-only wallet on Electrum wallet app? Is there any specific feature that doesn't exist or doesn't work well enough on Electrum wallet app?

Rael Ales (OP)
Newbie
*
Offline

Activity: 3
Merit: 0


View Profile WWW
Today at 10:48:02 AM
 #3

Some features I like about it include:

Open-source and free.
No installer required.
No data persistence (no seed, mnemonic, xpriv, xpub, index, or anything else).
Aggregated UTXO lookup, independent of the BIP standard (84, 49, 44, or 86).
No IP exposure to the node (since it routes through a worker, the IP seen by the node is that of CloudFlare).
No xpub exposure (only scripthashes are shared with the node).
No RBF (intentional, to mitigate the risk of transaction reversal in the event of a compromised node—consider the recent case involving Electrum).
Signing is intentionally handled separately and offline (the "cofre-btc" tool acts as the key generator and PSBT signer).

This project was developed for personal use, but I’m sharing it in case it proves useful to others.
For those without easy access to dedicated electronic devices, it takes just five minutes—provided there is an internet connection—to check balances and execute transfers, all without leaving a trace.

All you need is a flash drive running Tails.
"Boot up, create the transaction, download the standalone 'cofre-btc' tool, go offline, sign the PSBT, close 'cofre-btc,' go back online, import the signed PSBT, broadcast the transaction, unplug the flash drive—and that’s it."

The separation of the wallet into two distinct programs is based on a threat model. The connected computer holds only the account’s xpub (BIP84 or BIP86), which allows for the derivation of addresses and balance tracking, but cannot authorize spending. It constructs a PSBT (BIP174)—containing the inputs, outputs, derivation paths, and the account fingerprint—and broadcasts the transaction once it has been signed. The seed and the xprv keys reside in a separate environment—a "BTC Vault" running on an offline instance of Tails. This environment only reads PSBTs (Partially Signed Bitcoin Transactions), verifies each input against the UTXO script, displays the destination, change, and fee, signs the transaction, and returns the file. An attacker who compromises the internet-connected computer might be able to see balances or attempt to initiate a transaction, but they cannot sign it; meanwhile, the offline review process ensures that the user can verify exactly what is being approved. In contrast, with native software that handles everything in a single process, the private keys and the network connection share the same memory space, leaving both vulnerable to system-level malware.

I am not a fan of the "complexity" of Electrum—though it is certainly useful—especially given a recent issue involving two confirmed cases of vulnerabilities where transactions were "sent back" to be re-signed.

I believe that the simpler and more direct a system is, the smaller its attack surface and the more robust it becomes. Consequently, I decided to build something as simple and straightforward as possible.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!