Skip to content

Hardware wallet support #14145

@Sjors

Description

@Sjors

Potential benefits of using hardware wallets in combination with Bitcoin Core:

  • privacy: all or most hardware wallets rely on a backend to fetch balance and history
  • less vendor-specific code to trust, including much of their dependencies (e.g. hardware wallet software often uses ElectronJS and the whole Javascript kitchen sink)
  • potentially safer coin storage for Bitcoin Core users than just a wallet.dat file

Current easy to use alternatives:

  • use the official wallet that goes with the device
  • use a different wallet (e.g. Electrum)

Current advanced alternatives:

Probably out of scope:

  • hardware drivers; i.e. there will always be some binary from manufacturer that the user needs to install and trust
  • UI changes more complex than "Please approve the transaction on your device"

Potential ingredients:

Previous issues discussing this:


I imagine a UX like this:

  1. User installs hardware driver
  2. User starts Bitcoin Core and inserts hardware wallet
  3. Core detects this driver and checks device id against all loaded wallets
    3a. If no wallet is found, add menu entry "Create wallet with device X"
    3b. Core asks device for account xpub m/49'/0' (or whatever user enters)
    3c. Derive keys (driver provides output descriptor for change and receive addresses, e.g. /0/* and /1/*)
    3d. Mark wallet as watch-only and store the device id.
    3e. Ask driver if this is an existing or fresh wallet, rescan if needed
  4. When user makes a transaction and wallet has a device id, check with driver that device is inserted, then ask device to sign transaction

What seems to be missing is some sort of reverse-RPC, where the Bitcoin Core can take initiative, e.g. asking the device "give me an xpub", or "sign this". Perhaps drivers can symlink a standardized RPC at $bitcoin_datadir/hardware/device-id?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions