forked from spesmilo/electrum
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkeepkey.py
More file actions
35 lines (28 loc) · 1.15 KB
/
keepkey.py
File metadata and controls
35 lines (28 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from ..trezor.plugin import TrezorCompatiblePlugin, TrezorCompatibleKeyStore
class KeepKey_KeyStore(TrezorCompatibleKeyStore):
hw_type = 'keepkey'
device = 'KeepKey'
class KeepKeyPlugin(TrezorCompatiblePlugin):
firmware_URL = 'https://www.keepkey.com'
libraries_URL = 'https://github.com/keepkey/python-keepkey'
minimum_firmware = (1, 0, 0)
keystore_class = KeepKey_KeyStore
def __init__(self, *args):
try:
import client
import keepkeylib
import keepkeylib.ckd_public
import keepkeylib.transport_hid
self.client_class = client.KeepKeyClient
self.ckd_public = keepkeylib.ckd_public
self.types = keepkeylib.client.types
self.DEVICE_IDS = keepkeylib.transport_hid.DEVICE_IDS
self.libraries_available = True
except ImportError:
self.libraries_available = False
TrezorCompatiblePlugin.__init__(self, *args)
def hid_transport(self, pair):
from keepkeylib.transport_hid import HidTransport
return HidTransport(pair)
def bridge_transport(self, d):
raise NotImplementedError('')