2016-12-08 15:18:12 +00:00
|
|
|
from trezor.wire import register, protobuf_workflow
|
2016-09-21 12:24:12 +00:00
|
|
|
from trezor.utils import unimport
|
|
|
|
from trezor.messages.wire_types import \
|
2017-05-08 20:11:30 +00:00
|
|
|
GetPublicKey, GetAddress, \
|
|
|
|
GetEntropy, \
|
2017-07-28 16:19:43 +00:00
|
|
|
SignTx, \
|
2016-11-18 13:19:03 +00:00
|
|
|
SignMessage, VerifyMessage, \
|
2016-11-18 13:59:36 +00:00
|
|
|
SignIdentity, \
|
|
|
|
CipherKeyValue
|
2016-05-25 12:27:22 +00:00
|
|
|
|
|
|
|
|
2016-09-21 12:24:12 +00:00
|
|
|
@unimport
|
|
|
|
def dispatch_GetPublicKey(*args, **kwargs):
|
2016-12-08 15:18:12 +00:00
|
|
|
from .get_public_key import layout_get_public_key
|
2016-09-21 12:24:12 +00:00
|
|
|
return layout_get_public_key(*args, **kwargs)
|
2016-06-09 14:06:37 +00:00
|
|
|
|
|
|
|
|
2016-10-20 13:04:29 +00:00
|
|
|
@unimport
|
|
|
|
def dispatch_GetAddress(*args, **kwargs):
|
2016-12-08 15:18:12 +00:00
|
|
|
from .get_address import layout_get_address
|
2016-10-20 13:04:29 +00:00
|
|
|
return layout_get_address(*args, **kwargs)
|
|
|
|
|
|
|
|
|
2017-05-08 20:11:30 +00:00
|
|
|
@unimport
|
|
|
|
def dispatch_GetEntropy(*args, **kwargs):
|
|
|
|
from .get_entropy import layout_get_entropy
|
|
|
|
return layout_get_entropy(*args, **kwargs)
|
|
|
|
|
|
|
|
|
2016-11-11 10:27:10 +00:00
|
|
|
@unimport
|
|
|
|
def dispatch_SignTx(*args, **kwargs):
|
2016-12-08 17:51:39 +00:00
|
|
|
from .sign_tx import sign_tx
|
2016-12-08 15:18:12 +00:00
|
|
|
return sign_tx(*args, **kwargs)
|
2016-11-11 10:27:10 +00:00
|
|
|
|
|
|
|
|
2016-09-21 12:24:12 +00:00
|
|
|
@unimport
|
|
|
|
def dispatch_SignMessage(*args, **kwargs):
|
2016-12-08 15:18:12 +00:00
|
|
|
from .sign_message import layout_sign_message
|
2016-09-21 12:24:12 +00:00
|
|
|
return layout_sign_message(*args, **kwargs)
|
2016-06-09 15:34:43 +00:00
|
|
|
|
|
|
|
|
2016-11-16 21:55:11 +00:00
|
|
|
@unimport
|
|
|
|
def dispatch_VerifyMessage(*args, **kwargs):
|
2016-12-08 15:18:12 +00:00
|
|
|
from .verify_message import layout_verify_message
|
2016-11-16 21:55:11 +00:00
|
|
|
return layout_verify_message(*args, **kwargs)
|
|
|
|
|
|
|
|
|
2016-11-18 13:19:03 +00:00
|
|
|
@unimport
|
|
|
|
def dispatch_SignIdentity(*args, **kwargs):
|
2016-12-08 15:18:12 +00:00
|
|
|
from .sign_identity import layout_sign_identity
|
2016-11-18 13:19:03 +00:00
|
|
|
return layout_sign_identity(*args, **kwargs)
|
|
|
|
|
|
|
|
|
2016-11-18 13:59:36 +00:00
|
|
|
@unimport
|
|
|
|
def dispatch_CipherKeyValue(*args, **kwargs):
|
2016-12-08 15:31:10 +00:00
|
|
|
from .cipher_key_value import layout_cipher_key_value
|
|
|
|
return layout_cipher_key_value(*args, **kwargs)
|
2016-11-18 13:59:36 +00:00
|
|
|
|
|
|
|
|
2016-05-25 12:27:22 +00:00
|
|
|
def boot():
|
2016-12-08 15:18:12 +00:00
|
|
|
register(GetPublicKey, protobuf_workflow, dispatch_GetPublicKey)
|
|
|
|
register(GetAddress, protobuf_workflow, dispatch_GetAddress)
|
2017-05-08 20:11:30 +00:00
|
|
|
register(GetEntropy, protobuf_workflow, dispatch_GetEntropy)
|
2016-12-08 15:18:12 +00:00
|
|
|
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(CipherKeyValue, protobuf_workflow, dispatch_CipherKeyValue)
|