mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
common: Add DoPreauthorized message.
This commit is contained in:
parent
b9cfecb8b8
commit
2c30dd62fc
@ -369,3 +369,21 @@ message GetNextU2FCounter {
|
|||||||
message NextU2FCounter {
|
message NextU2FCounter {
|
||||||
optional uint32 u2f_counter = 1;
|
optional uint32 u2f_counter = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request: Ask device to prepare for a preauthorized operation.
|
||||||
|
* @start
|
||||||
|
* @next PreauthorizedRequest
|
||||||
|
* @next Failure
|
||||||
|
*/
|
||||||
|
message DoPreauthorized {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request: Device awaits a preauthorized operation.
|
||||||
|
* @start
|
||||||
|
* @next SignTx
|
||||||
|
* @next GetOwnershipProof
|
||||||
|
*/
|
||||||
|
message PreauthorizedRequest {
|
||||||
|
}
|
||||||
|
@ -64,6 +64,8 @@ enum MessageType {
|
|||||||
MessageType_NextU2FCounter = 81 [(wire_out) = true];
|
MessageType_NextU2FCounter = 81 [(wire_out) = true];
|
||||||
MessageType_ChangeWipeCode = 82 [(wire_in) = true];
|
MessageType_ChangeWipeCode = 82 [(wire_in) = true];
|
||||||
MessageType_EndSession = 83 [(wire_in) = true];
|
MessageType_EndSession = 83 [(wire_in) = true];
|
||||||
|
MessageType_DoPreauthorized = 84 [(wire_in) = true];
|
||||||
|
MessageType_PreauthorizedRequest = 85 [(wire_out) = true];
|
||||||
|
|
||||||
// Deprecated messages, kept for protobuf compatibility.
|
// Deprecated messages, kept for protobuf compatibility.
|
||||||
// Both are marked wire_out so that we don't need to implement incoming handler for legacy
|
// Both are marked wire_out so that we don't need to implement incoming handler for legacy
|
||||||
|
14
core/src/trezor/messages/DoPreauthorized.py
Normal file
14
core/src/trezor/messages/DoPreauthorized.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
|
||||||
|
if __debug__:
|
||||||
|
try:
|
||||||
|
from typing import Dict, List # noqa: F401
|
||||||
|
from typing_extensions import Literal # noqa: F401
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class DoPreauthorized(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 84
|
@ -39,6 +39,8 @@ GetNextU2FCounter = 80 # type: Literal[80]
|
|||||||
NextU2FCounter = 81 # type: Literal[81]
|
NextU2FCounter = 81 # type: Literal[81]
|
||||||
ChangeWipeCode = 82 # type: Literal[82]
|
ChangeWipeCode = 82 # type: Literal[82]
|
||||||
EndSession = 83 # type: Literal[83]
|
EndSession = 83 # type: Literal[83]
|
||||||
|
DoPreauthorized = 84 # type: Literal[84]
|
||||||
|
PreauthorizedRequest = 85 # type: Literal[85]
|
||||||
Deprecated_PassphraseStateRequest = 77 # type: Literal[77]
|
Deprecated_PassphraseStateRequest = 77 # type: Literal[77]
|
||||||
Deprecated_PassphraseStateAck = 78 # type: Literal[78]
|
Deprecated_PassphraseStateAck = 78 # type: Literal[78]
|
||||||
FirmwareErase = 6 # type: Literal[6]
|
FirmwareErase = 6 # type: Literal[6]
|
||||||
|
14
core/src/trezor/messages/PreauthorizedRequest.py
Normal file
14
core/src/trezor/messages/PreauthorizedRequest.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
import protobuf as p
|
||||||
|
|
||||||
|
if __debug__:
|
||||||
|
try:
|
||||||
|
from typing import Dict, List # noqa: F401
|
||||||
|
from typing_extensions import Literal # noqa: F401
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class PreauthorizedRequest(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 85
|
@ -4,7 +4,7 @@ endif
|
|||||||
|
|
||||||
SKIPPED_MESSAGES := Binance Cardano DebugMonero Eos Monero Ontology Ripple SdProtect Tezos WebAuthn \
|
SKIPPED_MESSAGES := Binance Cardano DebugMonero Eos Monero Ontology Ripple SdProtect Tezos WebAuthn \
|
||||||
DebugLinkRecordScreen DebugLinkReseedRandom DebugLinkShowText DebugLinkEraseSdCard DebugLinkWatchLayout \
|
DebugLinkRecordScreen DebugLinkReseedRandom DebugLinkShowText DebugLinkEraseSdCard DebugLinkWatchLayout \
|
||||||
GetOwnershipProof OwnershipProof GetOwnershipId OwnershipId AuthorizeCoinJoin
|
GetOwnershipProof OwnershipProof GetOwnershipId OwnershipId AuthorizeCoinJoin DoPreauthorized
|
||||||
|
|
||||||
ifeq ($(BITCOIN_ONLY), 1)
|
ifeq ($(BITCOIN_ONLY), 1)
|
||||||
SKIPPED_MESSAGES += Ethereum Lisk NEM Stellar
|
SKIPPED_MESSAGES += Ethereum Lisk NEM Stellar
|
||||||
|
14
python/src/trezorlib/messages/DoPreauthorized.py
Normal file
14
python/src/trezorlib/messages/DoPreauthorized.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
from .. import protobuf as p
|
||||||
|
|
||||||
|
if __debug__:
|
||||||
|
try:
|
||||||
|
from typing import Dict, List # noqa: F401
|
||||||
|
from typing_extensions import Literal # noqa: F401
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class DoPreauthorized(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 84
|
@ -37,6 +37,8 @@ GetNextU2FCounter = 80 # type: Literal[80]
|
|||||||
NextU2FCounter = 81 # type: Literal[81]
|
NextU2FCounter = 81 # type: Literal[81]
|
||||||
ChangeWipeCode = 82 # type: Literal[82]
|
ChangeWipeCode = 82 # type: Literal[82]
|
||||||
EndSession = 83 # type: Literal[83]
|
EndSession = 83 # type: Literal[83]
|
||||||
|
DoPreauthorized = 84 # type: Literal[84]
|
||||||
|
PreauthorizedRequest = 85 # type: Literal[85]
|
||||||
Deprecated_PassphraseStateRequest = 77 # type: Literal[77]
|
Deprecated_PassphraseStateRequest = 77 # type: Literal[77]
|
||||||
Deprecated_PassphraseStateAck = 78 # type: Literal[78]
|
Deprecated_PassphraseStateAck = 78 # type: Literal[78]
|
||||||
FirmwareErase = 6 # type: Literal[6]
|
FirmwareErase = 6 # type: Literal[6]
|
||||||
|
14
python/src/trezorlib/messages/PreauthorizedRequest.py
Normal file
14
python/src/trezorlib/messages/PreauthorizedRequest.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
# fmt: off
|
||||||
|
from .. import protobuf as p
|
||||||
|
|
||||||
|
if __debug__:
|
||||||
|
try:
|
||||||
|
from typing import Dict, List # noqa: F401
|
||||||
|
from typing_extensions import Literal # noqa: F401
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class PreauthorizedRequest(p.MessageType):
|
||||||
|
MESSAGE_WIRE_TYPE = 85
|
@ -61,6 +61,7 @@ from .DebugMoneroDiagAck import DebugMoneroDiagAck
|
|||||||
from .DebugMoneroDiagRequest import DebugMoneroDiagRequest
|
from .DebugMoneroDiagRequest import DebugMoneroDiagRequest
|
||||||
from .Deprecated_PassphraseStateAck import Deprecated_PassphraseStateAck
|
from .Deprecated_PassphraseStateAck import Deprecated_PassphraseStateAck
|
||||||
from .Deprecated_PassphraseStateRequest import Deprecated_PassphraseStateRequest
|
from .Deprecated_PassphraseStateRequest import Deprecated_PassphraseStateRequest
|
||||||
|
from .DoPreauthorized import DoPreauthorized
|
||||||
from .ECDHSessionKey import ECDHSessionKey
|
from .ECDHSessionKey import ECDHSessionKey
|
||||||
from .EndSession import EndSession
|
from .EndSession import EndSession
|
||||||
from .Entropy import Entropy
|
from .Entropy import Entropy
|
||||||
@ -211,6 +212,7 @@ from .PassphraseRequest import PassphraseRequest
|
|||||||
from .PinMatrixAck import PinMatrixAck
|
from .PinMatrixAck import PinMatrixAck
|
||||||
from .PinMatrixRequest import PinMatrixRequest
|
from .PinMatrixRequest import PinMatrixRequest
|
||||||
from .Ping import Ping
|
from .Ping import Ping
|
||||||
|
from .PreauthorizedRequest import PreauthorizedRequest
|
||||||
from .PublicKey import PublicKey
|
from .PublicKey import PublicKey
|
||||||
from .RecoveryDevice import RecoveryDevice
|
from .RecoveryDevice import RecoveryDevice
|
||||||
from .ResetDevice import ResetDevice
|
from .ResetDevice import ResetDevice
|
||||||
|
Loading…
Reference in New Issue
Block a user