From 72e407bf6d7d09923d15461be82685017a0887be Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 31 Jul 2026 01:10:13 -0700 Subject: Dust-isolate arkoor outputs; prove lightning E2E on regtest The server rejects an arkoor mixing dust and non-dust outputs, which broke small Lightning payments (a 45-sat HTLC next to change) and tiny plain sends. Mirror bark's isolation: dust outputs route through a combined isolation output spent by a fanout tx, splitting a non-dust output to pad the dust below-threshold. Outputs can therefore split across two vtxos, so the manager now classifies results by policy instead of index (legacy single-field actions still resume). Regtest now runs the full stack: dedicated cln-ark node (secondark/cln-hold, hold plugin + xpay) wired into captaind with a channel to the coinos dev clc node. tools/ark/ln-e2e-test.js proves pay (5000 sat and a 25-sat dust zap), hold-invoice receive with claim, and spending the claimed vtxos. Co-Authored-By: Claude Fable 5 --- src/features/ark.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/features') diff --git a/src/features/ark.js b/src/features/ark.js index 9b057b1..03041a2 100644 --- a/src/features/ark.js +++ b/src/features/ark.js @@ -722,7 +722,7 @@ export function arkFeature(ctx) { const actionId = await mgr.send(z.address, sats); const action = mgr.state.actions.find((a) => a.id === actionId); if (!action || action.step === 'failed') throw new Error(action?.error || t('claimFailed')); - const vtxoId = decodeVtxo(hex.decode(action.destBytes)).id; + const vtxoId = decodeVtxo(hex.decode((action.destBytesList || [action.destBytes])[0])).id; // the receipt is best-effort: the sats are already delivered via mailbox await wallet.nostrPublish({ kind: ARK_ZAP_KIND, @@ -1425,7 +1425,7 @@ export function arkFeature(ctx) { const actionId = await mgr.send(gm.address(), amountSat); const action = mgr.state.actions.find((a) => a.id === actionId); if (!action || action.step === 'failed') throw new Error(action?.error || t('claimFailed')); - const vtxoId = decodeVtxo(hex.decode(action.destBytes)).id; + const vtxoId = decodeVtxo(hex.decode((action.destBytesList || [action.destBytes])[0])).id; arkGiftRecords().push({ id: vtxoId, amountSat, secretHex, created: Date.now(), revoked: false, claimed: false }); mgr._save(); return { code: encodeArkGiftCode(getNetwork(), amountSat, secret), amount: amountSat }; -- cgit v1.2.3