URL-scope bundle submission for provider-platform per-PP routes#35
Merged
Conversation
provider-platform moved POST /api/v1/bundle to POST /api/v1/providers/:ppPublicKey/bundles so the executor can act on the specific PP that owns the bundle, instead of a default / first-match across the fleet. Pay-platform's instant flows already know which PP they targeted (council_pps row has public_key + url), so swap the URL to the scoped form. Covers both instant-execute and instant-submit.
5 tasks
AquiGorka
added a commit
to Moonlight-Protocol/provider-platform
that referenced
this pull request
May 29, 2026
) ## Summary Three bundled changes for the provider-dashboard work: 1. **`feat(entities)`** — rename `users` → `entities`, add POST /api/v1/entities for KYC/KYB-style approval, gate bundle submission on the submitter's entity being APPROVED (`SUBMITTER_NOT_APPROVED`). 2. **`feat(bundles)`** — bundles submitted to `/api/v1/providers/:ppPublicKey/bundles` instead of channel-only. Each bundle row carries `pp_public_key`. channel-resolver requires explicit PP, returns the PP-bound signer/channel client. `bundle.jurisdiction_from/to` dropped (now derived from the submitter's entity). dashboard `listRecentBundles` is PP-scoped and returns entityName / jurisdictions / aggregated amount. Event emission moves from `emitForChannel` (every PP on the channel) to `emitForBundles` / `emitForPp` so dashboards only see events for bundles that belong to them. 3. **Version bump** to 0.7.0 (minor — new surface area). Migrations: 0014 (rename users→entities), 0015 (drop bundle jurisdictions), 0016 (bundle pp_public_key). ## CI note Cross-repo deadlock with `local-dev` and `pay-platform`: - This PR's e2e + lifecycle CI uses `local-dev@main` which still calls the old `/api/v1/bundle` route — will be red until local-dev's PR (Moonlight-Protocol/local-dev#101) merges. - Pay-platform PR (Moonlight-Protocol/pay-platform#35) also needs to merge to fix the same old-URL call from production payment flow. Locally, with all three branches checked out, `./test.sh all` is green across e2e + otel + governance + lifecycle + pos-instant. ## Test plan - [x] deno fmt --check (288 files) - [x] deno lint (248 files) - [x] deno task test:unit (64 passed) - [x] deno task test:pay (136 passed) - [x] Local `./test.sh all` against local-dev + pay-platform branches — all 5 suites green
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.
Summary
provider-platform moved its bundle submission endpoint from
POST /api/v1/bundletoPOST /api/v1/providers/:ppPublicKey/bundles(the executor now acts on the specific PP that owns the bundle, not a default/first-match across the fleet). Pay-platform was still calling the old path, so every instant payment came back as "provider rejected the bundle" (404).Both instant flows (
instant-execute,instant-submit) already know which PP they targeted —council_ppscarriespublic_key+url. One-line URL swap on each.CI note
Provider-platform main does not yet have the URL-scoped routes; the matching PR is https://github.com/Moonlight-Protocol/provider-platform branch
feat-provider-dashboard-rework. CI here may be red until that lands.Test plan
./test.sh pos-instantagainst this branch — payment completed, merchant received funds, OTEL passed