feat: add forecasting storage and wallet utilities - #493
Merged
Just-Bamford merged 1 commit intoAug 27, 2026
Merged
Conversation
Implement balance forecasting, Soroban storage analysis, adaptive congestion monitoring, and provider-neutral hardware wallet signing adapters.
|
@Dev-AdeTutu 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! 🚀 |
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 adds four framework-agnostic Sorokit utilities:
•
Balance forecasting (#482): forecastBalance analyzes successful historical inflows and outflows over a configurable window and projects daily balances for a configurable future period, including sample counts and confidence.
•
Soroban storage analysis (#481): analyzeContractStorage produces structured entry-size reports, detects repeated values and large entries, and emits metadata-based optimization recommendations.
•
Congestion monitoring (#480): CongestionMonitor tracks rolling latency, failures, and confirmation times, classifies network conditions, and recommends adaptive concurrency and delay values while preserving full concurrency on healthy networks.
•
Hardware wallet adapters (#473): adds a provider-neutral HardwareWalletAdapter abstraction with discovery, public-key retrieval, transaction signing, capability reporting, and normalized connection/signing failures.
All new APIs are exported from their module barrels and the package root. Focused Vitest coverage covers forecast calculations, storage findings, congestion adaptation, and adapter error handling.
Validation
•
Focused feature suite: 4 tests passed.
•
git diff --check passed.
•
Full typecheck/build are currently blocked by pre-existing diagnostics in src/soroban/nftMetadata.ts, src/transaction/bundles.ts, and src/transaction/priceSubscriptions.ts; no diagnostics were introduced by the new modules.
Closes #482
Closes #481
Closes #480
Closes #473