diff --git a/packages/protobuf/messages.json b/packages/protobuf/messages.json index 1ce5ca53f24..3bb7beae115 100644 --- a/packages/protobuf/messages.json +++ b/packages/protobuf/messages.json @@ -1,7 +1,4 @@ { - "options": { - "syntax": "proto2" - }, "nested": { "BinanceGetAddress": { "fields": { @@ -610,10 +607,7 @@ }, "overwintered": { "type": "bool", - "id": 7, - "options": { - "deprecated": true - } + "id": 7 }, "version_group_id": { "type": "uint32", @@ -754,9 +748,6 @@ } }, "TxAck": { - "options": { - "deprecated": true - }, "fields": { "tx": { "type": "TransactionType", @@ -811,10 +802,7 @@ }, "overwintered": { "type": "bool", - "id": 11, - "options": { - "deprecated": true - } + "id": 11 }, "version_group_id": { "type": "uint32", @@ -979,10 +967,7 @@ }, "payment_req_index": { "type": "uint32", - "id": 12, - "options": { - "(experimental_field)": true - } + "id": 12 } } } @@ -1122,10 +1107,7 @@ }, "payment_req_index": { "type": "uint32", - "id": 12, - "options": { - "(experimental_field)": true - } + "id": 12 } } }, @@ -1223,9 +1205,6 @@ } }, "TxAckPaymentRequest": { - "options": { - "(experimental_message)": true - }, "fields": { "nonce": { "type": "bytes", @@ -2583,11 +2562,6 @@ }, "nested": { "ButtonRequestType": { - "valuesOptions": { - "_Deprecated_ButtonRequest_PassphraseType": { - "deprecated": true - } - }, "values": { "ButtonRequest_Other": 1, "ButtonRequest_FeeOverThreshold": 2, @@ -2648,10 +2622,7 @@ "fields": { "_on_device": { "type": "bool", - "id": 1, - "options": { - "deprecated": true - } + "id": 1 } } }, @@ -2663,10 +2634,7 @@ }, "_state": { "type": "bytes", - "id": 2, - "options": { - "deprecated": true - } + "id": 2 }, "on_device": { "type": "bool", @@ -2675,9 +2643,6 @@ } }, "Deprecated_PassphraseStateRequest": { - "options": { - "deprecated": true - }, "fields": { "state": { "type": "bytes", @@ -2686,9 +2651,6 @@ } }, "Deprecated_PassphraseStateAck": { - "options": { - "deprecated": true - }, "fields": {} }, "HDNodeType": { @@ -3962,10 +3924,7 @@ "fields": { "_old_address": { "type": "bytes", - "id": 1, - "options": { - "deprecated": true - } + "id": 1 }, "address": { "type": "string", @@ -4299,10 +4258,7 @@ }, "_skip_passphrase": { "type": "bool", - "id": 2, - "options": { - "deprecated": true - } + "id": 2 }, "derive_cardano": { "type": "bool", @@ -4380,10 +4336,7 @@ }, "_passphrase_cached": { "type": "bool", - "id": 17, - "options": { - "deprecated": true - } + "id": 17 }, "firmware_present": { "type": "bool", @@ -4553,38 +4506,6 @@ } }, "Capability": { - "options": { - "(has_bitcoin_only_values)": true - }, - "valuesOptions": { - "Capability_Bitcoin": { - "(bitcoin_only)": true - }, - "Capability_Crypto": { - "(bitcoin_only)": true - }, - "Capability_Lisk": { - "deprecated": true - }, - "Capability_Shamir": { - "(bitcoin_only)": true - }, - "Capability_ShamirGroups": { - "(bitcoin_only)": true - }, - "Capability_PassphraseEntry": { - "(bitcoin_only)": true - }, - "Capability_Translations": { - "(bitcoin_only)": true - }, - "Capability_Brightness": { - "(bitcoin_only)": true - }, - "Capability_Haptic": { - "(bitcoin_only)": true - } - }, "values": { "Capability_Bitcoin": 1, "Capability_Bitcoin_like": 2, @@ -4629,10 +4550,7 @@ "fields": { "language": { "type": "string", - "id": 1, - "options": { - "deprecated": true - } + "id": 1 }, "label": { "type": "string", @@ -4648,10 +4566,7 @@ }, "_passphrase_source": { "type": "uint32", - "id": 5, - "options": { - "deprecated": true - } + "id": 5 }, "auto_lock_delay_ms": { "type": "uint32", @@ -4858,10 +4773,7 @@ }, "language": { "type": "string", - "id": 5, - "options": { - "deprecated": true - } + "id": 5 }, "label": { "type": "string", @@ -4904,10 +4816,7 @@ }, "language": { "type": "string", - "id": 5, - "options": { - "deprecated": true - } + "id": 5 }, "label": { "type": "string", @@ -4991,10 +4900,7 @@ }, "language": { "type": "string", - "id": 4, - "options": { - "deprecated": true - } + "id": 4 }, "label": { "type": "string", @@ -5124,15 +5030,9 @@ } }, "GetNonce": { - "options": { - "(experimental_message)": true - }, "fields": {} }, "Nonce": { - "options": { - "(experimental_message)": true - }, "fields": { "nonce": { "rule": "required", @@ -7796,908 +7696,7 @@ } } }, - "wire_in": { - "type": "bool", - "id": 50002, - "extend": "google.protobuf.EnumValueOptions" - }, - "wire_out": { - "type": "bool", - "id": 50003, - "extend": "google.protobuf.EnumValueOptions" - }, - "wire_debug_in": { - "type": "bool", - "id": 50004, - "extend": "google.protobuf.EnumValueOptions" - }, - "wire_debug_out": { - "type": "bool", - "id": 50005, - "extend": "google.protobuf.EnumValueOptions" - }, - "wire_tiny": { - "type": "bool", - "id": 50006, - "extend": "google.protobuf.EnumValueOptions" - }, - "wire_bootloader": { - "type": "bool", - "id": 50007, - "extend": "google.protobuf.EnumValueOptions" - }, - "wire_no_fsm": { - "type": "bool", - "id": 50008, - "extend": "google.protobuf.EnumValueOptions" - }, - "bitcoin_only": { - "type": "bool", - "id": 60000, - "extend": "google.protobuf.EnumValueOptions" - }, - "has_bitcoin_only_values": { - "type": "bool", - "id": 51001, - "extend": "google.protobuf.EnumOptions" - }, - "experimental_message": { - "type": "bool", - "id": 52001, - "extend": "google.protobuf.MessageOptions" - }, - "wire_type": { - "type": "uint32", - "id": 52002, - "extend": "google.protobuf.MessageOptions" - }, - "experimental_field": { - "type": "bool", - "id": 53001, - "extend": "google.protobuf.FieldOptions" - }, - "include_in_bitcoin_only": { - "type": "bool", - "id": 60000, - "extend": "google.protobuf.FileOptions" - }, "MessageType": { - "options": { - "(has_bitcoin_only_values)": true - }, - "valuesOptions": { - "MessageType_Initialize": { - "(bitcoin_only)": true, - "(wire_in)": true, - "(wire_tiny)": true - }, - "MessageType_Ping": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_Success": { - "(bitcoin_only)": true, - "(wire_out)": true, - "(wire_debug_out)": true - }, - "MessageType_Failure": { - "(bitcoin_only)": true, - "(wire_out)": true, - "(wire_debug_out)": true - }, - "MessageType_ChangePin": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_WipeDevice": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_GetEntropy": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_Entropy": { - "(bitcoin_only)": true, - "(wire_out)": true - }, - "MessageType_LoadDevice": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_ResetDevice": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_SetBusy": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_Features": { - "(bitcoin_only)": true, - "(wire_out)": true - }, - "MessageType_PinMatrixRequest": { - "(bitcoin_only)": true, - "(wire_out)": true - }, - "MessageType_PinMatrixAck": { - "(bitcoin_only)": true, - "(wire_in)": true, - "(wire_tiny)": true, - "(wire_no_fsm)": true - }, - "MessageType_Cancel": { - "(bitcoin_only)": true, - "(wire_in)": true, - "(wire_tiny)": true - }, - "MessageType_LockDevice": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_ApplySettings": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_ButtonRequest": { - "(bitcoin_only)": true, - "(wire_out)": true - }, - "MessageType_ButtonAck": { - "(bitcoin_only)": true, - "(wire_in)": true, - "(wire_tiny)": true, - "(wire_no_fsm)": true - }, - "MessageType_ApplyFlags": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_GetNonce": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_Nonce": { - "(bitcoin_only)": true, - "(wire_out)": true - }, - "MessageType_BackupDevice": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_EntropyRequest": { - "(bitcoin_only)": true, - "(wire_out)": true - }, - "MessageType_EntropyAck": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_PassphraseRequest": { - "(bitcoin_only)": true, - "(wire_out)": true - }, - "MessageType_PassphraseAck": { - "(bitcoin_only)": true, - "(wire_in)": true, - "(wire_tiny)": true, - "(wire_no_fsm)": true - }, - "MessageType_RecoveryDevice": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_WordRequest": { - "(bitcoin_only)": true, - "(wire_out)": true - }, - "MessageType_WordAck": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_GetFeatures": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_SdProtect": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_ChangeWipeCode": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_EndSession": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_DoPreauthorized": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_PreauthorizedRequest": { - "(bitcoin_only)": true, - "(wire_out)": true - }, - "MessageType_CancelAuthorization": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_RebootToBootloader": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_GetFirmwareHash": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_FirmwareHash": { - "(bitcoin_only)": true, - "(wire_out)": true - }, - "MessageType_UnlockPath": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_UnlockedPathRequest": { - "(bitcoin_only)": true, - "(wire_out)": true - }, - "MessageType_ShowDeviceTutorial": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_UnlockBootloader": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_AuthenticateDevice": { - "(bitcoin_only)": true, - "(wire_out)": true - }, - "MessageType_AuthenticityProof": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_ChangeLanguage": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_TranslationDataRequest": { - "(bitcoin_only)": true, - "(wire_out)": true - }, - "MessageType_TranslationDataAck": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_SetBrightness": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_SetU2FCounter": { - "(wire_in)": true - }, - "MessageType_GetNextU2FCounter": { - "(wire_in)": true - }, - "MessageType_NextU2FCounter": { - "(wire_out)": true - }, - "MessageType_Deprecated_PassphraseStateRequest": { - "deprecated": true - }, - "MessageType_Deprecated_PassphraseStateAck": { - "deprecated": true - }, - "MessageType_FirmwareErase": { - "(bitcoin_only)": true, - "(wire_in)": true, - "(wire_bootloader)": true - }, - "MessageType_FirmwareUpload": { - "(bitcoin_only)": true, - "(wire_in)": true, - "(wire_bootloader)": true - }, - "MessageType_FirmwareRequest": { - "(bitcoin_only)": true, - "(wire_out)": true, - "(wire_bootloader)": true - }, - "MessageType_ProdTestT1": { - "(bitcoin_only)": true, - "(wire_in)": true, - "(wire_bootloader)": true - }, - "MessageType_GetPublicKey": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_PublicKey": { - "(bitcoin_only)": true, - "(wire_out)": true - }, - "MessageType_SignTx": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_TxRequest": { - "(bitcoin_only)": true, - "(wire_out)": true - }, - "MessageType_TxAck": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_GetAddress": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_Address": { - "(bitcoin_only)": true, - "(wire_out)": true - }, - "MessageType_TxAckPaymentRequest": { - "(wire_in)": true - }, - "MessageType_SignMessage": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_VerifyMessage": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_MessageSignature": { - "(bitcoin_only)": true, - "(wire_out)": true - }, - "MessageType_GetOwnershipId": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_OwnershipId": { - "(bitcoin_only)": true, - "(wire_out)": true - }, - "MessageType_GetOwnershipProof": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_OwnershipProof": { - "(bitcoin_only)": true, - "(wire_out)": true - }, - "MessageType_AuthorizeCoinJoin": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_CipherKeyValue": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_CipheredKeyValue": { - "(bitcoin_only)": true, - "(wire_out)": true - }, - "MessageType_SignIdentity": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_SignedIdentity": { - "(bitcoin_only)": true, - "(wire_out)": true - }, - "MessageType_GetECDHSessionKey": { - "(bitcoin_only)": true, - "(wire_in)": true - }, - "MessageType_ECDHSessionKey": { - "(bitcoin_only)": true, - "(wire_out)": true - }, - "MessageType_DebugLinkDecision": { - "(bitcoin_only)": true, - "(wire_debug_in)": true, - "(wire_tiny)": true, - "(wire_no_fsm)": true - }, - "MessageType_DebugLinkGetState": { - "(bitcoin_only)": true, - "(wire_debug_in)": true, - "(wire_tiny)": true - }, - "MessageType_DebugLinkState": { - "(bitcoin_only)": true, - "(wire_debug_out)": true - }, - "MessageType_DebugLinkStop": { - "(bitcoin_only)": true, - "(wire_debug_in)": true - }, - "MessageType_DebugLinkLog": { - "(bitcoin_only)": true, - "(wire_debug_out)": true - }, - "MessageType_DebugLinkMemoryRead": { - "(bitcoin_only)": true, - "(wire_debug_in)": true - }, - "MessageType_DebugLinkMemory": { - "(bitcoin_only)": true, - "(wire_debug_out)": true - }, - "MessageType_DebugLinkMemoryWrite": { - "(bitcoin_only)": true, - "(wire_debug_in)": true - }, - "MessageType_DebugLinkFlashErase": { - "(bitcoin_only)": true, - "(wire_debug_in)": true - }, - "MessageType_DebugLinkLayout": { - "(bitcoin_only)": true, - "(wire_debug_out)": true - }, - "MessageType_DebugLinkReseedRandom": { - "(bitcoin_only)": true, - "(wire_debug_in)": true - }, - "MessageType_DebugLinkRecordScreen": { - "(bitcoin_only)": true, - "(wire_debug_in)": true - }, - "MessageType_DebugLinkEraseSdCard": { - "(bitcoin_only)": true, - "(wire_debug_in)": true - }, - "MessageType_DebugLinkWatchLayout": { - "(bitcoin_only)": true, - "(wire_debug_in)": true - }, - "MessageType_DebugLinkResetDebugEvents": { - "(bitcoin_only)": true, - "(wire_debug_in)": true - }, - "MessageType_DebugLinkOptigaSetSecMax": { - "(bitcoin_only)": true, - "(wire_debug_in)": true - }, - "MessageType_EthereumGetPublicKey": { - "(wire_in)": true - }, - "MessageType_EthereumPublicKey": { - "(wire_out)": true - }, - "MessageType_EthereumGetAddress": { - "(wire_in)": true - }, - "MessageType_EthereumAddress": { - "(wire_out)": true - }, - "MessageType_EthereumSignTx": { - "(wire_in)": true - }, - "MessageType_EthereumSignTxEIP1559": { - "(wire_in)": true - }, - "MessageType_EthereumTxRequest": { - "(wire_out)": true - }, - "MessageType_EthereumTxAck": { - "(wire_in)": true - }, - "MessageType_EthereumSignMessage": { - "(wire_in)": true - }, - "MessageType_EthereumVerifyMessage": { - "(wire_in)": true - }, - "MessageType_EthereumMessageSignature": { - "(wire_out)": true - }, - "MessageType_EthereumSignTypedData": { - "(wire_in)": true - }, - "MessageType_EthereumTypedDataStructRequest": { - "(wire_out)": true - }, - "MessageType_EthereumTypedDataStructAck": { - "(wire_in)": true - }, - "MessageType_EthereumTypedDataValueRequest": { - "(wire_out)": true - }, - "MessageType_EthereumTypedDataValueAck": { - "(wire_in)": true - }, - "MessageType_EthereumTypedDataSignature": { - "(wire_out)": true - }, - "MessageType_EthereumSignTypedHash": { - "(wire_in)": true - }, - "MessageType_NEMGetAddress": { - "(wire_in)": true - }, - "MessageType_NEMAddress": { - "(wire_out)": true - }, - "MessageType_NEMSignTx": { - "(wire_in)": true - }, - "MessageType_NEMSignedTx": { - "(wire_out)": true - }, - "MessageType_NEMDecryptMessage": { - "(wire_in)": true - }, - "MessageType_NEMDecryptedMessage": { - "(wire_out)": true - }, - "MessageType_TezosGetAddress": { - "(wire_in)": true - }, - "MessageType_TezosAddress": { - "(wire_out)": true - }, - "MessageType_TezosSignTx": { - "(wire_in)": true - }, - "MessageType_TezosSignedTx": { - "(wire_out)": true - }, - "MessageType_TezosGetPublicKey": { - "(wire_in)": true - }, - "MessageType_TezosPublicKey": { - "(wire_out)": true - }, - "MessageType_StellarSignTx": { - "(wire_in)": true - }, - "MessageType_StellarTxOpRequest": { - "(wire_out)": true - }, - "MessageType_StellarGetAddress": { - "(wire_in)": true - }, - "MessageType_StellarAddress": { - "(wire_out)": true - }, - "MessageType_StellarCreateAccountOp": { - "(wire_in)": true - }, - "MessageType_StellarPaymentOp": { - "(wire_in)": true - }, - "MessageType_StellarPathPaymentStrictReceiveOp": { - "(wire_in)": true - }, - "MessageType_StellarManageSellOfferOp": { - "(wire_in)": true - }, - "MessageType_StellarCreatePassiveSellOfferOp": { - "(wire_in)": true - }, - "MessageType_StellarSetOptionsOp": { - "(wire_in)": true - }, - "MessageType_StellarChangeTrustOp": { - "(wire_in)": true - }, - "MessageType_StellarAllowTrustOp": { - "(wire_in)": true - }, - "MessageType_StellarAccountMergeOp": { - "(wire_in)": true - }, - "MessageType_StellarManageDataOp": { - "(wire_in)": true - }, - "MessageType_StellarBumpSequenceOp": { - "(wire_in)": true - }, - "MessageType_StellarManageBuyOfferOp": { - "(wire_in)": true - }, - "MessageType_StellarPathPaymentStrictSendOp": { - "(wire_in)": true - }, - "MessageType_StellarClaimClaimableBalanceOp": { - "(wire_in)": true - }, - "MessageType_StellarSignedTx": { - "(wire_out)": true - }, - "MessageType_CardanoGetPublicKey": { - "(wire_in)": true - }, - "MessageType_CardanoPublicKey": { - "(wire_out)": true - }, - "MessageType_CardanoGetAddress": { - "(wire_in)": true - }, - "MessageType_CardanoAddress": { - "(wire_out)": true - }, - "MessageType_CardanoTxItemAck": { - "(wire_out)": true - }, - "MessageType_CardanoTxAuxiliaryDataSupplement": { - "(wire_out)": true - }, - "MessageType_CardanoTxWitnessRequest": { - "(wire_in)": true - }, - "MessageType_CardanoTxWitnessResponse": { - "(wire_out)": true - }, - "MessageType_CardanoTxHostAck": { - "(wire_in)": true - }, - "MessageType_CardanoTxBodyHash": { - "(wire_out)": true - }, - "MessageType_CardanoSignTxFinished": { - "(wire_out)": true - }, - "MessageType_CardanoSignTxInit": { - "(wire_in)": true - }, - "MessageType_CardanoTxInput": { - "(wire_in)": true - }, - "MessageType_CardanoTxOutput": { - "(wire_in)": true - }, - "MessageType_CardanoAssetGroup": { - "(wire_in)": true - }, - "MessageType_CardanoToken": { - "(wire_in)": true - }, - "MessageType_CardanoTxCertificate": { - "(wire_in)": true - }, - "MessageType_CardanoTxWithdrawal": { - "(wire_in)": true - }, - "MessageType_CardanoTxAuxiliaryData": { - "(wire_in)": true - }, - "MessageType_CardanoPoolOwner": { - "(wire_in)": true - }, - "MessageType_CardanoPoolRelayParameters": { - "(wire_in)": true - }, - "MessageType_CardanoGetNativeScriptHash": { - "(wire_in)": true - }, - "MessageType_CardanoNativeScriptHash": { - "(wire_out)": true - }, - "MessageType_CardanoTxMint": { - "(wire_in)": true - }, - "MessageType_CardanoTxCollateralInput": { - "(wire_in)": true - }, - "MessageType_CardanoTxRequiredSigner": { - "(wire_in)": true - }, - "MessageType_CardanoTxInlineDatumChunk": { - "(wire_in)": true - }, - "MessageType_CardanoTxReferenceScriptChunk": { - "(wire_in)": true - }, - "MessageType_CardanoTxReferenceInput": { - "(wire_in)": true - }, - "MessageType_RippleGetAddress": { - "(wire_in)": true - }, - "MessageType_RippleAddress": { - "(wire_out)": true - }, - "MessageType_RippleSignTx": { - "(wire_in)": true - }, - "MessageType_RippleSignedTx": { - "(wire_in)": true - }, - "MessageType_MoneroTransactionInitRequest": { - "(wire_out)": true - }, - "MessageType_MoneroTransactionInitAck": { - "(wire_out)": true - }, - "MessageType_MoneroTransactionSetInputRequest": { - "(wire_out)": true - }, - "MessageType_MoneroTransactionSetInputAck": { - "(wire_out)": true - }, - "MessageType_MoneroTransactionInputViniRequest": { - "(wire_out)": true - }, - "MessageType_MoneroTransactionInputViniAck": { - "(wire_out)": true - }, - "MessageType_MoneroTransactionAllInputsSetRequest": { - "(wire_out)": true - }, - "MessageType_MoneroTransactionAllInputsSetAck": { - "(wire_out)": true - }, - "MessageType_MoneroTransactionSetOutputRequest": { - "(wire_out)": true - }, - "MessageType_MoneroTransactionSetOutputAck": { - "(wire_out)": true - }, - "MessageType_MoneroTransactionAllOutSetRequest": { - "(wire_out)": true - }, - "MessageType_MoneroTransactionAllOutSetAck": { - "(wire_out)": true - }, - "MessageType_MoneroTransactionSignInputRequest": { - "(wire_out)": true - }, - "MessageType_MoneroTransactionSignInputAck": { - "(wire_out)": true - }, - "MessageType_MoneroTransactionFinalRequest": { - "(wire_out)": true - }, - "MessageType_MoneroTransactionFinalAck": { - "(wire_out)": true - }, - "MessageType_MoneroKeyImageExportInitRequest": { - "(wire_out)": true - }, - "MessageType_MoneroKeyImageExportInitAck": { - "(wire_out)": true - }, - "MessageType_MoneroKeyImageSyncStepRequest": { - "(wire_out)": true - }, - "MessageType_MoneroKeyImageSyncStepAck": { - "(wire_out)": true - }, - "MessageType_MoneroKeyImageSyncFinalRequest": { - "(wire_out)": true - }, - "MessageType_MoneroKeyImageSyncFinalAck": { - "(wire_out)": true - }, - "MessageType_MoneroGetAddress": { - "(wire_in)": true - }, - "MessageType_MoneroAddress": { - "(wire_out)": true - }, - "MessageType_MoneroGetWatchKey": { - "(wire_in)": true - }, - "MessageType_MoneroWatchKey": { - "(wire_out)": true - }, - "MessageType_DebugMoneroDiagRequest": { - "(wire_in)": true - }, - "MessageType_DebugMoneroDiagAck": { - "(wire_out)": true - }, - "MessageType_MoneroGetTxKeyRequest": { - "(wire_in)": true - }, - "MessageType_MoneroGetTxKeyAck": { - "(wire_out)": true - }, - "MessageType_MoneroLiveRefreshStartRequest": { - "(wire_in)": true - }, - "MessageType_MoneroLiveRefreshStartAck": { - "(wire_out)": true - }, - "MessageType_MoneroLiveRefreshStepRequest": { - "(wire_in)": true - }, - "MessageType_MoneroLiveRefreshStepAck": { - "(wire_out)": true - }, - "MessageType_MoneroLiveRefreshFinalRequest": { - "(wire_in)": true - }, - "MessageType_MoneroLiveRefreshFinalAck": { - "(wire_out)": true - }, - "MessageType_EosGetPublicKey": { - "(wire_in)": true - }, - "MessageType_EosPublicKey": { - "(wire_out)": true - }, - "MessageType_EosSignTx": { - "(wire_in)": true - }, - "MessageType_EosTxActionRequest": { - "(wire_out)": true - }, - "MessageType_EosTxActionAck": { - "(wire_in)": true - }, - "MessageType_EosSignedTx": { - "(wire_out)": true - }, - "MessageType_BinanceGetAddress": { - "(wire_in)": true - }, - "MessageType_BinanceAddress": { - "(wire_out)": true - }, - "MessageType_BinanceGetPublicKey": { - "(wire_in)": true - }, - "MessageType_BinancePublicKey": { - "(wire_out)": true - }, - "MessageType_BinanceSignTx": { - "(wire_in)": true - }, - "MessageType_BinanceTxRequest": { - "(wire_out)": true - }, - "MessageType_BinanceTransferMsg": { - "(wire_in)": true - }, - "MessageType_BinanceOrderMsg": { - "(wire_in)": true - }, - "MessageType_BinanceCancelMsg": { - "(wire_in)": true - }, - "MessageType_BinanceSignedTx": { - "(wire_out)": true - }, - "MessageType_WebAuthnListResidentCredentials": { - "(wire_in)": true - }, - "MessageType_WebAuthnCredentials": { - "(wire_out)": true - }, - "MessageType_WebAuthnAddResidentCredential": { - "(wire_in)": true - }, - "MessageType_WebAuthnRemoveResidentCredential": { - "(wire_in)": true - }, - "MessageType_SolanaGetPublicKey": { - "(wire_in)": true - }, - "MessageType_SolanaPublicKey": { - "(wire_out)": true - }, - "MessageType_SolanaGetAddress": { - "(wire_in)": true - }, - "MessageType_SolanaAddress": { - "(wire_out)": true - }, - "MessageType_SolanaSignTx": { - "(wire_in)": true - }, - "MessageType_SolanaTxSignature": { - "(wire_out)": true - } - }, "values": { "MessageType_Initialize": 0, "MessageType_Ping": 1, @@ -8941,686 +7940,6 @@ "MessageType_SolanaSignTx": 904, "MessageType_SolanaTxSignature": 905 } - }, - "google": { - "nested": { - "protobuf": { - "nested": { - "FileDescriptorSet": { - "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", - "id": 1 - } - } - }, - "FileDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "package": { - "type": "string", - "id": 2 - }, - "dependency": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "public_dependency": { - "rule": "repeated", - "type": "int32", - "id": 10, - "options": { - "packed": false - } - }, - "weak_dependency": { - "rule": "repeated", - "type": "int32", - "id": 11, - "options": { - "packed": false - } - }, - "message_type": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 4 - }, - "enum_type": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 5 - }, - "service": { - "rule": "repeated", - "type": "ServiceDescriptorProto", - "id": 6 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 7 - }, - "options": { - "type": "FileOptions", - "id": 8 - }, - "source_code_info": { - "type": "SourceCodeInfo", - "id": 9 - }, - "syntax": { - "type": "string", - "id": 12 - } - } - }, - "DescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "field": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 2 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 6 - }, - "nested_type": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 3 - }, - "enum_type": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 4 - }, - "extension_range": { - "rule": "repeated", - "type": "ExtensionRange", - "id": 5 - }, - "oneof_decl": { - "rule": "repeated", - "type": "OneofDescriptorProto", - "id": 8 - }, - "options": { - "type": "MessageOptions", - "id": 7 - }, - "reserved_range": { - "rule": "repeated", - "type": "ReservedRange", - "id": 9 - }, - "reserved_name": { - "rule": "repeated", - "type": "string", - "id": 10 - } - }, - "nested": { - "ExtensionRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - }, - "ReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "FieldDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 3 - }, - "label": { - "type": "Label", - "id": 4 - }, - "type": { - "type": "Type", - "id": 5 - }, - "type_name": { - "type": "string", - "id": 6 - }, - "extendee": { - "type": "string", - "id": 2 - }, - "default_value": { - "type": "string", - "id": 7 - }, - "oneof_index": { - "type": "int32", - "id": 9 - }, - "json_name": { - "type": "string", - "id": 10 - }, - "options": { - "type": "FieldOptions", - "id": 8 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_DOUBLE": 1, - "TYPE_FLOAT": 2, - "TYPE_INT64": 3, - "TYPE_UINT64": 4, - "TYPE_INT32": 5, - "TYPE_FIXED64": 6, - "TYPE_FIXED32": 7, - "TYPE_BOOL": 8, - "TYPE_STRING": 9, - "TYPE_GROUP": 10, - "TYPE_MESSAGE": 11, - "TYPE_BYTES": 12, - "TYPE_UINT32": 13, - "TYPE_ENUM": 14, - "TYPE_SFIXED32": 15, - "TYPE_SFIXED64": 16, - "TYPE_SINT32": 17, - "TYPE_SINT64": 18 - } - }, - "Label": { - "values": { - "LABEL_OPTIONAL": 1, - "LABEL_REQUIRED": 2, - "LABEL_REPEATED": 3 - } - } - } - }, - "OneofDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "options": { - "type": "OneofOptions", - "id": 2 - } - } - }, - "EnumDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "value": { - "rule": "repeated", - "type": "EnumValueDescriptorProto", - "id": 2 - }, - "options": { - "type": "EnumOptions", - "id": 3 - } - } - }, - "EnumValueDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "EnumValueOptions", - "id": 3 - } - } - }, - "ServiceDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "method": { - "rule": "repeated", - "type": "MethodDescriptorProto", - "id": 2 - }, - "options": { - "type": "ServiceOptions", - "id": 3 - } - } - }, - "MethodDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "input_type": { - "type": "string", - "id": 2 - }, - "output_type": { - "type": "string", - "id": 3 - }, - "options": { - "type": "MethodOptions", - "id": 4 - }, - "client_streaming": { - "type": "bool", - "id": 5 - }, - "server_streaming": { - "type": "bool", - "id": 6 - } - } - }, - "FileOptions": { - "fields": { - "java_package": { - "type": "string", - "id": 1 - }, - "java_outer_classname": { - "type": "string", - "id": 8 - }, - "java_multiple_files": { - "type": "bool", - "id": 10 - }, - "java_generate_equals_and_hash": { - "type": "bool", - "id": 20, - "options": { - "deprecated": true - } - }, - "java_string_check_utf8": { - "type": "bool", - "id": 27 - }, - "optimize_for": { - "type": "OptimizeMode", - "id": 9, - "options": { - "default": "SPEED" - } - }, - "go_package": { - "type": "string", - "id": 11 - }, - "cc_generic_services": { - "type": "bool", - "id": 16 - }, - "java_generic_services": { - "type": "bool", - "id": 17 - }, - "py_generic_services": { - "type": "bool", - "id": 18 - }, - "deprecated": { - "type": "bool", - "id": 23 - }, - "cc_enable_arenas": { - "type": "bool", - "id": 31 - }, - "objc_class_prefix": { - "type": "string", - "id": 36 - }, - "csharp_namespace": { - "type": "string", - "id": 37 - }, - "uninterpreted_option": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [[1000, 536870911]], - "reserved": [[38, 38]], - "nested": { - "OptimizeMode": { - "values": { - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3 - } - } - } - }, - "MessageOptions": { - "fields": { - "message_set_wire_format": { - "type": "bool", - "id": 1 - }, - "no_standard_descriptor_accessor": { - "type": "bool", - "id": 2 - }, - "deprecated": { - "type": "bool", - "id": 3 - }, - "map_entry": { - "type": "bool", - "id": 7 - }, - "uninterpreted_option": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [[1000, 536870911]], - "reserved": [[8, 8]] - }, - "FieldOptions": { - "fields": { - "ctype": { - "type": "CType", - "id": 1, - "options": { - "default": "STRING" - } - }, - "packed": { - "type": "bool", - "id": 2 - }, - "jstype": { - "type": "JSType", - "id": 6, - "options": { - "default": "JS_NORMAL" - } - }, - "lazy": { - "type": "bool", - "id": 5 - }, - "deprecated": { - "type": "bool", - "id": 3 - }, - "weak": { - "type": "bool", - "id": 10 - }, - "uninterpreted_option": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [[1000, 536870911]], - "reserved": [[4, 4]], - "nested": { - "CType": { - "values": { - "STRING": 0, - "CORD": 1, - "STRING_PIECE": 2 - } - }, - "JSType": { - "values": { - "JS_NORMAL": 0, - "JS_STRING": 1, - "JS_NUMBER": 2 - } - } - } - }, - "OneofOptions": { - "fields": { - "uninterpreted_option": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [[1000, 536870911]] - }, - "EnumOptions": { - "fields": { - "allow_alias": { - "type": "bool", - "id": 2 - }, - "deprecated": { - "type": "bool", - "id": 3 - }, - "uninterpreted_option": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [[1000, 536870911]] - }, - "EnumValueOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 1 - }, - "uninterpreted_option": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [[1000, 536870911]] - }, - "ServiceOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 33 - }, - "uninterpreted_option": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [[1000, 536870911]] - }, - "MethodOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 33 - }, - "uninterpreted_option": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [[1000, 536870911]] - }, - "UninterpretedOption": { - "fields": { - "name": { - "rule": "repeated", - "type": "NamePart", - "id": 2 - }, - "identifier_value": { - "type": "string", - "id": 3 - }, - "positive_int_value": { - "type": "uint64", - "id": 4 - }, - "negative_int_value": { - "type": "int64", - "id": 5 - }, - "double_value": { - "type": "double", - "id": 6 - }, - "string_value": { - "type": "bytes", - "id": 7 - }, - "aggregate_value": { - "type": "string", - "id": 8 - } - }, - "nested": { - "NamePart": { - "fields": { - "name_part": { - "rule": "required", - "type": "string", - "id": 1 - }, - "is_extension": { - "rule": "required", - "type": "bool", - "id": 2 - } - } - } - } - }, - "SourceCodeInfo": { - "fields": { - "location": { - "rule": "repeated", - "type": "Location", - "id": 1 - } - }, - "nested": { - "Location": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "span": { - "rule": "repeated", - "type": "int32", - "id": 2 - }, - "leading_comments": { - "type": "string", - "id": 3 - }, - "trailing_comments": { - "type": "string", - "id": 4 - }, - "leading_detached_comments": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - } - } - }, - "GeneratedCodeInfo": { - "fields": { - "annotation": { - "rule": "repeated", - "type": "Annotation", - "id": 1 - } - }, - "nested": { - "Annotation": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "source_file": { - "type": "string", - "id": 2 - }, - "begin": { - "type": "int32", - "id": 3 - }, - "end": { - "type": "int32", - "id": 4 - } - } - } - } - } - } - } - } } } } diff --git a/packages/protobuf/scripts/protobuf-build.sh b/packages/protobuf/scripts/protobuf-build.sh index 1224afda5aa..a9b2994e1f6 100755 --- a/packages/protobuf/scripts/protobuf-build.sh +++ b/packages/protobuf/scripts/protobuf-build.sh @@ -4,11 +4,14 @@ set -euxo pipefail echo $# -PARENT_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) +get_abs_path() { + echo "$( cd -- "$(dirname "$1")" >/dev/null 2>&1 ; pwd -P )" +} -BRANCH="main" -DIST="." -REPO_DIR_NAME="trezor-firmware-probuf-update" +SCRIPTS_PATH=$(get_abs_path "${BASH_SOURCE[0]}") + +REPO_BRANCH="main" +REPO_PATH=$(get_abs_path "../../../trezor-firmware-probuf-update/.") if [[ $# -ne 0 && $# -ne 1 ]] then @@ -18,50 +21,25 @@ fi if [[ $# -eq 1 ]] then - BRANCH=$1 + REPO_BRANCH=$1 fi -cd ../../../ -ls -la -if test -d ./$REPO_DIR_NAME; then - echo "$REPO_DIR_NAME directory exists" +if test -d "$REPO_PATH"; then + echo "$REPO_PATH directory exists" else - echo "$REPO_DIR_NAME directory does not exist" - git clone https://github.com/trezor/trezor-firmware.git $REPO_DIR_NAME + echo "$REPO_PATH directory does not exist" + git clone https://github.com/trezor/trezor-firmware.git "$REPO_PATH" fi -cd $REPO_DIR_NAME +cd "$REPO_PATH" git fetch origin -git checkout "$BRANCH" -git reset "origin/$BRANCH" --hard +git checkout "$REPO_BRANCH" +git reset "origin/$REPO_BRANCH" --hard cd .. -cd "$PARENT_PATH/.." - -SRC="../../../$REPO_DIR_NAME/common/protob" - -# BUILD combined messages.proto file from protobuf files -# this code was copied from ./submodules/trezor-common/protob Makekile -# clear protobuf syntax and remove unknown values to be able to work with proto2js -echo 'syntax = "proto2";' > "$DIST"/messages.proto -echo 'import "google/protobuf/descriptor.proto";' >> "$DIST"/messages.proto -echo "Build proto file from $SRC" -# NOTE: grep sorting is not cross platform deterministic, make sure that the content of messages.proto ("Message_Type") is at the end of the generated file -grep -hv -e '^import ' -e '^syntax' -e '^package' -e 'option java_' "$SRC"/messages-*.proto "$SRC"/messages.proto \ -| sed 's/ hw\.trezor\.messages\.common\./ /' \ -| sed 's/ common\./ /' \ -| sed 's/ ethereum_definitions\./ /' \ -| sed 's/ management\./ /' \ -| sed 's/^option /\/\/ option /' \ -| grep -v ' reserved '>> "$DIST"/messages.proto - -# BUILD messages.json from message.proto -# pbjs command is added by protobufjs-cli package -node ../../node_modules/.bin/pbjs -t json -p "$DIST" -o "$DIST"/messages.json --keep-case messages.proto -rm "$DIST"/messages.proto - -cd "$PARENT_PATH" +cd "$SCRIPTS_PATH" +yarn tsx ./protobuf-definitions.ts "$REPO_PATH/common/protob" node ./protobuf-types.js typescript yarn workspace @trezor/protobuf g:prettier --write {messages.json,src/messages.ts} diff --git a/packages/protobuf/scripts/protobuf-definitions.ts b/packages/protobuf/scripts/protobuf-definitions.ts new file mode 100644 index 00000000000..fd65af32bff --- /dev/null +++ b/packages/protobuf/scripts/protobuf-definitions.ts @@ -0,0 +1,168 @@ +/* eslint-disable no-console */ +import fs from 'fs'; +import path from 'path'; +import * as protobuf from 'protobufjs'; + +// protobuf.ReflectionObject to JSON +type Definition = { + reserved?: unknown[]; + options?: Record; + valuesOptions?: Record; + rule?: string; + type?: string; + extend?: string; + nested?: Record; + fields?: Record; +}; + +const modifyDefinitionsJSON = (root: protobuf.Root, def: Definition) => { + // remove "reserved" fields + delete def.reserved; + // remove "valuesOptions" fields + delete def.valuesOptions; + // remove unused "options" + if (def.options) { + const ignoreOptions = [ + '(experimental_field)', + '(experimental_message)', + '(has_bitcoin_only_values)', + 'deprecated', + ]; + const options = Object.keys(def.options); + // compatibility with json generated by `node_modules/.bin/pbjs` + // `packed` option is not set for custom types, it is set only for primitives like uint32 + if (def.type && options.includes('packed')) { + const obj = root.lookup(def.type); + if (obj) { + try { + root.lookupType(def.type); + ignoreOptions.push('packed'); + } catch {} + } + } + const opts = options + .filter(opt => !ignoreOptions.includes(opt)) + .reduce((prev, curr) => { + prev[curr] = def.options?.[curr]; + + return prev; + }, {}); + + if (Object.keys(opts).length < 1) { + delete def.options; + } + } + + // replace types pointing to different packages like "hw.trezor.messages.common" + if (def.type && def.type.includes('.')) { + def.type = def.type.split('.').pop(); + } + + // modify recursively for nested types and fields + const { nested } = def; + if (nested) { + Object.keys(nested).forEach(key => { + const item = nested[key]; + if (item.extend && item.extend.startsWith('google')) { + delete nested[key]; + } else { + modifyDefinitionsJSON(root, item); + } + }); + } + + if (def.fields) { + Object.values(def.fields).forEach(item => modifyDefinitionsJSON(root, item)); + } + + return def; +}; + +type BuildOptions = { + skipPackages?: string[]; + onlyPackages?: string[]; + includeImports?: boolean; +}; + +export const buildDefinitions = (protoDir: string, args: BuildOptions) => { + // https://github.com/protobufjs/protobuf.js/blob/master/README.md#compatibility + // Because the internals of this package do not rely on google/protobuf/descriptor.proto, options are parsed and presented literally. + const root = new protobuf.Root({ + common: protobuf.common('descriptor', {}), + }); + + const files: string[] = []; + const packages: string[] = []; + const { skipPackages, onlyPackages, includeImports } = args; + + // read all messages*.proto files from directory + fs.readdirSync(protoDir).forEach(fileName => { + if (!/^messages.*.proto$/.test(fileName)) { + return; + } + // messages.proto file => empty pkg + const pkg = fileName.replace(/messages-?(.+)?.proto$/, '$1').replace('-', '_'); + if (skipPackages?.includes(pkg)) { + return console.log('Skipping', pkg); + } + if (onlyPackages && !onlyPackages.includes(pkg)) { + return console.log('Skipping', pkg); + } + + if (pkg) { + packages.push(pkg); + } + files.push(path.join(protoDir, fileName)); + }); + + console.log('Loading files:', files); + + const proto = root.loadSync(files, { keepCase: true }); + const messages = proto.lookup('hw.trezor.messages'); + if (!messages) { + throw new Error('hw.trezor.messages not found'); + } + + const result = {}; + // remove deep nesting (hw.trezor.messages.*) + packages.forEach(p => { + const pkg = proto.lookup(`hw.trezor.messages.${p}`); + if (!pkg) { + throw new Error(`hw.trezor.messages.${p} not found`); + } + const json = pkg.toJSON(); + Object.assign(result, json.nested); + }); + + // @ts-expect-error typed as protobuf.Reflection but in fact it is a protobuf.Namespace + const topLevelMessages = includeImports ? messages.nested : {}; + // hw.trezor.messages Namespace contains all the packages, ignore already processed + Object.keys(topLevelMessages).forEach(name => { + if (!packages.includes(name)) { + Object.assign(result, { [name]: topLevelMessages[name].toJSON() }); + } + }); + + return modifyDefinitionsJSON(proto, { nested: result }); +}; + +if (require.main === module) { + // called directly, otherwise required as a module + const [protoDir, ...args] = process.argv.slice(2); + + // get --arg=X + const getArgValue = (args: string[], arg: string) => { + return args.find(a => a.startsWith(arg))?.substring(arg.length + 1); + }; + + const json = buildDefinitions(protoDir, { + includeImports: true, + skipPackages: getArgValue(args, '--skip')?.split(','), + onlyPackages: getArgValue(args, '--only')?.split(','), + }); + + const distDir = path.join(__dirname, '../'); + fs.writeFile(`${distDir}/messages.json`, JSON.stringify(json, null, 2), err => { + if (err) throw err; + }); +} diff --git a/packages/protobuf/scripts/protobuf-patches/index.js b/packages/protobuf/scripts/protobuf-patches/index.js index 0b42d4e6b5e..ee76b2c1ae5 100644 --- a/packages/protobuf/scripts/protobuf-patches/index.js +++ b/packages/protobuf/scripts/protobuf-patches/index.js @@ -7,7 +7,7 @@ const DeviceModelInternal = 'DeviceModelInternal'; // type rule fixes, ideally it should not be here const RULE_PATCH = { - 'BackupDevice.groups': "optional", // protobuf repeated bytes are always optional (fallback to []) + 'BackupDevice.groups': 'optional', // protobuf repeated bytes are always optional (fallback to []) 'MultisigRedeemScriptType.nodes': 'optional', // its valid to be undefined according to implementation/tests 'MultisigRedeemScriptType.address_n': 'optional', // its valid to be undefined according to implementation/tests 'TxRequestDetailsType.request_index': 'required', @@ -295,19 +295,6 @@ const SKIP = [ 'WebAuthnRemoveResidentCredential', 'WebAuthnCredential', 'WebAuthnCredentials', - 'wire_in', - 'wire_out', - 'wire_debug_in', - 'wire_debug_out', - 'wire_tiny', - 'wire_bootloader', - 'wire_no_fsm', - 'bitcoin_only', - 'has_bitcoin_only_values', - 'unstable', - 'wire_type', - 'experimental', - 'include_in_bitcoin_only', ]; module.exports = { diff --git a/packages/protobuf/src/messages-schema.ts b/packages/protobuf/src/messages-schema.ts index eb204ecfa02..812f807c7d9 100644 --- a/packages/protobuf/src/messages-schema.ts +++ b/packages/protobuf/src/messages-schema.ts @@ -3477,12 +3477,6 @@ export const TezosSignedTx = Type.Object( { $id: 'TezosSignedTx' }, ); -export type experimental_message = Static; -export const experimental_message = Type.Object({}, { $id: 'experimental_message' }); - -export type experimental_field = Static; -export const experimental_field = Type.Object({}, { $id: 'experimental_field' }); - export type MessageType = Static; export const MessageType = Type.Object( { @@ -3762,8 +3756,6 @@ export const MessageType = Type.Object( TezosBallotOp, TezosSignTx, TezosSignedTx, - experimental_message, - experimental_field, }, { $id: 'MessageType' }, ); diff --git a/packages/protobuf/src/messages.ts b/packages/protobuf/src/messages.ts index 46074a84b01..ee8ff18b85c 100644 --- a/packages/protobuf/src/messages.ts +++ b/packages/protobuf/src/messages.ts @@ -2460,12 +2460,6 @@ export type TezosSignedTx = { operation_hash: string; }; -// experimental_message -export type experimental_message = {}; - -// experimental_field -export type experimental_field = {}; - // custom connect definitions export type MessageType = { BinanceGetAddress: BinanceGetAddress; @@ -2744,8 +2738,6 @@ export type MessageType = { TezosBallotOp: TezosBallotOp; TezosSignTx: TezosSignTx; TezosSignedTx: TezosSignedTx; - experimental_message: experimental_message; - experimental_field: experimental_field; }; export type MessageKey = keyof MessageType;