1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-15 20:19:23 +00:00

TR-python: support ShowDeviceTutorial in trezorlib

This commit is contained in:
grdddj 2023-03-31 12:37:50 +02:00
parent e1bcb4e347
commit f8afaf4039
2 changed files with 13 additions and 0 deletions

View File

@ -292,6 +292,13 @@ def reboot_to_bootloader(obj: "TrezorConnection") -> str:
return device.reboot_to_bootloader(client) return device.reboot_to_bootloader(client)
@cli.command()
@with_client
def tutorial(client: "TrezorClient") -> str:
"""Show on-device tutorial."""
return device.show_device_tutorial(client)
@cli.command() @cli.command()
@click.argument("enable", type=ChoiceType({"on": True, "off": False}), required=False) @click.argument("enable", type=ChoiceType({"on": True, "off": False}), required=False)
@click.option( @click.option(

View File

@ -241,6 +241,12 @@ def reboot_to_bootloader(client: "TrezorClient") -> "MessageType":
return client.call(messages.RebootToBootloader()) return client.call(messages.RebootToBootloader())
@session
@expect(messages.Success, field="message", ret_type=str)
def show_device_tutorial(client: "TrezorClient") -> "MessageType":
return client.call(messages.ShowDeviceTutorial())
@expect(messages.Success, field="message", ret_type=str) @expect(messages.Success, field="message", ret_type=str)
@session @session
def set_busy(client: "TrezorClient", expiry_ms: Optional[int]) -> "MessageType": def set_busy(client: "TrezorClient", expiry_ms: Optional[int]) -> "MessageType":