Create apps/backend/src/routes/treasury.ts with authenticated endpoints: POST /treasury/propose, POST /treasury/proposals/:id/approve, POST /treasury/proposals/:id/reject, POST /treasury/proposals/:id/execute, GET /treasury/proposals?conversationId=, GET /treasury/proposals/:id. Each mutating endpoint calls the corresponding on-chain contract function via Stellar SDK and syncs the DB. Mount under /treasury.
Acceptance criteria:
- All routes return
403 for non-members
POST /treasury/propose returns { id, onChainId, status: 'pending' }
- DB row status stays in sync with on-chain status
Create
apps/backend/src/routes/treasury.tswith authenticated endpoints:POST /treasury/propose,POST /treasury/proposals/:id/approve,POST /treasury/proposals/:id/reject,POST /treasury/proposals/:id/execute,GET /treasury/proposals?conversationId=,GET /treasury/proposals/:id. Each mutating endpoint calls the corresponding on-chain contract function via Stellar SDK and syncs the DB. Mount under/treasury.Acceptance criteria:
403for non-membersPOST /treasury/proposereturns{ id, onChainId, status: 'pending' }