bitcoindevkit / bdk

A modern, lightweight, descriptor-based wallet library written in Rust!
Other
867 stars 311 forks source link

Add ability to get private key for a address #835

Open thesimplekid opened 1 year ago

thesimplekid commented 1 year ago

Describe the enhancement
Add a method that reveals the private key for a address in a wallet.

Use case
Used to prove ownership of a UTXO, this is necessary for a Joinmarket like Podle verification, to prove that your counter party owns the UTXO they claim to.

Additional context Would mirror functionality to the bitcoincore rpc dump private key function https://docs.rs/bitcoincore-rpc/0.16.0/bitcoincore_rpc/trait.RpcApi.html#method.dump_private_key

danielabrozzoni commented 1 year ago

Hey there! I think it would be an useful method, even tho it should be available only for single sig wallets. At the moment we're working on the BDK 1.0 release, but after that, we can work on that :)

thesimplekid commented 1 year ago

Great, thank you