Skip to content

feat(api): add anchor flows, admin ops routes, and graceful shutdown#249

Open
ikemHood wants to merge 10 commits intoRemitwise-Org:mainfrom
ikemHood:feat/anchor
Open

feat(api): add anchor flows, admin ops routes, and graceful shutdown#249
ikemHood wants to merge 10 commits intoRemitwise-Org:mainfrom
ikemHood:feat/anchor

Conversation

@ikemHood
Copy link
Contributor

Summary

This PR implements three backend tasks for anchor operations, admin/internal support routes, and graceful shutdown behavior.

What’s included

  • Added protected anchor flow endpoints:
    • POST /api/anchor/deposit
    • POST /api/anchor/withdraw
    • Returns 501 when anchor integration is not configured.
  • Added protected admin routes under /api/admin/* with X-Admin-Key / admin cookie auth:
    • POST /api/admin/cache/clear
    • GET /api/admin/users
    • GET /api/admin/audit
  • Added graceful shutdown handling for in-process background jobs:
    • Handles SIGTERM / SIGINT
    • Stops new background work
    • Waits for in-flight jobs with timeout before exit
  • Updated docs/env/openapi for new routes and configuration.

Validation

  • npm run lint
  • npm run test
  • npm run test:integration

Issues to close

Closes #170
Closes #199
Closes #201

@Baskarayelu
Copy link
Contributor

please resolve the conflicts

@Baskarayelu
Copy link
Contributor

@ikemHood Can you please resolve the conflicts?

@ikemHood
Copy link
Contributor Author

@Baskarayelu

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.

Graceful Shutdown for Background Jobs Admin or Internal Routes Deposit and Withdrawal Flow Hooks (Anchor)

2 participants