The add, withdraw and swap calls fixed their `(optional uint)` deadline at
prepare time (now + TX_DEADLINE_SECONDS, 120s), and submitWithConfirmation
re-signed that same call on every replace-by-fee bump. The first bump only
fires after TX_CONFIRMATION_TIMEOUT_MS (also 120s), so every replacement
carried an expired deadline and could only be mined as ERR_DEADLINE_PASSED
(err u5009) while paying the higher fee (0.05 -> 0.075 -> 0.1125 -> 0.15 STX).
- Builders record which argument holds the deadline (`deadlineArgIndex`)
- `signAndBroadcast` (v6) and `broadcastLiquidity` (v7) re-stamp it to
sign time + TX_DEADLINE_SECONDS via `withFreshDeadline`, so every broadcast
gets its own full window; calls without a deadline pass through unchanged
- Shared `txDeadline()` replaces the duplicate `deadline()` helpers in
swap.ts and liquidity.ts
Fixing it at sign time covers every path: tick primitives, manual runners
and cash-out. A replaced tx can now mine up to ~8 minutes after the plan
(default 3 bumps); the min-out / min-dlp / active-bin-tolerance bounds from
prepare time still apply.
test/txDeadline.test.ts drives the real submitWithConfirmation loop with only
signing/broadcast stubbed and asserts each of the 4 signed txs carries a
deadline 120s after its own sign time; an old-API version of that test fails
on the previous code. typecheck, build and 230 tests pass.