Add experimental silent payment transaction creation support#220
Open
nymius wants to merge 10 commits intobitcoindevkit:masterfrom
Open
Add experimental silent payment transaction creation support#220nymius wants to merge 10 commits intobitcoindevkit:masterfrom
nymius wants to merge 10 commits intobitcoindevkit:masterfrom
Conversation
e0a13af to
bc40b76
Compare
tvpeter
requested changes
Oct 11, 2025
Collaborator
tvpeter
left a comment
There was a problem hiding this comment.
Thank you for working on adding this feature @nymius,
I couldn't test because I don't know how to construct sp recipients. I will check the documentation on the library and will come back to test it. In the meantime, I have left some comments.
Thank you
…actions Add experimental silent payment sending capabilities with new CreateSpTx command. This command creates signed transactions directly rather than PSBTs due to current limitations in secure shared derivation. - Add bdk_sp dependency with "sp" feature flag - Implement CreateSpTx subcommand for offline wallet operations - Add silent payment recipient parsing utility - Support mixed recipients (regular addresses + silent payments) - Generate signed transactions ready for broadcast - For the moment is not possible to enable RBF for the created transactions. Note: This is experimental functionality for testing only, not recommended for mainnet use.
…s error return value
The input for this command are two compressed public keys. The network is obtained from the wallet current network. The silent payment code generated is independent from any of the other stateful features of bdk-cli. This command is mainly intended for experimental use, do not lock any funds to the generated code if you don't know what you are doing and don't have the keys matchin the public keys used.
bc40b76 to
8d15df7
Compare
tvpeter
reviewed
Feb 4, 2026
| #[error("Create transaction error: {0}")] | ||
| CreateTx(#[from] bdk_wallet::error::CreateTxError), | ||
|
|
||
| #[error("Silent payment address decoding error: {0}")] |
Collaborator
There was a problem hiding this comment.
Suggested change
| #[error("Silent payment address decoding error: {0}")] | |
| #[cfg(feature = "sp")] | |
| #[error("Silent payment address decoding error: {0}")] |
Comment on lines
+366
to
+368
| if send_all { | ||
| tx_builder.drain_wallet().drain_to(recipients[0].0.clone()); | ||
| } else { |
Collaborator
There was a problem hiding this comment.
Is it possible to drain to an SP address? if so, it will be great to cover that as well.
Comment on lines
+467
to
+470
| for psbt_input in psbt.inputs.iter_mut() { | ||
| psbt_input.final_script_sig = None; | ||
| psbt_input.final_script_witness = None; | ||
| } |
Collaborator
There was a problem hiding this comment.
Won't it be ideal to check if they were actually finalized before resetting?
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.
Description
This PR adds experimental support for creating silent payment transactions through a new
CreateSpTxcommand. The implementation integrates thebdk_spcrate to enable sending Bitcoin to silent payment addresses.Key changes:
bdk_spdependency as an optional featureCreateSpTxcommand with support for silent payment recipientsaddress:amountpairsNotes to the reviewers
.expect()calls that should be addressed in future iterationsChangelog notice
Added: Experimental silent payment transaction creation via
CreateSpTxcommand (feature-gated behindspflag)Checklists
All Submissions
New Features
* [ ] I've added tests for the new feature