mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-08-03 12:28:13 +00:00
add usage; add newlines to some tests
This commit is contained in:
parent
7f0f73d1c6
commit
e9dbfc757c
@ -42,6 +42,8 @@ or to learn options of a particular command:
|
|||||||
|
|
||||||
trezorctl commands --help
|
trezorctl commands --help
|
||||||
|
|
||||||
|
or visit `usage <USAGE.rst>`_ page for more info.
|
||||||
|
|
||||||
To use the library in your application look at the following example.
|
To use the library in your application look at the following example.
|
||||||
|
|
||||||
Example
|
Example
|
||||||
|
14
USAGE.rst
Normal file
14
USAGE.rst
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
Usage
|
||||||
|
=====
|
||||||
|
|
||||||
|
Get first receiving address of first account for Bitcoin:
|
||||||
|
|
||||||
|
.. code::
|
||||||
|
|
||||||
|
trezorctl get_address -c Litecoin -t address -n "m/44'/0'/0'/0/0"
|
||||||
|
|
||||||
|
Get first receiving address of first account for Segwit-in-P2SH for Litecoin:
|
||||||
|
|
||||||
|
.. code::
|
||||||
|
|
||||||
|
trezorctl get_address -c Litecoin -t p2shsegwit -n "m/49'/2'/0'/0/0"
|
@ -24,6 +24,7 @@ import trezorlib.types_pb2 as proto_types
|
|||||||
|
|
||||||
|
|
||||||
class TestMsgEstimatetxsize(common.TrezorTest):
|
class TestMsgEstimatetxsize(common.TrezorTest):
|
||||||
|
|
||||||
def test_estimate_size(self):
|
def test_estimate_size(self):
|
||||||
self.setup_mnemonic_nopin_nopassphrase()
|
self.setup_mnemonic_nopin_nopassphrase()
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ from trezorlib import messages_pb2 as proto
|
|||||||
|
|
||||||
|
|
||||||
class TestDeviceRecovery(common.TrezorTest):
|
class TestDeviceRecovery(common.TrezorTest):
|
||||||
|
|
||||||
def test_pin_passphrase(self):
|
def test_pin_passphrase(self):
|
||||||
mnemonic = self.mnemonic12.split(' ')
|
mnemonic = self.mnemonic12.split(' ')
|
||||||
ret = self.client.call_raw(proto.RecoveryDevice(word_count=12,
|
ret = self.client.call_raw(proto.RecoveryDevice(word_count=12,
|
||||||
|
@ -54,6 +54,7 @@ def generate_entropy(strength, internal_entropy, external_entropy):
|
|||||||
|
|
||||||
|
|
||||||
class TestDeviceReset(common.TrezorTest):
|
class TestDeviceReset(common.TrezorTest):
|
||||||
|
|
||||||
def test_reset_device(self):
|
def test_reset_device(self):
|
||||||
# No PIN, no passphrase
|
# No PIN, no passphrase
|
||||||
external_entropy = b'zlutoucky kun upel divoke ody' * 2
|
external_entropy = b'zlutoucky kun upel divoke ody' * 2
|
||||||
|
@ -39,6 +39,7 @@ TXHASH_d6da21 = binascii.unhexlify(b'd6da21677d7cca5f42fbc7631d062c9ae918a0254f7
|
|||||||
|
|
||||||
|
|
||||||
class TestMsgSigntx(common.TrezorTest):
|
class TestMsgSigntx(common.TrezorTest):
|
||||||
|
|
||||||
def test_one_one_fee(self):
|
def test_one_one_fee(self):
|
||||||
self.setup_mnemonic_nopin_nopassphrase()
|
self.setup_mnemonic_nopin_nopassphrase()
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ from trezorlib.ckd_public import deserialize
|
|||||||
|
|
||||||
|
|
||||||
class TestMsgSigntxSegwit(common.TrezorTest):
|
class TestMsgSigntxSegwit(common.TrezorTest):
|
||||||
|
|
||||||
def test_send_p2sh(self):
|
def test_send_p2sh(self):
|
||||||
self.setup_mnemonic_allallall()
|
self.setup_mnemonic_allallall()
|
||||||
self.client.set_tx_api(TxApiTestnet)
|
self.client.set_tx_api(TxApiTestnet)
|
||||||
|
@ -23,6 +23,7 @@ from trezorlib import messages_pb2 as proto
|
|||||||
|
|
||||||
|
|
||||||
class TestDeviceWipe(common.TrezorTest):
|
class TestDeviceWipe(common.TrezorTest):
|
||||||
|
|
||||||
def test_wipe_device(self):
|
def test_wipe_device(self):
|
||||||
self.setup_mnemonic_pin_passphrase()
|
self.setup_mnemonic_pin_passphrase()
|
||||||
features = self.client.call_raw(proto.Initialize())
|
features = self.client.call_raw(proto.Initialize())
|
||||||
|
Loading…
Reference in New Issue
Block a user