bdk-ffi
bdk-ffi copied to clipboard
Add memory wallet
I almost can't believe we get this for free now that the generic on the Wallet type has been removed.
Don't merge, needs actual testing. My main concern would be that certain methods don't work on the memory wallet, but that should be captured at compile time, so... are we just getting away with it with such simple changes? It's too good to be true.
Changelog notice
Added
- New memory wallet [#528]
[#528]: https://github.com/bitcoindevkit/bdk-ffi/pull/528
Checklists
All Submissions:
- [x] I've signed all my commits
- [x] I followed the contribution guidelines
- [x] I ran
cargo fmt
andcargo clippy
before committing
Walkthrough
The updates across various modules of the Bitcoin Development Kit (BDK) primarily focus on enhancing wallet synchronization and address management. Key changes include the introduction of FullScanRequest
and SyncRequest
to standardize full scan and sync operations, the replacement of get_address
with reveal_next_address
for address retrieval, and the addition of error handling improvements. These modifications aim to streamline processes and improve the robustness of the wallet functionalities.
Changes
File Path | Change Summary |
---|---|
.../LiveTxBuilderTest.kt , .../LiveWalletTest.kt , .../OfflineWalletTest.kt |
Introduced FullScanRequest for initiating scans, updated address retrieval to revealNextAddress , and added wallet commit operations after updates. |
bdk-ffi/src/... , bdk-jvm/lib/src/test/kotlin/... , bdk-python/tests/... , bdk-swift/Tests/... |
Added FullScanRequest and SyncRequest , updated method signatures and error handling, and standardized address retrieval across different language bindings. |
bdk-ffi/src/error.rs , bdk-ffi/src/wallet.rs |
Enhanced error handling with new error types and updated method signatures for better clarity and functionality. |
bdk-ffi/src/esplora.rs , bdk-jvm/lib/src/test/kotlin/LiveTxBuilderTest.kt |
Modified full_scan method to take FullScanRequest , and updated synchronization logic. Changed network from TESTNET to SIGNET in JVM tests. |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Tips
Chat
There are 3 ways to chat with CodeRabbit:
Note: Auto-reply has been disabled for this repository by the repository owner. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitai
in a new review comment at the desired location with your query. Examples:-
@coderabbitai generate unit testing code for this file.
-
@coderabbitai modularize this function.
-
- PR comments: Tag
@coderabbitai
in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:-
@coderabbitai generate interesting stats about this repository and render them as a table.
-
@coderabbitai show all the console.log statements in this repository.
-
@coderabbitai read src/utils.ts and generate unit testing code.
-
@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
-
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (invoked as PR comments)
-
@coderabbitai pause
to pause the reviews on a PR. -
@coderabbitai resume
to resume the paused reviews. -
@coderabbitai review
to trigger a review. This is useful when automatic reviews are disabled for the repository. -
@coderabbitai resolve
resolve all the CodeRabbit review comments. -
@coderabbitai help
to get help.
Additionally, you can add @coderabbitai ignore
anywhere in the PR description to prevent this PR from being reviewed.
CodeRabbit Configration File (.coderabbit.yaml
)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yaml
file to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
@reez I have tested those locally with all our JVM tests by turning them into memory wallets and all tests passed. Ready for review.
@reez this is ready for final review. I rebased #535 onto this one, so if you can review this one first we'll merge that and then look at the electrum client.