2021-06-08 11:29:03 +00:00
|
|
|
from typing import *
|
2022-02-19 12:49:04 +00:00
|
|
|
CONFIRMED: object
|
|
|
|
CANCELLED: object
|
2021-06-08 11:29:03 +00:00
|
|
|
|
|
|
|
|
2022-02-19 12:49:04 +00:00
|
|
|
# rust/src/ui/model_t1/layout.rs
|
|
|
|
def confirm_action(
|
2022-01-18 23:49:18 +00:00
|
|
|
*,
|
|
|
|
title: str,
|
|
|
|
action: str | None = None,
|
|
|
|
description: str | None = None,
|
|
|
|
verb: str | None = None,
|
|
|
|
verb_cancel: str | None = None,
|
|
|
|
hold: bool | None = None,
|
|
|
|
reverse: bool = False,
|
|
|
|
) -> object:
|
2022-02-19 12:49:04 +00:00
|
|
|
"""Confirm action."""
|
2021-10-29 11:06:16 +00:00
|
|
|
|
|
|
|
|
2022-02-19 12:49:04 +00:00
|
|
|
# rust/src/ui/model_t1/layout.rs
|
|
|
|
def confirm_text(
|
|
|
|
*,
|
|
|
|
title: str,
|
|
|
|
data: str,
|
|
|
|
description: str | None,
|
2022-05-01 12:08:31 +00:00
|
|
|
) -> object:
|
|
|
|
"""Confirm text."""
|
|
|
|
CONFIRMED: object
|
|
|
|
CANCELLED: object
|
|
|
|
|
|
|
|
|
|
|
|
# rust/src/ui/model_tr/layout.rs
|
|
|
|
def confirm_action(
|
|
|
|
*,
|
|
|
|
title: str,
|
|
|
|
action: str | None = None,
|
|
|
|
description: str | None = None,
|
|
|
|
verb: str | None = None,
|
|
|
|
verb_cancel: str | None = None,
|
|
|
|
hold: bool | None = None,
|
|
|
|
reverse: bool = False,
|
|
|
|
) -> object:
|
|
|
|
"""Confirm action."""
|
|
|
|
|
|
|
|
|
|
|
|
# rust/src/ui/model_tr/layout.rs
|
|
|
|
def confirm_text(
|
|
|
|
*,
|
|
|
|
title: str,
|
|
|
|
data: str,
|
|
|
|
description: str | None,
|
2022-02-19 12:49:04 +00:00
|
|
|
) -> object:
|
|
|
|
"""Confirm text."""
|
|
|
|
CONFIRMED: object
|
|
|
|
CANCELLED: object
|
2022-04-05 12:35:37 +00:00
|
|
|
INFO: object
|
2021-12-13 11:22:52 +00:00
|
|
|
|
|
|
|
|
2022-02-19 12:49:04 +00:00
|
|
|
# rust/src/ui/model_tt/layout.rs
|
|
|
|
def confirm_action(
|
2022-02-07 16:09:39 +00:00
|
|
|
*,
|
2022-02-19 12:49:04 +00:00
|
|
|
title: str,
|
|
|
|
action: str | None = None,
|
|
|
|
description: str | None = None,
|
|
|
|
verb: str | None = None,
|
|
|
|
verb_cancel: str | None = None,
|
2022-05-24 10:54:02 +00:00
|
|
|
hold: bool = False,
|
2022-02-19 12:49:04 +00:00
|
|
|
reverse: bool = False,
|
2022-02-07 16:09:39 +00:00
|
|
|
) -> object:
|
2022-02-19 12:49:04 +00:00
|
|
|
"""Confirm action."""
|
2022-02-07 16:09:39 +00:00
|
|
|
|
|
|
|
|
2022-05-24 10:54:02 +00:00
|
|
|
# rust/src/ui/model_tt/layout.rs
|
|
|
|
def confirm_blob(
|
|
|
|
*,
|
|
|
|
title: str,
|
|
|
|
data: str,
|
|
|
|
description: str = "",
|
|
|
|
extra: str = "",
|
|
|
|
verb_cancel: str | None = None,
|
|
|
|
ask_pagination: bool = False,
|
|
|
|
hold: bool = False,
|
|
|
|
) -> object:
|
|
|
|
"""Confirm byte sequence data."""
|
|
|
|
|
|
|
|
|
|
|
|
# rust/src/ui/model_tt/layout.rs
|
|
|
|
def show_qr(
|
|
|
|
*,
|
|
|
|
title: str,
|
|
|
|
address: str,
|
|
|
|
verb_cancel: str,
|
|
|
|
case_sensitive: bool,
|
|
|
|
) -> object:
|
|
|
|
"""Show QR code."""
|
|
|
|
|
|
|
|
|
|
|
|
# rust/src/ui/model_tt/layout.rs
|
|
|
|
def confirm_output(
|
|
|
|
*,
|
|
|
|
title: str,
|
|
|
|
description: str,
|
|
|
|
value: str,
|
|
|
|
verb: str = "NEXT",
|
|
|
|
) -> object:
|
|
|
|
"""Confirm output."""
|
|
|
|
|
|
|
|
|
|
|
|
# rust/src/ui/model_tt/layout.rs
|
|
|
|
def confirm_total(
|
|
|
|
*,
|
|
|
|
title: str,
|
|
|
|
description: str,
|
|
|
|
value: str,
|
|
|
|
) -> object:
|
|
|
|
"""Confirm total."""
|
|
|
|
|
|
|
|
|
|
|
|
# rust/src/ui/model_tt/layout.rs
|
|
|
|
def confirm_joint_total(
|
|
|
|
*,
|
|
|
|
spending_amount: str,
|
|
|
|
total_amount: str,
|
|
|
|
) -> object:
|
|
|
|
"""Confirm total if there are external inputs."""
|
|
|
|
|
|
|
|
|
|
|
|
# rust/src/ui/model_tt/layout.rs
|
|
|
|
def confirm_modify_output(
|
|
|
|
*,
|
|
|
|
address: str,
|
|
|
|
sign: int,
|
|
|
|
amount_change: str,
|
|
|
|
amount_new: str,
|
|
|
|
) -> object:
|
|
|
|
"""Decrease or increase amount for given address."""
|
|
|
|
|
|
|
|
|
|
|
|
# rust/src/ui/model_tt/layout.rs
|
|
|
|
def confirm_modify_fee(
|
|
|
|
*,
|
|
|
|
sign: int,
|
|
|
|
user_fee_change: str,
|
|
|
|
total_fee_new: str,
|
|
|
|
) -> object:
|
|
|
|
"""Decrease or increase transaction fee."""
|
|
|
|
|
|
|
|
|
|
|
|
# rust/src/ui/model_tt/layout.rs
|
|
|
|
def show_warning(
|
|
|
|
*,
|
|
|
|
title: str,
|
|
|
|
description: str = "",
|
|
|
|
) -> object:
|
|
|
|
"""Warning modal."""
|
|
|
|
|
|
|
|
|
|
|
|
# rust/src/ui/model_tt/layout.rs
|
|
|
|
def show_success(
|
|
|
|
*,
|
|
|
|
title: str,
|
|
|
|
button: str,
|
|
|
|
description: str = "",
|
|
|
|
) -> object:
|
|
|
|
"""Success modal."""
|
|
|
|
|
|
|
|
|
|
|
|
# rust/src/ui/model_tt/layout.rs
|
|
|
|
def confirm_payment_request(
|
|
|
|
*,
|
|
|
|
description: str,
|
|
|
|
memos: Iterable[str],
|
|
|
|
) -> object:
|
|
|
|
"""Confirm payment request."""
|
|
|
|
|
|
|
|
|
|
|
|
# rust/src/ui/model_tt/layout.rs
|
|
|
|
def confirm_coinjoin(
|
|
|
|
*,
|
|
|
|
coin_name: str,
|
|
|
|
max_rounds: str,
|
|
|
|
max_feerate: str,
|
|
|
|
) -> object:
|
|
|
|
"""Confirm coinjoin authorization."""
|
|
|
|
|
|
|
|
|
2022-02-19 12:49:04 +00:00
|
|
|
# rust/src/ui/model_tt/layout.rs
|
|
|
|
def request_pin(
|
2022-03-04 11:56:49 +00:00
|
|
|
*,
|
|
|
|
prompt: str,
|
2022-05-24 10:54:02 +00:00
|
|
|
subprompt: str,
|
2022-02-19 12:49:04 +00:00
|
|
|
allow_cancel: bool = True,
|
|
|
|
warning: str | None = None,
|
|
|
|
) -> str | object:
|
|
|
|
"""Request pin on device."""
|
2022-03-04 11:56:49 +00:00
|
|
|
|
|
|
|
|
2022-02-19 12:49:04 +00:00
|
|
|
# rust/src/ui/model_tt/layout.rs
|
|
|
|
def request_passphrase(
|
2022-03-04 11:56:49 +00:00
|
|
|
*,
|
|
|
|
prompt: str,
|
2022-02-19 12:49:04 +00:00
|
|
|
max_len: int,
|
|
|
|
) -> str | object:
|
|
|
|
"""Passphrase input keyboard."""
|
2022-03-04 11:56:49 +00:00
|
|
|
|
|
|
|
|
2022-02-19 12:49:04 +00:00
|
|
|
# rust/src/ui/model_tt/layout.rs
|
|
|
|
def request_bip39(
|
2022-03-04 11:56:49 +00:00
|
|
|
*,
|
|
|
|
prompt: str,
|
2022-02-19 12:49:04 +00:00
|
|
|
) -> str:
|
|
|
|
"""BIP39 word input keyboard."""
|
2022-03-04 11:56:49 +00:00
|
|
|
|
|
|
|
|
2022-02-19 12:49:04 +00:00
|
|
|
# rust/src/ui/model_tt/layout.rs
|
|
|
|
def request_slip39(
|
2021-12-13 11:22:52 +00:00
|
|
|
*,
|
2022-02-19 12:49:04 +00:00
|
|
|
prompt: str,
|
|
|
|
) -> str:
|
|
|
|
"""SLIP39 word input keyboard."""
|