Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sign_options argument to Wallet::sign and Wallet::finalize_psbt methods #650

Merged

Conversation

thunderbiscuit
Copy link
Member

@thunderbiscuit thunderbiscuit commented Jan 10, 2025

This PR adds an optional SignOptions argument to the methods that can use them on the wallet.

If none is provided, the methods simply use the default values for the SignOptions type (as we did before).

Don't merge just yet, I'll see if I can write a test or two on the Rust side (maybe just for myself).

Changelog notice

Added:
  - New optional argument sign_options on `Wallet::sign` and `Wallet::finalize_psbt` [#650]

[#650]: https://github.com/bitcoindevkit/bdk-ffi/pull/650

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

Bugfixes:

  • This pull request breaks the existing API
  • I've added tests to reproduce the issue which are now passing
  • I'm linking the issue being fixed by this PR

@thunderbiscuit thunderbiscuit added this to the 1.0.0 milestone Jan 10, 2025
@thunderbiscuit thunderbiscuit requested a review from reez January 15, 2025 21:25
Copy link
Collaborator

@reez reez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 971f2f1

👍 I like this, keeps the API clean and straightforward (while allowing for customization), and is nice that it preserves existing call sites for users that don't require any changes unless they want custom options (other than TapLeavesOptions).

Thanks for adding all those doc strings too!

@thunderbiscuit thunderbiscuit merged commit 971f2f1 into bitcoindevkit:master Jan 16, 2025
25 checks passed
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.

2 participants