mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-26 01:18:28 +00:00
8f84e356ad
Added commandline tool cmd.py
28 lines
981 B
Python
28 lines
981 B
Python
import unittest
|
|
import config
|
|
|
|
from bitkeylib.client import BitkeyClient
|
|
from bitkeylib.debuglink import DebugLink
|
|
from bitkeylib import proto
|
|
|
|
class TestSignTx(unittest.TestCase):
|
|
|
|
def setUp(self):
|
|
self.debug_transport = config.DEBUG_TRANSPORT(*config.DEBUG_TRANSPORT_ARGS)
|
|
self.transport = config.TRANSPORT(*config.TRANSPORT_ARGS)
|
|
self.bitkey = BitkeyClient(self.transport, DebugLink(self.debug_transport), algo=proto.ELECTRUM)
|
|
|
|
self.bitkey.setup_debuglink(pin_correct=True, otp_correct=True)
|
|
|
|
self.bitkey.load_device(seed='beyond neighbor scratch swirl embarrass doll cause also stick softly physical nice',
|
|
otp=True, pin='1234', spv=True, button=True)
|
|
|
|
print "Setup finished"
|
|
print "--------------"
|
|
|
|
def tearDown(self):
|
|
self.debug_transport.close()
|
|
self.transport.close()
|
|
|
|
def test_signtx(self):
|
|
print self.bitkey.sign_tx([], []) |