예제 #1
0
    def boot() -> None:
        # wipe storage when debug build is used on real hardware
        if not utils.EMULATOR:
            config.wipe()

        register(MessageType.DebugLinkDecision, dispatch_DebugLinkDecision)
        register(MessageType.DebugLinkGetState, dispatch_DebugLinkGetState)
예제 #2
0
def boot(features_only: bool = False) -> None:
    register(MessageType.Initialize, handle_Initialize)
    register(MessageType.GetFeatures, handle_GetFeatures)
    if not features_only:
        register(MessageType.Cancel, handle_Cancel)
        register(MessageType.ClearSession, handle_ClearSession)
        register(MessageType.Ping, handle_Ping)
예제 #3
0
    def boot():
        # wipe storage when debug build is used
        storage.wipe()

        register(MessageType.DebugLinkDecision, protobuf_workflow,
                 dispatch_DebugLinkDecision)
        register(MessageType.DebugLinkGetState, protobuf_workflow,
                 dispatch_DebugLinkGetState)
예제 #4
0
def boot() -> None:
    wire.register(MessageType.Initialize, handle_Initialize)
    wire.register(MessageType.GetFeatures, handle_GetFeatures)
    wire.register(MessageType.Cancel, handle_Cancel)
    wire.register(MessageType.LockDevice, handle_LockDevice)
    wire.register(MessageType.Ping, handle_Ping)

    workflow.idle_timer.set(storage.device.get_autolock_delay_ms(),
                            lock_device)
예제 #5
0
    def boot():
        # wipe storage when debug build is used on real hardware
        if not utils.EMULATOR:
            storage.wipe()

        register(MessageType.DebugLinkDecision, protobuf_workflow,
                 dispatch_DebugLinkDecision)
        register(MessageType.DebugLinkGetState, protobuf_workflow,
                 dispatch_DebugLinkGetState)
예제 #6
0
def boot():
    register(CardanoGetAddress, protobuf_workflow, dispatch_CardanoGetAddress)
    register(CardanoGetPublicKey, protobuf_workflow,
             dispatch_CardanoGetPublicKey)
    register(CardanoSignMessage, protobuf_workflow,
             dispatch_CardanoSignMessage)
    register(CardanoVerifyMessage, protobuf_workflow,
             dispatch_CardanoVerifyMessage)
    register(CardanoSignTransaction, protobuf_workflow,
             dispatch_CardanoSignTransaction)
예제 #7
0
    def boot() -> None:
        # wipe storage when debug build is used on real hardware
        if not utils.EMULATOR:
            config.wipe()

        wire.register(MessageType.DebugLinkDecision,
                      dispatch_DebugLinkDecision)
        wire.register(MessageType.DebugLinkGetState,
                      dispatch_DebugLinkGetState)

        wire.add(MessageType.LoadDevice, __name__, "load_device")
예제 #8
0
def boot():
    register(EthereumGetAddress, protobuf_workflow,
             dispatch_EthereumGetAddress)
    register(EthereumSignTx, protobuf_workflow, dispatch_EthereumSignTx)
    register(EthereumSignMessage, protobuf_workflow,
             dispatch_EthereumSignMessage)
    register(EthereumVerifyMessage, protobuf_workflow,
             dispatch_EthereumVerifyMessage)
예제 #9
0
    def boot() -> None:
        # wipe storage when debug build is used on real hardware
        if not utils.EMULATOR:
            config.wipe()

        wire.add(MessageType.LoadDevice, __name__, "load_device")
        wire.add(MessageType.DebugLinkShowText, __name__, "show_text")
        wire.register(MessageType.DebugLinkDecision,
                      dispatch_DebugLinkDecision)
        wire.register(MessageType.DebugLinkGetState,
                      dispatch_DebugLinkGetState)
        wire.register(MessageType.DebugLinkReseedRandom,
                      dispatch_DebugLinkReseedRandom)
        wire.register(MessageType.DebugLinkRecordScreen,
                      dispatch_DebugLinkRecordScreen)
        wire.register(MessageType.DebugLinkEraseSdCard,
                      dispatch_DebugLinkEraseSdCard)
예제 #10
0
def boot():
    register(Initialize, protobuf_workflow, respond_Features)
    register(GetFeatures, protobuf_workflow, respond_Features)
    register(Ping, protobuf_workflow, respond_Pong)
예제 #11
0
def boot():
    register(NEMGetAddress, protobuf_workflow, dispatch_NemGetAddress)
    register(NEMSignTx, protobuf_workflow, dispatch_NemSignTx)
예제 #12
0
def boot():
    register(MessageType.Initialize, protobuf_workflow, handle_Initialize)
    register(MessageType.GetFeatures, protobuf_workflow, handle_GetFeatures)
    register(MessageType.Cancel, protobuf_workflow, handle_Cancel)
    register(MessageType.ClearSession, protobuf_workflow, handle_ClearSession)
    register(MessageType.Ping, protobuf_workflow, handle_Ping)
예제 #13
0
def boot():
    register(GetPublicKey, protobuf_workflow, dispatch_GetPublicKey)
    register(GetAddress, protobuf_workflow, dispatch_GetAddress)
    register(GetEntropy, protobuf_workflow, dispatch_GetEntropy)
    register(SignTx, protobuf_workflow, dispatch_SignTx)
    register(SignMessage, protobuf_workflow, dispatch_SignMessage)
    register(VerifyMessage, protobuf_workflow, dispatch_VerifyMessage)
    register(SignIdentity, protobuf_workflow, dispatch_SignIdentity)
    register(GetECDHSessionKey, protobuf_workflow, dispatch_GetECDHSessionKey)
    register(CipherKeyValue, protobuf_workflow, dispatch_CipherKeyValue)
예제 #14
0
def boot():
    register(wire_types.Initialize, protobuf_workflow, handle_Initialize)
    register(wire_types.GetFeatures, protobuf_workflow, handle_GetFeatures)
    register(wire_types.ClearSession, protobuf_workflow, handle_ClearSession)
    register(wire_types.Ping, protobuf_workflow, handle_Ping)
예제 #15
0
def boot():
    register(EthereumGetAddress, protobuf_workflow,
             dispatch_EthereumGetAddress)
예제 #16
0
def boot():
    register(LiskGetPublicKey, protobuf_workflow, dispatch_LiskGetPublicKey)
    register(LiskGetAddress, protobuf_workflow, dispatch_LiskGetAddress)
    register(LiskSignMessage, protobuf_workflow, dispatch_LiskSignMessage)
    register(LiskVerifyMessage, protobuf_workflow, dispatch_LiskVerifyMessage)
    register(LiskSignTx, protobuf_workflow, dispatch_LiskSignTx)
예제 #17
0
def boot():
    register(LoadDevice, protobuf_workflow, dispatch_LoadDevice)
    register(ResetDevice, protobuf_workflow, dispatch_ResetDevice)
    register(WipeDevice, protobuf_workflow, dispatch_WipeDevice)
    register(RecoveryDevice, protobuf_workflow, dispatch_RecoveryDevice)
    register(ApplySettings, protobuf_workflow, dispatch_ApplySettings)
    register(ChangePin, protobuf_workflow, dispatch_ChangePin)
예제 #18
0
def boot():
    register(StellarGetAddress, protobuf_workflow, dispatch_StellarGetAddress)
    register(StellarGetPublicKey, protobuf_workflow,
             dispatch_StellarGetPublicKey)
    register(StellarSignTx, protobuf_workflow, dispatch_StellarSignTx)
예제 #19
0
def boot() -> None:
    wire.register(MessageType.Initialize, handle_Initialize)
    wire.register(MessageType.GetFeatures, handle_GetFeatures)
    wire.register(MessageType.Cancel, handle_Cancel)
    wire.register(MessageType.LockDevice, handle_LockDevice)
    wire.register(MessageType.EndSession, handle_EndSession)
    wire.register(MessageType.Ping, handle_Ping)
    wire.register(MessageType.DoPreauthorized, handle_DoPreauthorized)
    wire.register(MessageType.CancelAuthorization, handle_CancelAuthorization)

    wire.experimental_enabled = storage.device.get_experimental_features()

    workflow.idle_timer.set(storage.device.get_autolock_delay_ms(),
                            lock_device)
예제 #20
0
def boot():
    register(wire_types.DebugLinkDecision, protobuf_workflow,
             dispatch_DebugLinkDecision)
    register(wire_types.DebugLinkGetState, protobuf_workflow,
             dispatch_DebugLinkGetState)
예제 #21
0
def boot():
    register(GetPublicKey, protobuf_workflow, dispatch_GetPublicKey)
    register(GetAddress, protobuf_workflow, dispatch_GetAddress)
    register(SignTx, protobuf_workflow, dispatch_SignTx)
    register(EstimateTxSize, protobuf_workflow, dispatch_EstimateTxSize)
    register(SignMessage, protobuf_workflow, dispatch_SignMessage)
    register(VerifyMessage, protobuf_workflow, dispatch_VerifyMessage)
    register(SignIdentity, protobuf_workflow, dispatch_SignIdentity)
    register(CipherKeyValue, protobuf_workflow, dispatch_CipherKeyValue)
예제 #22
0
def boot() -> None:
    register(MessageType.Initialize, handle_Initialize)
    register(MessageType.GetFeatures, handle_GetFeatures)
    register(MessageType.Cancel, handle_Cancel)
    register(MessageType.ClearSession, handle_ClearSession)
    register(MessageType.Ping, handle_Ping)
예제 #23
0
def boot():
    register(DebugLinkDecision, protobuf_workflow, dispatch_DebugLinkDecision)
    register(DebugLinkGetState, protobuf_workflow, dispatch_DebugLinkGetState)
    register(DebugLinkStop, protobuf_workflow, dispatch_DebugLinkStop)
    register(DebugLinkMemoryRead, protobuf_workflow, dispatch_DebugLinkMemoryRead)
    register(DebugLinkMemoryWrite, protobuf_workflow, dispatch_DebugLinkMemoryWrite)
    register(DebugLinkFlashErase, protobuf_workflow, dispatch_DebugLinkFlashErase)
예제 #24
0
def boot():
    # only enable LoadDevice in debug builds
    if __debug__:
        register(LoadDevice, protobuf_workflow, dispatch_LoadDevice)
    register(ResetDevice, protobuf_workflow, dispatch_ResetDevice)
    register(BackupDevice, protobuf_workflow, dispatch_BackupDevice)
    register(WipeDevice, protobuf_workflow, dispatch_WipeDevice)
    register(RecoveryDevice, protobuf_workflow, dispatch_RecoveryDevice)
    register(ApplySettings, protobuf_workflow, dispatch_ApplySettings)
    register(ApplyFlags, protobuf_workflow, dispatch_ApplyFlags)
    register(ChangePin, protobuf_workflow, dispatch_ChangePin)
    register(SetU2FCounter, protobuf_workflow, dispatch_SetU2FCounter)
예제 #25
0
def boot() -> None:
    wire.register(MessageType.Initialize, handle_Initialize)
    wire.register(MessageType.GetFeatures, handle_GetFeatures)
    wire.register(MessageType.Cancel, handle_Cancel)
    wire.register(MessageType.LockDevice, handle_LockDevice)
    wire.register(MessageType.EndSession, handle_EndSession)
    wire.register(MessageType.Ping, handle_Ping)
    wire.register(MessageType.DoPreauthorized, handle_DoPreauthorized)
    wire.register(MessageType.CancelAuthorization, handle_CancelAuthorization)

    reload_settings_from_storage()
예제 #26
0
def boot():
    register(wire_types.Initialize, protobuf_workflow, respond_Features)
    register(wire_types.GetFeatures, protobuf_workflow, respond_Features)
    register(wire_types.ClearSession, protobuf_workflow, respond_ClearSession)
    register(wire_types.Ping, protobuf_workflow, respond_Pong)
예제 #27
0
def boot():
    register(RippleGetAddress, protobuf_workflow, dispatch_RippleGetAddress)
    register(RippleSignTx, protobuf_workflow, dispatch_RippleSignTx)