bitcoindevkit / bdk

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

Support for sending to silent payments #1114

Open benthecarman opened 1 year ago

benthecarman commented 1 year ago

https://github.com/bitcoin/bips/pull/1458

Supporting receiving for silent payments would be a very large undertaking. However, supporting sending should be relatively pretty trivial.

LLFourn commented 1 year ago

Although sending has less moving parts I'm less sure what's the right API inside transaction building system (mostly because we haven't re-designed transaction building yet). With receiving I know precisely how to approach it (as a new tx graph index) so I'd be tempted to do receiving first and leave sending until later. Of course the basic function to produce a silent payment tx would be needed at the same time as the receiving code which would allow you to manually construct a silent payment tx. We could consider upstreaming this to rust-bitcoin also.

This would go all go in bdk_chain with bdk_tx_build proving more user friendly API coming later (when it exists).

realeinherjar commented 1 year ago

This BIP is recent and still with a lot of comments addressing implementation details, e.g. https://github.com/bitcoin/bips/pull/1458#discussion_r1313885038.

evanlinjin commented 1 year ago

This BIP is recent and still with a lot of comments addressing implementation details, e.g. https://github.com/bitcoin/bips/pull/1458#discussion_r1313885038.

I think Steven was mostly addressing HOW the BIP should be structured, not WHAT was specified in the BIP.

LLFourn commented 1 year ago

While implementing it we might be able to contribute to the BIP if we find places it could be improved.

notmandatory commented 10 months ago

I assigned this to the 1.1 alpha release, but we may need to move it to 2.0 depending on priorities and who's available/able to work on this.

sethforprivacy commented 4 months ago

Traction behind Silent Payments is rapidly growing, with two wallets releasing with full Silent Payments support this week. The most important step for their traction to continue is that wallets simply add the ability to send to Silent Payment addresses (as this PR is for) so that there is proper incentive for receiving to be added to wallets, exchanges, etc.

I started a bounty for this PR to be completed on X, and am offering 100k sats to the dev who's PR solves this issue (total bounty of 870k sats thanks to others on X).

Would be amazing for all BDK wallets to be able to trivially enable sending to Silent Payment addresses!

sethforprivacy commented 4 months ago

Note that a crate for Silent Payment support already exists here:

https://github.com/cygnet3/rust-silentpayments

storopoli commented 3 months ago

The parsing of a SP address is being discussed upstream here https://github.com/rust-bitcoin/rust-bitcoin/issues/2778

junderw commented 3 months ago

I think this should wait for

  1. https://github.com/bitcoin-core/secp256k1/pull/1519
  2. merging 1 into the secp256k1 wrapper crate.

rust-silentpayments crate is a great prototype, but it is weak to timing attacks.

cygnet3 commented 3 months ago

rust-silentpayments crate is a great prototype, but it is weak to timing attacks.

This should be mitigated in v0.3.0. If you find other weaknesses or oversights, please let us know!

Having said that, I agree that the purpose of rust-silentpayments is somewhat obsolete once the silentpayments module is added to secp256k1. Perhaps we will transition to become a more high-level silent payments utility library. Either way, we will rewrite rust-silentpayments to work on top of the silentpayments module once that is finalized.

junderw commented 3 months ago

This should be mitigated in v0.3.0.

I see you just released this about an hour ago. Nice!

notmandatory commented 1 month ago

Tracking issues for SP sending support:

Related issues