feat: Implement four core features (#499, #501, #502, #503) - #538
Open
Machundii wants to merge 5 commits into
Open
feat: Implement four core features (#499, #501, #502, #503)#538Machundii wants to merge 5 commits into
Machundii wants to merge 5 commits into
Conversation
…ties - Add calculateStorageRent() to estimate renewal requirements - Add renewContractStorage() to build renewal operations - Support configurable warning thresholds - Include structured error handling for renewal failures - Add comprehensive test coverage for active, near-expiry, and expired entries - Export APIs through src/soroban/index.ts and src/index.ts closes Sorokit#502
…bmission - Add TransactionQueue class with low/normal/high/critical priorities - Support configurable batch size and scheduling intervals - Track dependent transactions and preserve ordering - Implement retry policy with exponential backoff - Prevent duplicate transaction entries - Expose queue state (pending, processing, completed, failed) - Add comprehensive test coverage for priority ordering, batching, retries, and dependencies - Existing direct submission APIs remain unaffected - Export APIs through src/transaction/index.ts and src/index.ts closes Sorokit#501
…ilities - Add generateComplianceReport() for compliance report generation - Support multiple frameworks: AML, KYC, SOX, Basic, and custom - Normalize account activity into consistent reporting structure - Categorize transactions: transfers, payments, swaps, contract-interactions - Support configurable date ranges and framework-specific rule sets - Include compliance score, assessment, and flagged activities - Export compliance reports as JSON and CSV formats - Add comprehensive test coverage for categorization, date filtering, and frameworks - Report incomplete or unsupported activity explicitly - Export APIs through src/account/index.ts and src/index.ts closes Sorokit#503
- Add TransactionMixingPool class for coordinated batch submissions - Support multiple participants in a single pool - Shuffle transactions before batch construction for privacy - Prevent duplicate and already-submitted transactions - Calculate privacy rating (0-100) and cost savings before participation - Remove failed or expired participants without corrupting pool state - Participation remains explicitly opt-in (isolated from normal flows) - Add comprehensive test coverage for pooling, shuffling, cancellation, and failure scenarios - Include privacy analysis with anonymity set metrics - Pool manages transaction lifecycle: pending -> shuffled -> batch-ready -> submitted - Export APIs through src/transaction/index.ts and src/index.ts closes Sorokit#499
- Export storage expiration APIs (Sorokit#502) - Export transaction queue APIs (Sorokit#501) - Export compliance reporting APIs (Sorokit#503) - Export transaction mixing APIs (Sorokit#499)
|
@Machundii Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Collaborator
|
@Machundii your PR has merge conflicts. Please resolve the conflicts and update the PR when done. Thanks. |
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 pull request implements four core features for Sorokit, addressing storage management, transaction scheduling, compliance reporting, and privacy enhancements.
Implemented Features
1. Soroban Storage Expiration Tracking and Renewal Utilities (#502)
calculateStorageRent(contractId)- Estimates renewal requirements and identifies entries approaching expirationrenewContractStorage(contractId)- Builds renewal operations for contract storagesrc/soroban/index.tsandsrc/index.tsKey Files:
src/soroban/storageExpiration.ts- Implementationsrc/soroban/storageExpiration.test.ts- Tests2. Prioritized Transaction Queues and Scheduled Batch Submission (#501)
TransactionQueueclass supportinglow,normal,high, andcriticalprioritiessrc/transaction/index.tsandsrc/index.tsKey Files:
src/transaction/transactionQueue.ts- Implementationsrc/transaction/transactionQueue.test.ts- Tests3. Account Activity Reporting and Compliance Analysis Utilities (#503)
generateComplianceReport(account, framework)- Generates framework-specific compliance reportsexportComplianceReport()- Export reports as JSON or CSVsrc/account/index.tsandsrc/index.tsKey Files:
src/account/complianceReporting.ts- Implementationsrc/account/complianceReporting.test.ts- Tests4. Privacy-Preserving Transaction Pooling and Mixing (#499)
TransactionMixingPoolclass for coordinated privacy-preserving batchessrc/transaction/index.tsandsrc/index.tsKey Files:
src/transaction/transactionMixing.ts- Implementationsrc/transaction/transactionMixing.test.ts- TestsChanges
SorokitResult<T>response patternTesting
All implementations include comprehensive test coverage:
Related Issues