bitcoindevkit / bdk

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

Chain notification API #306

Open LLFourn opened 3 years ago

LLFourn commented 3 years ago

Let's say you want to know when a lightning channel has been funded or some other event occurs. Right now the best way to do this is to create a temporary wallet with one of a descriptor of one of the outputs in the funding transaction and then calling .sync until it appears in wallet.list_transactions().

There should be a lightweight interface that doesn't require choosing a database or a descriptor etc. The user should only have to pass in a Blockchain or some similar trait. It would be nice if they can get a future that will be resolved when the expected transaction has a certain number of confirmations etc.

LLFourn commented 2 years ago

should be done after: https://github.com/bitcoindevkit/bdk/issues/527