WO-16 — Offline CLI wallet¶
Branch: wo-16-cli-wallet, based on wo-13-qtl-v2 at f2cb7c3
Status: DONE for review. Owner resolved decision #25 by approving the versioned binary E46QTLW2 app-local wallet format.
Scope: offline/testnet only. No node or network code was added. QTL must never control physical access.
Implemented¶
e46-wallet is built from the existing keys, addresses, transaction, and QTL v2 primitive libraries. It supports:
new WALLET [--show-secret]: makes a 32-byte master seed with OpenSSL’s OS-backed RNG, seals it under the QTL v2 toy profile, writes the wallet file with mode 0600 without overwriting an existing path, prints the external SHAKE fingerprint, warns that QTL is for test data only, and suggests 2–3 verified backup copies.address INDEX --wallet WALLET --fingerprint HEX: unlocks, derives account 0/indexINDEX, and prints a testnette46…address.build WALLET FP SPENT_DESC KEY_INDEX RECIPIENT AMOUNT FEE HEIGHT: builds and signs a single-input, single-owner testnet payment, including change when due. The supplied spent description isprev_txid_hex:output_index:value:type:payload_hex:is_coinbase:creation_height.show TX_HEX [SPENT_DESC]: decodes inputs, outputs and witness summaries, and prints txid, wtxid, sighashes when spent-coin data is supplied, and canonical serialized bytes.unlock WALLET FP [--show-secret]: checks the external fingerprint and password, verifies both puzzle checkpoint sets, and reports success without printing secret material by default.lock WALLET FP NEW_WALLET: unlocks and re-seals to a new file with a new password; it leaves the original file untouched and prints the new external fingerprint.
Passwords are read from hidden terminal input (or stdin in automated tests). Wallet files contain no raw master seed or private key. The explicit --show-secret flag reveals only the master seed. Payment construction requires an externally supplied spent-coin description and current height; without a node, the CLI cannot prove that an outpoint exists or remains unspent.
The wallet uses the versioned binary E46QTLW2 envelope, with the fingerprint kept outside the file and supplied to read/unlock commands. Owner decision #25 approves this as the WO-16 app-local format; matching the Python prototype’s canonical JSON envelope is not required. Any GUI implementation that chooses a different format or needs migration must resolve that separately before implementation.
Verification¶
Release:
wallet_cli_integrationpasses. It creates/unlocks a wallet, checks 0600 permissions and default secret redaction, exercises explicit--show-secret, derives and decodes ate46address, rejects a wrong password in under 1 second (observed about 0.05 s), rejects tampered profile/magic data even after its fingerprint is recomputed, signs a payment accepted bytransaction_cli validate, round-trips through transaction analysis andshow, then re-locks and unlocks the new file.Sanitizer: the same integration test passes under ASan/UBSan.
The WO-13 primitive golden/differential and reproducibility tests pass in both release and sanitizer presets alongside the wallet integration test.
No network calls or additional libraries were introduced.
Resolved decision and limitations¶
Decision #25 is resolved: retain the versioned binary E46QTLW2 envelope as the CLI app-local wallet format, with the fingerprint external. The Python prototype remains canonical JSON; file interoperability between them is not part of WO-16.
This wallet is testnet-only and uses the prototype’s toy QTL profile. Offline transaction building verifies signatures and supplied transaction rules, but cannot validate chain inclusion, UTXO status, current consensus state, or broadcast a payment. It is experimental software for data/testnet use only and never for physical access.