feat: add concrete SpvClient UniFFI object#17
Merged
Conversation
|
This PR has merge conflicts with the base branch. Please rebase or merge the base branch into your branch to resolve them. |
033ee86 to
2a58afc
Compare
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v0.42-dev #17 +/- ##
=============================================
- Coverage 65.96% 65.95% -0.01%
=============================================
Files 312 312
Lines 64711 64799 +88
=============================================
+ Hits 42684 42741 +57
- Misses 22027 22058 +31
🚀 New features to boost your workflow:
|
- Add `#[cfg_attr(feature = "uniffi", derive(uniffi::Enum))]` to `MempoolStrategy` - Add `#[cfg_attr(feature = "uniffi", derive(uniffi::Record))]` to `ClientConfig` - Change `max_mempool_transactions: usize` → `u64` for UniFFI compatibility - Add `custom_type!` mappings for `SocketAddr` and `PathBuf` in bridge module - Make `DashSpvClient::start()` public (was `pub(super)`) - Implement `SpvClient` UniFFI object wrapping the concrete type `DashSpvClient<WalletManager<ManagedWalletInfo>, PeerNetworkManager, DiskStorageManager>` - Export: `new()`, `start()`, `stop()`, `shutdown()`, `is_running()`, `tip_height()`, `tip_hash()`, `peer_count()`, `sync_progress()`, `is_syncing()` - Add `SpvClientError` uniffi::Error enum mapped from `SpvError` - Unit tests for construction and state queries Closes #7 Co-authored-by: Kevin Rombach <xdustinface@users.noreply.github.com>
2a58afc to
47526b6
Compare
5 tasks
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
SpvClientUniFFI object wrappingDashSpvClient<WalletManager, PeerNetworkManager, DiskStorageManager>new(),start(),stop(),shutdown()is_running(),tip_height(),tip_hash(),peer_count(),sync_progress(),is_syncing()SpvClientErroruniffi::Error enum mapped fromSpvErrorcustom_type!mappings forSocketAddrandPathBuf#[cfg_attr(feature = "uniffi", derive(uniffi::Record))]toClientConfig#[cfg_attr(feature = "uniffi", derive(uniffi::Enum))]toMempoolStrategyCloses #7