Skip to content

feat: implement transaction sending endpoint#162

Merged
salazarsebas merged 4 commits intoHarmonia-Development:mainfrom
derianrddev:feat/send-transactions
Oct 5, 2025
Merged

feat: implement transaction sending endpoint#162
salazarsebas merged 4 commits intoHarmonia-Development:mainfrom
derianrddev:feat/send-transactions

Conversation

@derianrddev
Copy link
Contributor

🛠️ Issue

📖 Description

This PR implements transaction sending functionality for the Stellar wallet service. It adds the ability for authenticated users to send native Stellar lumens (XLM) to other accounts through a secure REST API endpoint with comprehensive validation and transaction persistence.

✅ Changes Made

  • New Transaction Endpoint: Added POST /wallet/send endpoint with JWT authentication
  • Database Schema: Added transactions table with foreign key relationships and proper indexing
  • Transaction Validation: Implemented comprehensive validation for amounts, destinations, memos, and asset types
  • Transaction Signing: Integrated secure transaction signing using encrypted private keys
  • Transaction Persistence: Added transaction history tracking with success/failure status
  • Security Enhancements: Added JWT middleware protection and user authorization checks
  • Comprehensive Testing: Added extensive test coverage for database operations and API endpoints
  • Dependencies: Added JWT authentication (jsonwebtoken), rate limiting (express-rate-limit), and logging (winston) capabilities

🖼️ Media (screenshots/videos)

image

- Add TransactionRow type definition
- Implement initializeTransactionsTable with FK constraints and indexes
- Add insertTransaction function for transaction persistence
- Add transaction sending functionality with comprehensive validation
- Integrate Stellar SDK for transaction building and submission
- Add transaction persistence with success/failure tracking
- Test transactions table creation with proper schema validation
- Test transaction insertion with uniqueness constraints
- Test foreign key cascade behavior and multi-transaction scenarios
- Add JWT authentication and authorization tests
- Test transaction validation for amounts, destinations, and memos
- Test Stellar integration and error handling scenarios
Copy link
Contributor

@salazarsebas salazarsebas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@salazarsebas salazarsebas merged commit 8b55808 into Harmonia-Development:main Oct 5, 2025
4 checks passed
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.

Send Stellar Transactions for Wallet Service [wallet - service]

2 participants