How to use the trezor.wire.add function in trezor

To help you get started, we’ve selected a few trezor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github trezor / trezor-core / src / apps / monero / __init__.py View on Github external
def boot():
    ns = [[CURVE, HARDENED | 44, HARDENED | 128]]
    wire.add(MessageType.MoneroGetAddress, __name__, "get_address", ns)
    wire.add(MessageType.MoneroGetWatchKey, __name__, "get_watch_only", ns)
    wire.add(MessageType.MoneroTransactionInitRequest, __name__, "sign_tx", ns)
    wire.add(
        MessageType.MoneroKeyImageExportInitRequest, __name__, "key_image_sync", ns
    )
    wire.add(MessageType.MoneroGetTxKeyRequest, __name__, "get_tx_keys", ns)
    wire.add(MessageType.MoneroLiveRefreshStartRequest, __name__, "live_refresh", ns)

    if __debug__ and hasattr(MessageType, "DebugMoneroDiagRequest"):
        wire.add(MessageType.DebugMoneroDiagRequest, __name__, "diag")
github trezor / trezor-core / src / apps / management / __init__.py View on Github external
def boot():
    # only enable LoadDevice in debug builds
    if __debug__:
        wire.add(MessageType.LoadDevice, __name__, "load_device")
    wire.add(MessageType.ResetDevice, __name__, "reset_device")
    wire.add(MessageType.BackupDevice, __name__, "backup_device")
    wire.add(MessageType.WipeDevice, __name__, "wipe_device")
    wire.add(MessageType.RecoveryDevice, __name__, "recovery_device")
    wire.add(MessageType.ApplySettings, __name__, "apply_settings")
    wire.add(MessageType.ApplyFlags, __name__, "apply_flags")
    wire.add(MessageType.ChangePin, __name__, "change_pin")
    wire.add(MessageType.SetU2FCounter, __name__, "set_u2f_counter")
github trezor / trezor-firmware / core / src / apps / stellar / __init__.py View on Github external
def boot() -> None:
    ns = [[CURVE, HARDENED | 44, HARDENED | 148]]
    wire.add(MessageType.StellarGetAddress, __name__, "get_address", ns)
    wire.add(MessageType.StellarSignTx, __name__, "sign_tx", ns)
github trezor / trezor-core / src / apps / management / __init__.py View on Github external
def boot():
    # only enable LoadDevice in debug builds
    if __debug__:
        wire.add(MessageType.LoadDevice, __name__, "load_device")
    wire.add(MessageType.ResetDevice, __name__, "reset_device")
    wire.add(MessageType.BackupDevice, __name__, "backup_device")
    wire.add(MessageType.WipeDevice, __name__, "wipe_device")
    wire.add(MessageType.RecoveryDevice, __name__, "recovery_device")
    wire.add(MessageType.ApplySettings, __name__, "apply_settings")
    wire.add(MessageType.ApplyFlags, __name__, "apply_flags")
    wire.add(MessageType.ChangePin, __name__, "change_pin")
    wire.add(MessageType.SetU2FCounter, __name__, "set_u2f_counter")
github trezor / trezor-firmware / core / src / apps / monero / __init__.py View on Github external
def boot() -> None:
    ns = [[CURVE, HARDENED | 44, HARDENED | 128]]
    wire.add(MessageType.MoneroGetAddress, __name__, "get_address", ns)
    wire.add(MessageType.MoneroGetWatchKey, __name__, "get_watch_only", ns)
    wire.add(MessageType.MoneroTransactionInitRequest, __name__, "sign_tx", ns)
    wire.add(
        MessageType.MoneroKeyImageExportInitRequest, __name__, "key_image_sync", ns
    )
    wire.add(MessageType.MoneroGetTxKeyRequest, __name__, "get_tx_keys", ns)
    wire.add(MessageType.MoneroLiveRefreshStartRequest, __name__, "live_refresh", ns)

    if __debug__ and hasattr(MessageType, "DebugMoneroDiagRequest"):
        wire.add(MessageType.DebugMoneroDiagRequest, __name__, "diag")
github trezor / trezor-firmware / core / src / apps / monero / __init__.py View on Github external
def boot() -> None:
    ns = [[CURVE, HARDENED | 44, HARDENED | 128]]
    wire.add(MessageType.MoneroGetAddress, __name__, "get_address", ns)
    wire.add(MessageType.MoneroGetWatchKey, __name__, "get_watch_only", ns)
    wire.add(MessageType.MoneroTransactionInitRequest, __name__, "sign_tx", ns)
    wire.add(
        MessageType.MoneroKeyImageExportInitRequest, __name__, "key_image_sync", ns
    )
    wire.add(MessageType.MoneroGetTxKeyRequest, __name__, "get_tx_keys", ns)
    wire.add(MessageType.MoneroLiveRefreshStartRequest, __name__, "live_refresh", ns)

    if __debug__ and hasattr(MessageType, "DebugMoneroDiagRequest"):
        wire.add(MessageType.DebugMoneroDiagRequest, __name__, "diag")
github trezor / trezor-core / src / apps / management / __init__.py View on Github external
def boot():
    # only enable LoadDevice in debug builds
    if __debug__:
        wire.add(MessageType.LoadDevice, __name__, "load_device")
    wire.add(MessageType.ResetDevice, __name__, "reset_device")
    wire.add(MessageType.BackupDevice, __name__, "backup_device")
    wire.add(MessageType.WipeDevice, __name__, "wipe_device")
    wire.add(MessageType.RecoveryDevice, __name__, "recovery_device")
    wire.add(MessageType.ApplySettings, __name__, "apply_settings")
    wire.add(MessageType.ApplyFlags, __name__, "apply_flags")
    wire.add(MessageType.ChangePin, __name__, "change_pin")
    wire.add(MessageType.SetU2FCounter, __name__, "set_u2f_counter")
github trezor / trezor-firmware / core / src / apps / binance / __init__.py View on Github external
def boot():
    ns = [[CURVE, HARDENED | 44, HARDENED | 714]]
    wire.add(MessageType.BinanceGetAddress, __name__, "get_address", ns)
    wire.add(MessageType.BinanceGetPublicKey, __name__, "get_public_key", ns)
    wire.add(MessageType.BinanceSignTx, __name__, "sign_tx", ns)
github trezor / trezor-firmware / core / src / apps / nem / __init__.py View on Github external
def boot() -> None:
    ns = [[CURVE, HARDENED | 44, HARDENED | 43], [CURVE, HARDENED | 44, HARDENED | 1]]
    wire.add(MessageType.NEMGetAddress, __name__, "get_address", ns)
    wire.add(MessageType.NEMSignTx, __name__, "sign_tx", ns)