feat(wallet): add efficient recovery#1081
Draft
a1denvalu3 wants to merge 2 commits into
Draft
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1081 +/- ##
==========================================
+ Coverage 74.54% 74.65% +0.11%
==========================================
Files 115 116 +1
Lines 13195 13310 +115
==========================================
+ Hits 9836 9937 +101
- Misses 3359 3373 +14 ☔ View full report in Codecov by Harness. |
Collaborator
Author
robwoodgate
added a commit
to cashubtc/cashu-ts
that referenced
this pull request
Jul 14, 2026
Self-contained demo of the draft recovery scheme against a mint built from the Nutshell reference branch (cashubtc/nutshell#1081). The Makefile builds and runs the mint (up/demo/down); the script exercises two mints, several swaps, a Lightning melt with NUT-08 change and an unclaimed sent token, then recovers everything from seed alone via restoreEfficient(), with a batchRestore() comparison.
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
d_gapmetadata to blinded messages and signaturesd_gapat the mint and advertise NUT-342 supportImplementation notes
Binary-search probes use the legacy recovery batch size as their window size. This tolerates isolated derivation gaps while keeping the strategy wallet-defined and wire-compatible.
The wallet reuses the derivation counter already stored in each proof's
derivation_path; no wallet schema migration is needed. The mint adds a nullabled_gapcolumn topromises.Testing
poetry run ruff check .poetry run mypy cashu --check-untyped-defsReview considerations