feat: implement Stellar SEP-24 Interactive Deposit and Withdrawal Protocol Flow (#269) - #306
Merged
Conversation
|
@abdulrahamza is attempting to deploy a commit to the milah's projects Team on Vercel. A member of the Team first needs to authorize it. |
…posit-and-Withdrawal-Protocol-Flow-(Afro-Pay#269)
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements full support for the Stellar SEP-24 Interactive Deposit and Withdrawal Protocol standard in AfroPay-Stellar (#269). It enables AfroPay to operate as a compliant Stellar anchor and integrate with third-party wallets (e.g. LOBSTR, Vibrant) via an interactive webview flow for identity (KYC) data capture and payment details selection, backed by NestJS REST endpoints, JWT webview session authentication, and PostgreSQL state management.
Type of change
Related issue
Closes #269
Scope and impact
Testing
Database / Schema Impact:
Sep24TransactionStatusenum andSep24Transactionmodel inapps/api/prisma/schema.prismato track interactive deposit/withdraw session states (incomplete→pending_user_transfer_start).API Compatibility Impact:
/sep24(/sep24/transactions/deposit/interactive,/sep24/transactions/withdraw/interactive,/sep24/transaction,/sep24/transactions,/sep24/info,/sep24/interactive/session,/sep24/interactive/confirm).Validation
Test Execution Results:
apps/api):sep24.service.spec.ts(17 passed) &sep24.controller.spec.ts(10 passed) — Total: 27 passed, 0 failed.apps/frontend):interactive.test.tsx(10 passed) — Total: 10 passed, 0 failed.Compatibility and operations
Configuration Notes:
JWT_SECRETmust be set inapps/apienvironment configuration (minimum 32 chars).NEXT_PUBLIC_API_URLmust point to the NestJS API base URL inapps/frontendenvironment configuration.Screenshots
Not applicable
Additional context
window.parent.postMessagecallback protocol with eventsep24:interactive_completeto notify parent wallet webviews upon session completion.