Description
Implement POST / (create donation, status PENDING) and POST /:id/confirm (verify the Stellar/Soroban transaction and mark CONFIRMED) under /api/v1/donations.
Acceptance Criteria
- Creating a donation requires an active (ACTIVE status) campaign - rejects otherwise.
- txHash is unique; duplicate confirmation attempts with the same hash are rejected.
- Confirmation actually queries the Soroban/Stellar network (testnet acceptable) to verify the transaction exists and matches the claimed amount/currency before marking CONFIRMED.
- On confirmation, the campaign's raisedAmount is incremented atomically (use a DB transaction to avoid race conditions).
- Failed verification sets status to FAILED, not silently ignored.
- Tests cover creation, successful confirmation, mismatched-amount rejection, and duplicate-hash rejection (blockchain calls mocked in tests).
- Documented in openapi.yaml, including the Soroban transaction format per README's "Blockchain formats" section.
Suggested reward: $35-$45
Description
Implement POST / (create donation, status PENDING) and POST /:id/confirm (verify the Stellar/Soroban transaction and mark CONFIRMED) under /api/v1/donations.
Acceptance Criteria
Suggested reward: $35-$45