1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-03-29 14:35:51 +00:00
trezor-firmware/docs/core/src/apps.md
2019-12-06 12:24:20 +00:00

595 B

Apps

The folder src/apps/ is the place where all the user-facing features are implemented.

Each app has a boot() function in the module's __init__ file. This functions assigns what function should be called if some specific message was received. In other words, it is a link between the MicroPython functions and the Protobuf messages.

Example

This binds the message GetAddress to function get_address inside the apps.wallet module.

from trezor import wire
from trezor.messages import MessageType

wire.add(MessageType.GetAddress, apps.wallet, "get_address")