THAMER
Sovereign Bitcoin Wallet

WALLET AI BITCOIN

Your Bitcoin Wallet. Your Keys. Your Engine.

Self-hosted Bitcoin software built for developers, applications, and AI agents.

CREATE WALLET

Bitcoin Silent Payments Scanning: Detecting Outputs and Recovering History

permalink THAMER
#bip352#bitcoin#scanning#utxo-discovery#wallet-recovery

Receiving through BIP352 differs from watching a list of ordinary Bitcoin addresses. A recipient does not simply query the chain for every occurrence of a published Silent Payments address: that address is not repeated in the resulting transaction outputs.

What the recipient scans

The receiving wallet uses its scan private key and information derived from eligible transaction inputs to reconstruct candidate shared secrets. It then checks whether any transaction outputs match the keys it expects. Matching outputs can be associated with the wallet and later spent with the corresponding spending key material.

This work can require inspecting transactions and their input-related data across a block range. Ordinary output-script matching alone is insufficient. An implementation may use indexes, precomputed metadata or a trusted scanning service, but each choice changes its privacy and trust properties.

Why this is more demanding than a gap-limit scan

An HD wallet commonly derives an address range and checks whether its scripts appear on-chain. Silent Payments detection instead depends on transaction-specific sender data. There is no universal list of static destination scripts to scan before seeing the transactions.

A compact block filter designed to match known scripts is therefore not, by itself, a complete Silent Payments discovery mechanism. A wallet needs the additional transaction information specified by BIP352. Optimized scanning schemes may reduce bandwidth or computation but must preserve correct detection.

Recovery after losing local state

Suppose a recipient restores its wallet on a new machine. To reconstruct Silent Payments receipts it needs the appropriate scan and spend key material, the correct network and derivation information, and a reliable scan from a sufficiently early point in chain history.

A recovery birthday or known first-use block can reduce the work. If that starting point is too late, the wallet can miss older outputs. A complete backup plan should also account for optional labels and any wallet-specific metadata required to reproduce derived destinations.

A normal seed backup may or may not contain enough information for a particular implementation's Silent Payments derivation. Verify the actual wallet's documented recovery procedure before relying on it.

Confirmed, unconfirmed and reorganized receipts

A scanning wallet must distinguish mempool observations from confirmed outputs. Reorganizations can remove previously confirmed transactions from the active chain, while replacement transactions may change the input set and therefore the derived payment output. Correct scanning and balance logic must reconcile these events rather than assume every detected transaction is final.

Privacy of scanning services

Sending a scan private key to a remote service gives that service sensitive visibility into incoming payments. A locally controlled scanner reduces that exposure but requires more resources. Designs using outsourced hints or indexes need explicit threat-model analysis; they should not be described as automatically private.

Primary references

BIP352 — Silent Payments: https://github.com/bitcoin/bips/blob/master/bip-0352.mediawiki
BIP157 — Client Side Block Filtering: https://github.com/bitcoin/bips/blob/master/bip-0157.mediawiki
BIP158 — Compact Block Filters: https://github.com/bitcoin/bips/blob/master/bip-0158.mediawiki

Questions & Answers

Explore all questions →

Latest from the Lab

THAMER illustrated developer portrait and signature

ABOUT THE DEVELOPER

Independent Software Developer specializing in Bitcoin Script, Golang, and AI Agents.

Software engineering · Independent research · Open-source projects