Skip to content

Commit a739a06

Browse files
authored
Feature: QR support for Jade (#1964)
1 parent bef9cf6 commit a739a06

File tree

1 file changed

+10
-0
lines changed
  • src/cryptoadvance/specter/devices

1 file changed

+10
-0
lines changed

src/cryptoadvance/specter/devices/jade.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ class Jade(HWIDevice):
1010
name = "Jade"
1111
icon = "img/devices/jade_icon.svg"
1212

13+
qr_code_support = True
14+
supported_qr_code_format = "crypto-psbt"
15+
sd_card_support = False
1316
supports_hwi_toggle_passphrase = False
1417
supports_hwi_multisig_display_address = True
1518
liquid_support = True
@@ -31,3 +34,10 @@ def no_key_found_reason(self, wallet_type, network="main"):
3134
if wallet_type == "multisig" and is_liquid(network):
3235
return "Jade does not support multisig wallets on Liquid."
3336
return super().no_key_found_reason(wallet_type, network)
37+
38+
# For signing PSBTs via QR code on the Jade
39+
def create_psbts(self, base64_psbt, wallet):
40+
psbts = super().create_psbts(base64_psbt, wallet)
41+
qr_psbt = wallet.fill_psbt(base64_psbt, non_witness=False, xpubs=False)
42+
psbts["qrcode"] = f"{self.supported_qr_code_format}:{qr_psbt}"
43+
return psbts

0 commit comments

Comments
 (0)