electrum icon indicating copy to clipboard operation
electrum copied to clipboard

Native support for new Ledger app

Open bigspider opened this issue 3 years ago • 0 comments

The upcoming release of the Ledger Bitcoin app will come with miniscript support, but will break compatibility with the legacy protocol (used before app version 2.0.0, and now deprecated). Currently, the new app still basically contains the old app inside, but that's not sustainable in the long term.

We plan to drop legacy support in the main app by October 2022.

There will be a way to install the legacy app, so that nobody is locked out − but I would like to encourage the integration of the new API, which brings numerous benefits. It's easier, cleaner and psbt- and descriptor-native; it already supports taproot (and work for miniscript on segwitv0 and on taproot will only be brought to the new API); moreover, it's actively developed.

The good news:

  • we have a python library that should be quite easy to use and adapt. It was already the base of the HWI integration.
  • the library is backwards-compatible with older versions of the app; that is, for simple transactions, it can proxy to the legacy library if the installed app version is legacy.

The (maybe) bad news:

  • The new app has a register-and-use flow for multisignature wallets; so a proper integrations will require some changes to the client side logic as well. The benefit is a much safer and cleaner UX for multisig wallets (the app can now correctly recognize change addresses and simplify the signing flow accordingly)

Currently, the HWI integration for multisignature is partial (it does not store the required multisig information, forcing the user to re-register it every time); hopefully that can be improved in an upcoming release.

There is also this PoC for multisig by @mflaxman that was developed independently using the library, so it might be useful.

If you are able to compile and install the app to use with speculos or sideload on a device, you can compile from the current develop (default) branch in the app-bitcoin-new repository with

$ make DEBUG=0 COIN=bitcoin_lite

for mainnet, or

$ make DEBUG=0 COIN=bitcoin_testnet_lite

for testnet.

(The _lite targets compile the app without legacy support).

Please feel free to reach out if I can help in any way. As the historical and one of the most commonly used multisig wallets, I would really love to see a good integration within Electrum.

bigspider avatar Jul 20 '22 08:07 bigspider