V2 JoinMarket NG tumbler#1232
Draft
m0wer wants to merge 11 commits into
Draft
Conversation
Replace the published @joinmarket-webui/joinmarket-api-ts@0.3.0 (generated from joinmarket-clientserver/docs/api/wallet-rpc.yaml) with a fresh build generated from jm-ng's /openapi.json. The new client is consumed from the m0wer/joinmarket-api-ts#jm-ng fork (see follow-up commit) until the upstream package publishes a jm-ng-compatible release. It pulls in the new tumbler endpoints (tumblerplan, tumblerstart, tumblerstatus, tumblerstop, tumblerplandelete) and removes the legacy /taker/schedule operations.
The jm-ng OpenAPI client emits FastAPI-shaped error types (HttpValidationError)
instead of the legacy ErrorMessage interface, and several response fields are
now optional or nullable that previously were required.
- Drop the explicit ErrorMessage error generic on useQuery / useMutation /
callback annotations; let inference flow from the SDK options or fall back
to unknown for prop signatures.
- Route all error message extraction through getErrorReason(error, fallback)
so the runtime '{message: ...}' shape returned by jm-ng's
daemon_error_handler keeps working without leaking type assumptions.
- Guard the now-optional WalletInfo.accounts and nullable
RescanInfoResponse.progress.
- Coerce the now-mixed string|number values in SessionResponse.offer_list
via String(... ?? '').
- Drop unused non-null assertion on the now-required WalletDisplayBranch.branch.
Sweep is intentionally left untouched here -- the legacy /taker/schedule
operations no longer exist in the SDK and SweepPage is rewritten in the
follow-up commit.
Replace the legacy /taker/schedule integration with the new tumbler plan/start/status/stop/delete flow. The progress UI now consumes TumblerPlanResponse/TumblerPhaseResponse directly: scheduleUtils derives the per-step summary from phase status (pending/running/completed/failed/ cancelled) instead of the legacy 7-tuple state flag, and surfaces broadcast txids from either phase.txid or the multi-tx phase.txids list. SweepPage drives a two-step start (POST /tumbler/plan -> POST /tumbler/start) with force=true so leftover PENDING plans never trap the user, polls /tumbler/status while a coinjoin is in process, and shows a terminal-state alert with a 'clear plan' button (DELETE /tumbler/plan) once the runner reaches completed/failed/cancelled. Changelog: Use jm-ng tumbler API for the Sweep page; show terminal plan state with an option to clear it before starting a new run.
Point the Logs page at jm-ng's in-memory /api/v1/logs endpoint instead of the legacy file-based route. Changelog: Restore the Logs page against jm-ng backends
After lock/unlock the SweepPage rendered a leftover PENDING tumbler plan as if it were live, scheduling fake transactions and offering a Stop button that hit the backend with no running plan. Only render the progress card for running or terminal plans, and surface pending plans with an informational alert so the user can either start or discard them. Also move the insecure regtest parameter payload to jm-ng-native TumbleParameters fields. Changelog: Stop rendering pending sweep plans as live schedules.
On failed plans the progress card showed a success banner alongside the outer terminal-error alert. The running Stop button also stuck around once the plan reached a terminal state, and per-phase rows exposed only the bare state/wait fields while jm-ng already returns kind, mixdepth, amount/fraction, destination, counterparty_count, duration and per-phase errors. Suppress the success banner unless the plan status is completed, hide the Stop button on terminal plans, and render the planned taker / maker / bondless-burst metadata (plus any phase-level error) directly under each transaction row.
Now that the regtest stack runs three maker peers simultaneously (jm_regtest_joinmarket2/3/4 with Satoshi.jmdat) the insecure debug parameters no longer need to force counterparty_count=1; lift them to 2..3 so dev tumbles exercise realistic maker-count logic while staying fast.
Replace the local tarball reference (`file:./tmp/joinmarket-api-ts/...`) with a git URL pointing at the m0wer/joinmarket-api-ts#jm-ng fork. The fork ships a `prepare` script that builds `dist/` on install when absent, so `npm install` works on a clean clone without any out-of-tree checkout. The lockfile pins the fork commit, so installs are reproducible until the upstream package publishes a jm-ng-compatible release.
…ial fork Replace the temporary github:m0wer/joinmarket-api-ts#jm-ng dependency with github:joinmarket-ng/joinmarket-ng-api-ts#master and rename all 40 imports from @joinmarket-webui/joinmarket-api-ts to @joinmarket-ng/joinmarket-ng-api-ts to match the official fork's package name. The new repository publishes the OpenAPI spec to GitHub Pages on every push to master: https://joinmarket-ng.github.io/joinmarket-ng-api-ts/openapi.json https://joinmarket-ng.github.io/joinmarket-ng-api-ts/openapi.yaml https://joinmarket-ng.github.io/joinmarket-ng-api-ts/ (Swagger UI) so consumers (and the schema-fetch script in the SDK repo) can pull the canonical jm-ng spec without needing local access to a running jmwalletd.
…kage commit Refresh package-lock.json after the upstream fork pushed the rename commit (1e7c573) which fixes the package name to match the repository name (@joinmarket-ng/joinmarket-ng-api-ts).
This was referenced Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a continuation of #1166 that adds breaking changes to the jmwalletd API.
The tumbler redesign shares and endpoint for the schedule.
By default the tumbler will fail since the default setting is to not accepted bondless makers with more than 0 fees. Need to find a way to switch that off for testing.