Ejemplo n.º 1
0
        apps.monero.boot()
        apps.nem.boot()
        apps.stellar.boot()
        apps.ripple.boot()
        apps.cardano.boot()
        apps.tezos.boot()
        apps.eos.boot()
        apps.binance.boot()
        apps.webauthn.boot()
        apps.polis.boot()

    if __debug__:
        apps.debug.boot()

    # run main event loop and specify which screen is the default
    apps.base.set_homescreen()
    workflow.start_default()


_boot_apps()

# initialize the wire codec
wire.setup(usb.iface_wire)
if __debug__:
    wire.setup(usb.iface_debug, use_workflow=False)

loop.run()

# loop is empty. That should not happen
utils.halt("All tasks have died.")
Ejemplo n.º 2
0
    apps.eos.boot()
    apps.binance.boot()
    if __debug__:
        apps.debug.boot()
    else:
        apps.webauthn.boot(usb.iface_webauthn)

    # run main event loop and specify which screen is the default
    from apps.homescreen.homescreen import homescreen

    workflow.startdefault(homescreen)


from trezor import loop, wire, workflow
from apps.common.storage import recovery

while True:
    # initialize the wire codec
    wire.setup(usb.iface_wire)
    if __debug__:
        wire.setup(usb.iface_debug)

    # boot either in recovery or default mode
    if recovery.is_in_progress():
        _boot_recovery()
    else:
        _boot_default()
    loop.run()

    # loop is empty, reboot
Ejemplo n.º 3
0
        0x26,
        0xff,
        0x00,  # LOGICAL_MAXIMUM (255)
        0x75,
        0x08,  # REPORT_SIZE (8)
        0x95,
        0x40,  # REPORT_COUNT (64)
        0x91,
        0x02,  # OUTPUT (Data,Var,Abs)
        0xc0,  # END_COLLECTION
    ]),
)

msg.init_usb(
    msg.USB(vendor_id=0x1209,
            product_id=0x53C1,
            release_num=0x0002,
            manufacturer_str="SatoshiLabs",
            product_str="TREZOR",
            serial_number_str="000000000000000000000000"),
    (hid_wire, vcp, hid_u2f))

# Initialize the wire codec pipeline
wire.setup(_IFACE_WIRE)

# Load default homescreen
from apps.homescreen.homescreen import layout_homescreen

# Run main even loop and specify which screen is default
trezor.main.run(default_workflow=layout_homescreen)
Ejemplo n.º 4
0
# load applications
from apps.common import storage
if __debug__:
    from apps import debug
from apps import homescreen
from apps import management
from apps import wallet
from apps import ethereum
from apps import fido_u2f

# boot applications
if __debug__:
    debug.boot()
homescreen.boot()
management.boot()
wallet.boot()
ethereum.boot()
fido_u2f.boot(usb_u2f)

# initialize the wire codec and start the USB
wire.setup(usb_wire)
usb.open()

# load default homescreen
from apps.homescreen.homescreen import layout_homescreen

# run main even loop and specify which screen is default
workflow.startdefault(layout_homescreen)
loop.run()
Ejemplo n.º 5
0
from trezor import log, loop, utils, wire, workflow

import apps.base
import usb

apps.base.boot()

if not utils.BITCOIN_ONLY and usb.ENABLE_IFACE_WEBAUTHN:
    import apps.webauthn

    apps.webauthn.boot()

if __debug__:
    import apps.debug

    apps.debug.boot()

# run main event loop and specify which screen is the default
apps.base.set_homescreen()
workflow.start_default()

# initialize the wire codec
wire.setup(usb.iface_wire)
if __debug__:
    wire.setup(usb.iface_debug, is_debug_session=True)

loop.run()

if __debug__:
    log.debug(__name__, "Restarting main loop")
Ejemplo n.º 6
0
from apps import ethereum
if __debug__:
    from apps import debug
else:
    from apps import fido_u2f

# boot applications
homescreen.boot()
management.boot()
wallet.boot()
ethereum.boot()
if __debug__:
    debug.boot()
else:
    fido_u2f.boot(usb_u2f)

# initialize the wire codec and start the USB
wire.setup(usb_wire)
if __debug__:
    wire.setup(usb_debug)
usb.open()

utils.set_mode_unprivileged()

# load default homescreen
from apps.homescreen.homescreen import homescreen

# run main even loop and specify which screen is default
workflow.startdefault(homescreen)
loop.run()
Ejemplo n.º 7
0
from apps import ethereum

# Initialize all applications
if __debug__:
    debug.boot()
homescreen.boot()
management.boot()
wallet.boot()
ethereum.boot()

# HACK: keep storage loaded at all times
from apps.common import storage

# Change backlight to white for better visibility
ui.display.backlight(ui.BACKLIGHT_NORMAL)

# Just a demo to show how to register USB ifaces
msg.set_interfaces([0xFF00, 0xFF01, 0xF1D0])
# and list them
for i, up in enumerate(msg.get_interfaces()):
    print("iface %d: usage_page 0x%04x" % (i + 1, up))

# Initialize the wire codec pipeline
wire.setup(0xFF00)

# Load default homescreen
from apps.homescreen.homescreen import layout_homescreen

# Run main even loop and specify which screen is default
trezor.main.run(default_workflow=layout_homescreen)