aboutsummaryrefslogtreecommitdiffstats
path: root/src/ark
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-01 19:38:30 -0700
committerAdam Soltys <[email protected]>2026-08-01 19:38:30 -0700
commit348a57004f94dd0f58c4e70769e65ca7ea3f7619 (patch)
tree5f8cd2930abd9c1e05bb7c18e0bec239780281ef /src/ark
parent9196f4804851a87c8356418b1c4cade6e87c54ba (diff)
downloadcoinosv3-348a57004f94dd0f58c4e70769e65ca7ea3f7619.tar.gz
coinosv3-348a57004f94dd0f58c4e70769e65ca7ea3f7619.zip
Simplify: one Lightning path, one balance, fewer features
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 <[email protected]>
Diffstat (limited to 'src/ark')
-rw-r--r--src/ark/manager.js26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/ark/manager.js b/src/ark/manager.js
index 2edcd8a..5a797e7 100644
--- a/src/ark/manager.js
+++ b/src/ark/manager.js
@@ -500,32 +500,6 @@ export class ArkManager {
return action.id;
}
- // A send whose recipient is one of the USER's own foreign-branch keys (the
- // NWC pouch): no address, no mailbox delivery — the caller receives the
- // signed recipient vtxo bytes directly and stores them wherever the branch
- // lives. Same cosign machinery as send(), so all its failure handling holds.
- async sendToPubkey(destPubkeyHex, amountSat) {
- const input = this._selectInput(amountSat);
- const changeSat = input.amountSat - amountSat;
- const action = {
- id: `send-${Date.now()}`, type: 'send', step: 'created',
- inputId: input.id, amountSat, destAddress: null,
- destPubkey: destPubkeyHex, destBlindedId: null,
- changeIndex: changeSat > 0 ? this.state.nextKeyIndex++ : null, changeSat,
- };
- input.state = 'pending';
- this.state.actions.push(action);
- this._save();
- await this._driveSend(action);
- if (action.step !== 'done') throw new Error(action.error || 'send did not complete');
- return {
- vtxos: (action.destBytesList || []).map((b) => {
- const v = decodeVtxo(hex.decode(b));
- return { id: v.id, bytes: b, amountSat: v.amountSat, expiryHeight: v.expiryHeight };
- }),
- };
- }
-
_sendOutputs(action) {
const outputs = [{ amountSat: action.amountSat, userPubkey: hex.decode(action.destPubkey) }];
if (action.changeSat > 0) {