Replace the hand-rolled INI parser in read_bitcoin_conf_credentials
with the rust-ini crate (imported as 'ini'). The function shrinks
from ~35 lines to 6 and we stop maintaining INI parsing semantics
in this repo.
The Bitcoin Core node is the authority on descriptor validity.
Reimplementing descriptor shape/prefix/checksum checks here creates
a divergence risk with the node's own validator and adds maintenance
surface for no real safety gain. Invalid descriptors now fail at the
node, surfaced through AnalysisError.
- delete api/src/preflight.rs and its module declaration
- drop ValidationError from ApiError (no remaining producers)
- remove the validate() call from the scan handler
- drop the two tests that asserted preflight-specific rejection codes
Replace the inline cookie split with stealth_bitcoincore::read_cookie_file,
which already implements the same parsing with proper error handling.
Removes duplication and keeps the cookie format in one place.
The if-chain and counter pattern is a 5-arm tuple match in disguise.
Pattern match on (descriptor, descriptors, utxos) directly: every
valid case picks exactly one variant, the empty tuple is a clear
missing-input error, and the wildcard catches mutual-exclusion
violations.
Browser-based frontends need CORS to call the API. Apply
tower_http::cors::CorsLayer::permissive() at the router level so
the frontend (and other origins during development) can reach the
scan endpoint.