From 348a57004f94dd0f58c4e70769e65ca7ea3f7619 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 1 Aug 2026 19:38:30 -0700 Subject: Simplify: one Lightning path, one balance, fewer features MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dropped: silent payments (feature, wallet chains, scan worker, indexer config), Boltz submarine/reverse swaps (feature + swap.js + tools), the third-party ark swap bridge (config, client flows, settings card — the ASP's own Lightning send is the one path now), and the Consolidate coins settings action. The NWC pouch is gone with them: background answering now spends the WHOLE ark balance. The IndexedDB record mirrors the real manager state plus the chain-3 keys for its live coins and a change-index window; the worker pays through the ASP exactly like the open app, and the app folds the worker's spends, change, and key allocations back in on connect (additive merge + reconcile against the server). A leftover chain-6 pouch from the short-lived pouch era is swept home automatically using the keys stored in its own record. The stated tradeoff: same-origin script access now reaches the ark balance, not a carve-out — the ark balance is walking-around money, the on-chain wallet's keys are never mirrored, and per-connection NWC budgets remain the enforced ceiling. Bundle: 726KB -> 602KB. Co-Authored-By: Claude Fable 5 --- src/wallet.js | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'src/wallet.js') diff --git a/src/wallet.js b/src/wallet.js index 2417383..015a396 100644 --- a/src/wallet.js +++ b/src/wallet.js @@ -1229,21 +1229,6 @@ export class Wallet { - // Number of unreserved spendable coins (for the consolidate prompt/action). - spendableCoinCount() { - const locked = this.lockedCoinIds(); - return this.utxos.filter((u) => !locked.has(utxoId(u)) && (u.confirmed || u.chain === 1)).length; - } - - // Merge all unreserved spendable coins into one, via a max self-send. Leaves - // the wallet with a single coin so future sends/gifts use one input. - async consolidate(feeRate) { - const rate = Math.max(1, Math.round(feeRate)); - const draft = this.buildTx({ recipients: [{ address: this.freshReceive().address }], feeRate: rate, sendMax: true }); - const hex = this.sign(draft.tx); - await this.broadcast(hex); - return { txid: draft.tx.id, inputs: draft.inputsCount }; - } -- cgit v1.2.3