Please note that this guide was tested with python-trezor 0.11.2 on the following clean systems:
It works with Trezor One (bootloader version 1.6.0, and firmware version 1.7.0 or higher) and Trezor Model T.
1. Update repositories, install dependencies:
sudo apt update && sudo apt install -y python3-pip python3-dev libusb-1.0-0-dev libudev-dev
pip3 install setuptools wheel
pip3 install trezor
source .profile
You can check the latest python-trezor version on this page. To update your Python-trezor version run:
pip3 install -U trezor
-n or --address BIP32 path eg."m/49'/0'/0'/0/0"
-c or --coin
Supported coin types: Bitcoin, Testnet, Bcash, Bgold, Bitcore, Bprivate, Crown, Dash, Decred, Decred Testnet, DigiByte, Dogecoin, Feathercoin, Flashcoin, Fujicoin, Groestlcoin, Groestlcoin Testnet, Koto, Litecoin, Litecoin Testnet, Monacoin, MonetaryUnit, Pesetacoin, SmartCash, Terracoin, Vertcoin, Viacoin, Zcash, Zcash Testnet, Zcoin, Zencash
-t or --script-type
You can specify which script type of address to use to get xpub
address/segwit/p2shsegwit
-d or --show-display
This option will display a specific address on the Trezor display.
trezorctl get-address -n "m/49'/0'/0'/0/0" -t "p2shsegwit" -d
If the device is not in bootloader mode, it will erase the user data. If the device is not in bootloader mode but the option --bootloader is called, it will tell the user to enter bootloader mode. If the device is in bootloader mode and the option --bootloader is called, it will erase both the user data and firmware. If the device is in bootloader mode and the option --bootloader is not called, it will warn the user that the device is in bootloader mode.
--help : Show command description.
-b or --bootloader : Wipe the device in the bootloader mode. This also erases the firmware.
trezorctl wipe-device
--help : Show command description.
-f or --filename : This option lets the user set the file from which the firmware should be installed.
You can install a specific version of the firmware (.bin file), download it from this Github page
trezorctl firmware-update -f trezor-2.1.0.bin
-u or --url
You directly type the url of the firmware file you want to install.
trezorctl firmware-update -u https://github.com/trezor/webwallet-data/raw/master/firmware/2/trezor-2.1.0.bin
-v or --version
You can specify the firmware version you want to install.
trezorctl firmware-update -v 2.1.0
--fingerprint
You can enter the fingerprint of the installed firmware when updating the firmware. It will check if the fingerprint of the version matches the entered fingerprint. If the version is not defined, the fingerprint is compared to the latest firmware fingerprint.
For firmware 2.1.0:
trezorctl firmware-update --fingerprint bb5b0308807b45d41d1e2ab66a468152997ad69a01099789d8a35e464cde999f
-r or --remove: This option allows the user to remove PIN protection from the device.
-b or --backup_type
This option lets you choose between a traditional single BIP-39 Recovery seed or Shamir Backup.
Example:
trezorctl reset-device -b shamir -t 128
initiates the devices using Shamir backup with 20-word shares. Changing the -t option to 256 will create a wallet using 33-word shares.
-t or --strength
This option lets the user choose the version of the recovery seed. The options are 128 bits (12 words), 192 bits (18 words) and 256 bits (24 words). The default is set to 256 bits.
This command creates a new wallet with an 18 word recovery seed.
trezorctl reset-device -t 192
-r or --passphrase-protection
This option enables passphrase protection after a new wallet is created.
-p or --pin-protection
This option lets the user set a PIN before a new wallet is created.
-l or --label
This option lets the user set a label for the device before a new wallet is created.
trezorctl reset-device -l "MyTrezor"
-u or --u2f-counter
This option lets the user set a custom U2F counter.
-s or --skip-backup
This option lets the user skip the recovery seed backup process - showing the seed two times on the device screen. Using this option the Trezor screen shows the "Needs backup" sign after a new wallet is created.
This is a power-user feature. Use with caution.
trezorctl set safety-checks prompt
Features (90 bytes)
device_id: '3B5328CA18BAE5F0553BCD3A', flags: 0, initialized: True, language: 'english', major_version: 2, minor_version: 1, model: 'T', needs_backup: False, no_backup: False, passphrase_cached: False, passphrase_protection: True, patch_version: 0, pin_cached: True, pin_protection: True, revision: 8 bytes b'3f0e3a33', unfinished_backup: False, vendor: 'trezor.io',
-n or --address
trezorctl get-public-node -n "m/44'/0'/0'/0/0"
-c or --coin
Supported coin types: Bitcoin, Testnet, Bcash, Bgold, Bitcore, Bprivate, Crown, Dash, Decred, Decred Testnet, DigiByte, Dogecoin, Feathercoin, Flashcoin, Fujicoin, Groestlcoin, Groestlcoin Testnet, Koto, Litecoin, Litecoin Testnet, Monacoin, MonetaryUnit, Pesetacoin, SmartCash, Terracoin, Vertcoin, Viacoin, Zcash, Zcash Testnet, Zcoin, Zencash
-d or --show-display
This option will display the node public key on the Trezor display.
-t or --script-type
You can specify which script type of address to use to get an xpub
address/segwit/p2shsegwit
trezorctl ping "ahoy!"
-b or --button-protection
This option requires the user to confirm on the device that it received the ping message.
-p or --pin-protection
This option requires the user to enter PIN protection before sending the ping message to the device.
-r or --passphrase-protection
This option requires the user to enter the passphrase before sending the ping message.
-w or --words
This option lets the user choose the number of recovery seed words (12, 18 or 24 words).
-e or --expand
This option lets the user enter only the first four letters of each mnemonic word (which is sufficient for a successful recovery).
-p or --pin-protection
This option lets the user set the PIN before starting the recovery process.
trezorctl recovery-device -p
-r or --passphrase-protection
This option lets the user enable passphrase protection before starting the recovery process.
-l or --label
This option lets the user name the Trezor device before starting the recovery process.
-t or --type
scrambled or matrix
This option lets the user choose between the standard (scrambled) and advanced (matrix) recovery process.
trezorctl recovery-device -t matrix
-d or --dry-run
This option lets the user perform dry run recovery - check if the entered recovery seed matches the seed in the device. The result will show if the recovery seed is valid and if it matches the seed in the device. This option can be used with initialized as well as with uninitialized device.
See also: Check your recovery seed - Model One - Model T
trezorctl set auto-lock-delay 86400
-f or --filename
For Trezor Model T: The picture has to be in TOIF (Trezor optimized image format) format with a size of 144x144 pixels.
For Trezor One: The picture has to be 128x64 pixels.
For more information about how to create a home screen for Trezor One, please visit this home screen editor. For more information about the TOIF picture format, please see this GitHub page.
trezorctl set-homescreen -f mynewhs.png
-l or --label
-n or --address
It is necessary to specify BIP32 path with sign-message command., eg. "m/44'/0'/0'/0/0"
trezorctl sign-message -n "m/44'/0'/0'/0/0" "ahoy"
-c or --coin
It is possible to specify which coin to use to sign a message. The default is "Bitcoin".
trezorctl sign-message -n "m/44'/0'/0'/0/0" -c "Litecoin" "ahoy"
-t or --script-type
It is possible to specify which script type of address to use to sign a message address/segwit/p2shsegwit
-c or --coin
trezorctl verify-message
1aWUN65K8ecrc4yi4CnWWB76SaeB8CxHt H2cYhELO9G/NES63uARBidkkgV2ARD8nhCNWHjf+rcTmJreVi+OEfZzL7WvXn02ky62yDQmFFSgxzvaijYPA2ec= ahoy
trezorctl set passphrase enabled --force-on-device
Command: