Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to choose functionality selectively from BDK #1

Open
BitcoinZavior opened this issue Apr 3, 2022 · 1 comment
Open

Ability to choose functionality selectively from BDK #1

BitcoinZavior opened this issue Apr 3, 2022 · 1 comment

Comments

@BitcoinZavior
Copy link
Contributor

The binary size of BDk for Android and IOS is quite large by default.
It would be great to have smaller binaries with different set of functionalities so that they can be used selectively for different applications.

This will be very useful for using BDK in mobile applications and Browsers(via WASM) and hardware wallets.

Below is an example of how functionality can be separated so that an application can select a suitable set of functionalities thereby reducing binary size. This is only an example, a better grouping of logical (and technically linked) components can be created based on BDK architecture.

  1. HD Wallet functionality
    This would only require functionality to generate seed, derive keys and addresses and ability to sign messages

  2. Transaction creation and signing
    Creating and signing all supported transaction types

  3. Bitcoin Electrum Node Interaction
    Ability to receive and parse block information from Electrum nodes
    Ability to broadcast transactions to Electrum node

  4. Bitcoin Core Interaction
    Ability to receive and parse block information from Bitcoin Core
    Ability to broadcast transactions

  5. Bitcoin Electrs Interaction
    Ability to receive and parse data from Electrs indexer
    Ability to broadcast transactions to Electrs

@notmandatory
Copy link

This should be possible, there is already work underway with the bdk rust project to split up the core wallet functionality from the blockchain and database modules. Once that's done it's how I'd start with splitting it up for the downstream languages too. If that goes well we can follow the same pattern if we need to break things up more. I suspect most of the size currently is related to those two modules so if we can separate them out we may not need to break down much more, but we'll have to see.

Czino referenced this issue in Peach2Peach/bdk-rn May 16, 2023
BitcoinZavior pushed a commit that referenced this issue Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants