mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
regenerate pb messages
This commit is contained in:
parent
47cfa178e4
commit
78d2c07d34
@ -1,7 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
CURDIR=$(pwd)
|
CURDIR=$(pwd)
|
||||||
mkdir -p $CURDIR/pb2/
|
PB2DIR=$CURDIR/pb2
|
||||||
touch $CURDIR/pb2/__init__.py
|
mkdir -p $PB2DIR
|
||||||
|
touch $PB2DIR/__init__.py
|
||||||
|
|
||||||
mkdir -p ../trezorlib/messages
|
mkdir -p ../trezorlib/messages
|
||||||
|
|
||||||
@ -14,7 +15,7 @@ echo '' >> $INDEX
|
|||||||
for i in types messages storage ; do
|
for i in types messages storage ; do
|
||||||
# Compile .proto files to python2 modules using google protobuf library
|
# Compile .proto files to python2 modules using google protobuf library
|
||||||
cd $CURDIR/../../trezor-common/protob
|
cd $CURDIR/../../trezor-common/protob
|
||||||
protoc --python_out=$CURDIR/pb2/ -I/usr/include -I. $i.proto
|
protoc --python_out=$PB2DIR -I/usr/include -I. $i.proto
|
||||||
done
|
done
|
||||||
|
|
||||||
# hack to make output python 3 compatible
|
# hack to make output python 3 compatible
|
||||||
@ -27,4 +28,4 @@ for i in types messages storage ; do
|
|||||||
./pb2py -p $CURDIR -l $INDEX $i ../trezorlib/messages/
|
./pb2py -p $CURDIR -l $INDEX $i ../trezorlib/messages/
|
||||||
done
|
done
|
||||||
|
|
||||||
rm -rf $CURDIR/pb2/
|
rm -rf $PB2DIR
|
||||||
|
@ -71,6 +71,8 @@ CosiCommit = 71
|
|||||||
CosiCommitment = 72
|
CosiCommitment = 72
|
||||||
CosiSign = 73
|
CosiSign = 73
|
||||||
CosiSignature = 74
|
CosiSignature = 74
|
||||||
|
NEMDecryptMessage = 75
|
||||||
|
NEMDecryptedMessage = 76
|
||||||
DebugLinkDecision = 100
|
DebugLinkDecision = 100
|
||||||
DebugLinkGetState = 101
|
DebugLinkGetState = 101
|
||||||
DebugLinkState = 102
|
DebugLinkState = 102
|
||||||
|
13
trezorlib/messages/NEMDecryptMessage.py
Normal file
13
trezorlib/messages/NEMDecryptMessage.py
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
from __future__ import absolute_import
|
||||||
|
from .. import protobuf as p
|
||||||
|
|
||||||
|
|
||||||
|
class NEMDecryptMessage(p.MessageType):
|
||||||
|
FIELDS = {
|
||||||
|
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
|
||||||
|
2: ('network', p.UVarintType, 0),
|
||||||
|
3: ('public_key', p.BytesType, 0),
|
||||||
|
4: ('payload', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
MESSAGE_WIRE_TYPE = 75
|
10
trezorlib/messages/NEMDecryptedMessage.py
Normal file
10
trezorlib/messages/NEMDecryptedMessage.py
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Automatically generated by pb2py
|
||||||
|
from __future__ import absolute_import
|
||||||
|
from .. import protobuf as p
|
||||||
|
|
||||||
|
|
||||||
|
class NEMDecryptedMessage(p.MessageType):
|
||||||
|
FIELDS = {
|
||||||
|
1: ('payload', p.BytesType, 0),
|
||||||
|
}
|
||||||
|
MESSAGE_WIRE_TYPE = 76
|
@ -1,13 +1,13 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
from .. import protobuf as p
|
from .. import protobuf as p
|
||||||
|
from .NEMMosaicSupplyChange import NEMMosaicSupplyChange
|
||||||
from .NEMTransfer import NEMTransfer
|
from .NEMTransfer import NEMTransfer
|
||||||
from .NEMMosaicCreation import NEMMosaicCreation
|
from .NEMMosaicCreation import NEMMosaicCreation
|
||||||
|
from .NEMTransactionCommon import NEMTransactionCommon
|
||||||
|
from .NEMAggregateModification import NEMAggregateModification
|
||||||
from .NEMProvisionNamespace import NEMProvisionNamespace
|
from .NEMProvisionNamespace import NEMProvisionNamespace
|
||||||
from .NEMImportanceTransfer import NEMImportanceTransfer
|
from .NEMImportanceTransfer import NEMImportanceTransfer
|
||||||
from .NEMAggregateModification import NEMAggregateModification
|
|
||||||
from .NEMMosaicSupplyChange import NEMMosaicSupplyChange
|
|
||||||
from .NEMTransactionCommon import NEMTransactionCommon
|
|
||||||
|
|
||||||
|
|
||||||
class NEMSignTx(p.MessageType):
|
class NEMSignTx(p.MessageType):
|
||||||
|
@ -10,5 +10,6 @@ class SignTx(p.MessageType):
|
|||||||
3: ('coin_name', p.UnicodeType, 0), # default='Bitcoin'
|
3: ('coin_name', p.UnicodeType, 0), # default='Bitcoin'
|
||||||
4: ('version', p.UVarintType, 0), # default=1
|
4: ('version', p.UVarintType, 0), # default=1
|
||||||
5: ('lock_time', p.UVarintType, 0), # default=0
|
5: ('lock_time', p.UVarintType, 0), # default=0
|
||||||
|
6: ('decred_expiry', p.UVarintType, 0),
|
||||||
}
|
}
|
||||||
MESSAGE_WIRE_TYPE = 15
|
MESSAGE_WIRE_TYPE = 15
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
from .. import protobuf as p
|
from .. import protobuf as p
|
||||||
from .TxInputType import TxInputType
|
|
||||||
from .TransactionType import TransactionType
|
from .TransactionType import TransactionType
|
||||||
|
from .TxInputType import TxInputType
|
||||||
from .TxOutputType import TxOutputType
|
from .TxOutputType import TxOutputType
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,4 +19,5 @@ class Storage(p.MessageType):
|
|||||||
11: ('u2f_counter', p.UVarintType, 0),
|
11: ('u2f_counter', p.UVarintType, 0),
|
||||||
12: ('needs_backup', p.BoolType, 0),
|
12: ('needs_backup', p.BoolType, 0),
|
||||||
13: ('flags', p.UVarintType, 0),
|
13: ('flags', p.UVarintType, 0),
|
||||||
|
14: ('u2froot', HDNodeType, 0),
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
# Automatically generated by pb2py
|
# Automatically generated by pb2py
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
from .. import protobuf as p
|
from .. import protobuf as p
|
||||||
|
from .TxOutputBinType import TxOutputBinType
|
||||||
from .TxInputType import TxInputType
|
from .TxInputType import TxInputType
|
||||||
from .TxOutputType import TxOutputType
|
from .TxOutputType import TxOutputType
|
||||||
from .TxOutputBinType import TxOutputBinType
|
|
||||||
|
|
||||||
|
|
||||||
class TransactionType(p.MessageType):
|
class TransactionType(p.MessageType):
|
||||||
@ -17,4 +17,5 @@ class TransactionType(p.MessageType):
|
|||||||
7: ('outputs_cnt', p.UVarintType, 0),
|
7: ('outputs_cnt', p.UVarintType, 0),
|
||||||
8: ('extra_data', p.BytesType, 0),
|
8: ('extra_data', p.BytesType, 0),
|
||||||
9: ('extra_data_len', p.UVarintType, 0),
|
9: ('extra_data_len', p.UVarintType, 0),
|
||||||
|
10: ('decred_expiry', p.UVarintType, 0),
|
||||||
}
|
}
|
||||||
|
@ -14,4 +14,6 @@ class TxInputType(p.MessageType):
|
|||||||
6: ('script_type', p.UVarintType, 0), # default=0
|
6: ('script_type', p.UVarintType, 0), # default=0
|
||||||
7: ('multisig', MultisigRedeemScriptType, 0),
|
7: ('multisig', MultisigRedeemScriptType, 0),
|
||||||
8: ('amount', p.UVarintType, 0),
|
8: ('amount', p.UVarintType, 0),
|
||||||
|
9: ('decred_tree', p.UVarintType, 0),
|
||||||
|
10: ('decred_script_version', p.UVarintType, 0),
|
||||||
}
|
}
|
||||||
|
@ -7,4 +7,5 @@ class TxOutputBinType(p.MessageType):
|
|||||||
FIELDS = {
|
FIELDS = {
|
||||||
1: ('amount', p.UVarintType, 0), # required
|
1: ('amount', p.UVarintType, 0), # required
|
||||||
2: ('script_pubkey', p.BytesType, 0), # required
|
2: ('script_pubkey', p.BytesType, 0), # required
|
||||||
|
3: ('decred_script_version', p.UVarintType, 0),
|
||||||
}
|
}
|
||||||
|
@ -12,4 +12,5 @@ class TxOutputType(p.MessageType):
|
|||||||
4: ('script_type', p.UVarintType, 0), # required
|
4: ('script_type', p.UVarintType, 0), # required
|
||||||
5: ('multisig', MultisigRedeemScriptType, 0),
|
5: ('multisig', MultisigRedeemScriptType, 0),
|
||||||
6: ('op_return_data', p.BytesType, 0),
|
6: ('op_return_data', p.BytesType, 0),
|
||||||
|
7: ('decred_script_version', p.UVarintType, 0),
|
||||||
}
|
}
|
||||||
|
@ -22,18 +22,18 @@ from .TxOutputBinType import *
|
|||||||
from .TxOutputType import *
|
from .TxOutputType import *
|
||||||
from .TxRequestDetailsType import *
|
from .TxRequestDetailsType import *
|
||||||
from .TxRequestSerializedType import *
|
from .TxRequestSerializedType import *
|
||||||
|
from . import FailureType
|
||||||
|
from . import OutputScriptType
|
||||||
|
from . import InputScriptType
|
||||||
|
from . import RequestType
|
||||||
|
from . import ButtonRequestType
|
||||||
from . import PinMatrixRequestType
|
from . import PinMatrixRequestType
|
||||||
|
from . import RecoveryDeviceType
|
||||||
|
from . import WordRequestType
|
||||||
|
from . import NEMMosaicLevy
|
||||||
from . import NEMSupplyChangeType
|
from . import NEMSupplyChangeType
|
||||||
from . import NEMModificationType
|
from . import NEMModificationType
|
||||||
from . import ButtonRequestType
|
|
||||||
from . import InputScriptType
|
|
||||||
from . import FailureType
|
|
||||||
from . import RecoveryDeviceType
|
|
||||||
from . import NEMImportanceTransferMode
|
from . import NEMImportanceTransferMode
|
||||||
from . import NEMMosaicLevy
|
|
||||||
from . import WordRequestType
|
|
||||||
from . import OutputScriptType
|
|
||||||
from . import RequestType
|
|
||||||
from .Address import *
|
from .Address import *
|
||||||
from .ApplyFlags import *
|
from .ApplyFlags import *
|
||||||
from .ApplySettings import *
|
from .ApplySettings import *
|
||||||
@ -89,6 +89,8 @@ from .Initialize import *
|
|||||||
from .LoadDevice import *
|
from .LoadDevice import *
|
||||||
from .MessageSignature import *
|
from .MessageSignature import *
|
||||||
from .NEMAddress import *
|
from .NEMAddress import *
|
||||||
|
from .NEMDecryptMessage import *
|
||||||
|
from .NEMDecryptedMessage import *
|
||||||
from .NEMGetAddress import *
|
from .NEMGetAddress import *
|
||||||
from .NEMSignTx import *
|
from .NEMSignTx import *
|
||||||
from .NEMSignedTx import *
|
from .NEMSignedTx import *
|
||||||
|
Loading…
Reference in New Issue
Block a user