Skip to content

Support Auth47 authentication for airgapped (HW_AIRGAPPED) wallets #1972

@MightyMercurian

Description

@MightyMercurian

Problem

Wallet.hasPaymentCode() requires bip47ExtendedPrivateKey != null, which filters out airgapped wallets before Auth47 can run. The payment code itself only needs public key + chain code (m/47'/0'/0' xpub), but airgapped keystores never have this populated.

Relevant code:

  • Wallet.java - hasPaymentCode() gate
  • Keystore.java -rederiveKeystoreFromMaster() only sets BIP47 keys for software keystores
  • Auth47.java - sendResponse() calls hasPaymentCode() upfront

Context

There's an open proposal for adding BIP47 primitives to SeedSigner, with an open PR to enable message signing on BIP47 derivation paths. Sparrow already has the QR relay pattern needed (MessageSignDialog.showQr()) and a working Auth47 implementation for software wallets.

Possible approaches

1. Extend airgapped wallet import to include BIP47 xpub

  • During wallet import, request the m/47'/0'/0' xpub alongside the existing xpubs
  • Store as bip47ExtendedPublicKey on Keystore
  • Derive payment code from the public key + chain code (no private key needed)
  • For signing, relay the Auth47 challenge to the signing device via MessageSignDialog.showQr()

2. Ephemeral two-scan flow (no wallet model changes)

  • When Auth47 URI is scanned, show a signmessage QR for the signing device
  • Separately prompt for the payment code (scan or manual entry)
  • Combine the signature + payment code into the Auth47 response
  • Stateless - nothing persisted, but requires two QR scans per authentication

Approach 1 is cleaner long-term and aligns with how Sparrow already handles airgapped signing. Approach 2 avoids touching drongo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions