Skip to content

chore: rename the service to Chronik Wallet Service (CWS) with a /bws/api alias - #9

Merged
nghiacc merged 2 commits into
mainfrom
chore/rename-cws
Sep 17, 2026
Merged

nghiacc merged 2 commits into
mainfrom
chore/rename-cws

Conversation

@nghiacc

@nghiacc nghiacc commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Renames the service to Chronik Wallet Service (CWS) while keeping the BWS-compatible API contract intact. The engine is Chronik (chain data) + Postgres/Hono (coordination); bitcore only remains in the legacy client key path and as the migration oracle.

API

  • Routes are mounted at /cws/api and /bws/api from the same Hono app (config.basePath + config.legacyBasePath); auth middleware strips either prefix.
  • Startup logs report both base paths.
  • bws-utils.tswallet-id.ts (formatWalletId); web bwsFetchapiFetch.

Web

  • VITE_API_URL is preferred, VITE_BWS_URL still honored, default is /cws/api; dev proxy forwards both prefixes.
  • Settings shows "Wallet server" and the resolved URL; restore copy no longer says "BWS".
  • The LAN web server proxies both /cws and /bws; lan-deploy.sh health-checks /cws/api.

Docs / config

  • README explains CWS vs BWS-compatible and updates the quick-start URL; .cursor/environment.json, .env.example updated; migration plan records the decision as D7.
  • Legacy references intentionally unchanged: the old bitcore BWS, LEGACY_MONGO_DB=bws, migration docs and fixtures.

Verification (deployed LAN build)

  • /cws/api/health and /bws/api/health: 200; web root and both proxied prefixes: 200
  • Staging E2E against /cws/api: 42/42 checks passed
  • Signed requests through the legacy alias (/bws/api): balance 200, getWallet 200 — alias auth verified
  • pnpm -r type-check, pnpm -r test (42 wallet-core + 27 API), web production build

DXC Development added 2 commits September 17, 2026 20:22
…/api alias

The service is now CWS while its API surface stays BWS-compatible: routes are mounted at /cws/api and /bws/api (same Hono app, middleware strips either prefix), the web client resolves VITE_API_URL then VITE_BWS_URL and defaults to /cws/api, the dev proxy and LAN web server forward both prefixes, and the deploy health check uses /cws/api. Naming updated in README (with a CWS vs BWS-compatible note), .cursor environment, API logs, Settings page and restore copy; bws-utils.ts renamed to wallet-id.ts and bwsFetch to apiFetch. Legacy references (the old bitcore BWS, LEGACY_MONGO_DB=bws, migration docs) intentionally unchanged, and D7 records the decision in the migration plan.
@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 11 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 1dbdbb49-3a69-4277-968b-06983cd6ac2f

📥 Commits

Reviewing files that changed from the base of the PR and between 9467ab1 and b0fa06f.

📒 Files selected for processing (19)
  • .cursor/environment.json
  • .env.example
  • README.md
  • apps/abcpay-api/src/config.ts
  • apps/abcpay-api/src/index.ts
  • apps/abcpay-api/src/lib/wallet-id.ts
  • apps/abcpay-api/src/middleware/auth.ts
  • apps/abcpay-api/src/routes.ts
  • apps/abcpay-api/src/scripts/staging-e2e.ts
  • apps/abcpay-api/src/services/wallet.service.ts
  • apps/abcpay-web/src/lib/api.ts
  • apps/abcpay-web/src/pages/RestorePage.tsx
  • apps/abcpay-web/src/pages/SettingsPage.tsx
  • apps/abcpay-web/src/vite-env.d.ts
  • apps/abcpay-web/vite.config.ts
  • docs/migration/v1-to-v2-migration-plan.md
  • packages/abcpay-wallet-core/src/__tests__/crypto.test.ts
  • scripts/lan-deploy.sh
  • scripts/lan-web-server.js

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nghiacc
nghiacc merged commit 0d77ac4 into main Sep 17, 2026
2 checks passed
@nghiacc
nghiacc deleted the chore/rename-cws branch September 17, 2026 13:28
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