Skip to content

M3: send/receive (real BTC sends, ML pipeline, tracking) - #5

Open
erubboli wants to merge 20 commits into
feat/m2-chain-datafrom
feat/m3-send-receive
Open

erubboli wants to merge 20 commits into
feat/m2-chain-datafrom
feat/m3-send-receive

Conversation

@erubboli

Copy link
Copy Markdown
Member

Summary

Milestone M3 (send/receive): the wallet moves money.

  • BTC send end-to-end real: multi-address UTXO selection with per-input origin signing (scure P2WPKH, BIP84 vectors), change rotated to branch-1, confirmed-only inputs (own-change exception documented), send mutex (typed busy), fee pinning to the reviewed rate, broadcast txid verified against the locally computed id
  • ML send: planner + signer over the bindings interface; flow honest per state (broadcast endpoint off vs native signing pending device build) — production ML sends land when A1/A2 + device builds arrive
  • Broadcast: gap-3 provider, config-gated real routes, mock broadcaster demo-labelled in mock mode; post-broadcast storage failures surface as success-with-warning
  • 3-step send UI on real builders: per-chain address validation (wrong-network, mixed-case, taproot rejection), exact BigInt totals, per-chain fee ETA, pending/confirmed tracking with per-entry confirmation targets, fresh-address rotation after send, origin walk driven by persisted counters (failed sends release change)
  • Clipboard hygiene (60s wipe, latest-wins), a11y pass on send states, e2e harness riding the real service seam
  • Gate: OCR + security + DRY + UX + mobile/i18n audits across 4 cycles, 0 critical / 0 medium at close

Known follow-ups (tracked)

  • ML signing needs the native call-through + a build machine (EAS/Mac mini); A1 (public submission endpoint) and A2 (testnet URL) block live ML/testnet sends
  • Change-index release on uncertain broadcast outcomes is privacy-level address reuse (documented low)
  • ScanSheet/expo-camera deferred (D15)

Fixture BTC quotes scale by float division and land in e-notation, which crashes decimalsToAtoms at Review; rebuild both schedules on atom integers with a quoteBtc shape gate. Split the ML step-0 honest states: broadcast endpoint missing reads mlBroadcastOff, device-pending signing (bindings seam) surfaces mlPending with the first quote failure. Re-quote failure on step 1 renders the error with a retry and the preparing copy only while in flight; the rate row uses the rateLabel key. TxTracker stops once confirmations meet the per-entry target instead of polling confirmed txs for 30 minutes.
Demo success replaces the explorer link with the demoTx note; the review auth callout states the factual on-device signing instead of promising a biometric prompt that never runs. Internal rejected details stay diagnostics-only and map to the generic copy; wrongNetwork names the network in plain words. The review amount scales to fit and the step-0 amount input may shrink, so long values hold at 360. Error callouts announce as alerts, fee tiles expose role and selected state with a combined label, token sends label the ML-paid fee and the fee-excluded total, a stalled tracker discloses itself, and the timeout copy stops inviting a blind retry.
BtcTxBuilder reads rate and fallback from the buildUnsigned result instead of instance fields as a hidden return channel; MlChainReader trims the tip route the builder never calls; SendScreen hoists the etaKey helper; the account context gains a requireIndexer type guard so callers stop re-checking null; transport.ts owns one assertTxHex contract used at both broadcast boundaries; the clipboard scrub lives in one helper shared by ReceiveScreen and ImportPhrase.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant