mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-01 17:55:20 +00:00
Merge pull request #6309 from benma/bitbox02
plugins/bitbox02: fix compatibility with bitbox02-4.0.0
This commit is contained in:
commit
db063517ec
2 changed files with 8 additions and 5 deletions
|
@ -13,5 +13,5 @@ safet>=0.1.5
|
||||||
keepkey>=6.3.1
|
keepkey>=6.3.1
|
||||||
btchip-python>=0.1.26
|
btchip-python>=0.1.26
|
||||||
ckcc-protocol>=0.7.7
|
ckcc-protocol>=0.7.7
|
||||||
bitbox02>=3.0.0
|
bitbox02>=4.0.0
|
||||||
hidapi
|
hidapi
|
||||||
|
|
|
@ -394,6 +394,7 @@ class BitBox02Client(HardwareClientBase):
|
||||||
"prev_out_value": txin.value_sats(),
|
"prev_out_value": txin.value_sats(),
|
||||||
"sequence": txin.nsequence,
|
"sequence": txin.nsequence,
|
||||||
"keypath": full_path,
|
"keypath": full_path,
|
||||||
|
"script_config_index": 0,
|
||||||
"prev_tx": {
|
"prev_tx": {
|
||||||
"version": prev_tx.version,
|
"version": prev_tx.version,
|
||||||
"locktime": prev_tx.locktime,
|
"locktime": prev_tx.locktime,
|
||||||
|
@ -437,7 +438,7 @@ class BitBox02Client(HardwareClientBase):
|
||||||
my_pubkey, change_pubkey_path = keystore.find_my_pubkey_in_txinout(txout)
|
my_pubkey, change_pubkey_path = keystore.find_my_pubkey_in_txinout(txout)
|
||||||
outputs.append(
|
outputs.append(
|
||||||
bitbox02.BTCOutputInternal(
|
bitbox02.BTCOutputInternal(
|
||||||
keypath=change_pubkey_path, value=txout.value,
|
keypath=change_pubkey_path, value=txout.value, script_config_index=0,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
@ -475,8 +476,10 @@ class BitBox02Client(HardwareClientBase):
|
||||||
|
|
||||||
sigs = self.bitbox02_device.btc_sign(
|
sigs = self.bitbox02_device.btc_sign(
|
||||||
coin,
|
coin,
|
||||||
tx_script_type,
|
[bitbox02.btc.BTCScriptConfigWithKeypath(
|
||||||
keypath_account=keypath_account,
|
script_config=tx_script_type,
|
||||||
|
keypath=keypath_account,
|
||||||
|
)],
|
||||||
inputs=inputs,
|
inputs=inputs,
|
||||||
outputs=outputs,
|
outputs=outputs,
|
||||||
locktime=tx.locktime,
|
locktime=tx.locktime,
|
||||||
|
@ -565,7 +568,7 @@ class BitBox02_KeyStore(Hardware_KeyStore):
|
||||||
|
|
||||||
class BitBox02Plugin(HW_PluginBase):
|
class BitBox02Plugin(HW_PluginBase):
|
||||||
keystore_class = BitBox02_KeyStore
|
keystore_class = BitBox02_KeyStore
|
||||||
minimum_library = (3, 0, 0)
|
minimum_library = (4, 0, 0)
|
||||||
DEVICE_IDS = [(0x03EB, 0x2403)]
|
DEVICE_IDS = [(0x03EB, 0x2403)]
|
||||||
|
|
||||||
SUPPORTED_XTYPES = ("p2wpkh-p2sh", "p2wpkh", "p2wsh")
|
SUPPORTED_XTYPES = ("p2wpkh-p2sh", "p2wpkh", "p2wsh")
|
||||||
|
|
Loading…
Add table
Reference in a new issue