LedgerProtocol
LedgerProtocol Objects
class LedgerProtocol(typing.Protocol)
A connection to the IOTA app on a Ledger device.
Every call completes once the device answers, which for address
verification includes waiting for the user to confirm on the device. Calls
on the same Ledger, including through the LedgerSigners created from
it, run one at a time.
exit_app
async def exit_app() -> None
Close the app running on the device and return to the dashboard.
On Speculos, this ends the emulated app.
get_public_key
async def get_public_key(path: str) -> Ed25519PublicKey
Read the public key at a derivation path such as
m/44'/4218'/0'/0'/0'.
is_app_open
async def is_app_open() -> bool
Check whether the IOTA app is the app running on the device.
Speculos reports a placeholder app name unless started with
SPECULOS_APPNAME=IOTA:<version>, so this returns false there.
open_app
async def open_app() -> None
Open the IOTA app, from the dashboard or by closing another app first.
Does nothing if the IOTA app is already running, or on a speculos
connection.
signer
async def signer(path: str) -> LedgerSigner
Create a signer for the key at a derivation path such as
m/44'/4218'/0'/0'/0', reading its public key from the device.
The signer shares this Ledger's connection, which stays usable.
verify_address
async def verify_address(path: str) -> Ed25519PublicKey
Show the address at a derivation path on the device for the user to confirm, and return its public key.
version
async def version() -> LedgerAppVersion
Read the version of the IOTA app.