feat: add state inspection, split routing, and privacy primitives - #497
Merged
Conversation
feat: add state inspection, split routing, and privacy primitives
|
@Hahfyeex 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 pull request combines the four requested Sorokit core improvements:
Adds typed Soroban contract state snapshots, deterministic state digests, key-level added/removed/changed diffs, and an invocation inspection wrapper.
Adds a safe ScVal argument optimization layer that canonicalizes repeated values, preserves positional semantics, reports encoding statistics, and is integrated into prepareContractCall.
Adds a deterministic multi-path strict-receive split planner that ranks quoted routes by effective source cost, respects route capacities, and returns executable payment legs with structured liquidity errors.
Adds browser-compatible zero-knowledge proof infrastructure with claim commitments, proof envelopes, selective-disclosure metadata, and pluggable verification for private transaction validation.
Tests and validation
New focused Vitest suite passes: 7 tests passed.
ESLint passes for all changed TypeScript files.
git diff --check passes.
Full npm run typecheck reaches only pre-existing strict-null errors in src/soroban/nftMetadata.ts, src/transaction/bundles.ts, and src/transaction/priceSubscriptions.ts.
The bundle’s JavaScript build succeeds, but declaration generation is blocked by the pre-existing nftMetadata.ts error; this is documented here rather than changed as unrelated scope.
Closes #469
Closes #462
Closes #463
Closes #466