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 Descriptor Wallets: importdescriptors, Watch-Only Tracking, and Rescans

permalink THAMER
#bitcoin-core#descriptor-wallet#importdescriptors#rescan#watch-only

A descriptor wallet tracks Bitcoin outputs using explicit script descriptions rather than guessing every address format from a key. In Bitcoin Core, descriptor wallets provide a consistent foundation for receive-address generation, change management, and watch-only monitoring. They also make it easier to distinguish public tracking data from private signing authority.

Tracking versus signing

A public descriptor such as wpkh(XPUB/0/*) can describe many receive outputs without exposing private keys. The wallet can watch for those outputs and report balances after relevant chain data is scanned. Spending still requires appropriate private keys or an external signer. A watch-only balance is not proof that the monitoring node can move the coins.

A complete wallet may contain separate active descriptors for external receiving and internal change. The internal flag matters: treating change as external can distort address-management behavior, while omitting it can leave outputs undiscovered after recovery.

Importing descriptors safely

The Bitcoin Core importdescriptors RPC accepts a set of import requests, each with a descriptor and relevant metadata. Ranged descriptors may need a range and next_index; imports may also specify whether they are active or internal. The exact accepted fields and defaults should be checked with bitcoin-cli help importdescriptors on the installed version.

For a watch-only import, avoid supplying private key material to the tracking system. Descriptor checksums help catch input mistakes but do not validate provenance. Before import, compare a few derived addresses with a trusted wallet or offline backup.

Why a rescan matters

An imported descriptor may describe outputs that already received coins years earlier. The node needs to inspect historical blockchain data to identify matching transactions. The import timestamp can determine how far back a scan starts; an inaccurate recent timestamp can miss older activity. A ranged descriptor also needs a sufficient index range to cover actual usage.

On a pruned Bitcoin Core node, older blocks may no longer be locally available for a full historical rescan. Options include an unpruned node, importing with accurate history from another trusted workflow, or reconstructing the wallet's state through a separately validated index. Do not assume that importing a descriptor alone reconstructs every historical transaction.

Operational verification

After import, derive several addresses, verify the network and change branch, inspect wallet information and balances, and test that previously known transactions appear. For a spending wallet, test the signer independently. Keep wallet credentials, descriptors, and RPC authentication protected, and never expose Bitcoin Core RPC publicly.

Primary references

Bitcoin Core descriptors: https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md

Bitcoin Core RPC reference: https://bitcoincore.org/en/doc/

BIP380 — Output Script Descriptors: https://github.com/bitcoin/bips/blob/master/bip-0380.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