# Spiral Grant Proposal Evan Lin ( github.com/evanlinjin | twitter.com/evanlinjin ) ### Summary In the 12 months of the grant period, I will continue to contribute to the [bitcoindevkit](https://github.com/bitcoindevkit) (BDK) and [rust-bitcoin](https://github.com/rust-bitcoin) ecosystem(s). This includes mostly code contributions, but I will also assist with code reviews, assinging tasks and communicating with projects that use BDK to better determine the direction of BDK (and maybe even contribute code to projects that use, or plan to use BDK). In addition to this, I would also like to facilitate in the [Taipei BitDevs](https://bitdevs.tw/) effort. The goal would be to encourage both technical and philosophical discussions around Bitcoin. #### BDK Core and BDK 1.0 Currently, the majority of the development effort is getting [`bdk_core`](https://github.com/LLFourn/bdk_core_staging) integrated into BDK itself. BDK Core is the major aspect for the BDK 1.0 release. BDK Core has three main components: BDK Chain, Coin Select and the Miniscript Planning Module. Read more about BDK Core [here](https://bitcoindevkit.org/blog/bdk-core-pt1/) and [here](https://bitcoindevkit.org/blog/road-to-bdk-1/). I will mostly focus on the BDK Chain and Coin Select components, working alongside the rest of the BDK. BDK Chain enables flexible and efficient wallet-syncing. This improves the legacy BDK syncing mechanism by better-enabling async/multi-threaded models, reducing disk-IO and blocking when waiting for the network. Coin Select in BDK Core simplifies implementing coin selection algorithms. Instead of a `CoinSelectionAlgorithm` trait (as in the old BDK), we instead have a `CoinSelector` struct which tracks selected candidates, and performs associated weight, fee, excess and waste calculations. In addition to this, we have a generic branch-and-bound object that can minimise a generic score. The combination of this allows for more elegant coin selection and composing multiple coin selection algorithms. The rough timeline for the work can be found in the [`README.md`](https://github.com/LLFourn/bdk_core_staging#development-and-release-plan) of the repository. #### BDK Coin Selection After the release of BDK 1.0, I will be assisting to integrate BDK Coin Selection into various projects (such as [`nolooking`](https://github.com/chaincase-app/nolooking), [`fedimint`](https://github.com/fedimint/fedimint)). The goal of this will be twofold: 1. Introduce sane, heuristic-breaking, privacy-by-default coin selection to BDK. This includes research on heuristics and how to break heuristics. The API should be flexible, and a potential implementation would be to provide a list of constraints (heuristics to break) that the coin selector must satisfy. 2. Further improvements to the API, and introduce potentially missing features to BDK. #### BDK & LDK Compatibility I will assist in the effort to increase the compatibility between BDK and LDK. Currently, my understanding of LDK is lackluster, and I will need to do research. However, I imagine this effort will include adding features to BDK, and including a separate package for tooling (if needed). #### BDK HWI Integrating hardware wallet support has been made simple with [`HWI`](https://github.com/bitcoin-core/HWI). We even have rust bindings to this ([`rust-hwi`](https://github.com/bitcoindevkit/rust-hwi)). However, `HWI` cannot be used on mobile operating systems. I would like to do research on interacting with hardware signing devices via USB, NFC and Bluetooth under a mobile setting. The end goal is to provide tooling to streamline these interactions.