seed-scan
A command for somebody who holds a mnemonic and does not know what it is: which scheme it follows, which addresses it gave, which coins those addresses held, and whether a fork concerns them. It finds funds; the user's own wallet moves them.
What is here
seed-scan identify, seed-scan scan, seed-scan forks and
seed-scan report are the first commands.
btclib-org/.github#2203
records the design. The command is to stay thin: what is general goes
down to the packages it is to build on,
bip39-slip39,
bip32-descriptors,
btclib-wallet and
coin-addresses. A
scheme or a coin they do not cover is to be reported as not checked,
never passed over: the costly failure is a wrong "nothing found".
Installing
The package installs the seed-scan command. pip installs it in the
active virtual environment:
pip install seed-scan
uv installs it in an environment of its own:
uv tool install seed-scan
Both need a Python that requires-python in
pyproject.toml
allows.
Identifying a mnemonic
seed-scan identify > bundle.json
It asks for the mnemonic, then for passphrases until an empty one, at
hidden prompts, and for further shares where the words are one
SLIP-0039 share. It writes the bundle to standard output and what it
found to standard error. Where you know an address the mnemonic gave,
--address followed by it has the command search for the address's
path. seed_scan.bundle documents the bundle, and
seed-scan identify --help the bounds of what it writes and searches.
Scanning a bundle
seed-scan scan bundle.json --server electrum.example.org:50002 \
--node http://127.0.0.1:8545 > scan.json
It asks the Electrum server named, as host:port, which Bitcoin
accounts of the bundle were used, and the EVM node named, by its URL,
which of its accounts were on the chain the node serves, and writes the
scan result to standard output and what it found to standard error.
Name either or both. Each learns every address it is asked about, so
name your own: there is no default.
The Electrum connection is TLS, and the server's certificate is
verified against the system's CA certificates, or against those of the
file --cafile names, which is how a server with a self-signed
certificate is reached.
The connection is kept from one request to the next, and replaced by a
new one, with a new handshake, where btclib-wallet's
PersistentTlsLineTransport says it is: after a failed request, or a
connection the server closed, among others. The command closes the one
open when it ends.
--tcp asks a server on your own machine over plain TCP instead. Its
host must resolve to loopback addresses alone, 127.0.0.0/8 or ::1,
and any other is refused. The connection is not encrypted or
authenticated: SECURITY.md's Limitations, not vulnerabilities says
what that exposes.
Before any address is asked, the server's genesis block and its block at a height Bitcoin Core pins are compared with Bitcoin's, and each history it answers is then proved on that block. SECURITY.md's Limitations, not vulnerabilities says which servers that refuses, what the proof holds, and what the server is still trusted for.
The node is an execution client's JSON-RPC, at an https URL, or an
http one on a loopback address such as http://127.0.0.1:8545.
--cafile is the Electrum server's alone: seed_scan.evm says what the
node's certificate is verified against. An address is used where it
holds the chain's native asset, has a nonce or holds one of the ERC-20
tokens seed_scan.evm lists for the chain, a few stablecoins and
wrapped assets. Any other token is not asked: an address with no
native balance, zero nonce and no listed token balance reads as unused,
whatever other tokens it holds. The result and the report list the
tokens checked.
--evm-chain names the chain the node serves, Ethereum where it is not
given; seed-scan scan --help lists the chains. A key gives the same
address on each, so Ethereum's accounts are read on every chain: those
at m/44h/60h/<n>h, the legacy addresses Ledger Live and MyEtherWallet
derive at m/44h/60h/0h/<n>, and those MyEtherWallet derives from a
mnemonic at m/44h/60h/<n>, as far as the keys the bundle holds of
them: the search is cut short where they end before the gap limit. On
Ethereum Classic its own are read too: those at m/44h/61h/<n>h, where
its wallets derive, and the legacy ones at m/44h/60h/160720h/0h/<n>.
On BNB Smart Chain, BNB's are read too: those at m/44h/714h/<n>h,
where Trust Wallet's "Smart Chain Legacy" derives, and the one address
of its "Stable Account", at m/44h/60h/9172h/3604/9999. Before any
address is asked, the node's chain id is compared with the chain's.
SECURITY.md's Limitations, not vulnerabilities says which nodes that
refuses, and what it does not prove.
A coin with no server or node named, every coin but Bitcoin and those
an EVM chain reads, and the accounts of a coin one chain alone reads on
any other chain, are listed as not checked. seed_scan.scan documents
the result, seed_scan.evm the node's requests, and
seed-scan scan --help the bounds of the search.
Reading a fork of Bitcoin
seed-scan forks bundle.json --chain bitcoin-cash \
--server bch.example.org:50002 > forks.json
Coins a key held on Bitcoin when a chain forked from it are on that
chain too, at the same script, and the chain's own wallets may have used
the key since. forks asks the Electrum server named, which serves the
chain named, which of the bundle's accounts were used there, and writes
the forks result to standard output and what it found to standard
error. seed-scan forks --help lists the chains it reads. How it reads
an output that also holds tokens, on each chain, is in seed_scan.forks.
The server is the user's own, reached as Scanning a bundle says, over
TLS or, with --tcp, over loopback. Before any address is asked, its
blocks at the chain's checkpoints are compared with the chain's, so that
a server of a chain whose blocks differ there, as one of Bitcoin's, is
refused. Each history it answers is then proved on the chain's last
checkpoint, under the chain's own difficulty rule, as for scan.
SECURITY.md's Limitations, not vulnerabilities says what the proof
holds, and what the server is still trusted for.
seed_scan.forks documents the result and which accounts are read, and
seed-scan forks --help the bounds of the search.
Reporting what was found
seed-scan report bundle.json --scan scan.json --forks forks.json > report.txt
It reads the bundle and the scan result made from it, offline, and
writes what they say to standard output: for each reading, coin and
purpose, the used accounts and each of their used addresses, with its
balance and path, and what was not checked and why. Without --scan,
as after a server or a node failed, scan's lines list every account as
not checked. Each --forks names a forks result made from the bundle,
one per chain, with or without --scan, and the report lists what it
read the same way, each used account with its balance at the fork too.
A result made from another bundle is refused. The last line is the
SHA-256 of the lines above it. seed_scan.report documents the layout.
What touches the secret
The commands are to keep to this split, so that the mnemonic stays on one machine and everything after it reads public data:
identifytouches the secret and no network. It reads the mnemonic from a prompt, never from an argument. It tries each scheme, language and candidate passphrase, and, given an address the user knows, finds the reading and the path that give it. It writes a public bundle: the fingerprint and the account public keys, and, for MyEtherWallet's layout, the public keys of its first addresses.scanandforkstouch the network and no secret. They read the bundle and what the commands before them wrote, and the CA certificates they verify their server against, andscanits node: the system's or, for a server, those of the file the user names; nothing else. Scanning a bundle and Reading a fork of Bitcoin say which server and which node each asks.forksreads the bundle's accounts on a chain forked from Bitcoin, and takes what each held at the fork from the history the chain's server answers.reporttouches neither. It assembles whatscanandforksfound: what was searched, what was found, the limits of the search, and the digest of the report.
The bundle holds no secret, but it is not harmless: an account public key gives every address of that account, so whoever holds the bundle can follow its history and balance, though not spend from it. The same holds of the report: it holds no secret, but it lets anyone follow the wallet's history.
Nor is the bundle harmless beside one leaked key: by BIP32, an extended
public key and the private key of one of its unhardened children give
the extended private key, so the bundle and the key of a single address
give its account's keys. It holds no key above a hardened account, which
with one leaked key would give every account below it. MyEtherWallet's
addresses of a mnemonic are the children m/44h/60h/<n> of the key
above Ethereum's accounts: the bundle holds the public key of each, for
n below identify --keys, and not that key, so the key of one of them
gives that address alone.
The package is fully annotated and ships py.typed. Its refusals are
seed_scan.exceptions's classes: a ValueError or a TypeError,
under one base, SeedScanException.
from seed_scan.exceptions import (
SeedScanException,
SeedScanTypeError,
SeedScanValueError,
)
assert issubclass(SeedScanValueError, (SeedScanException, ValueError))
assert issubclass(SeedScanTypeError, (SeedScanException, TypeError))
tests/readme_test.py runs every Python block of this file, so the
example above is the one the suite checks.
Security
SECURITY.md says what the package does to guard the mnemonic and what it cannot, how to report a vulnerability, which versions are supported, and how a published file is traced back to the run that built it.
Contributing
Software development in btclib-org is mainly LLM-driven, but human
beings are welcome too. A contribution must have been read and
understood by the person who submits it.
CONTRIBUTING.md
has the rules.
CONTRIBUTING.md
has the commands each CI job runs, verbatim. uv sync creates the
environment; uv is the only tool that has to be installed.
REVIEWING.md
is what a pull request is answered against.
How the organization decides, and who holds which role, is its GOVERNANCE.md; what it intends to do, and what it deliberately does not, is its ROADMAP.md.
Links
- Source: https://github.com/btclib-org/seed-scan
- Releases: https://github.com/btclib-org/seed-scan/releases
- CHANGELOG.md, and RELEASE_NOTES.md for what a release asks a user to act on
Status
The btclib organization and its projects are actively supported by DGI and CheckSig.
Metadata
Release files for seed-scan 2026.11.17
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| seed_scan-2026.11.17.tar.gz | 783.4 kB | With provenance | Details for seed_scan-2026.11.17.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| seed_scan-2026.11.17-py3-none-any.whl | Python 3 | none | any | Details for seed_scan-2026.11.17-py3-none-any.whl |
Total release size: 875.7 kB
Release files / seed_scan-2026.11.17.tar.gz
| Download URL | seed_scan-2026.11.17.tar.gz |
|---|---|
| Size | 783.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c9e89705dc3a5906a58e7e6719f5b92682bec8dd28f06b1773d85e92710a198a
|
|
BLAKE2b-256 checksum How to use checksums |
103c1587e315e0c9def4e85c0f9dc614454d68cb1ee96a3b0ee1237bdc02e2f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logRelease files / seed_scan-2026.11.17-py3-none-any.whl
| Download URL | seed_scan-2026.11.17-py3-none-any.whl |
|---|---|
| Size | 92.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4e6bb43df8967013c92aa1ab7dd644174df1e595481bd5a7268402c9e6e50fb7
|
|
BLAKE2b-256 checksum How to use checksums |
66ab30ace9692a36875f246c2e39a4bd00dabcd47c27908927eeff2a397905f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logSecurity for seed-scan 2026.11.17
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for seed_scan-2026.11.17.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.