Merge pull request #9650 from SomberNight/202503_keepkey
plugins: keepkey: vendor our fork of keepkeylib (as git submodule)
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -4,3 +4,6 @@
|
|||||||
[submodule "electrum/www"]
|
[submodule "electrum/www"]
|
||||||
path = electrum/plugins/payserver/www
|
path = electrum/plugins/payserver/www
|
||||||
url = https://github.com/spesmilo/electrum-http.git
|
url = https://github.com/spesmilo/electrum-http.git
|
||||||
|
[submodule "electrum/plugins/keepkey/keepkeylib"]
|
||||||
|
path = electrum/plugins/keepkey/keepkeylib
|
||||||
|
url = https://github.com/spesmilo/electrum-keepkeylib.git
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ datas += collect_data_files(f"{PYPKG}.plugins")
|
|||||||
datas += collect_data_files('trezorlib') # TODO is this needed? and same question for other hww libs
|
datas += collect_data_files('trezorlib') # TODO is this needed? and same question for other hww libs
|
||||||
datas += collect_data_files('safetlib')
|
datas += collect_data_files('safetlib')
|
||||||
datas += collect_data_files('btchip')
|
datas += collect_data_files('btchip')
|
||||||
datas += collect_data_files('keepkeylib')
|
|
||||||
datas += collect_data_files('ckcc')
|
datas += collect_data_files('ckcc')
|
||||||
datas += collect_data_files('bitbox02')
|
datas += collect_data_files('bitbox02')
|
||||||
|
|
||||||
|
|||||||
@@ -279,10 +279,6 @@ hidapi==0.14.0 \
|
|||||||
idna==3.6 \
|
idna==3.6 \
|
||||||
--hash=sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca \
|
--hash=sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca \
|
||||||
--hash=sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f
|
--hash=sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f
|
||||||
keepkey==6.3.1 \
|
|
||||||
--hash=sha256:88e2b5291c85c8e8567732f675697b88241082884aa1aba32257f35ee722fc09 \
|
|
||||||
--hash=sha256:cef1e862e195ece3e42640a0f57d15a63086fd1dedc8b5ddfcbc9c2657f0bb1e \
|
|
||||||
--hash=sha256:f369d640c65fec7fd8e72546304cdc768c04224a6b9b00a19dc2cd06fa9d2a6b
|
|
||||||
ledger-bitcoin==0.3.0 \
|
ledger-bitcoin==0.3.0 \
|
||||||
--hash=sha256:ad9cdeaf33a45562bbd5bae6751025b869a2f81d6eb0267dd062a01f5925a4d5 \
|
--hash=sha256:ad9cdeaf33a45562bbd5bae6751025b869a2f81d6eb0267dd062a01f5925a4d5 \
|
||||||
--hash=sha256:e7c33404d02044c3810b294a510f7ad97bc65ab12dbdd180d873f2b4ebc0711a
|
--hash=sha256:e7c33404d02044c3810b294a510f7ad97bc65ab12dbdd180d873f2b4ebc0711a
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ datas += collect_data_files(f"{PYPKG}.plugins")
|
|||||||
datas += collect_data_files('trezorlib') # TODO is this needed? and same question for other hww libs
|
datas += collect_data_files('trezorlib') # TODO is this needed? and same question for other hww libs
|
||||||
datas += collect_data_files('safetlib')
|
datas += collect_data_files('safetlib')
|
||||||
datas += collect_data_files('btchip')
|
datas += collect_data_files('btchip')
|
||||||
datas += collect_data_files('keepkeylib')
|
|
||||||
datas += collect_data_files('ckcc')
|
datas += collect_data_files('ckcc')
|
||||||
datas += collect_data_files('bitbox02')
|
datas += collect_data_files('bitbox02')
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,11 @@ trezor[hidapi]>=0.13.0,<0.14
|
|||||||
safet>=0.1.5
|
safet>=0.1.5
|
||||||
|
|
||||||
# device plugin: keepkey
|
# device plugin: keepkey
|
||||||
keepkey>=6.3.1
|
ecdsa>=0.9
|
||||||
|
protobuf>=3.20
|
||||||
|
mnemonic>=0.8
|
||||||
|
hidapi>=0.7.99.post15
|
||||||
|
libusb1>=1.6
|
||||||
|
|
||||||
# device plugin: ledger
|
# device plugin: ledger
|
||||||
# note: btchip-python only needed for "legacy" protocol and HW.1 support
|
# note: btchip-python only needed for "legacy" protocol and HW.1 support
|
||||||
@@ -25,10 +29,6 @@ bitbox02>=6.2.0
|
|||||||
cbor2>=5.4.6,<6.0.0
|
cbor2>=5.4.6,<6.0.0
|
||||||
pyserial>=3.5.0,<4.0.0
|
pyserial>=3.5.0,<4.0.0
|
||||||
|
|
||||||
# prefer older protobuf (see #7922)
|
|
||||||
# (pulled in via e.g. keepkey and bitbox02)
|
|
||||||
protobuf>=3.20,<4
|
|
||||||
|
|
||||||
# prefer older colorama to avoid needing hatchling
|
# prefer older colorama to avoid needing hatchling
|
||||||
# (pulled in via trezor -> click -> colorama)
|
# (pulled in via trezor -> click -> colorama)
|
||||||
# (pulled in via safet -> click -> colorama)
|
# (pulled in via safet -> click -> colorama)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
qrcode
|
qrcode
|
||||||
protobuf>=3.20,<4
|
protobuf>=3.20
|
||||||
qdarkstyle>=3.2
|
qdarkstyle>=3.2
|
||||||
aiorpcx>=0.22.0,<0.25
|
aiorpcx>=0.22.0,<0.25
|
||||||
aiohttp>=3.3.0,<4.0.0
|
aiohttp>=3.3.0,<4.0.0
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
from keepkeylib.client import proto, BaseClient, ProtocolMixin
|
from .keepkeylib.keepkeylib.client import proto, BaseClient, ProtocolMixin
|
||||||
from .clientbase import KeepKeyClientBase
|
from .clientbase import KeepKeyClientBase
|
||||||
|
|
||||||
class KeepKeyClient(KeepKeyClientBase, ProtocolMixin, BaseClient):
|
class KeepKeyClient(KeepKeyClientBase, ProtocolMixin, BaseClient):
|
||||||
|
|||||||
@@ -75,10 +75,8 @@ class KeepKeyPlugin(HW_PluginBase):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
from . import client
|
from . import client
|
||||||
import keepkeylib
|
from .keepkeylib import keepkeylib
|
||||||
import keepkeylib.ckd_public
|
from .keepkeylib.keepkeylib import ckd_public, transport_hid, transport_webusb
|
||||||
import keepkeylib.transport_hid
|
|
||||||
import keepkeylib.transport_webusb
|
|
||||||
self.client_class = client.KeepKeyClient
|
self.client_class = client.KeepKeyClient
|
||||||
self.ckd_public = keepkeylib.ckd_public
|
self.ckd_public = keepkeylib.ckd_public
|
||||||
self.types = keepkeylib.client.types
|
self.types = keepkeylib.client.types
|
||||||
@@ -90,11 +88,12 @@ class KeepKeyPlugin(HW_PluginBase):
|
|||||||
self.device_manager().register_enumerate_func(self.enumerate)
|
self.device_manager().register_enumerate_func(self.enumerate)
|
||||||
self.libraries_available = True
|
self.libraries_available = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
self.logger.debug("error importing keepkeylib", exc_info=True)
|
||||||
self.libraries_available = False
|
self.libraries_available = False
|
||||||
|
|
||||||
@runs_in_hwd_thread
|
@runs_in_hwd_thread
|
||||||
def enumerate(self):
|
def enumerate(self):
|
||||||
from keepkeylib.transport_webusb import WebUsbTransport
|
from .keepkeylib.keepkeylib.transport_webusb import WebUsbTransport
|
||||||
results = []
|
results = []
|
||||||
for dev in WebUsbTransport.enumerate():
|
for dev in WebUsbTransport.enumerate():
|
||||||
path = self._dev_to_str(dev)
|
path = self._dev_to_str(dev)
|
||||||
@@ -112,12 +111,12 @@ class KeepKeyPlugin(HW_PluginBase):
|
|||||||
|
|
||||||
@runs_in_hwd_thread
|
@runs_in_hwd_thread
|
||||||
def hid_transport(self, pair):
|
def hid_transport(self, pair):
|
||||||
from keepkeylib.transport_hid import HidTransport
|
from .keepkeylib.keepkeylib.transport_hid import HidTransport
|
||||||
return HidTransport(pair)
|
return HidTransport(pair)
|
||||||
|
|
||||||
@runs_in_hwd_thread
|
@runs_in_hwd_thread
|
||||||
def webusb_transport(self, device):
|
def webusb_transport(self, device):
|
||||||
from keepkeylib.transport_webusb import WebUsbTransport
|
from .keepkeylib.keepkeylib.transport_webusb import WebUsbTransport
|
||||||
for dev in WebUsbTransport.enumerate():
|
for dev in WebUsbTransport.enumerate():
|
||||||
if device.path == self._dev_to_str(dev):
|
if device.path == self._dev_to_str(dev):
|
||||||
return WebUsbTransport(dev)
|
return WebUsbTransport(dev)
|
||||||
|
|||||||
1
electrum/plugins/keepkey/keepkeylib
Submodule
1
electrum/plugins/keepkey/keepkeylib
Submodule
Submodule electrum/plugins/keepkey/keepkeylib added at fadf5f9fef
Reference in New Issue
Block a user