Skip to content

URL-scope bundle submission for provider-platform per-PP routes#35

Merged
AquiGorka merged 3 commits into
mainfrom
feat-provider-dashboard-rework
May 28, 2026
Merged

URL-scope bundle submission for provider-platform per-PP routes#35
AquiGorka merged 3 commits into
mainfrom
feat-provider-dashboard-rework

Conversation

@AquiGorka
Copy link
Copy Markdown
Contributor

Summary

provider-platform moved its bundle submission endpoint from POST /api/v1/bundle to POST /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_pps carries public_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

  • deno fmt --check
  • deno lint
  • deno task test:unit (21 passed)
  • deno task test:integration (25 passed)
  • Local ./test.sh pos-instant against this branch — payment completed, merchant received funds, OTEL passed

AquiGorka added 3 commits May 28, 2026 16:02
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.
@AquiGorka AquiGorka merged commit f0d0c13 into main May 28, 2026
7 checks passed
@AquiGorka AquiGorka deleted the feat-provider-dashboard-rework branch May 28, 2026 19:28
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant