Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,3 @@ BUNDLE_MAX_OPERATIONS=20

# WAITLIST (optional)
# DISCORD_WEBHOOK_URL= # fired (best-effort) on POST /api/v1/waitlist

# Internal: forces /pay/demo/simulate-kyc open on non-local NETWORKs. Self-hosters: leave unset.
# PAY_DEMO_ENABLED=true
11 changes: 0 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,6 @@ for these in the app code. Enable by setting `OTEL_DENO=true`.
| --------------------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------- |
| `DISCORD_WEBHOOK_URL` | no | unset | Discord webhook fired (best-effort, non-blocking) when a wallet posts to `POST /api/v1/waitlist`. Unset = no notification. |

### Internal (do not set as a self-hoster)

`PAY_DEMO_ENABLED` opens `POST /api/v1/pay/demo/simulate-kyc` on non-local
`NETWORK`s. Self-hosters should leave it unset; it exists only for internal
testnet/dev environments.

## Initial setup

This walks the platform through "fresh deploy" to "operator can submit bundles
Expand Down Expand Up @@ -394,11 +388,6 @@ OTEL OTLP exporter is opt-in via `OTEL_DENO=true`. Point
exists). There is no operator approval step. Operators uncomfortable with this
should not run this platform.

- **`/api/v1/pay/demo/*` is internal.** The demo simulate-KYC endpoint is
registered only when `NETWORK=local` or `NETWORK=standalone`. Self-hosters
should not set `PAY_DEMO_ENABLED=true`; the variable exists for our
testnet/dev environments and is not a supported operator surface.

- **Legacy `/api/v1/dashboard/...` per-PP paths return 410 Gone** with the new
URL-scoped equivalent in the body. They are a temporary migration aid and will
be removed once metrics confirm zero traffic. See
Expand Down
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@moonlight-protocol/provider-platform",
"version": "0.7.3",
"version": "0.7.4",
"license": "MIT",
"exports": "./src/main.ts",
"tasks": {
Expand Down
71 changes: 0 additions & 71 deletions src/http/v1/pay/demo/simulate-kyc.ts

This file was deleted.

20 changes: 0 additions & 20 deletions src/http/v1/pay/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@ import { handleGetCustodialAccount } from "@/http/v1/pay/custodial/account.ts";
import { handlePostCustodialSend } from "@/http/v1/pay/custodial/send.ts";
import { handlePostCustodialLogin } from "@/http/v1/pay/custodial/login.ts";
import { handlePostCustodialRegister } from "@/http/v1/pay/custodial/register.ts";
import { handlePostSimulateKyc } from "@/http/v1/pay/demo/simulate-kyc.ts";
import { handleGetEscrowSummary } from "@/http/v1/pay/escrow/summary.ts";
import { handlePostReport } from "@/http/v1/pay/report/post.ts";
import type { Logger } from "@/utils/logger/index.ts";
import { loadOptionalEnv } from "@/utils/env/loadEnv.ts";

export function buildPayRouter(deps: { log: Logger }): Router {
const log = deps.log.scope("pay.routes");
const payRouter = new Router();

// --- Public auth endpoints (no JWT) ---
Expand Down Expand Up @@ -58,22 +55,5 @@ export function buildPayRouter(deps: { log: Logger }): Router {
);
payRouter.post("/pay/report", jwtMiddleware(deps), handlePostReport(deps));

// --- Demo endpoints (local/standalone only) ---
const networkEnv = loadOptionalEnv("NETWORK") ?? "";
const demoEnabled = loadOptionalEnv("PAY_DEMO_ENABLED") === "true";
if (networkEnv === "local" || networkEnv === "standalone" || demoEnabled) {
log.debug("network", networkEnv);
log.debug("demoEnabled", demoEnabled);
log.event("pay demo routes enabled");
payRouter.post(
"/pay/demo/simulate-kyc",
jwtMiddleware(deps),
handlePostSimulateKyc(deps),
);
} else {
log.debug("network", networkEnv);
log.event("pay demo routes disabled (non-local network)");
}

return payRouter;
}
75 changes: 0 additions & 75 deletions src/http/v1/pay/tests/demo_guard_test.ts

This file was deleted.

Loading
Loading