feat: register kyc data in soroban contract#157
Merged
salazarsebas merged 4 commits intoHarmonia-Development:mainfrom Sep 28, 2025
Merged
feat: register kyc data in soroban contract#157salazarsebas merged 4 commits intoHarmonia-Development:mainfrom
salazarsebas merged 4 commits intoHarmonia-Development:mainfrom
Conversation
Contributor
|
hey @Bosun-Josh121 , please fix the workflow errors |
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.
feat: register kyc in soroban
Closes #154
🎯 Overview
Implements a
POST /kyc/verifyendpoint that registers KYC/KYB data in the Soroban smart contract for the Stellar wallet service. The endpoint generates a cryptographic hash of user KYC data, stores it in the contract with an approved status, and updates the SQLite database to reflect the registration.✅ Changes Made
Core Implementation
src/routes/kyc-verify.ts: New Express route handler for KYC verificationvalidateKycData()functionregister_kycfunctionEnvironment Configuration
config/envs.ts: Added required environment variables with Zod validationSTELLAR_SECRET_KEY: Deployer account secret key (required)SOROBAN_CONTRACT_ID: Contract address from deployment (required).env.example: Updated with new environment variable examplesApplication Integration
src/index.ts: Mounted KYC verify routes at/kycpath with rate limitingTesting
tests/routes/kyc-verify.test.ts: Comprehensive unit tests with mocked dependencies🔧 Technical Details
API Specification
Success Response (201):
{ "kyc_id": "123", "data_hash": "a1b2c3d4e5f6...", "status": "approved" }Error Responses:
400: Invalid input or non-existent kyc_id500: Contract call failure or internal errorSecurity Features
Contract Interaction Flow
register_kycfunction🧪 Testing Strategy
Unit Tests (Mocked)
🚀 Deployment Requirements
Environment Variables
Prerequisites