Skip to content

feat: add wallet creation and restoration methods to UniFFI bridge#52

Merged
xdustinface merged 1 commit intov0.42-devfrom
claude/issue-50-20260314-0045
Mar 14, 2026
Merged

feat: add wallet creation and restoration methods to UniFFI bridge#52
xdustinface merged 1 commit intov0.42-devfrom
claude/issue-50-20260314-0045

Conversation

@xdustinface
Copy link
Owner

Closes #50

Adds wallet creation and restoration methods for the React Native onboarding flow:

  • WalletCreationResult UniFFI record with mnemonic and wallet_id
  • SpvClientError::Wallet error variant
  • create_wallet(word_count: u8) — generates BIP39 mnemonic (12 or 24 words) and creates wallet
  • restore_wallet(mnemonic: String) — restores wallet from existing mnemonic
  • validate_mnemonic(mnemonic: String) -> bool — standalone UX validation
  • 14 new unit tests covering success and error paths

@github-actions
Copy link

This PR has merge conflicts with the base branch. Please rebase or merge the base branch into your branch to resolve them.

@xdustinface xdustinface reopened this Mar 14, 2026
@xdustinface xdustinface force-pushed the claude/issue-50-20260314-0045 branch from 9a359e0 to c6952bf Compare March 14, 2026 00:59
@xdustinface xdustinface force-pushed the claude/issue-50-20260314-0045 branch from c6952bf to 6b37b76 Compare March 14, 2026 01:04
@github-actions
Copy link

This PR has merge conflicts with the base branch. Please rebase or merge the base branch into your branch to resolve them.

@xdustinface xdustinface force-pushed the claude/issue-50-20260314-0045 branch from 6b37b76 to 66c1d65 Compare March 14, 2026 01:25
@xdustinface xdustinface force-pushed the claude/issue-50-20260314-0045 branch from 66c1d65 to d807768 Compare March 14, 2026 01:30
- Add WalletCreationResult record type with mnemonic and wallet_id fields
- Add Wallet error variant to SpvClientError
- Add SpvClient::create_wallet(word_count) method for generating new wallets with BIP39 mnemonic
- Add SpvClient::restore_wallet(mnemonic) method for restoring wallets from mnemonic phrase
- Add standalone validate_mnemonic(mnemonic) function for mnemonic validation
- Add comprehensive unit tests for all new functionality

Closes #50

Co-authored-by: Kevin Rombach <xdustinface@users.noreply.github.com>
@xdustinface xdustinface reopened this Mar 14, 2026
@codecov-commenter
Copy link

codecov-commenter commented Mar 14, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 97.64706% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.79%. Comparing base (aa28af3) to head (955d664).

Files with missing lines Patch % Lines
dash-spv/src/bridge/mod.rs 97.64% 4 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@              Coverage Diff              @@
##           v0.42-dev      #52      +/-   ##
=============================================
- Coverage      73.08%   67.79%   -5.30%     
=============================================
  Files            287      316      +29     
  Lines          58264    68644   +10380     
=============================================
+ Hits           42584    46538    +3954     
- Misses         15680    22106    +6426     
Flag Coverage Δ
core 75.14% <ø> (ø)
ffi 37.22% <ø> (?)
rpc 19.92% <ø> (ø)
spv 84.72% <97.64%> (+0.05%) ⬆️
wallet 66.40% <ø> (ø)
Files with missing lines Coverage Δ
dash-spv/src/bridge/mod.rs 90.53% <97.64%> (+0.76%) ⬆️

... and 32 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@xdustinface xdustinface merged commit 15f1b4f into v0.42-dev Mar 14, 2026
83 of 92 checks passed
@xdustinface xdustinface deleted the claude/issue-50-20260314-0045 branch March 14, 2026 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add wallet creation and restore methods to UniFFI bridge

2 participants