1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-23 06:48:16 +00:00
trezor-firmware/docs/core/src/apps.md
Tomas Susanka 445f56d387 core/bitcoin: finalize bitcoin refactor
- core/bitcoin: move common files to the app's root
- core/bitcoin: use require_confirm instead of confirm
- core: move bitcoin unrelated functions from 'bitcoin' to a new 'misc' app
- core/bitcoin: use relative imports inside the app
- core: rename wallet app to bitcoin
- core/wallet: replace SigningErrors and the other exception classes with wire.Errors
2020-05-18 14:31:51 +02:00

597 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.bitcoin module.

from trezor import wire
from trezor.messages import MessageType

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