Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces comprehensive support for SEP-6 (Programmatic Deposit and Withdrawal API) to the Stellar .NET SDK. SEP-6 enables non-interactive deposit and withdrawal flows between Stellar assets and external systems (fiat, crypto, etc.), complementing the interactive SEP-24 flow with a programmatic alternative designed for API integration.
Key changes:
- Implements a complete
TransferServerServiceclass with methods for deposit, withdrawal, fee queries, and transaction management - Adds request/response models for all SEP-6 operations including deposit-exchange and withdrawal-exchange (with SEP-38 quote support)
- Introduces custom exception handling for authentication, customer information requirements, and general transfer server errors
- Provides a custom JSON converter to handle special nested structures in anchor transaction responses
Reviewed changes
Copilot reviewed 51 out of 51 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| TransferServerService.cs | Core service implementing all SEP-6 endpoints with HTTP client management, error handling, and domain discovery |
| Response models (18 files) | Complete set of response DTOs for info, deposits, withdrawals, transactions, fees, and customer information |
| Request models (7 files) | Request DTOs for all SEP-6 operations with proper validation and parameter mapping |
| Exception classes (4 files) | Custom exceptions for transfer server errors with detailed context and response encapsulation |
| AnchorTransactionJsonConverter.cs | Custom JSON converter handling nested "transaction" keys in required_info_updates fields |
| JsonOptions.cs | Registration of the new converter in global JSON serialization options |
| Test data (11 JSON files) | Comprehensive test fixtures covering various asset types, error states, and transaction flows |
| TransferServerServiceTest.cs | 20 test methods validating all service operations, error handling, and edge cases |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ff6793b to
2ed24d7
Compare
04868b4 to
604793d
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 57 out of 57 changed files in this pull request and generated 21 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
#8
Auto-generated Summary 🤖
This pull request primarily adds comprehensive SEP-0006 test data files and introduces improvements to the
StellarTomlclass to support cancellation viaCancellationToken. The new test data covers a wide range of SEP-0006 scenarios, including deposit, withdrawal, transaction status, error cases, and fee information, which will help ensure robust testing of SEP-0006 flows. Additionally, theStellarTomlclass now allows async operations to be cancelled, improving resilience and control for consumers of the SDK.SEP-0006 Test Data Additions:
StellarDotnetSdk.Tests/TestData/Sep/Sep0006/to cover scenarios such as authentication required, customer information needed, deposit and withdrawal instructions for various assets, fee responses, transaction and transactions responses, and various error cases. These files will enable more thorough and realistic testing of SEP-0006 flows. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16]StellarToml Class Improvements:
StellarToml.FromDomainAsyncmethod to accept an optionalCancellationToken, allowing callers to cancel the operation if needed. This includes propagating the token to all relevant async operations and handlingOperationCanceledExceptionappropriately. [1] [2] [3]using System.Threading;to support cancellation token usage.Other Minor Improvements:
ResponseHandler.cs(no functional change).Types of changes