2015-12-26 20:56:50 -08:00
|
|
|
from plugins.trezor.client import trezor_client_class
|
2015-12-27 01:23:46 -08:00
|
|
|
from plugins.trezor.plugin import TrezorCompatiblePlugin, TrezorCompatibleWallet
|
2014-07-10 12:44:28 -07:00
|
|
|
|
|
|
|
try:
|
|
|
|
from trezorlib.client import proto, BaseClient, ProtocolMixin
|
|
|
|
TREZOR = True
|
2014-07-18 06:40:31 -07:00
|
|
|
except ImportError:
|
|
|
|
TREZOR = False
|
2014-07-10 12:44:28 -07:00
|
|
|
|
2015-03-05 08:09:39 -08:00
|
|
|
|
2015-12-27 01:23:46 -08:00
|
|
|
class TrezorWallet(TrezorCompatibleWallet):
|
2015-11-23 05:15:25 -08:00
|
|
|
wallet_type = 'trezor'
|
2015-12-25 23:25:10 -08:00
|
|
|
device = 'Trezor'
|
2015-11-23 05:15:25 -08:00
|
|
|
|
2015-12-26 20:56:50 -08:00
|
|
|
|
2015-12-26 02:42:57 -08:00
|
|
|
class TrezorPlugin(TrezorCompatiblePlugin):
|
2015-12-26 20:56:50 -08:00
|
|
|
client_class = trezor_client_class(ProtocolMixin, BaseClient, proto)
|
|
|
|
firmware_URL = 'https://www.mytrezor.com'
|
|
|
|
libraries_URL = 'https://github.com/trezor/python-trezor'
|
|
|
|
libraries_available = TREZOR
|
|
|
|
minimum_firmware = (1, 2, 1)
|
|
|
|
wallet_class = TrezorWallet
|
2015-12-26 02:42:57 -08:00
|
|
|
import trezorlib.ckd_public as ckd_public
|
|
|
|
from trezorlib.client import types
|
2015-12-26 20:56:50 -08:00
|
|
|
from trezorlib.transport_hid import HidTransport
|