Command Line Interface

ledgereth provides a pretty limited CLI to use for quick one-off tasks and testing.

python -m ledgereth [command]

Get Accounts

python -m ledgereth accounts

Create and Sign Transaction

python -m ledgereth send FROM_ADDRESS TO_ADDRESS VALUE_WEI -n NONCE -p GAS_PRICE_WEI -c CHAIN_ID

Sign a Message

python -m ledgereth sign SIGNER_ADDRESS "I'm a little teapot"

Sign Typed Data

This command, similar to the library, only takes hashes of the domain and message. That’s because the Ledger Ethereum app itself only deals with these hashes rather than the data/message iteself. For more details on how you might generate these hashes, see the typed data signing implementation in the tests.

python -m ledgereth signtyped SIGNER_ADDRESS DOMAIN_HASH MESSAGE_HASH