diff --git a/accounts/usbwallet/data_type.go b/accounts/usbwallet/data_type.go new file mode 100644 index 00000000000..35a218b2e12 --- /dev/null +++ b/accounts/usbwallet/data_type.go @@ -0,0 +1,106 @@ +// Copyright 2017 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package usbwallet + +import ( + "fmt" + "regexp" + "strconv" + "strings" + + "github.com/ethereum/go-ethereum/signer/core/apitypes" +) + +type dataType byte + +const ( + CustomType dataType = iota + IntType + UintType + AddressType + BoolType + StringType + FixedBytesType + BytesType +) + +var nameToType = map[string]dataType{ + "int": IntType, + "uint": UintType, + "address": AddressType, + "bool": BoolType, + "string": StringType, + "bytes": BytesType, +} + +func parseType(data apitypes.TypedData, field apitypes.Type) (dt dataType, name string, byteLength int, arrayLevels []*int, err error) { + name = strings.TrimSpace(field.Type) + arrayLengths := regexp.MustCompile(`\[(\d*)]`).FindAllStringSubmatch(name, -1) + if len(arrayLengths) > 0 { + arrayLevels = make([]*int, len(arrayLengths)) + for i, arrayLength := range arrayLengths { + if len(arrayLength[1]) == 0 { + arrayLevels[i] = nil // nil means dynamic length + } else { + length, _ := strconv.Atoi(arrayLength[1]) // guaranteed to be a digit, ignore error + arrayLevels[i] = &length + } + } + name = name[0:strings.Index(name, "[")] + } + if data.Types[name] != nil { + dt = CustomType + return + } + + matches := regexp.MustCompile(`^(.+?)(\d*)$`).FindStringSubmatch(name) + name = matches[1] + lengthStr := matches[2] + + var ok bool + if dt, ok = nameToType[name]; !ok { + err = fmt.Errorf("unknown type: %s", field.Type) + return + } + + byteLength, _ = strconv.Atoi(lengthStr) + if dt == UintType || dt == IntType { + if lengthStr == "" { + byteLength = 32 + } else if byteLength%8 != 0 { + err = fmt.Errorf("invalid length for %s: %s", field.Type, lengthStr) + return + } else { + byteLength /= 8 + } + } else if lengthStr != "" { + if dt == BytesType { + dt = FixedBytesType + } else { + err = fmt.Errorf("invalid type: %s", field.Type) + return + } + } else if dt == AddressType { + byteLength = 20 // address is always 20 bytes + } + if lengthStr != "" && (byteLength < 1 || byteLength > 32) { + err = fmt.Errorf("invalid length for %s: %s", field.Type, lengthStr) + return + } + + return +} diff --git a/accounts/usbwallet/hub.go b/accounts/usbwallet/hub.go index 81457b7da27..e20daae67ea 100644 --- a/accounts/usbwallet/hub.go +++ b/accounts/usbwallet/hub.go @@ -26,7 +26,7 @@ import ( "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/log" - "github.com/karalabe/hid" + "github.com/karalabe/usb" ) // LedgerScheme is the protocol scheme prefixing account and wallet URLs. @@ -105,7 +105,7 @@ func NewTrezorHubWithWebUSB() (*Hub, error) { // newHub creates a new hardware wallet manager for generic USB devices. func newHub(scheme string, vendorID uint16, productIDs []uint16, usageID uint16, endpointID int, makeDriver func(log.Logger) driver) (*Hub, error) { - if !hid.Supported() { + if !usb.Supported() { return nil, errors.New("unsupported platform") } hub := &Hub{ @@ -151,7 +151,7 @@ func (hub *Hub) refreshWallets() { return } // Retrieve the current list of USB wallet devices - var devices []hid.DeviceInfo + var devices []usb.DeviceInfo if runtime.GOOS == "linux" { // hidapi on Linux opens the device during enumeration to retrieve some infos, @@ -166,7 +166,7 @@ func (hub *Hub) refreshWallets() { return } } - infos, err := hid.Enumerate(hub.vendorID, 0) + infos, err := usb.Enumerate(hub.vendorID, 0) if err != nil { failcount := hub.enumFails.Add(1) if runtime.GOOS == "linux" { diff --git a/accounts/usbwallet/ledger.go b/accounts/usbwallet/ledger.go index 52595a16212..14a94e7b4bf 100644 --- a/accounts/usbwallet/ledger.go +++ b/accounts/usbwallet/ledger.go @@ -27,14 +27,18 @@ import ( "fmt" "io" "math/big" + "strconv" + "strings" "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/rlp" + "github.com/ethereum/go-ethereum/signer/core/apitypes" ) // ledgerOpcode is an enumeration encoding the supported Ledger opcodes. @@ -48,21 +52,60 @@ type ledgerParam1 byte // specific opcodes. The same parameter values may be reused between opcodes. type ledgerParam2 byte +// ledgerStatus is an enumeration encoding ledger status words. +type ledgerStatus uint16 + const ( - ledgerOpRetrieveAddress ledgerOpcode = 0x02 // Returns the public key and Ethereum address for a given BIP 32 path - ledgerOpSignTransaction ledgerOpcode = 0x04 // Signs an Ethereum transaction after having the user validate the parameters - ledgerOpGetConfiguration ledgerOpcode = 0x06 // Returns specific wallet application configuration - ledgerOpSignTypedMessage ledgerOpcode = 0x0c // Signs an Ethereum message following the EIP 712 specification + ledgerOpRetrieveAddress ledgerOpcode = 0x02 // Returns the public key and Ethereum address for a given BIP 32 path + ledgerOpSignTransaction ledgerOpcode = 0x04 // Signs an Ethereum transaction after having the user validate the parameters + ledgerOpGetConfiguration ledgerOpcode = 0x06 // Returns specific wallet application configuration + ledgerOpSignPersonalMessage ledgerOpcode = 0x08 // Signs a personal message following the EIP 712 specification + ledgerOpSignTypedMessage ledgerOpcode = 0x0c // Signs an Ethereum message following the EIP 712 specification + ledgerOpEip712SendStructDef ledgerOpcode = 0x1a // Sends EIP-712 struct types to the ledger + ledgerOpEip712SendStructImpl ledgerOpcode = 0x1c // Sends EIP-712 struct values to the ledger ledgerP1DirectlyFetchAddress ledgerParam1 = 0x00 // Return address directly from the wallet ledgerP1InitTypedMessageData ledgerParam1 = 0x00 // First chunk of Typed Message data ledgerP1InitTransactionData ledgerParam1 = 0x00 // First transaction data block for signing ledgerP1ContTransactionData ledgerParam1 = 0x80 // Subsequent transaction data block for signing + ledgerP1CompleteSend ledgerParam1 = 0x00 // Complete the value (in one go, or after partial) + ledgerP1PartialSend ledgerParam1 = 0x01 // Send partial data ledgerP2DiscardAddressChainCode ledgerParam2 = 0x00 // Do not return the chain code along with the address - - ledgerEip155Size int = 3 // Size of the EIP-155 chain_id,r,s in unsigned transactions + ledgerP2ProcessAndStartFlow ledgerParam2 = 0x00 // Process and start transaction signing flow + ledgerP2V0Implementation ledgerParam2 = 0x00 // EIP-712 V0 implementation (hashes only) + ledgerP2StructName ledgerParam2 = 0x00 // Send EIP-712 struct name + ledgerP2RootStruct ledgerParam2 = 0x00 // Send EIP-712 root struct + ledgerP2Array ledgerParam2 = 0x0f // Send EIP-712 array + ledgerP2StructField ledgerParam2 = 0xff // Send EIP-712 struct field + ledgerP2FullImplementation ledgerParam2 = 0x01 // EIP-712 full implementation (typed data) + + ledgerStatusNormalEnd ledgerStatus = 0x9000 + ledgerEip155Size int = 3 // Size of the EIP-155 chain_id,r,s in unsigned transactions ) +var ledgerStatuses = map[ledgerStatus]string{ + 0x5515: "Device is locked", + 0x6001: "Mode check fail", + 0x6501: "TransactionType not supported", + 0x6502: "Output buffer too small for chainId conversion", + 0x6511: "Ethereum app not open", + //0x68xx: "Internal error (Please report)", + 0x6982: "Security status not satisfied (Canceled by user)", + 0x6983: "Wrong Data length", + 0x6984: "Plugin not installed", + 0x6985: "Condition not satisfied", + 0x6A00: "Error without info", + 0x6A80: "Invalid data", + 0x6A84: "Insufficient memory", + 0x6A88: "Data not found", + 0x6B00: "Incorrect parameter P1 or P2", + 0x6D00: "Incorrect parameter INS", + 0x6E00: "Incorrect parameter CLA", + 0x6F00: "Incorrect parameter CLA", + 0x6F01: "Technical problem (Internal error, please report)", + 0x911C: "Command code not supported (i.e. Ledger-PKI not yet available)", +} + // errLedgerReplyInvalidHeader is the error message returned by a Ledger data exchange // if the device replies with a mismatching header. This usually means the device // is in browser mode. @@ -72,6 +115,10 @@ var errLedgerReplyInvalidHeader = errors.New("ledger: invalid reply header") // when a response does arrive, but it does not contain the expected data. var errLedgerInvalidVersionReply = errors.New("ledger: invalid version reply") +// errLedgerInvalidStatus is the error message returned if the ledger doesn't respond with a +// 0x9000 status. +var errLedgerInvalidStatus = errors.New("ledger: invalid status") + // ledgerDriver implements the communication with a Ledger hardware wallet. type ledgerDriver struct { device io.ReadWriter // USB device connection to communicate through @@ -119,7 +166,7 @@ func (w *ledgerDriver) Open(device io.ReadWriter, passphrase string) error { _, err := w.ledgerDerive(accounts.DefaultBaseDerivationPath) if err != nil { // Ethereum app is not running or in browser mode, nothing more to do, return - if err == errLedgerReplyInvalidHeader { + if errors.Is(err, errLedgerReplyInvalidHeader) { w.browser = true } return nil @@ -141,7 +188,7 @@ func (w *ledgerDriver) Close() error { // Heartbeat implements usbwallet.driver, performing a sanity check against the // Ledger to see if it's still online. func (w *ledgerDriver) Heartbeat() error { - if _, err := w.ledgerVersion(); err != nil && err != errLedgerInvalidVersionReply { + if _, err := w.ledgerVersion(); err != nil && !errors.Is(err, errLedgerInvalidVersionReply) { w.failure = err return err } @@ -166,7 +213,7 @@ func (w *ledgerDriver) SignTx(path accounts.DerivationPath, tx *types.Transactio return common.Address{}, nil, accounts.ErrWalletClosed } // Ensure the wallet is capable of signing the given transaction - if chainID != nil && (w.version[0] < 1 || (w.version[0] == 1 && w.version[1] == 0 && w.version[2] < 3)) { + if chainID != nil && w.version[0] <= 1 && w.version[1] <= 0 && w.version[2] <= 2 { //lint:ignore ST1005 brand name displayed on the console return common.Address{}, nil, fmt.Errorf("Ledger v%d.%d.%d doesn't support signing this transaction, please update to v1.0.3 at least", w.version[0], w.version[1], w.version[2]) } @@ -174,11 +221,43 @@ func (w *ledgerDriver) SignTx(path accounts.DerivationPath, tx *types.Transactio return w.ledgerSign(path, tx, chainID) } -// SignTypedMessage implements usbwallet.driver, sending the message to the Ledger and +// SignTypedHash implements usbwallet.driver, sending the message to the Ledger and // waiting for the user to sign or deny the transaction. // // Note: this was introduced in the ledger 1.5.0 firmware -func (w *ledgerDriver) SignTypedMessage(path accounts.DerivationPath, domainHash []byte, messageHash []byte) ([]byte, error) { +func (w *ledgerDriver) SignTypedHash(path accounts.DerivationPath, domainHash []byte, messageHash []byte) ([]byte, error) { + // If the Ethereum app doesn't run, abort + if w.offline() { + return nil, accounts.ErrWalletClosed + } + // Ensure the wallet is capable of signing the given transaction + if w.version[0] < 1 && w.version[1] < 5 { + //lint:ignore ST1005 brand name displayed on the console + return nil, fmt.Errorf("Ledger version >= 1.5.0 required for EIP-712 signing (found version v%d.%d.%d)", w.version[0], w.version[1], w.version[2]) + } + // All infos gathered and metadata checks out, request signing + return w.ledgerSignTypedHash(path, domainHash, messageHash) +} + +// SignText implements usbwallet.driver, sending the message to the Ledger and +// waiting for the user to confirm or deny the signature. +func (w *ledgerDriver) SignText(path accounts.DerivationPath, text []byte) ([]byte, error) { + // If the Ethereum app doesn't run, abort + if w.offline() { + return nil, accounts.ErrWalletClosed + } + // Ensure the wallet is capable of signing the given transaction + if w.version[0] < 1 && w.version[1] < 5 { + //lint:ignore ST1005 brand name displayed on the console + return nil, fmt.Errorf("Ledger version >= 1.5.0 required for EIP-712 signing (found version v%d.%d.%d)", w.version[0], w.version[1], w.version[2]) + } + // All infos gathered and metadata checks out, request signing + return w.ledgerSignPersonalMessage(path, text) +} + +// SignedTypedData implements usbwallet.driver, sending the message to the Ledger and +// waiting for the user to sign or deny signing an EIP-712 typed data struct. +func (w *ledgerDriver) SignedTypedData(path accounts.DerivationPath, data apitypes.TypedData) ([]byte, error) { // If the Ethereum app doesn't run, abort if w.offline() { return nil, accounts.ErrWalletClosed @@ -189,7 +268,7 @@ func (w *ledgerDriver) SignTypedMessage(path accounts.DerivationPath, domainHash return nil, fmt.Errorf("Ledger version >= 1.5.0 required for EIP-712 signing (found version v%d.%d.%d)", w.version[0], w.version[1], w.version[2]) } // All infos gathered and metadata checks out, request signing - return w.ledgerSignTypedMessage(path, domainHash, messageHash) + return w.ledgerSignTypedData(path, data) } // ledgerVersion retrieves the current version of the Ethereum wallet app running @@ -360,7 +439,7 @@ func (w *ledgerDriver) ledgerSign(derivationPath []uint32, tx *types.Transaction // Send the request and wait for the response var ( - op = ledgerP1InitTransactionData + p1 = ledgerP1InitTransactionData reply []byte ) @@ -378,13 +457,13 @@ func (w *ledgerDriver) ledgerSign(derivationPath []uint32, tx *types.Transaction chunk = len(payload) } // Send the chunk over, ensuring it's processed correctly - reply, err = w.ledgerExchange(ledgerOpSignTransaction, op, 0, payload[:chunk]) + reply, err = w.ledgerExchange(ledgerOpSignTransaction, p1, ledgerP2ProcessAndStartFlow, payload[:chunk]) if err != nil { return common.Address{}, nil, err } // Shift the payload and ensure subsequent chunks are marked as such payload = payload[chunk:] - op = ledgerP1ContTransactionData + p1 = ledgerP1ContTransactionData } // Extract the Ethereum signature and do a sanity validation if len(reply) != crypto.SignatureLength { @@ -414,7 +493,7 @@ func (w *ledgerDriver) ledgerSign(derivationPath []uint32, tx *types.Transaction return sender, signed, nil } -// ledgerSignTypedMessage sends the transaction to the Ledger wallet, and waits for the user +// ledgerSignTypedHash sends the transaction to the Ledger wallet, and waits for the user // to confirm or deny the transaction. // // The signing protocol is defined as follows: @@ -441,7 +520,7 @@ func (w *ledgerDriver) ledgerSign(derivationPath []uint32, tx *types.Transaction // signature V | 1 byte // signature R | 32 bytes // signature S | 32 bytes -func (w *ledgerDriver) ledgerSignTypedMessage(derivationPath []uint32, domainHash []byte, messageHash []byte) ([]byte, error) { +func (w *ledgerDriver) ledgerSignTypedHash(derivationPath []uint32, domainHash []byte, messageHash []byte) ([]byte, error) { // Flatten the derivation path into the Ledger request path := make([]byte, 1+4*len(derivationPath)) path[0] = byte(len(derivationPath)) @@ -454,13 +533,70 @@ func (w *ledgerDriver) ledgerSignTypedMessage(derivationPath []uint32, domainHas // Send the request and wait for the response var ( - op = ledgerP1InitTypedMessageData reply []byte err error ) // Send the message over, ensuring it's processed correctly - reply, err = w.ledgerExchange(ledgerOpSignTypedMessage, op, 0, payload) + reply, err = w.ledgerExchange(ledgerOpSignTypedMessage, ledgerP1InitTypedMessageData, ledgerP2V0Implementation, payload) + + if err != nil { + return nil, err + } + + // Extract the Ethereum signature and do a sanity validation + if len(reply) != crypto.SignatureLength { + return nil, errors.New("reply lacks signature") + } + signature := append(reply[1:], reply[0]) + return signature, nil +} + +// ledgerSignPersonalMessage sends the transaction to the Ledger wallet, and waits for the user +// to confirm or deny the transaction. +// +// The signing protocol is defined as follows: +// +// CLA | INS | P1 | P2 | Lc | Le +// ----+-----+----+-----------------------------+-----+--- +// E0 | 08 | 00 | implementation version : 00 | variable | variable +// +// Where the input is: +// +// Description | Length +// -------------------------------------------------+---------- +// Number of BIP 32 derivations to perform (max 10) | 1 byte +// First derivation index (big endian) | 4 bytes +// ... | 4 bytes +// Last derivation index (big endian) | 4 bytes +// text | arbitrary +// +// And the output data is: +// +// Description | Length +// ------------+--------- +// signature V | 1 byte +// signature R | 32 bytes +// signature S | 32 bytes +func (w *ledgerDriver) ledgerSignPersonalMessage(derivationPath []uint32, text []byte) ([]byte, error) { + // Flatten the derivation path into the Ledger request + path := make([]byte, 5+4*len(derivationPath)) + path[0] = byte(len(derivationPath)) + for i, component := range derivationPath { + binary.BigEndian.PutUint32(path[1+4*i:], component) + } + binary.BigEndian.PutUint32(path[1+4*len(derivationPath):], uint32(len(text))) + // Create the 712 message + payload := append(path, text...) + + // Send the request and wait for the response + var ( + reply []byte + err error + ) + + // Send the message over, ensuring it's processed correctly + reply, err = w.ledgerExchange(ledgerOpSignPersonalMessage, ledgerP1InitTransactionData, 0, payload) if err != nil { return nil, err @@ -474,6 +610,223 @@ func (w *ledgerDriver) ledgerSignTypedMessage(derivationPath []uint32, domainHas return signature, nil } +// ledgerSignTypedData sends the transaction to the Ledger wallet, and waits for the user +// to confirm or deny the transaction. +// +// The typed data struct fields and values need to be sent to the Ledger first. +// See https://github.com/LedgerHQ/app-ethereum/blob/develop/doc/eip712.md. +// +// After the data is sent, the signing protocol is defined as follows: +// +// CLA | INS | P1 | P2 | Lc | Le +// ----+-----+----+-----------------------------+-----+--- +// E0 | 0C | 00 | implementation version : 00 | variable | variable +// +// Where the input is: +// +// Description | Length +// -------------------------------------------------+---------- +// Number of BIP 32 derivations to perform (max 10) | 1 byte +// First derivation index (big endian) | 4 bytes +// ... | 4 bytes +// Last derivation index (big endian) | 4 bytes +// +// And the output data is: +// +// Description | Length +// ------------+--------- +// signature V | 1 byte +// signature R | 32 bytes +// signature S | 32 bytes +func (w *ledgerDriver) ledgerSignTypedData(derivationPath []uint32, data apitypes.TypedData) ([]byte, error) { + // Check if the EIP712Domain and primary type are present in the data + domainStruct := data.Types["EIP712Domain"] + if domainStruct == nil { + return nil, fmt.Errorf("EIP712Domain type is required") + } + primaryType := data.Types[data.PrimaryType] + if primaryType == nil { + return nil, fmt.Errorf("primary type %s not found in types", data.PrimaryType) + } + + // sendField is a function for sending an EIP-712 struct field name + type + sendField := func(field apitypes.Type) error { + dt, name, byteLength, arrays, err := parseType(data, field) + if err != nil { + return err + } + + typeDesc := byte(dt) + + var typeName []byte + var typeSize []byte + switch dt { + case CustomType: + typeName = append([]byte{byte(len(name))}, []byte(name)...) + case IntType, UintType, FixedBytesType: + typeSize = []byte{byte(byteLength)} + typeDesc |= 0x40 + default: + } + + var arrayLevels []byte + if len(arrays) > 0 { + typeDesc |= 0x80 + arrayLevels = []byte{byte(len(arrays))} + for _, length := range arrays { + if length == nil { + arrayLevels = append(arrayLevels, 0) + } else { + arrayLevels = append(arrayLevels, 1, byte(*length)) + } + } + } + + payload := []byte{typeDesc} + payload = append(payload, typeName...) + payload = append(payload, typeSize...) + payload = append(payload, arrayLevels...) + payload = append(payload, byte(len(field.Name))) + payload = append(payload, []byte(field.Name)...) + _, err = w.ledgerExchange(ledgerOpEip712SendStructDef, 0, ledgerP2StructField, payload) + return err + } + + // sendValue is a recursive function that sends the value of a field + var sendValue func(t, name string, value interface{}) error + sendValue = func(t, name string, value interface{}) error { + if value == nil { + return fmt.Errorf("nil value for field %s", name) + } + if strings.HasSuffix(t, "]") { + a, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("expected array for field %s, got %T", name, value) + } + if _, err := w.ledgerExchange(ledgerOpEip712SendStructImpl, ledgerP1CompleteSend, ledgerP2Array, []byte{byte(len(a))}); err != nil { + return fmt.Errorf("failed to send array length: %w", err) + } + t = t[:strings.LastIndex(t, "[")] + for _, item := range a { + if err := sendValue(t, name, item); err != nil { + return fmt.Errorf("failed to send array item: %w", err) + } + } + return nil + } + s := data.Types[t] + if s != nil { + m, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("expected struct for field %s, got %T", name, value) + } + for _, field := range s { + if err := sendValue(field.Type, field.Name, m[field.Name]); err != nil { + return fmt.Errorf("failed to send struct field %s: %w", field.Name, err) + } + } + return nil + } + var enc []byte + var err error + switch v := value.(type) { + case string: + if t == "string" { + enc = []byte(v) + } else if strings.HasPrefix(v, "0x") { + enc, err = hex.DecodeString(v[2:]) + if err != nil { + return fmt.Errorf("failed to decode hex string for field %s: %w", name, err) + } + } else { + return fmt.Errorf("invalid string value for field %s: %s", name, v) + } + case bool: + if v { + enc = []byte{1} + } else { + enc = []byte{0} + } + case float64: + enc = new(big.Int).SetInt64(int64(v)).Bytes() + case *math.HexOrDecimal256: + if v == nil { + return fmt.Errorf("nil value for field %s", name) + } + h := big.Int(*v) + enc = (&h).Bytes() + + default: + return fmt.Errorf("unsupported type for field %s: %T", name, value) + } + + chunk := 255 + payload := binary.BigEndian.AppendUint16([]byte{}, uint16(len(enc))) + payload = append(payload, enc...) + for len(payload) > 0 { + p1 := ledgerP1PartialSend + if chunk >= len(payload) { + chunk = len(payload) + p1 = ledgerP1CompleteSend + } + if _, err := w.ledgerExchange(ledgerOpEip712SendStructImpl, p1, ledgerP2StructField, payload[:chunk]); err != nil { + return fmt.Errorf("failed to send field %s: %w", name, err) + } + payload = payload[chunk:] + } + return nil + } + + // first send all the EIP-712 struct definitions + for name, fields := range data.Types { + _, err := w.ledgerExchange(ledgerOpEip712SendStructDef, 0, ledgerP2StructName, []byte(name)) + if err != nil { + return nil, fmt.Errorf("failed to send type name %s: %w", name, err) + } + for _, field := range fields { + if err := sendField(field); err != nil { + return nil, fmt.Errorf("failed to send field %s: %w", field.Name, err) + } + } + } + + // send the EIP-712 domain field values + if _, err := w.ledgerExchange(ledgerOpEip712SendStructImpl, ledgerP1CompleteSend, ledgerP2RootStruct, []byte("EIP712Domain")); err != nil { + return nil, fmt.Errorf("failed to send domain type name: %w", err) + } + if err := sendValue("EIP712Domain", "domain", data.Domain.Map()); err != nil { + return nil, fmt.Errorf("failed to send domain fields: %w", err) + } + + // send the message field values + if _, err := w.ledgerExchange(ledgerOpEip712SendStructImpl, ledgerP1CompleteSend, ledgerP2RootStruct, []byte(data.PrimaryType)); err != nil { + return nil, fmt.Errorf("failed to send primary type name: %w", err) + } + if err := sendValue(data.PrimaryType, "message", data.Message); err != nil { + return nil, fmt.Errorf("failed to send primary type fields: %w", err) + } + + // Flatten the derivation path into the Ledger request + path := make([]byte, 1+4*len(derivationPath)) + path[0] = byte(len(derivationPath)) + for i, component := range derivationPath { + binary.BigEndian.PutUint32(path[1+4*i:], component) + } + + // Send the message over, ensuring it's processed correctly + reply, err := w.ledgerExchange(ledgerOpSignTypedMessage, 0, ledgerP2FullImplementation, path) + if err != nil { + return nil, err + } + + // Extract the Ethereum signature and do a sanity validation + if len(reply) != crypto.SignatureLength { + return nil, fmt.Errorf("invalid signature length: %d", len(reply)) + } + signature := append(reply[1:], reply[0]) + return signature, nil +} + // ledgerExchange performs a data exchange with the Ledger wallet, sending it a // message and retrieving the response. // @@ -508,6 +861,16 @@ func (w *ledgerDriver) ledgerSignTypedMessage(derivationPath []uint32, domainHas // APDU length | 1 byte // Optional APDU data | arbitrary func (w *ledgerDriver) ledgerExchange(opcode ledgerOpcode, p1 ledgerParam1, p2 ledgerParam2, data []byte) ([]byte, error) { + for i := 1; ; i++ { + res, err := w._ledgerExchange(opcode, p1, p2, data) + // on failure, try the exchange 3 times in total + if err == nil || i == 3 { + return res, err + } + } +} + +func (w *ledgerDriver) _ledgerExchange(opcode ledgerOpcode, p1 ledgerParam1, p2 ledgerParam2, data []byte) ([]byte, error) { // Construct the message payload, possibly split into multiple chunks apdu := make([]byte, 2, 7+len(data)) @@ -569,5 +932,16 @@ func (w *ledgerDriver) ledgerExchange(opcode ledgerOpcode, p1 ledgerParam1, p2 l break } } + if len(reply) < 2 { + return nil, errLedgerInvalidStatus + } + status := ledgerStatus(binary.BigEndian.Uint16(reply[len(reply)-2:])) + if status != ledgerStatusNormalEnd { + s := ledgerStatuses[status] + if s == "" { + s = "unknown error" + } + return nil, fmt.Errorf("%w: 0x%s (%s)", errLedgerInvalidStatus, strconv.FormatUint(uint64(status), 16), s) + } return reply[:len(reply)-2], nil } diff --git a/accounts/usbwallet/trezor.go b/accounts/usbwallet/trezor.go index d4862d161b7..3b081ef73ab 100644 --- a/accounts/usbwallet/trezor.go +++ b/accounts/usbwallet/trezor.go @@ -27,6 +27,7 @@ import ( "io" "math" "math/big" + "reflect" "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/accounts/usbwallet/trezor" @@ -34,31 +35,34 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/log" + "github.com/ethereum/go-ethereum/signer/core/apitypes" + pin "github.com/reserve-protocol/trezor" "google.golang.org/protobuf/proto" ) -// ErrTrezorPINNeeded is returned if opening the trezor requires a PIN code. In -// this case, the calling application should display a pinpad and send back the -// encoded passphrase. -var ErrTrezorPINNeeded = errors.New("trezor: pin needed") - -// ErrTrezorPassphraseNeeded is returned if opening the trezor requires a passphrase -var ErrTrezorPassphraseNeeded = errors.New("trezor: passphrase needed") - // errTrezorReplyInvalidHeader is the error message returned by a Trezor data exchange // if the device replies with a mismatching header. This usually means the device // is in browser mode. var errTrezorReplyInvalidHeader = errors.New("trezor: invalid reply header") +type TrezorFailure struct { + *trezor.Failure +} + +// Error implements the error interface for the TrezorFailure type, returning +// a formatted error message containing the failure reason. +func (f *TrezorFailure) Error() string { + return fmt.Sprintf("trezor: %s", f.GetMessage()) +} + // trezorDriver implements the communication with a Trezor hardware wallet. type trezorDriver struct { - device io.ReadWriter // USB device connection to communicate through - version [3]uint32 // Current version of the Trezor firmware - label string // Current textual label of the Trezor device - pinwait bool // Flags whether the device is waiting for PIN entry - passphrasewait bool // Flags whether the device is waiting for passphrase entry - failure error // Any failure that would make the device unusable - log log.Logger // Contextual logger to tag the trezor with its id + device io.ReadWriter // USB device connection to communicate through + version [3]uint32 // Current version of the Trezor firmware + label string // Current textual label of the Trezor device + passphrase string + failure error // Any failure that would make the device unusable + log log.Logger // Contextual logger to tag the trezor with its id } // newTrezorDriver creates a new instance of a Trezor USB protocol driver. @@ -77,87 +81,32 @@ func (w *trezorDriver) Status() (string, error) { if w.device == nil { return "Closed", w.failure } - if w.pinwait { - return fmt.Sprintf("Trezor v%d.%d.%d '%s' waiting for PIN", w.version[0], w.version[1], w.version[2], w.label), w.failure - } return fmt.Sprintf("Trezor v%d.%d.%d '%s' online", w.version[0], w.version[1], w.version[2], w.label), w.failure } // Open implements usbwallet.driver, attempting to initialize the connection to -// the Trezor hardware wallet. Initializing the Trezor is a two or three phase operation: -// - The first phase is to initialize the connection and read the wallet's -// features. This phase is invoked if the provided passphrase is empty. The -// device will display the pinpad as a result and will return an appropriate -// error to notify the user that a second open phase is needed. -// - The second phase is to unlock access to the Trezor, which is done by the -// user actually providing a passphrase mapping a keyboard keypad to the pin -// number of the user (shuffled according to the pinpad displayed). -// - If needed the device will ask for passphrase which will require calling -// open again with the actual passphrase (3rd phase) +// the Trezor hardware wallet. func (w *trezorDriver) Open(device io.ReadWriter, passphrase string) error { - w.device, w.failure = device, nil - - // If phase 1 is requested, init the connection and wait for user callback - if passphrase == "" && !w.passphrasewait { - // If we're already waiting for a PIN entry, insta-return - if w.pinwait { - return ErrTrezorPINNeeded - } - // Initialize a connection to the device - features := new(trezor.Features) - if _, err := w.trezorExchange(&trezor.Initialize{}, features); err != nil { - return err - } - w.version = [3]uint32{features.GetMajorVersion(), features.GetMinorVersion(), features.GetPatchVersion()} - w.label = features.GetLabel() + w.device, w.passphrase, w.failure = device, passphrase, nil - // Do a manual ping, forcing the device to ask for its PIN and Passphrase - askPin := true - askPassphrase := true - res, err := w.trezorExchange(&trezor.Ping{PinProtection: &askPin, PassphraseProtection: &askPassphrase}, new(trezor.PinMatrixRequest), new(trezor.PassphraseRequest), new(trezor.Success)) - if err != nil { - return err - } - // Only return the PIN request if the device wasn't unlocked until now - switch res { - case 0: - w.pinwait = true - return ErrTrezorPINNeeded - case 1: - w.pinwait = false - w.passphrasewait = true - return ErrTrezorPassphraseNeeded - case 2: - return nil // responded with trezor.Success - } + if _, err := w.trezorExchange(&trezor.EndSession{}, new(trezor.Success)); err != nil { + return err } - // Phase 2 requested with actual PIN entry - if w.pinwait { - w.pinwait = false - res, err := w.trezorExchange(&trezor.PinMatrixAck{Pin: &passphrase}, new(trezor.Success), new(trezor.PassphraseRequest)) - if err != nil { - w.failure = err - return err - } - if res == 1 { - w.passphrasewait = true - return ErrTrezorPassphraseNeeded - } - } else if w.passphrasewait { - w.passphrasewait = false - if _, err := w.trezorExchange(&trezor.PassphraseAck{Passphrase: &passphrase}, new(trezor.Success)); err != nil { - w.failure = err - return err - } + + features := new(trezor.Features) + if _, err := w.trezorExchange(&trezor.Initialize{}, features); err != nil { + return err } + w.version = [3]uint32{features.GetMajorVersion(), features.GetMinorVersion(), features.GetPatchVersion()} + w.label = features.GetLabel() - return nil + return w.Heartbeat() } // Close implements usbwallet.driver, cleaning up and metadata maintained within // the Trezor driver. func (w *trezorDriver) Close() error { - w.version, w.label, w.pinwait = [3]uint32{}, "", false + w.version, w.label = [3]uint32{}, "" return nil } @@ -186,8 +135,236 @@ func (w *trezorDriver) SignTx(path accounts.DerivationPath, tx *types.Transactio return w.trezorSign(path, tx, chainID) } -func (w *trezorDriver) SignTypedMessage(path accounts.DerivationPath, domainHash []byte, messageHash []byte) ([]byte, error) { - return nil, accounts.ErrNotSupported +func (w *trezorDriver) SignTypedHash(path accounts.DerivationPath, domainHash []byte, messageHash []byte) ([]byte, error) { + if w.device == nil { + return nil, accounts.ErrWalletClosed + } + response := new(trezor.EthereumTypedDataSignature) + _, err := w.trezorExchange(&trezor.EthereumSignTypedHash{ + AddressN: path, + DomainSeparatorHash: domainHash, + MessageHash: messageHash, + }, response) + if err != nil { + return nil, err + } + return response.Signature, nil +} + +func (w *trezorDriver) SignText(path accounts.DerivationPath, text []byte) ([]byte, error) { + if w.device == nil { + return nil, accounts.ErrWalletClosed + } + response := new(trezor.EthereumMessageSignature) + _, err := w.trezorExchange(&trezor.EthereumSignMessage{ + AddressN: path, + Message: text, + }, response) + if err != nil { + return nil, err + } + return response.Signature, nil +} + +func (w *trezorDriver) SignedTypedData(path accounts.DerivationPath, data apitypes.TypedData) ([]byte, error) { + if w.device == nil { + return nil, accounts.ErrWalletClosed + } + + _, hashes, err := apitypes.TypedDataAndHash(data) + if err != nil { + return nil, fmt.Errorf("trezor: error hashing typed data: %w", err) + } + domainHash, messageHash := hashes[2:34], hashes[34:66] + if w.version[0] == 1 { + // legacy Trezor devices don't support typed data; fallback to hash signing: + return w.SignTypedHash(path, []byte(domainHash), []byte(messageHash)) + } + + if w.version[0] == 2 && (w.version[1] < 9 || (w.version[1] == 9 && w.version[2] == 0)) { + // ShowMessageHash was introduced in Trezor firmware v2.9.1 + return nil, fmt.Errorf("trezor: typed data signing requires firmware v2.9.1 or newer") + } + + signature := new(trezor.EthereumTypedDataSignature) + structRequest := new(trezor.EthereumTypedDataStructRequest) + valueRequest := new(trezor.EthereumTypedDataValueRequest) + var req proto.Message = &trezor.EthereumSignTypedData{ + AddressN: path, + PrimaryType: &data.PrimaryType, + ShowMessageHash: []byte(messageHash), + } + nestedArray := false + for { + n, err := w.trezorExchange(req, signature, structRequest, valueRequest) + if err != nil { + var trezorFailure *TrezorFailure + if nestedArray && errors.As(err, &trezorFailure) && + trezorFailure.Code != nil && *trezorFailure.Code == trezor.Failure_Failure_FirmwareError { + return nil, fmt.Errorf("trezor: nested arrays are not supported by this firmware version: %w", err) + } + return nil, err + } + nestedArray = false + switch n { + case 0: + // No additional data needed, return the signature + return signature.Signature, nil + case 1: + fields := data.Types[structRequest.GetName()] + if len(fields) == 0 { + return nil, fmt.Errorf("trezor: no fields for struct %s", structRequest.GetName()) + } + ack := &trezor.EthereumTypedDataStructAck{ + Members: make([]*trezor.EthereumTypedDataStructAck_EthereumStructMember, len(fields)), + } + for i, field := range fields { + dt, name, byteLength, arrays, err := parseType(data, field) + if err != nil { + return nil, err + } + ubyteLength := uint32(byteLength) + t := &trezor.EthereumTypedDataStructAck_EthereumFieldType{} + inner := t + for i := len(arrays) - 1; i >= 0; i-- { + dataType := trezor.EthereumTypedDataStructAck_ARRAY + inner.DataType = &dataType + if arrays[i] != nil { + length := uint32(*arrays[i]) + inner.Size = &length + } + inner.EntryType = &trezor.EthereumTypedDataStructAck_EthereumFieldType{} + inner = inner.EntryType + } + var dataType trezor.EthereumTypedDataStructAck_EthereumDataType + switch dt { + case CustomType: + inner.StructName = &name + dataType = trezor.EthereumTypedDataStructAck_STRUCT + members := uint32(len(data.Types[name])) + inner.Size = &members + case IntType: + dataType = trezor.EthereumTypedDataStructAck_INT + inner.Size = &ubyteLength + case UintType: + dataType = trezor.EthereumTypedDataStructAck_UINT + inner.Size = &ubyteLength + case AddressType: + dataType = trezor.EthereumTypedDataStructAck_ADDRESS + case BoolType: + dataType = trezor.EthereumTypedDataStructAck_BOOL + case StringType: + dataType = trezor.EthereumTypedDataStructAck_STRING + case FixedBytesType: + dataType = trezor.EthereumTypedDataStructAck_BYTES + inner.Size = &ubyteLength + case BytesType: + dataType = trezor.EthereumTypedDataStructAck_BYTES + } + inner.DataType = &dataType + ack.Members[i] = &trezor.EthereumTypedDataStructAck_EthereumStructMember{ + Name: &field.Name, + Type: t, + } + } + req = ack + case 2: + structType := data.Types[data.PrimaryType] + structValue := data.Message + if valueRequest.MemberPath[0] == 0 { + // populate with domain info + structType = data.Types["EIP712Domain"] + structValue = data.Domain.Map() + } + var value []byte + for i := 1; i < len(valueRequest.MemberPath); i++ { + p := valueRequest.MemberPath[i] + if structType == nil { + return nil, fmt.Errorf("trezor: no struct type for path %v", path) + } + if int(p) >= len(structType) { + return nil, fmt.Errorf("trezor: invalid field index %d for struct %s", p, structRequest.GetName()) + } + field := structType[p] + nextValue := structValue[field.Name] + dt, name, byteLength, arrays, err := parseType(data, field) + if err != nil { + return nil, err + } + if len(arrays) > 1 { + nestedArray = true + } + for j := 0; j < len(arrays) && i < len(valueRequest.MemberPath)-1; i, j = i+1, j+1 { + k := reflect.TypeOf(nextValue).Kind() + if !(k == reflect.Array || k == reflect.Slice) { + return nil, fmt.Errorf("trezor: expected array at path %v, got %T", valueRequest.MemberPath[:i+1], nextValue) + } + a := reflect.ValueOf(nextValue) + p = valueRequest.MemberPath[i+1] + if int(p) >= a.Len() { + return nil, fmt.Errorf("trezor: invalid array index %d for path %v", p, valueRequest.MemberPath[:i+1]) + } + nextValue = a.Index(int(p)).Interface() + } + k := reflect.TypeOf(nextValue).Kind() + if i < len(valueRequest.MemberPath)-1 { + if reflect.TypeOf(nextValue).Kind() != reflect.Map { + return nil, fmt.Errorf("trezor: expected map at path %v, got %T", valueRequest.MemberPath[:i+1], nextValue) + } + structType = data.Types[name] + structValue = nextValue.(apitypes.TypedDataMessage) + } else if k == reflect.Array || k == reflect.Slice { + // Array value, return length as uint16 + value = binary.BigEndian.AppendUint16([]byte{}, uint16(reflect.ValueOf(nextValue).Len())) + } else { + // Last value, encode it as a primitive value + switch dt { + case CustomType: + return nil, fmt.Errorf("trezor: cannot encode custom type %s at path %v", name, valueRequest.MemberPath[:i+1]) + case IntType, UintType, AddressType, FixedBytesType: + if str, ok := nextValue.(string); ok { + value = common.FromHex(str) + } else if f, ok := nextValue.(float64); ok { + value = new(big.Int).SetInt64(int64(f)).Bytes() + } + if len(value) > byteLength { + return nil, fmt.Errorf("trezor: value at path %v is too long (%d bytes, expected %d)", valueRequest.MemberPath[:i+1], len(value), byteLength) + } + for len(value) < byteLength { + value = append([]byte{0}, value...) + } + case BoolType: + if b, ok := nextValue.(bool); ok { + if b { + value = []byte{1} + } else { + value = []byte{0} + } + } else { + return nil, fmt.Errorf("trezor: expected bool at path %v, got %T", valueRequest.MemberPath[:i+1], nextValue) + } + case StringType: + if str, ok := nextValue.(string); ok { + value = []byte(str) + } else { + return nil, fmt.Errorf("trezor: expected string at path %v, got %T", valueRequest.MemberPath[:i+1], nextValue) + } + case BytesType: + if str, ok := nextValue.(string); ok { + value = common.FromHex(str) + } else { + return nil, fmt.Errorf("trezor: expected bytes at path %v, got %T", valueRequest.MemberPath[:i+1], nextValue) + } + } + } + } + req = &trezor.EthereumTypedDataValueAck{ + Value: value, + } + default: + return nil, fmt.Errorf("trezor: unexpected reply index %d", n) + } + } } // trezorDerive sends a derivation request to the Trezor device and returns the @@ -197,10 +374,7 @@ func (w *trezorDriver) trezorDerive(derivationPath []uint32) (common.Address, er if _, err := w.trezorExchange(&trezor.EthereumGetAddress{AddressN: derivationPath}, address); err != nil { return common.Address{}, err } - if addr := address.GetAddressBin(); len(addr) > 0 { // Older firmwares use binary formats - return common.BytesToAddress(addr), nil - } - if addr := address.GetAddressHex(); len(addr) > 0 { // Newer firmwares use hexadecimal formats + if addr := address.GetAddress(); len(addr) > 0 { return common.HexToAddress(addr), nil } return common.Address{}, errors.New("missing derived address") @@ -224,8 +398,7 @@ func (w *trezorDriver) trezorSign(derivationPath []uint32, tx *types.Transaction if to := tx.To(); to != nil { // Non contract deploy, set recipient explicitly hex := to.Hex() - request.ToHex = &hex // Newer firmwares (old will ignore) - request.ToBin = (*to)[:] // Older firmwares (new will ignore) + request.To = &hex } if length > 1024 { // Send the data chunked if that was requested request.DataInitialChunk, data = data[:1024], data[1024:] @@ -233,7 +406,7 @@ func (w *trezorDriver) trezorSign(derivationPath []uint32, tx *types.Transaction request.DataInitialChunk, data = data, nil } if chainID != nil { // EIP-155 transaction, set chain ID explicitly (only 32 bit is supported!?) - id := uint32(chainID.Int64()) + id := chainID.Uint64() request.ChainId = &id } // Send the initiation message and stream content until a signature is returned @@ -250,11 +423,7 @@ func (w *trezorDriver) trezorSign(derivationPath []uint32, tx *types.Transaction } } // Extract the Ethereum signature and do a sanity validation - if len(response.GetSignatureR()) == 0 || len(response.GetSignatureS()) == 0 { - return common.Address{}, nil, errors.New("reply lacks signature") - } else if response.GetSignatureV() == 0 && int(chainID.Int64()) <= (math.MaxUint32-36)/2 { - // for chainId >= (MaxUint32-36)/2, Trezor returns signature bit only - // https://github.com/trezor/trezor-mcu/pull/399 + if len(response.GetSignatureR()) == 0 || len(response.GetSignatureS()) == 0 || response.GetSignatureV() == 0 { return common.Address{}, nil, errors.New("reply lacks signature") } signature := append(append(response.GetSignatureR(), response.GetSignatureS()...), byte(response.GetSignatureV())) @@ -361,12 +530,22 @@ func (w *trezorDriver) trezorExchange(req proto.Message, results ...proto.Messag if err := proto.Unmarshal(reply, failure); err != nil { return 0, err } - return 0, errors.New("trezor: " + failure.GetMessage()) + return 0, &TrezorFailure{Failure: failure} } if kind == uint16(trezor.MessageType_MessageType_ButtonRequest) { // Trezor is waiting for user confirmation, ack and wait for the next message return w.trezorExchange(&trezor.ButtonAck{}, results...) } + if kind == uint16(trezor.MessageType_MessageType_PinMatrixRequest) { + p, err := pin.GetPIN("Please enter your Trezor PIN") + if err != nil { + return 0, err + } + return w.trezorExchange(&trezor.PinMatrixAck{Pin: &p}, results...) + } + if kind == uint16(trezor.MessageType_MessageType_PassphraseRequest) { + return w.trezorExchange(&trezor.PassphraseAck{Passphrase: &w.passphrase}, results...) + } for i, res := range results { if trezor.Type(res) == kind { return i, proto.Unmarshal(reply, res) diff --git a/accounts/usbwallet/trezor/messages-common.pb.go b/accounts/usbwallet/trezor/messages-common.pb.go index 73800802bb3..fc2f7bf08d5 100644 --- a/accounts/usbwallet/trezor/messages-common.pb.go +++ b/accounts/usbwallet/trezor/messages-common.pb.go @@ -1,20 +1,22 @@ // This file originates from the SatoshiLabs Trezor `common` repository at: // https://github.com/trezor/trezor-common/blob/master/protob/messages-common.proto -// dated 28.05.2019, commit 893fd219d4a01bcffa0cd9cfa631856371ec5aa9. +// dated 30.06.2025, commit 421b45d4677f2499234692b0f54010bc45b3ae5f. // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v5.27.1 +// protoc-gen-go v1.36.6 +// protoc v4.25.3 // source: messages-common.proto package trezor import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -27,19 +29,25 @@ const ( type Failure_FailureType int32 const ( - Failure_Failure_UnexpectedMessage Failure_FailureType = 1 - Failure_Failure_ButtonExpected Failure_FailureType = 2 - Failure_Failure_DataError Failure_FailureType = 3 - Failure_Failure_ActionCancelled Failure_FailureType = 4 - Failure_Failure_PinExpected Failure_FailureType = 5 - Failure_Failure_PinCancelled Failure_FailureType = 6 - Failure_Failure_PinInvalid Failure_FailureType = 7 - Failure_Failure_InvalidSignature Failure_FailureType = 8 - Failure_Failure_ProcessError Failure_FailureType = 9 - Failure_Failure_NotEnoughFunds Failure_FailureType = 10 - Failure_Failure_NotInitialized Failure_FailureType = 11 - Failure_Failure_PinMismatch Failure_FailureType = 12 - Failure_Failure_FirmwareError Failure_FailureType = 99 + Failure_Failure_UnexpectedMessage Failure_FailureType = 1 + Failure_Failure_ButtonExpected Failure_FailureType = 2 + Failure_Failure_DataError Failure_FailureType = 3 + Failure_Failure_ActionCancelled Failure_FailureType = 4 + Failure_Failure_PinExpected Failure_FailureType = 5 + Failure_Failure_PinCancelled Failure_FailureType = 6 + Failure_Failure_PinInvalid Failure_FailureType = 7 + Failure_Failure_InvalidSignature Failure_FailureType = 8 + Failure_Failure_ProcessError Failure_FailureType = 9 + Failure_Failure_NotEnoughFunds Failure_FailureType = 10 + Failure_Failure_NotInitialized Failure_FailureType = 11 + Failure_Failure_PinMismatch Failure_FailureType = 12 + Failure_Failure_WipeCodeMismatch Failure_FailureType = 13 + Failure_Failure_InvalidSession Failure_FailureType = 14 + Failure_Failure_Busy Failure_FailureType = 15 + Failure_Failure_ThpUnallocatedSession Failure_FailureType = 16 + Failure_Failure_InvalidProtocol Failure_FailureType = 17 + Failure_Failure_BufferError Failure_FailureType = 18 + Failure_Failure_FirmwareError Failure_FailureType = 99 ) // Enum value maps for Failure_FailureType. @@ -57,22 +65,34 @@ var ( 10: "Failure_NotEnoughFunds", 11: "Failure_NotInitialized", 12: "Failure_PinMismatch", + 13: "Failure_WipeCodeMismatch", + 14: "Failure_InvalidSession", + 15: "Failure_Busy", + 16: "Failure_ThpUnallocatedSession", + 17: "Failure_InvalidProtocol", + 18: "Failure_BufferError", 99: "Failure_FirmwareError", } Failure_FailureType_value = map[string]int32{ - "Failure_UnexpectedMessage": 1, - "Failure_ButtonExpected": 2, - "Failure_DataError": 3, - "Failure_ActionCancelled": 4, - "Failure_PinExpected": 5, - "Failure_PinCancelled": 6, - "Failure_PinInvalid": 7, - "Failure_InvalidSignature": 8, - "Failure_ProcessError": 9, - "Failure_NotEnoughFunds": 10, - "Failure_NotInitialized": 11, - "Failure_PinMismatch": 12, - "Failure_FirmwareError": 99, + "Failure_UnexpectedMessage": 1, + "Failure_ButtonExpected": 2, + "Failure_DataError": 3, + "Failure_ActionCancelled": 4, + "Failure_PinExpected": 5, + "Failure_PinCancelled": 6, + "Failure_PinInvalid": 7, + "Failure_InvalidSignature": 8, + "Failure_ProcessError": 9, + "Failure_NotEnoughFunds": 10, + "Failure_NotInitialized": 11, + "Failure_PinMismatch": 12, + "Failure_WipeCodeMismatch": 13, + "Failure_InvalidSession": 14, + "Failure_Busy": 15, + "Failure_ThpUnallocatedSession": 16, + "Failure_InvalidProtocol": 17, + "Failure_BufferError": 18, + "Failure_FirmwareError": 99, } ) @@ -118,21 +138,27 @@ func (Failure_FailureType) EnumDescriptor() ([]byte, []int) { type ButtonRequest_ButtonRequestType int32 const ( - ButtonRequest_ButtonRequest_Other ButtonRequest_ButtonRequestType = 1 - ButtonRequest_ButtonRequest_FeeOverThreshold ButtonRequest_ButtonRequestType = 2 - ButtonRequest_ButtonRequest_ConfirmOutput ButtonRequest_ButtonRequestType = 3 - ButtonRequest_ButtonRequest_ResetDevice ButtonRequest_ButtonRequestType = 4 - ButtonRequest_ButtonRequest_ConfirmWord ButtonRequest_ButtonRequestType = 5 - ButtonRequest_ButtonRequest_WipeDevice ButtonRequest_ButtonRequestType = 6 - ButtonRequest_ButtonRequest_ProtectCall ButtonRequest_ButtonRequestType = 7 - ButtonRequest_ButtonRequest_SignTx ButtonRequest_ButtonRequestType = 8 - ButtonRequest_ButtonRequest_FirmwareCheck ButtonRequest_ButtonRequestType = 9 - ButtonRequest_ButtonRequest_Address ButtonRequest_ButtonRequestType = 10 - ButtonRequest_ButtonRequest_PublicKey ButtonRequest_ButtonRequestType = 11 - ButtonRequest_ButtonRequest_MnemonicWordCount ButtonRequest_ButtonRequestType = 12 - ButtonRequest_ButtonRequest_MnemonicInput ButtonRequest_ButtonRequestType = 13 - ButtonRequest_ButtonRequest_PassphraseType ButtonRequest_ButtonRequestType = 14 - ButtonRequest_ButtonRequest_UnknownDerivationPath ButtonRequest_ButtonRequestType = 15 + ButtonRequest_ButtonRequest_Other ButtonRequest_ButtonRequestType = 1 + ButtonRequest_ButtonRequest_FeeOverThreshold ButtonRequest_ButtonRequestType = 2 + ButtonRequest_ButtonRequest_ConfirmOutput ButtonRequest_ButtonRequestType = 3 + ButtonRequest_ButtonRequest_ResetDevice ButtonRequest_ButtonRequestType = 4 + ButtonRequest_ButtonRequest_ConfirmWord ButtonRequest_ButtonRequestType = 5 + ButtonRequest_ButtonRequest_WipeDevice ButtonRequest_ButtonRequestType = 6 + ButtonRequest_ButtonRequest_ProtectCall ButtonRequest_ButtonRequestType = 7 + ButtonRequest_ButtonRequest_SignTx ButtonRequest_ButtonRequestType = 8 + ButtonRequest_ButtonRequest_FirmwareCheck ButtonRequest_ButtonRequestType = 9 + ButtonRequest_ButtonRequest_Address ButtonRequest_ButtonRequestType = 10 + ButtonRequest_ButtonRequest_PublicKey ButtonRequest_ButtonRequestType = 11 + ButtonRequest_ButtonRequest_MnemonicWordCount ButtonRequest_ButtonRequestType = 12 + ButtonRequest_ButtonRequest_MnemonicInput ButtonRequest_ButtonRequestType = 13 + // Deprecated: Marked as deprecated in messages-common.proto. + ButtonRequest__Deprecated_ButtonRequest_PassphraseType ButtonRequest_ButtonRequestType = 14 + ButtonRequest_ButtonRequest_UnknownDerivationPath ButtonRequest_ButtonRequestType = 15 + ButtonRequest_ButtonRequest_RecoveryHomepage ButtonRequest_ButtonRequestType = 16 + ButtonRequest_ButtonRequest_Success ButtonRequest_ButtonRequestType = 17 + ButtonRequest_ButtonRequest_Warning ButtonRequest_ButtonRequestType = 18 + ButtonRequest_ButtonRequest_PassphraseEntry ButtonRequest_ButtonRequestType = 19 + ButtonRequest_ButtonRequest_PinEntry ButtonRequest_ButtonRequestType = 20 ) // Enum value maps for ButtonRequest_ButtonRequestType. @@ -151,25 +177,35 @@ var ( 11: "ButtonRequest_PublicKey", 12: "ButtonRequest_MnemonicWordCount", 13: "ButtonRequest_MnemonicInput", - 14: "ButtonRequest_PassphraseType", + 14: "_Deprecated_ButtonRequest_PassphraseType", 15: "ButtonRequest_UnknownDerivationPath", + 16: "ButtonRequest_RecoveryHomepage", + 17: "ButtonRequest_Success", + 18: "ButtonRequest_Warning", + 19: "ButtonRequest_PassphraseEntry", + 20: "ButtonRequest_PinEntry", } ButtonRequest_ButtonRequestType_value = map[string]int32{ - "ButtonRequest_Other": 1, - "ButtonRequest_FeeOverThreshold": 2, - "ButtonRequest_ConfirmOutput": 3, - "ButtonRequest_ResetDevice": 4, - "ButtonRequest_ConfirmWord": 5, - "ButtonRequest_WipeDevice": 6, - "ButtonRequest_ProtectCall": 7, - "ButtonRequest_SignTx": 8, - "ButtonRequest_FirmwareCheck": 9, - "ButtonRequest_Address": 10, - "ButtonRequest_PublicKey": 11, - "ButtonRequest_MnemonicWordCount": 12, - "ButtonRequest_MnemonicInput": 13, - "ButtonRequest_PassphraseType": 14, - "ButtonRequest_UnknownDerivationPath": 15, + "ButtonRequest_Other": 1, + "ButtonRequest_FeeOverThreshold": 2, + "ButtonRequest_ConfirmOutput": 3, + "ButtonRequest_ResetDevice": 4, + "ButtonRequest_ConfirmWord": 5, + "ButtonRequest_WipeDevice": 6, + "ButtonRequest_ProtectCall": 7, + "ButtonRequest_SignTx": 8, + "ButtonRequest_FirmwareCheck": 9, + "ButtonRequest_Address": 10, + "ButtonRequest_PublicKey": 11, + "ButtonRequest_MnemonicWordCount": 12, + "ButtonRequest_MnemonicInput": 13, + "_Deprecated_ButtonRequest_PassphraseType": 14, + "ButtonRequest_UnknownDerivationPath": 15, + "ButtonRequest_RecoveryHomepage": 16, + "ButtonRequest_Success": 17, + "ButtonRequest_Warning": 18, + "ButtonRequest_PassphraseEntry": 19, + "ButtonRequest_PinEntry": 20, } ) @@ -215,9 +251,11 @@ func (ButtonRequest_ButtonRequestType) EnumDescriptor() ([]byte, []int) { type PinMatrixRequest_PinMatrixRequestType int32 const ( - PinMatrixRequest_PinMatrixRequestType_Current PinMatrixRequest_PinMatrixRequestType = 1 - PinMatrixRequest_PinMatrixRequestType_NewFirst PinMatrixRequest_PinMatrixRequestType = 2 - PinMatrixRequest_PinMatrixRequestType_NewSecond PinMatrixRequest_PinMatrixRequestType = 3 + PinMatrixRequest_PinMatrixRequestType_Current PinMatrixRequest_PinMatrixRequestType = 1 + PinMatrixRequest_PinMatrixRequestType_NewFirst PinMatrixRequest_PinMatrixRequestType = 2 + PinMatrixRequest_PinMatrixRequestType_NewSecond PinMatrixRequest_PinMatrixRequestType = 3 + PinMatrixRequest_PinMatrixRequestType_WipeCodeFirst PinMatrixRequest_PinMatrixRequestType = 4 + PinMatrixRequest_PinMatrixRequestType_WipeCodeSecond PinMatrixRequest_PinMatrixRequestType = 5 ) // Enum value maps for PinMatrixRequest_PinMatrixRequestType. @@ -226,11 +264,15 @@ var ( 1: "PinMatrixRequestType_Current", 2: "PinMatrixRequestType_NewFirst", 3: "PinMatrixRequestType_NewSecond", + 4: "PinMatrixRequestType_WipeCodeFirst", + 5: "PinMatrixRequestType_WipeCodeSecond", } PinMatrixRequest_PinMatrixRequestType_value = map[string]int32{ - "PinMatrixRequestType_Current": 1, - "PinMatrixRequestType_NewFirst": 2, - "PinMatrixRequestType_NewSecond": 3, + "PinMatrixRequestType_Current": 1, + "PinMatrixRequestType_NewFirst": 2, + "PinMatrixRequestType_NewSecond": 3, + "PinMatrixRequestType_WipeCodeFirst": 4, + "PinMatrixRequestType_WipeCodeSecond": 5, } ) @@ -275,20 +317,22 @@ func (PinMatrixRequest_PinMatrixRequestType) EnumDescriptor() ([]byte, []int) { // Response: Success of the previous request // @end type Success struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Message *string `protobuf:"bytes,1,opt,name=message,def=" json:"message,omitempty"` // human readable description of action or request-specific payload unknownFields protoimpl.UnknownFields - - Message *string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"` // human readable description of action or request-specific payload + sizeCache protoimpl.SizeCache } +// Default values for Success fields. +const ( + Default_Success_Message = string("") +) + func (x *Success) Reset() { *x = Success{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_messages_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Success) String() string { @@ -299,7 +343,7 @@ func (*Success) ProtoMessage() {} func (x *Success) ProtoReflect() protoreflect.Message { mi := &file_messages_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -318,28 +362,25 @@ func (x *Success) GetMessage() string { if x != nil && x.Message != nil { return *x.Message } - return "" + return Default_Success_Message } // * // Response: Failure of the previous request // @end type Failure struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Code *Failure_FailureType `protobuf:"varint,1,opt,name=code,enum=hw.trezor.messages.common.Failure_FailureType" json:"code,omitempty"` // computer-readable definition of the error state + Message *string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` // human-readable message of the error state unknownFields protoimpl.UnknownFields - - Code *Failure_FailureType `protobuf:"varint,1,opt,name=code,enum=hw.trezor.messages.common.Failure_FailureType" json:"code,omitempty"` // computer-readable definition of the error state - Message *string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` // human-readable message of the error state + sizeCache protoimpl.SizeCache } func (x *Failure) Reset() { *x = Failure{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_messages_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Failure) String() string { @@ -350,7 +391,7 @@ func (*Failure) ProtoMessage() {} func (x *Failure) ProtoReflect() protoreflect.Message { mi := &file_messages_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -384,21 +425,19 @@ func (x *Failure) GetMessage() string { // @auxstart // @next ButtonAck type ButtonRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Code *ButtonRequest_ButtonRequestType `protobuf:"varint,1,opt,name=code,enum=hw.trezor.messages.common.ButtonRequest_ButtonRequestType" json:"code,omitempty"` // enum identifier of the screen (deprecated) + Pages *uint32 `protobuf:"varint,2,opt,name=pages" json:"pages,omitempty"` // if the screen is paginated, number of pages + Name *string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"` // name of the screen unknownFields protoimpl.UnknownFields - - Code *ButtonRequest_ButtonRequestType `protobuf:"varint,1,opt,name=code,enum=hw.trezor.messages.common.ButtonRequest_ButtonRequestType" json:"code,omitempty"` - Data *string `protobuf:"bytes,2,opt,name=data" json:"data,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ButtonRequest) Reset() { *x = ButtonRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_messages_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ButtonRequest) String() string { @@ -409,7 +448,7 @@ func (*ButtonRequest) ProtoMessage() {} func (x *ButtonRequest) ProtoReflect() protoreflect.Message { mi := &file_messages_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -431,9 +470,16 @@ func (x *ButtonRequest) GetCode() ButtonRequest_ButtonRequestType { return ButtonRequest_ButtonRequest_Other } -func (x *ButtonRequest) GetData() string { - if x != nil && x.Data != nil { - return *x.Data +func (x *ButtonRequest) GetPages() uint32 { + if x != nil && x.Pages != nil { + return *x.Pages + } + return 0 +} + +func (x *ButtonRequest) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } return "" } @@ -442,18 +488,16 @@ func (x *ButtonRequest) GetData() string { // Request: Computer agrees to wait for HW button press // @auxend type ButtonAck struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ButtonAck) Reset() { *x = ButtonAck{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_common_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_messages_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ButtonAck) String() string { @@ -464,7 +508,7 @@ func (*ButtonAck) ProtoMessage() {} func (x *ButtonAck) ProtoReflect() protoreflect.Message { mi := &file_messages_common_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -484,20 +528,17 @@ func (*ButtonAck) Descriptor() ([]byte, []int) { // @auxstart // @next PinMatrixAck type PinMatrixRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Type *PinMatrixRequest_PinMatrixRequestType `protobuf:"varint,1,opt,name=type,enum=hw.trezor.messages.common.PinMatrixRequest_PinMatrixRequestType" json:"type,omitempty"` unknownFields protoimpl.UnknownFields - - Type *PinMatrixRequest_PinMatrixRequestType `protobuf:"varint,1,opt,name=type,enum=hw.trezor.messages.common.PinMatrixRequest_PinMatrixRequestType" json:"type,omitempty"` + sizeCache protoimpl.SizeCache } func (x *PinMatrixRequest) Reset() { *x = PinMatrixRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_common_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_messages_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PinMatrixRequest) String() string { @@ -508,7 +549,7 @@ func (*PinMatrixRequest) ProtoMessage() {} func (x *PinMatrixRequest) ProtoReflect() protoreflect.Message { mi := &file_messages_common_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -534,20 +575,17 @@ func (x *PinMatrixRequest) GetType() PinMatrixRequest_PinMatrixRequestType { // Request: Computer responds with encoded PIN // @auxend type PinMatrixAck struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Pin *string `protobuf:"bytes,1,req,name=pin" json:"pin,omitempty"` // matrix encoded PIN entered by user unknownFields protoimpl.UnknownFields - - Pin *string `protobuf:"bytes,1,req,name=pin" json:"pin,omitempty"` // matrix encoded PIN entered by user + sizeCache protoimpl.SizeCache } func (x *PinMatrixAck) Reset() { *x = PinMatrixAck{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_common_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_messages_common_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PinMatrixAck) String() string { @@ -558,7 +596,7 @@ func (*PinMatrixAck) ProtoMessage() {} func (x *PinMatrixAck) ProtoReflect() protoreflect.Message { mi := &file_messages_common_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -585,20 +623,18 @@ func (x *PinMatrixAck) GetPin() string { // @auxstart // @next PassphraseAck type PassphraseRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + // Deprecated: Marked as deprecated in messages-common.proto. + XOnDevice *bool `protobuf:"varint,1,opt,name=_on_device,json=OnDevice" json:"_on_device,omitempty"` // <2.3.0 unknownFields protoimpl.UnknownFields - - OnDevice *bool `protobuf:"varint,1,opt,name=on_device,json=onDevice" json:"on_device,omitempty"` // passphrase is being entered on the device + sizeCache protoimpl.SizeCache } func (x *PassphraseRequest) Reset() { *x = PassphraseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_common_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_messages_common_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PassphraseRequest) String() string { @@ -609,7 +645,7 @@ func (*PassphraseRequest) ProtoMessage() {} func (x *PassphraseRequest) ProtoReflect() protoreflect.Message { mi := &file_messages_common_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -624,32 +660,32 @@ func (*PassphraseRequest) Descriptor() ([]byte, []int) { return file_messages_common_proto_rawDescGZIP(), []int{6} } -func (x *PassphraseRequest) GetOnDevice() bool { - if x != nil && x.OnDevice != nil { - return *x.OnDevice +// Deprecated: Marked as deprecated in messages-common.proto. +func (x *PassphraseRequest) GetXOnDevice() bool { + if x != nil && x.XOnDevice != nil { + return *x.XOnDevice } return false } // * // Request: Send passphrase back -// @next PassphraseStateRequest +// @auxend type PassphraseAck struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Passphrase *string `protobuf:"bytes,1,opt,name=passphrase" json:"passphrase,omitempty"` + // Deprecated: Marked as deprecated in messages-common.proto. + XState []byte `protobuf:"bytes,2,opt,name=_state,json=State" json:"_state,omitempty"` // <2.3.0 + OnDevice *bool `protobuf:"varint,3,opt,name=on_device,json=onDevice" json:"on_device,omitempty"` // user wants to enter passphrase on the device unknownFields protoimpl.UnknownFields - - Passphrase *string `protobuf:"bytes,1,opt,name=passphrase" json:"passphrase,omitempty"` - State []byte `protobuf:"bytes,2,opt,name=state" json:"state,omitempty"` // expected device state + sizeCache protoimpl.SizeCache } func (x *PassphraseAck) Reset() { *x = PassphraseAck{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_common_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_messages_common_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PassphraseAck) String() string { @@ -660,7 +696,7 @@ func (*PassphraseAck) ProtoMessage() {} func (x *PassphraseAck) ProtoReflect() protoreflect.Message { mi := &file_messages_common_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -682,42 +718,50 @@ func (x *PassphraseAck) GetPassphrase() string { return "" } -func (x *PassphraseAck) GetState() []byte { +// Deprecated: Marked as deprecated in messages-common.proto. +func (x *PassphraseAck) GetXState() []byte { if x != nil { - return x.State + return x.XState } return nil } +func (x *PassphraseAck) GetOnDevice() bool { + if x != nil && x.OnDevice != nil { + return *x.OnDevice + } + return false +} + // * // Response: Device awaits passphrase state -// @next PassphraseStateAck -type PassphraseStateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +// Deprecated in 2.3.0 +// @next Deprecated_PassphraseStateAck +// +// Deprecated: Marked as deprecated in messages-common.proto. +type Deprecated_PassphraseStateRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + State []byte `protobuf:"bytes,1,opt,name=state" json:"state,omitempty"` // actual device state unknownFields protoimpl.UnknownFields - - State []byte `protobuf:"bytes,1,opt,name=state" json:"state,omitempty"` // actual device state + sizeCache protoimpl.SizeCache } -func (x *PassphraseStateRequest) Reset() { - *x = PassphraseStateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_common_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (x *Deprecated_PassphraseStateRequest) Reset() { + *x = Deprecated_PassphraseStateRequest{} + mi := &file_messages_common_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *PassphraseStateRequest) String() string { +func (x *Deprecated_PassphraseStateRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PassphraseStateRequest) ProtoMessage() {} +func (*Deprecated_PassphraseStateRequest) ProtoMessage() {} -func (x *PassphraseStateRequest) ProtoReflect() protoreflect.Message { +func (x *Deprecated_PassphraseStateRequest) ProtoReflect() protoreflect.Message { mi := &file_messages_common_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -727,12 +771,12 @@ func (x *PassphraseStateRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PassphraseStateRequest.ProtoReflect.Descriptor instead. -func (*PassphraseStateRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use Deprecated_PassphraseStateRequest.ProtoReflect.Descriptor instead. +func (*Deprecated_PassphraseStateRequest) Descriptor() ([]byte, []int) { return file_messages_common_proto_rawDescGZIP(), []int{8} } -func (x *PassphraseStateRequest) GetState() []byte { +func (x *Deprecated_PassphraseStateRequest) GetState() []byte { if x != nil { return x.State } @@ -741,31 +785,32 @@ func (x *PassphraseStateRequest) GetState() []byte { // * // Request: Send passphrase state back +// Deprecated in 2.3.0 // @auxend -type PassphraseStateAck struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +// +// Deprecated: Marked as deprecated in messages-common.proto. +type Deprecated_PassphraseStateAck struct { + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *PassphraseStateAck) Reset() { - *x = PassphraseStateAck{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_common_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (x *Deprecated_PassphraseStateAck) Reset() { + *x = Deprecated_PassphraseStateAck{} + mi := &file_messages_common_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *PassphraseStateAck) String() string { +func (x *Deprecated_PassphraseStateAck) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PassphraseStateAck) ProtoMessage() {} +func (*Deprecated_PassphraseStateAck) ProtoMessage() {} -func (x *PassphraseStateAck) ProtoReflect() protoreflect.Message { +func (x *Deprecated_PassphraseStateAck) ProtoReflect() protoreflect.Message { mi := &file_messages_common_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -775,8 +820,8 @@ func (x *PassphraseStateAck) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PassphraseStateAck.ProtoReflect.Descriptor instead. -func (*PassphraseStateAck) Descriptor() ([]byte, []int) { +// Deprecated: Use Deprecated_PassphraseStateAck.ProtoReflect.Descriptor instead. +func (*Deprecated_PassphraseStateAck) Descriptor() ([]byte, []int) { return file_messages_common_proto_rawDescGZIP(), []int{9} } @@ -785,25 +830,22 @@ func (*PassphraseStateAck) Descriptor() ([]byte, []int) { // Used for imports of private key into the device and exporting public key out of device // @embed type HDNodeType struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Depth *uint32 `protobuf:"varint,1,req,name=depth" json:"depth,omitempty"` + Fingerprint *uint32 `protobuf:"varint,2,req,name=fingerprint" json:"fingerprint,omitempty"` + ChildNum *uint32 `protobuf:"varint,3,req,name=child_num,json=childNum" json:"child_num,omitempty"` + ChainCode []byte `protobuf:"bytes,4,req,name=chain_code,json=chainCode" json:"chain_code,omitempty"` + PrivateKey []byte `protobuf:"bytes,5,opt,name=private_key,json=privateKey" json:"private_key,omitempty"` + PublicKey []byte `protobuf:"bytes,6,req,name=public_key,json=publicKey" json:"public_key,omitempty"` unknownFields protoimpl.UnknownFields - - Depth *uint32 `protobuf:"varint,1,req,name=depth" json:"depth,omitempty"` - Fingerprint *uint32 `protobuf:"varint,2,req,name=fingerprint" json:"fingerprint,omitempty"` - ChildNum *uint32 `protobuf:"varint,3,req,name=child_num,json=childNum" json:"child_num,omitempty"` - ChainCode []byte `protobuf:"bytes,4,req,name=chain_code,json=chainCode" json:"chain_code,omitempty"` - PrivateKey []byte `protobuf:"bytes,5,opt,name=private_key,json=privateKey" json:"private_key,omitempty"` - PublicKey []byte `protobuf:"bytes,6,opt,name=public_key,json=publicKey" json:"public_key,omitempty"` + sizeCache protoimpl.SizeCache } func (x *HDNodeType) Reset() { *x = HDNodeType{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_common_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_messages_common_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HDNodeType) String() string { @@ -814,7 +856,7 @@ func (*HDNodeType) ProtoMessage() {} func (x *HDNodeType) ProtoReflect() protoreflect.Message { mi := &file_messages_common_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -873,137 +915,105 @@ func (x *HDNodeType) GetPublicKey() []byte { var File_messages_common_proto protoreflect.FileDescriptor -var file_messages_common_proto_rawDesc = []byte{ - 0x0a, 0x15, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x68, 0x77, 0x2e, 0x74, 0x72, 0x65, 0x7a, - 0x6f, 0x72, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x22, 0x23, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, - 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xd5, 0x03, 0x0a, 0x07, 0x46, 0x61, 0x69, 0x6c, - 0x75, 0x72, 0x65, 0x12, 0x42, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x2e, 0x2e, 0x68, 0x77, 0x2e, 0x74, 0x72, 0x65, 0x7a, 0x6f, 0x72, 0x2e, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x46, 0x61, - 0x69, 0x6c, 0x75, 0x72, 0x65, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x22, 0xeb, 0x02, 0x0a, 0x0b, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x55, 0x6e, 0x65, - 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x10, 0x01, - 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x42, 0x75, 0x74, 0x74, - 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, - 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x44, 0x61, 0x74, 0x61, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, 0x64, 0x10, 0x04, - 0x12, 0x17, 0x0a, 0x13, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x50, 0x69, 0x6e, 0x45, - 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x46, 0x61, 0x69, - 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x50, 0x69, 0x6e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, - 0x64, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x50, - 0x69, 0x6e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x10, 0x07, 0x12, 0x1c, 0x0a, 0x18, 0x46, - 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x53, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x10, 0x08, 0x12, 0x18, 0x0a, 0x14, 0x46, 0x61, 0x69, - 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x10, 0x09, 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x4e, - 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x46, 0x75, 0x6e, 0x64, 0x73, 0x10, 0x0a, 0x12, - 0x1a, 0x0a, 0x16, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x4e, 0x6f, 0x74, 0x49, 0x6e, - 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x10, 0x0b, 0x12, 0x17, 0x0a, 0x13, 0x46, - 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x50, 0x69, 0x6e, 0x4d, 0x69, 0x73, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x10, 0x0c, 0x12, 0x19, 0x0a, 0x15, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, - 0x46, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x63, 0x22, - 0xe6, 0x04, 0x0a, 0x0d, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x4e, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x3a, 0x2e, 0x68, 0x77, 0x2e, 0x74, 0x72, 0x65, 0x7a, 0x6f, 0x72, 0x2e, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x75, 0x74, 0x74, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xf0, 0x03, 0x0a, 0x11, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x42, - 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x4f, 0x74, 0x68, - 0x65, 0x72, 0x10, 0x01, 0x12, 0x22, 0x0a, 0x1e, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x46, 0x65, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x54, 0x68, 0x72, - 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x42, 0x75, 0x74, 0x74, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, - 0x6d, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x10, 0x03, 0x12, 0x1d, 0x0a, 0x19, 0x42, 0x75, 0x74, - 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x52, 0x65, 0x73, 0x65, 0x74, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x10, 0x04, 0x12, 0x1d, 0x0a, 0x19, 0x42, 0x75, 0x74, 0x74, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, - 0x6d, 0x57, 0x6f, 0x72, 0x64, 0x10, 0x05, 0x12, 0x1c, 0x0a, 0x18, 0x42, 0x75, 0x74, 0x74, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x57, 0x69, 0x70, 0x65, 0x44, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x10, 0x06, 0x12, 0x1d, 0x0a, 0x19, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x43, 0x61, - 0x6c, 0x6c, 0x10, 0x07, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x53, 0x69, 0x67, 0x6e, 0x54, 0x78, 0x10, 0x08, 0x12, 0x1f, - 0x0a, 0x1b, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, - 0x46, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x10, 0x09, 0x12, - 0x19, 0x0a, 0x15, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x5f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x0a, 0x12, 0x1b, 0x0a, 0x17, 0x42, 0x75, - 0x74, 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x50, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x4b, 0x65, 0x79, 0x10, 0x0b, 0x12, 0x23, 0x0a, 0x1f, 0x42, 0x75, 0x74, 0x74, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x4d, 0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, - 0x63, 0x57, 0x6f, 0x72, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x10, 0x0c, 0x12, 0x1f, 0x0a, 0x1b, - 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x4d, 0x6e, - 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x10, 0x0d, 0x12, 0x20, 0x0a, - 0x1c, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x50, - 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0x0e, 0x12, - 0x27, 0x0a, 0x23, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x5f, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x50, 0x61, 0x74, 0x68, 0x10, 0x0f, 0x22, 0x0b, 0x0a, 0x09, 0x42, 0x75, 0x74, 0x74, - 0x6f, 0x6e, 0x41, 0x63, 0x6b, 0x22, 0xe9, 0x01, 0x0a, 0x10, 0x50, 0x69, 0x6e, 0x4d, 0x61, 0x74, - 0x72, 0x69, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x54, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x40, 0x2e, 0x68, 0x77, 0x2e, 0x74, 0x72, - 0x65, 0x7a, 0x6f, 0x72, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x22, 0x7f, 0x0a, 0x14, 0x50, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x69, 0x6e, 0x4d, - 0x61, 0x74, 0x72, 0x69, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x5f, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x69, - 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x5f, 0x4e, 0x65, 0x77, 0x46, 0x69, 0x72, 0x73, 0x74, 0x10, 0x02, 0x12, 0x22, 0x0a, - 0x1e, 0x50, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4e, 0x65, 0x77, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x10, - 0x03, 0x22, 0x20, 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x41, 0x63, - 0x6b, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, - 0x70, 0x69, 0x6e, 0x22, 0x30, 0x0a, 0x11, 0x50, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x6e, 0x5f, 0x64, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6f, 0x6e, 0x44, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0x45, 0x0a, 0x0d, 0x50, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, - 0x61, 0x73, 0x65, 0x41, 0x63, 0x6b, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x73, 0x73, 0x70, 0x68, - 0x72, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x73, 0x73, - 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x2e, 0x0a, 0x16, - 0x50, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x14, 0x0a, 0x12, - 0x50, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x41, - 0x63, 0x6b, 0x22, 0xc0, 0x01, 0x0a, 0x0a, 0x48, 0x44, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, - 0x52, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, - 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0b, 0x66, 0x69, - 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x08, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x4e, 0x75, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, - 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, - 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x4b, 0x65, 0x79, 0x42, 0x3b, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, - 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x2f, 0x75, 0x73, 0x62, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2f, 0x74, 0x72, 0x65, 0x7a, - 0x6f, 0x72, -} +const file_messages_common_proto_rawDesc = "" + + "\n" + + "\x15messages-common.proto\x12\x19hw.trezor.messages.common\x1a\roptions.proto\"%\n" + + "\aSuccess\x12\x1a\n" + + "\amessage\x18\x01 \x01(\t:\x00R\amessage\"\xfa\x04\n" + + "\aFailure\x12B\n" + + "\x04code\x18\x01 \x01(\x0e2..hw.trezor.messages.common.Failure.FailureTypeR\x04code\x12\x18\n" + + "\amessage\x18\x02 \x01(\tR\amessage\"\x90\x04\n" + + "\vFailureType\x12\x1d\n" + + "\x19Failure_UnexpectedMessage\x10\x01\x12\x1a\n" + + "\x16Failure_ButtonExpected\x10\x02\x12\x15\n" + + "\x11Failure_DataError\x10\x03\x12\x1b\n" + + "\x17Failure_ActionCancelled\x10\x04\x12\x17\n" + + "\x13Failure_PinExpected\x10\x05\x12\x18\n" + + "\x14Failure_PinCancelled\x10\x06\x12\x16\n" + + "\x12Failure_PinInvalid\x10\a\x12\x1c\n" + + "\x18Failure_InvalidSignature\x10\b\x12\x18\n" + + "\x14Failure_ProcessError\x10\t\x12\x1a\n" + + "\x16Failure_NotEnoughFunds\x10\n" + + "\x12\x1a\n" + + "\x16Failure_NotInitialized\x10\v\x12\x17\n" + + "\x13Failure_PinMismatch\x10\f\x12\x1c\n" + + "\x18Failure_WipeCodeMismatch\x10\r\x12\x1a\n" + + "\x16Failure_InvalidSession\x10\x0e\x12\x10\n" + + "\fFailure_Busy\x10\x0f\x12!\n" + + "\x1dFailure_ThpUnallocatedSession\x10\x10\x12\x1b\n" + + "\x17Failure_InvalidProtocol\x10\x11\x12\x17\n" + + "\x13Failure_BufferError\x10\x12\x12\x19\n" + + "\x15Failure_FirmwareError\x10c\"\xab\x06\n" + + "\rButtonRequest\x12N\n" + + "\x04code\x18\x01 \x01(\x0e2:.hw.trezor.messages.common.ButtonRequest.ButtonRequestTypeR\x04code\x12\x14\n" + + "\x05pages\x18\x02 \x01(\rR\x05pages\x12\x12\n" + + "\x04name\x18\x04 \x01(\tR\x04name\"\x99\x05\n" + + "\x11ButtonRequestType\x12\x17\n" + + "\x13ButtonRequest_Other\x10\x01\x12\"\n" + + "\x1eButtonRequest_FeeOverThreshold\x10\x02\x12\x1f\n" + + "\x1bButtonRequest_ConfirmOutput\x10\x03\x12\x1d\n" + + "\x19ButtonRequest_ResetDevice\x10\x04\x12\x1d\n" + + "\x19ButtonRequest_ConfirmWord\x10\x05\x12\x1c\n" + + "\x18ButtonRequest_WipeDevice\x10\x06\x12\x1d\n" + + "\x19ButtonRequest_ProtectCall\x10\a\x12\x18\n" + + "\x14ButtonRequest_SignTx\x10\b\x12\x1f\n" + + "\x1bButtonRequest_FirmwareCheck\x10\t\x12\x19\n" + + "\x15ButtonRequest_Address\x10\n" + + "\x12\x1b\n" + + "\x17ButtonRequest_PublicKey\x10\v\x12#\n" + + "\x1fButtonRequest_MnemonicWordCount\x10\f\x12\x1f\n" + + "\x1bButtonRequest_MnemonicInput\x10\r\x120\n" + + "(_Deprecated_ButtonRequest_PassphraseType\x10\x0e\x1a\x02\b\x01\x12'\n" + + "#ButtonRequest_UnknownDerivationPath\x10\x0f\x12\"\n" + + "\x1eButtonRequest_RecoveryHomepage\x10\x10\x12\x19\n" + + "\x15ButtonRequest_Success\x10\x11\x12\x19\n" + + "\x15ButtonRequest_Warning\x10\x12\x12!\n" + + "\x1dButtonRequest_PassphraseEntry\x10\x13\x12\x1a\n" + + "\x16ButtonRequest_PinEntry\x10\x14J\x04\b\x03\x10\x04\"\v\n" + + "\tButtonAck\"\xbb\x02\n" + + "\x10PinMatrixRequest\x12T\n" + + "\x04type\x18\x01 \x01(\x0e2@.hw.trezor.messages.common.PinMatrixRequest.PinMatrixRequestTypeR\x04type\"\xd0\x01\n" + + "\x14PinMatrixRequestType\x12 \n" + + "\x1cPinMatrixRequestType_Current\x10\x01\x12!\n" + + "\x1dPinMatrixRequestType_NewFirst\x10\x02\x12\"\n" + + "\x1ePinMatrixRequestType_NewSecond\x10\x03\x12&\n" + + "\"PinMatrixRequestType_WipeCodeFirst\x10\x04\x12'\n" + + "#PinMatrixRequestType_WipeCodeSecond\x10\x05\" \n" + + "\fPinMatrixAck\x12\x10\n" + + "\x03pin\x18\x01 \x02(\tR\x03pin\"5\n" + + "\x11PassphraseRequest\x12 \n" + + "\n" + + "_on_device\x18\x01 \x01(\bB\x02\x18\x01R\bOnDevice\"g\n" + + "\rPassphraseAck\x12\x1e\n" + + "\n" + + "passphrase\x18\x01 \x01(\tR\n" + + "passphrase\x12\x19\n" + + "\x06_state\x18\x02 \x01(\fB\x02\x18\x01R\x05State\x12\x1b\n" + + "\ton_device\x18\x03 \x01(\bR\bonDevice\"=\n" + + "!Deprecated_PassphraseStateRequest\x12\x14\n" + + "\x05state\x18\x01 \x01(\fR\x05state:\x02\x18\x01\"#\n" + + "\x1dDeprecated_PassphraseStateAck:\x02\x18\x01\"\xc0\x01\n" + + "\n" + + "HDNodeType\x12\x14\n" + + "\x05depth\x18\x01 \x02(\rR\x05depth\x12 \n" + + "\vfingerprint\x18\x02 \x02(\rR\vfingerprint\x12\x1b\n" + + "\tchild_num\x18\x03 \x02(\rR\bchildNum\x12\x1d\n" + + "\n" + + "chain_code\x18\x04 \x02(\fR\tchainCode\x12\x1f\n" + + "\vprivate_key\x18\x05 \x01(\fR\n" + + "privateKey\x12\x1d\n" + + "\n" + + "public_key\x18\x06 \x02(\fR\tpublicKeyBy\x80\xa6\x1d\x01\n" + + "#com.satoshilabs.trezor.lib.protobufB\x13TrezorMessageCommonZ9github.com/ethereum/go-ethereum/accounts/usbwallet/trezor" var ( file_messages_common_proto_rawDescOnce sync.Once - file_messages_common_proto_rawDescData = file_messages_common_proto_rawDesc + file_messages_common_proto_rawDescData []byte ) func file_messages_common_proto_rawDescGZIP() []byte { file_messages_common_proto_rawDescOnce.Do(func() { - file_messages_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_messages_common_proto_rawDescData) + file_messages_common_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_messages_common_proto_rawDesc), len(file_messages_common_proto_rawDesc))) }) return file_messages_common_proto_rawDescData } @@ -1022,8 +1032,8 @@ var file_messages_common_proto_goTypes = []any{ (*PinMatrixAck)(nil), // 8: hw.trezor.messages.common.PinMatrixAck (*PassphraseRequest)(nil), // 9: hw.trezor.messages.common.PassphraseRequest (*PassphraseAck)(nil), // 10: hw.trezor.messages.common.PassphraseAck - (*PassphraseStateRequest)(nil), // 11: hw.trezor.messages.common.PassphraseStateRequest - (*PassphraseStateAck)(nil), // 12: hw.trezor.messages.common.PassphraseStateAck + (*Deprecated_PassphraseStateRequest)(nil), // 11: hw.trezor.messages.common.Deprecated_PassphraseStateRequest + (*Deprecated_PassphraseStateAck)(nil), // 12: hw.trezor.messages.common.Deprecated_PassphraseStateAck (*HDNodeType)(nil), // 13: hw.trezor.messages.common.HDNodeType } var file_messages_common_proto_depIdxs = []int32{ @@ -1042,145 +1052,12 @@ func file_messages_common_proto_init() { if File_messages_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_messages_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Success); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Failure); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ButtonRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_common_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ButtonAck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_common_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PinMatrixRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_common_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PinMatrixAck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_common_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PassphraseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_common_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*PassphraseAck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_common_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PassphraseStateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_common_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*PassphraseStateAck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_common_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*HDNodeType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } + file_options_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_messages_common_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_messages_common_proto_rawDesc), len(file_messages_common_proto_rawDesc)), NumEnums: 3, NumMessages: 11, NumExtensions: 0, @@ -1192,7 +1069,6 @@ func file_messages_common_proto_init() { MessageInfos: file_messages_common_proto_msgTypes, }.Build() File_messages_common_proto = out.File - file_messages_common_proto_rawDesc = nil file_messages_common_proto_goTypes = nil file_messages_common_proto_depIdxs = nil } diff --git a/accounts/usbwallet/trezor/messages-common.proto b/accounts/usbwallet/trezor/messages-common.proto index 1f524e25d7b..879982cbc43 100644 --- a/accounts/usbwallet/trezor/messages-common.proto +++ b/accounts/usbwallet/trezor/messages-common.proto @@ -1,18 +1,26 @@ // This file originates from the SatoshiLabs Trezor `common` repository at: // https://github.com/trezor/trezor-common/blob/master/protob/messages-common.proto -// dated 28.05.2019, commit 893fd219d4a01bcffa0cd9cfa631856371ec5aa9. +// dated 30.06.2025, commit 421b45d4677f2499234692b0f54010bc45b3ae5f. syntax = "proto2"; package hw.trezor.messages.common; option go_package = "github.com/ethereum/go-ethereum/accounts/usbwallet/trezor"; +// Sugar for easier handling in Java +option java_package = "com.satoshilabs.trezor.lib.protobuf"; +option java_outer_classname = "TrezorMessageCommon"; + +import "options.proto"; + +option (include_in_bitcoin_only) = true; + /** * Response: Success of the previous request * @end */ message Success { - optional string message = 1; // human readable description of action or request-specific payload + optional string message = 1 [default=""]; // human readable description of action or request-specific payload } /** @@ -20,23 +28,29 @@ message Success { * @end */ message Failure { - optional FailureType code = 1; // computer-readable definition of the error state - optional string message = 2; // human-readable message of the error state - enum FailureType { - Failure_UnexpectedMessage = 1; - Failure_ButtonExpected = 2; - Failure_DataError = 3; - Failure_ActionCancelled = 4; - Failure_PinExpected = 5; - Failure_PinCancelled = 6; - Failure_PinInvalid = 7; - Failure_InvalidSignature = 8; - Failure_ProcessError = 9; - Failure_NotEnoughFunds = 10; - Failure_NotInitialized = 11; - Failure_PinMismatch = 12; - Failure_FirmwareError = 99; - } + optional FailureType code = 1; // computer-readable definition of the error state + optional string message = 2; // human-readable message of the error state + enum FailureType { + Failure_UnexpectedMessage = 1; + Failure_ButtonExpected = 2; + Failure_DataError = 3; + Failure_ActionCancelled = 4; + Failure_PinExpected = 5; + Failure_PinCancelled = 6; + Failure_PinInvalid = 7; + Failure_InvalidSignature = 8; + Failure_ProcessError = 9; + Failure_NotEnoughFunds = 10; + Failure_NotInitialized = 11; + Failure_PinMismatch = 12; + Failure_WipeCodeMismatch = 13; + Failure_InvalidSession = 14; + Failure_Busy = 15; + Failure_ThpUnallocatedSession = 16; + Failure_InvalidProtocol = 17; + Failure_BufferError = 18; + Failure_FirmwareError = 99; + } } /** @@ -45,28 +59,39 @@ message Failure { * @next ButtonAck */ message ButtonRequest { - optional ButtonRequestType code = 1; - optional string data = 2; - /** - * Type of button request - */ - enum ButtonRequestType { - ButtonRequest_Other = 1; - ButtonRequest_FeeOverThreshold = 2; - ButtonRequest_ConfirmOutput = 3; - ButtonRequest_ResetDevice = 4; - ButtonRequest_ConfirmWord = 5; - ButtonRequest_WipeDevice = 6; - ButtonRequest_ProtectCall = 7; - ButtonRequest_SignTx = 8; - ButtonRequest_FirmwareCheck = 9; - ButtonRequest_Address = 10; - ButtonRequest_PublicKey = 11; - ButtonRequest_MnemonicWordCount = 12; - ButtonRequest_MnemonicInput = 13; - ButtonRequest_PassphraseType = 14; - ButtonRequest_UnknownDerivationPath = 15; - } + optional ButtonRequestType code = 1; // enum identifier of the screen (deprecated) + optional uint32 pages = 2; // if the screen is paginated, number of pages + + // this existed briefly: https://github.com/trezor/trezor-firmware/commit/1012ee8497b241e8ca559e386d936fa549bc0357 + reserved 3; + + optional string name = 4; // name of the screen + + /** + * Type of button request + */ + enum ButtonRequestType { + ButtonRequest_Other = 1; + ButtonRequest_FeeOverThreshold = 2; + ButtonRequest_ConfirmOutput = 3; + ButtonRequest_ResetDevice = 4; + ButtonRequest_ConfirmWord = 5; + ButtonRequest_WipeDevice = 6; + ButtonRequest_ProtectCall = 7; + ButtonRequest_SignTx = 8; + ButtonRequest_FirmwareCheck = 9; + ButtonRequest_Address = 10; + ButtonRequest_PublicKey = 11; + ButtonRequest_MnemonicWordCount = 12; + ButtonRequest_MnemonicInput = 13; + _Deprecated_ButtonRequest_PassphraseType = 14 [deprecated=true]; + ButtonRequest_UnknownDerivationPath = 15; + ButtonRequest_RecoveryHomepage = 16; + ButtonRequest_Success = 17; + ButtonRequest_Warning = 18; + ButtonRequest_PassphraseEntry = 19; + ButtonRequest_PinEntry = 20; + } } /** @@ -82,15 +107,17 @@ message ButtonAck { * @next PinMatrixAck */ message PinMatrixRequest { - optional PinMatrixRequestType type = 1; - /** - * Type of PIN request - */ - enum PinMatrixRequestType { - PinMatrixRequestType_Current = 1; - PinMatrixRequestType_NewFirst = 2; - PinMatrixRequestType_NewSecond = 3; - } + optional PinMatrixRequestType type = 1; + /** + * Type of PIN request + */ + enum PinMatrixRequestType { + PinMatrixRequestType_Current = 1; + PinMatrixRequestType_NewFirst = 2; + PinMatrixRequestType_NewSecond = 3; + PinMatrixRequestType_WipeCodeFirst = 4; + PinMatrixRequestType_WipeCodeSecond = 5; + } } /** @@ -98,7 +125,7 @@ message PinMatrixRequest { * @auxend */ message PinMatrixAck { - required string pin = 1; // matrix encoded PIN entered by user + required string pin = 1; // matrix encoded PIN entered by user } /** @@ -107,31 +134,36 @@ message PinMatrixAck { * @next PassphraseAck */ message PassphraseRequest { - optional bool on_device = 1; // passphrase is being entered on the device + optional bool _on_device = 1 [deprecated=true]; // <2.3.0 } /** * Request: Send passphrase back - * @next PassphraseStateRequest + * @auxend */ message PassphraseAck { - optional string passphrase = 1; - optional bytes state = 2; // expected device state + optional string passphrase = 1; + optional bytes _state = 2 [deprecated=true]; // <2.3.0 + optional bool on_device = 3; // user wants to enter passphrase on the device } /** * Response: Device awaits passphrase state - * @next PassphraseStateAck + * Deprecated in 2.3.0 + * @next Deprecated_PassphraseStateAck */ -message PassphraseStateRequest { - optional bytes state = 1; // actual device state +message Deprecated_PassphraseStateRequest { + option deprecated = true; + optional bytes state = 1; // actual device state } /** * Request: Send passphrase state back + * Deprecated in 2.3.0 * @auxend */ -message PassphraseStateAck { +message Deprecated_PassphraseStateAck { + option deprecated = true; } /** @@ -140,10 +172,10 @@ message PassphraseStateAck { * @embed */ message HDNodeType { - required uint32 depth = 1; - required uint32 fingerprint = 2; - required uint32 child_num = 3; - required bytes chain_code = 4; - optional bytes private_key = 5; - optional bytes public_key = 6; -} + required uint32 depth = 1; + required uint32 fingerprint = 2; + required uint32 child_num = 3; + required bytes chain_code = 4; + optional bytes private_key = 5; + required bytes public_key = 6; +} \ No newline at end of file diff --git a/accounts/usbwallet/trezor/messages-ethereum-eip712.pb.go b/accounts/usbwallet/trezor/messages-ethereum-eip712.pb.go new file mode 100644 index 00000000000..b4079e23eb4 --- /dev/null +++ b/accounts/usbwallet/trezor/messages-ethereum-eip712.pb.go @@ -0,0 +1,608 @@ +// This file originates from the SatoshiLabs Trezor `common` repository at: +// https://github.com/trezor/trezor-common/blob/master/protob/messages-ethereum-eip712.proto +// dated 30.06.2025, commit 421b45d4677f2499234692b0f54010bc45b3ae5f. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v4.25.3 +// source: messages-ethereum-eip712.proto + +package trezor + +import ( + reflect "reflect" + sync "sync" + unsafe "unsafe" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type EthereumTypedDataStructAck_EthereumDataType int32 + +const ( + EthereumTypedDataStructAck_UINT EthereumTypedDataStructAck_EthereumDataType = 1 + EthereumTypedDataStructAck_INT EthereumTypedDataStructAck_EthereumDataType = 2 + EthereumTypedDataStructAck_BYTES EthereumTypedDataStructAck_EthereumDataType = 3 + EthereumTypedDataStructAck_STRING EthereumTypedDataStructAck_EthereumDataType = 4 + EthereumTypedDataStructAck_BOOL EthereumTypedDataStructAck_EthereumDataType = 5 + EthereumTypedDataStructAck_ADDRESS EthereumTypedDataStructAck_EthereumDataType = 6 + EthereumTypedDataStructAck_ARRAY EthereumTypedDataStructAck_EthereumDataType = 7 + EthereumTypedDataStructAck_STRUCT EthereumTypedDataStructAck_EthereumDataType = 8 +) + +// Enum value maps for EthereumTypedDataStructAck_EthereumDataType. +var ( + EthereumTypedDataStructAck_EthereumDataType_name = map[int32]string{ + 1: "UINT", + 2: "INT", + 3: "BYTES", + 4: "STRING", + 5: "BOOL", + 6: "ADDRESS", + 7: "ARRAY", + 8: "STRUCT", + } + EthereumTypedDataStructAck_EthereumDataType_value = map[string]int32{ + "UINT": 1, + "INT": 2, + "BYTES": 3, + "STRING": 4, + "BOOL": 5, + "ADDRESS": 6, + "ARRAY": 7, + "STRUCT": 8, + } +) + +func (x EthereumTypedDataStructAck_EthereumDataType) Enum() *EthereumTypedDataStructAck_EthereumDataType { + p := new(EthereumTypedDataStructAck_EthereumDataType) + *p = x + return p +} + +func (x EthereumTypedDataStructAck_EthereumDataType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (EthereumTypedDataStructAck_EthereumDataType) Descriptor() protoreflect.EnumDescriptor { + return file_messages_ethereum_eip712_proto_enumTypes[0].Descriptor() +} + +func (EthereumTypedDataStructAck_EthereumDataType) Type() protoreflect.EnumType { + return &file_messages_ethereum_eip712_proto_enumTypes[0] +} + +func (x EthereumTypedDataStructAck_EthereumDataType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *EthereumTypedDataStructAck_EthereumDataType) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = EthereumTypedDataStructAck_EthereumDataType(num) + return nil +} + +// Deprecated: Use EthereumTypedDataStructAck_EthereumDataType.Descriptor instead. +func (EthereumTypedDataStructAck_EthereumDataType) EnumDescriptor() ([]byte, []int) { + return file_messages_ethereum_eip712_proto_rawDescGZIP(), []int{2, 0} +} + +// * +// Request: Ask device to sign typed data +// @start +// @next EthereumTypedDataStructRequest +// @next EthereumTypedDataValueRequest +// @next EthereumTypedDataSignature +// @next Failure +type EthereumSignTypedData struct { + state protoimpl.MessageState `protogen:"open.v1"` + AddressN []uint32 `protobuf:"varint,1,rep,name=address_n,json=addressN" json:"address_n,omitempty"` // BIP-32 path to derive the key from master node + PrimaryType *string `protobuf:"bytes,2,req,name=primary_type,json=primaryType" json:"primary_type,omitempty"` // name of the root message struct + MetamaskV4Compat *bool `protobuf:"varint,3,opt,name=metamask_v4_compat,json=metamaskV4Compat,def=1" json:"metamask_v4_compat,omitempty"` // use MetaMask v4 (see https://github.com/MetaMask/eth-sig-util/issues/106) + Definitions *EthereumDefinitions `protobuf:"bytes,4,opt,name=definitions" json:"definitions,omitempty"` // network and/or token definitions + ShowMessageHash []byte `protobuf:"bytes,5,opt,name=show_message_hash,json=showMessageHash" json:"show_message_hash,omitempty"` // hash of the typed data to be signed (if set, user will be asked to confirm before signing) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +// Default values for EthereumSignTypedData fields. +const ( + Default_EthereumSignTypedData_MetamaskV4Compat = bool(true) +) + +func (x *EthereumSignTypedData) Reset() { + *x = EthereumSignTypedData{} + mi := &file_messages_ethereum_eip712_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EthereumSignTypedData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EthereumSignTypedData) ProtoMessage() {} + +func (x *EthereumSignTypedData) ProtoReflect() protoreflect.Message { + mi := &file_messages_ethereum_eip712_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EthereumSignTypedData.ProtoReflect.Descriptor instead. +func (*EthereumSignTypedData) Descriptor() ([]byte, []int) { + return file_messages_ethereum_eip712_proto_rawDescGZIP(), []int{0} +} + +func (x *EthereumSignTypedData) GetAddressN() []uint32 { + if x != nil { + return x.AddressN + } + return nil +} + +func (x *EthereumSignTypedData) GetPrimaryType() string { + if x != nil && x.PrimaryType != nil { + return *x.PrimaryType + } + return "" +} + +func (x *EthereumSignTypedData) GetMetamaskV4Compat() bool { + if x != nil && x.MetamaskV4Compat != nil { + return *x.MetamaskV4Compat + } + return Default_EthereumSignTypedData_MetamaskV4Compat +} + +func (x *EthereumSignTypedData) GetDefinitions() *EthereumDefinitions { + if x != nil { + return x.Definitions + } + return nil +} + +func (x *EthereumSignTypedData) GetShowMessageHash() []byte { + if x != nil { + return x.ShowMessageHash + } + return nil +} + +// * +// Response: Device asks for type information about a struct. +// @next EthereumTypedDataStructAck +type EthereumTypedDataStructRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` // name of the requested struct + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EthereumTypedDataStructRequest) Reset() { + *x = EthereumTypedDataStructRequest{} + mi := &file_messages_ethereum_eip712_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EthereumTypedDataStructRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EthereumTypedDataStructRequest) ProtoMessage() {} + +func (x *EthereumTypedDataStructRequest) ProtoReflect() protoreflect.Message { + mi := &file_messages_ethereum_eip712_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EthereumTypedDataStructRequest.ProtoReflect.Descriptor instead. +func (*EthereumTypedDataStructRequest) Descriptor() ([]byte, []int) { + return file_messages_ethereum_eip712_proto_rawDescGZIP(), []int{1} +} + +func (x *EthereumTypedDataStructRequest) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +// * +// Request: Type information about a struct. +// @next EthereumTypedDataStructRequest +type EthereumTypedDataStructAck struct { + state protoimpl.MessageState `protogen:"open.v1"` + Members []*EthereumTypedDataStructAck_EthereumStructMember `protobuf:"bytes,1,rep,name=members" json:"members,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EthereumTypedDataStructAck) Reset() { + *x = EthereumTypedDataStructAck{} + mi := &file_messages_ethereum_eip712_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EthereumTypedDataStructAck) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EthereumTypedDataStructAck) ProtoMessage() {} + +func (x *EthereumTypedDataStructAck) ProtoReflect() protoreflect.Message { + mi := &file_messages_ethereum_eip712_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EthereumTypedDataStructAck.ProtoReflect.Descriptor instead. +func (*EthereumTypedDataStructAck) Descriptor() ([]byte, []int) { + return file_messages_ethereum_eip712_proto_rawDescGZIP(), []int{2} +} + +func (x *EthereumTypedDataStructAck) GetMembers() []*EthereumTypedDataStructAck_EthereumStructMember { + if x != nil { + return x.Members + } + return nil +} + +// * +// Response: Device asks for data at the specific member path. +// @next EthereumTypedDataValueAck +type EthereumTypedDataValueRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + MemberPath []uint32 `protobuf:"varint,1,rep,name=member_path,json=memberPath" json:"member_path,omitempty"` // member path requested by device + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EthereumTypedDataValueRequest) Reset() { + *x = EthereumTypedDataValueRequest{} + mi := &file_messages_ethereum_eip712_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EthereumTypedDataValueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EthereumTypedDataValueRequest) ProtoMessage() {} + +func (x *EthereumTypedDataValueRequest) ProtoReflect() protoreflect.Message { + mi := &file_messages_ethereum_eip712_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EthereumTypedDataValueRequest.ProtoReflect.Descriptor instead. +func (*EthereumTypedDataValueRequest) Descriptor() ([]byte, []int) { + return file_messages_ethereum_eip712_proto_rawDescGZIP(), []int{3} +} + +func (x *EthereumTypedDataValueRequest) GetMemberPath() []uint32 { + if x != nil { + return x.MemberPath + } + return nil +} + +// * +// Request: Single value of a specific atomic field. +// @next EthereumTypedDataValueRequest +type EthereumTypedDataValueAck struct { + state protoimpl.MessageState `protogen:"open.v1"` + Value []byte `protobuf:"bytes,1,req,name=value" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EthereumTypedDataValueAck) Reset() { + *x = EthereumTypedDataValueAck{} + mi := &file_messages_ethereum_eip712_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EthereumTypedDataValueAck) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EthereumTypedDataValueAck) ProtoMessage() {} + +func (x *EthereumTypedDataValueAck) ProtoReflect() protoreflect.Message { + mi := &file_messages_ethereum_eip712_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EthereumTypedDataValueAck.ProtoReflect.Descriptor instead. +func (*EthereumTypedDataValueAck) Descriptor() ([]byte, []int) { + return file_messages_ethereum_eip712_proto_rawDescGZIP(), []int{4} +} + +func (x *EthereumTypedDataValueAck) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +type EthereumTypedDataStructAck_EthereumStructMember struct { + state protoimpl.MessageState `protogen:"open.v1"` + Type *EthereumTypedDataStructAck_EthereumFieldType `protobuf:"bytes,1,req,name=type" json:"type,omitempty"` + Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EthereumTypedDataStructAck_EthereumStructMember) Reset() { + *x = EthereumTypedDataStructAck_EthereumStructMember{} + mi := &file_messages_ethereum_eip712_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EthereumTypedDataStructAck_EthereumStructMember) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EthereumTypedDataStructAck_EthereumStructMember) ProtoMessage() {} + +func (x *EthereumTypedDataStructAck_EthereumStructMember) ProtoReflect() protoreflect.Message { + mi := &file_messages_ethereum_eip712_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EthereumTypedDataStructAck_EthereumStructMember.ProtoReflect.Descriptor instead. +func (*EthereumTypedDataStructAck_EthereumStructMember) Descriptor() ([]byte, []int) { + return file_messages_ethereum_eip712_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *EthereumTypedDataStructAck_EthereumStructMember) GetType() *EthereumTypedDataStructAck_EthereumFieldType { + if x != nil { + return x.Type + } + return nil +} + +func (x *EthereumTypedDataStructAck_EthereumStructMember) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +type EthereumTypedDataStructAck_EthereumFieldType struct { + state protoimpl.MessageState `protogen:"open.v1"` + DataType *EthereumTypedDataStructAck_EthereumDataType `protobuf:"varint,1,req,name=data_type,json=dataType,enum=hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck_EthereumDataType" json:"data_type,omitempty"` + Size *uint32 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"` // for integer types: size in bytes (uint8 has size 1, uint256 has size 32) + // for bytes types: size in bytes, or unset for dynamic + // for arrays: size in elements, or unset for dynamic + // for structs: number of members + // for string, bool and address: unset + EntryType *EthereumTypedDataStructAck_EthereumFieldType `protobuf:"bytes,3,opt,name=entry_type,json=entryType" json:"entry_type,omitempty"` // for array types, type of single entry + StructName *string `protobuf:"bytes,4,opt,name=struct_name,json=structName" json:"struct_name,omitempty"` // for structs: its name + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EthereumTypedDataStructAck_EthereumFieldType) Reset() { + *x = EthereumTypedDataStructAck_EthereumFieldType{} + mi := &file_messages_ethereum_eip712_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EthereumTypedDataStructAck_EthereumFieldType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EthereumTypedDataStructAck_EthereumFieldType) ProtoMessage() {} + +func (x *EthereumTypedDataStructAck_EthereumFieldType) ProtoReflect() protoreflect.Message { + mi := &file_messages_ethereum_eip712_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EthereumTypedDataStructAck_EthereumFieldType.ProtoReflect.Descriptor instead. +func (*EthereumTypedDataStructAck_EthereumFieldType) Descriptor() ([]byte, []int) { + return file_messages_ethereum_eip712_proto_rawDescGZIP(), []int{2, 1} +} + +func (x *EthereumTypedDataStructAck_EthereumFieldType) GetDataType() EthereumTypedDataStructAck_EthereumDataType { + if x != nil && x.DataType != nil { + return *x.DataType + } + return EthereumTypedDataStructAck_UINT +} + +func (x *EthereumTypedDataStructAck_EthereumFieldType) GetSize() uint32 { + if x != nil && x.Size != nil { + return *x.Size + } + return 0 +} + +func (x *EthereumTypedDataStructAck_EthereumFieldType) GetEntryType() *EthereumTypedDataStructAck_EthereumFieldType { + if x != nil { + return x.EntryType + } + return nil +} + +func (x *EthereumTypedDataStructAck_EthereumFieldType) GetStructName() string { + if x != nil && x.StructName != nil { + return *x.StructName + } + return "" +} + +var File_messages_ethereum_eip712_proto protoreflect.FileDescriptor + +const file_messages_ethereum_eip712_proto_rawDesc = "" + + "\n" + + "\x1emessages-ethereum-eip712.proto\x12\"hw.trezor.messages.ethereum_eip712\x1a\x17messages-ethereum.proto\"\x8b\x02\n" + + "\x15EthereumSignTypedData\x12\x1b\n" + + "\taddress_n\x18\x01 \x03(\rR\baddressN\x12!\n" + + "\fprimary_type\x18\x02 \x02(\tR\vprimaryType\x122\n" + + "\x12metamask_v4_compat\x18\x03 \x01(\b:\x04trueR\x10metamaskV4Compat\x12R\n" + + "\vdefinitions\x18\x04 \x01(\v20.hw.trezor.messages.ethereum.EthereumDefinitionsR\vdefinitions\x12*\n" + + "\x11show_message_hash\x18\x05 \x01(\fR\x0fshowMessageHash\"4\n" + + "\x1eEthereumTypedDataStructRequest\x12\x12\n" + + "\x04name\x18\x01 \x02(\tR\x04name\"\xb4\x05\n" + + "\x1aEthereumTypedDataStructAck\x12m\n" + + "\amembers\x18\x01 \x03(\v2S.hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumStructMemberR\amembers\x1a\x90\x01\n" + + "\x14EthereumStructMember\x12d\n" + + "\x04type\x18\x01 \x02(\v2P.hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumFieldTypeR\x04type\x12\x12\n" + + "\x04name\x18\x02 \x02(\tR\x04name\x1a\xa7\x02\n" + + "\x11EthereumFieldType\x12l\n" + + "\tdata_type\x18\x01 \x02(\x0e2O.hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumDataTypeR\bdataType\x12\x12\n" + + "\x04size\x18\x02 \x01(\rR\x04size\x12o\n" + + "\n" + + "entry_type\x18\x03 \x01(\v2P.hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumFieldTypeR\tentryType\x12\x1f\n" + + "\vstruct_name\x18\x04 \x01(\tR\n" + + "structName\"j\n" + + "\x10EthereumDataType\x12\b\n" + + "\x04UINT\x10\x01\x12\a\n" + + "\x03INT\x10\x02\x12\t\n" + + "\x05BYTES\x10\x03\x12\n" + + "\n" + + "\x06STRING\x10\x04\x12\b\n" + + "\x04BOOL\x10\x05\x12\v\n" + + "\aADDRESS\x10\x06\x12\t\n" + + "\x05ARRAY\x10\a\x12\n" + + "\n" + + "\x06STRUCT\x10\b\"@\n" + + "\x1dEthereumTypedDataValueRequest\x12\x1f\n" + + "\vmember_path\x18\x01 \x03(\rR\n" + + "memberPath\"1\n" + + "\x19EthereumTypedDataValueAck\x12\x14\n" + + "\x05value\x18\x01 \x02(\fR\x05valueB}\n" + + "#com.satoshilabs.trezor.lib.protobufB\x1bTrezorMessageEthereumEIP712Z9github.com/ethereum/go-ethereum/accounts/usbwallet/trezor" + +var ( + file_messages_ethereum_eip712_proto_rawDescOnce sync.Once + file_messages_ethereum_eip712_proto_rawDescData []byte +) + +func file_messages_ethereum_eip712_proto_rawDescGZIP() []byte { + file_messages_ethereum_eip712_proto_rawDescOnce.Do(func() { + file_messages_ethereum_eip712_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_messages_ethereum_eip712_proto_rawDesc), len(file_messages_ethereum_eip712_proto_rawDesc))) + }) + return file_messages_ethereum_eip712_proto_rawDescData +} + +var file_messages_ethereum_eip712_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_messages_ethereum_eip712_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_messages_ethereum_eip712_proto_goTypes = []any{ + (EthereumTypedDataStructAck_EthereumDataType)(0), // 0: hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumDataType + (*EthereumSignTypedData)(nil), // 1: hw.trezor.messages.ethereum_eip712.EthereumSignTypedData + (*EthereumTypedDataStructRequest)(nil), // 2: hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructRequest + (*EthereumTypedDataStructAck)(nil), // 3: hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck + (*EthereumTypedDataValueRequest)(nil), // 4: hw.trezor.messages.ethereum_eip712.EthereumTypedDataValueRequest + (*EthereumTypedDataValueAck)(nil), // 5: hw.trezor.messages.ethereum_eip712.EthereumTypedDataValueAck + (*EthereumTypedDataStructAck_EthereumStructMember)(nil), // 6: hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumStructMember + (*EthereumTypedDataStructAck_EthereumFieldType)(nil), // 7: hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumFieldType + (*EthereumDefinitions)(nil), // 8: hw.trezor.messages.ethereum.EthereumDefinitions +} +var file_messages_ethereum_eip712_proto_depIdxs = []int32{ + 8, // 0: hw.trezor.messages.ethereum_eip712.EthereumSignTypedData.definitions:type_name -> hw.trezor.messages.ethereum.EthereumDefinitions + 6, // 1: hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.members:type_name -> hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumStructMember + 7, // 2: hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumStructMember.type:type_name -> hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumFieldType + 0, // 3: hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumFieldType.data_type:type_name -> hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumDataType + 7, // 4: hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumFieldType.entry_type:type_name -> hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumFieldType + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_messages_ethereum_eip712_proto_init() } +func file_messages_ethereum_eip712_proto_init() { + if File_messages_ethereum_eip712_proto != nil { + return + } + file_messages_ethereum_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_messages_ethereum_eip712_proto_rawDesc), len(file_messages_ethereum_eip712_proto_rawDesc)), + NumEnums: 1, + NumMessages: 7, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_messages_ethereum_eip712_proto_goTypes, + DependencyIndexes: file_messages_ethereum_eip712_proto_depIdxs, + EnumInfos: file_messages_ethereum_eip712_proto_enumTypes, + MessageInfos: file_messages_ethereum_eip712_proto_msgTypes, + }.Build() + File_messages_ethereum_eip712_proto = out.File + file_messages_ethereum_eip712_proto_goTypes = nil + file_messages_ethereum_eip712_proto_depIdxs = nil +} diff --git a/accounts/usbwallet/trezor/messages-ethereum-eip712.proto b/accounts/usbwallet/trezor/messages-ethereum-eip712.proto new file mode 100644 index 00000000000..3a819a48cee --- /dev/null +++ b/accounts/usbwallet/trezor/messages-ethereum-eip712.proto @@ -0,0 +1,99 @@ +// This file originates from the SatoshiLabs Trezor `common` repository at: +// https://github.com/trezor/trezor-common/blob/master/protob/messages-ethereum-eip712.proto +// dated 30.06.2025, commit 421b45d4677f2499234692b0f54010bc45b3ae5f. + +syntax = "proto2"; +package hw.trezor.messages.ethereum_eip712; + +option go_package = "github.com/ethereum/go-ethereum/accounts/usbwallet/trezor"; + +// Sugar for easier handling in Java +option java_package = "com.satoshilabs.trezor.lib.protobuf"; +option java_outer_classname = "TrezorMessageEthereumEIP712"; + +import "messages-ethereum.proto"; + + +// Separated from messages-ethereum.proto as it is not implemented on T1 side +// and defining all the messages and fields could be even impossible as recursive +// messages are used here + + +/** + * Request: Ask device to sign typed data + * @start + * @next EthereumTypedDataStructRequest + * @next EthereumTypedDataValueRequest + * @next EthereumTypedDataSignature + * @next Failure + */ +message EthereumSignTypedData { + repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node + required string primary_type = 2; // name of the root message struct + optional bool metamask_v4_compat = 3 [default=true]; // use MetaMask v4 (see https://github.com/MetaMask/eth-sig-util/issues/106) + optional ethereum.EthereumDefinitions definitions = 4; // network and/or token definitions + optional bytes show_message_hash = 5; // hash of the typed data to be signed (if set, user will be asked to confirm before signing) +} + +/** + * Response: Device asks for type information about a struct. + * @next EthereumTypedDataStructAck + */ +message EthereumTypedDataStructRequest { + required string name = 1; // name of the requested struct +} + +/** + * Request: Type information about a struct. + * @next EthereumTypedDataStructRequest + */ +message EthereumTypedDataStructAck { + repeated EthereumStructMember members = 1; + + message EthereumStructMember { + required EthereumFieldType type = 1; + required string name = 2; + } + + message EthereumFieldType { + required EthereumDataType data_type = 1; + optional uint32 size = 2; // for integer types: size in bytes (uint8 has size 1, uint256 has size 32) + // for bytes types: size in bytes, or unset for dynamic + // for arrays: size in elements, or unset for dynamic + // for structs: number of members + // for string, bool and address: unset + optional EthereumFieldType entry_type = 3; // for array types, type of single entry + optional string struct_name = 4; // for structs: its name + } + + enum EthereumDataType { + UINT = 1; + INT = 2; + BYTES = 3; + STRING = 4; + BOOL = 5; + ADDRESS = 6; + ARRAY = 7; + STRUCT = 8; + } +} + +/** + * Response: Device asks for data at the specific member path. + * @next EthereumTypedDataValueAck + */ +message EthereumTypedDataValueRequest { + repeated uint32 member_path = 1; // member path requested by device +} + +/** + * Request: Single value of a specific atomic field. + * @next EthereumTypedDataValueRequest + */ +message EthereumTypedDataValueAck { + required bytes value = 1; + // * atomic types: value of the member. + // Length must match the `size` of the corresponding field type, unless the size is dynamic. + // * array types: number of elements, encoded as uint16. + // * struct types: undefined, Trezor will not query a struct field. +} \ No newline at end of file diff --git a/accounts/usbwallet/trezor/messages-ethereum.pb.go b/accounts/usbwallet/trezor/messages-ethereum.pb.go index a92123efcdd..bd8d53340a1 100644 --- a/accounts/usbwallet/trezor/messages-ethereum.pb.go +++ b/accounts/usbwallet/trezor/messages-ethereum.pb.go @@ -1,20 +1,22 @@ // This file originates from the SatoshiLabs Trezor `common` repository at: // https://github.com/trezor/trezor-common/blob/master/protob/messages-ethereum.proto -// dated 28.05.2019, commit 893fd219d4a01bcffa0cd9cfa631856371ec5aa9. +// dated 30.06.2025, commit 421b45d4677f2499234692b0f54010bc45b3ae5f. // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v5.27.1 +// protoc-gen-go v1.36.6 +// protoc v4.25.3 // source: messages-ethereum.proto package trezor import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -30,21 +32,18 @@ const ( // @next EthereumPublicKey // @next Failure type EthereumGetPublicKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + AddressN []uint32 `protobuf:"varint,1,rep,name=address_n,json=addressN" json:"address_n,omitempty"` // BIP-32 path to derive the key from master node + ShowDisplay *bool `protobuf:"varint,2,opt,name=show_display,json=showDisplay" json:"show_display,omitempty"` // optionally show on display before sending the result unknownFields protoimpl.UnknownFields - - AddressN []uint32 `protobuf:"varint,1,rep,name=address_n,json=addressN" json:"address_n,omitempty"` // BIP-32 path to derive the key from master node - ShowDisplay *bool `protobuf:"varint,2,opt,name=show_display,json=showDisplay" json:"show_display,omitempty"` // optionally show on display before sending the result + sizeCache protoimpl.SizeCache } func (x *EthereumGetPublicKey) Reset() { *x = EthereumGetPublicKey{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_ethereum_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_messages_ethereum_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EthereumGetPublicKey) String() string { @@ -55,7 +54,7 @@ func (*EthereumGetPublicKey) ProtoMessage() {} func (x *EthereumGetPublicKey) ProtoReflect() protoreflect.Message { mi := &file_messages_ethereum_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -88,21 +87,18 @@ func (x *EthereumGetPublicKey) GetShowDisplay() bool { // Response: Contains public key derived from device private seed // @end type EthereumPublicKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Node *HDNodeType `protobuf:"bytes,1,req,name=node" json:"node,omitempty"` // BIP32 public node + Xpub *string `protobuf:"bytes,2,req,name=xpub" json:"xpub,omitempty"` // serialized form of public node unknownFields protoimpl.UnknownFields - - Node *HDNodeType `protobuf:"bytes,1,opt,name=node" json:"node,omitempty"` // BIP32 public node - Xpub *string `protobuf:"bytes,2,opt,name=xpub" json:"xpub,omitempty"` // serialized form of public node + sizeCache protoimpl.SizeCache } func (x *EthereumPublicKey) Reset() { *x = EthereumPublicKey{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_ethereum_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_messages_ethereum_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EthereumPublicKey) String() string { @@ -113,7 +109,7 @@ func (*EthereumPublicKey) ProtoMessage() {} func (x *EthereumPublicKey) ProtoReflect() protoreflect.Message { mi := &file_messages_ethereum_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -148,21 +144,20 @@ func (x *EthereumPublicKey) GetXpub() string { // @next EthereumAddress // @next Failure type EthereumGetAddress struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AddressN []uint32 `protobuf:"varint,1,rep,name=address_n,json=addressN" json:"address_n,omitempty"` // BIP-32 path to derive the key from master node - ShowDisplay *bool `protobuf:"varint,2,opt,name=show_display,json=showDisplay" json:"show_display,omitempty"` // optionally show on display before sending the result + state protoimpl.MessageState `protogen:"open.v1"` + AddressN []uint32 `protobuf:"varint,1,rep,name=address_n,json=addressN" json:"address_n,omitempty"` // BIP-32 path to derive the key from master node + ShowDisplay *bool `protobuf:"varint,2,opt,name=show_display,json=showDisplay" json:"show_display,omitempty"` // optionally show on display before sending the result + EncodedNetwork []byte `protobuf:"bytes,3,opt,name=encoded_network,json=encodedNetwork" json:"encoded_network,omitempty"` // encoded Ethereum network, see external-definitions.md for details + Chunkify *bool `protobuf:"varint,4,opt,name=chunkify" json:"chunkify,omitempty"` // display the address in chunks of 4 characters + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *EthereumGetAddress) Reset() { *x = EthereumGetAddress{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_ethereum_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_messages_ethereum_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EthereumGetAddress) String() string { @@ -173,7 +168,7 @@ func (*EthereumGetAddress) ProtoMessage() {} func (x *EthereumGetAddress) ProtoReflect() protoreflect.Message { mi := &file_messages_ethereum_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -202,25 +197,37 @@ func (x *EthereumGetAddress) GetShowDisplay() bool { return false } +func (x *EthereumGetAddress) GetEncodedNetwork() []byte { + if x != nil { + return x.EncodedNetwork + } + return nil +} + +func (x *EthereumGetAddress) GetChunkify() bool { + if x != nil && x.Chunkify != nil { + return *x.Chunkify + } + return false +} + // * // Response: Contains an Ethereum address derived from device private seed // @end type EthereumAddress struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + // Deprecated: Marked as deprecated in messages-ethereum.proto. + XOldAddress []byte `protobuf:"bytes,1,opt,name=_old_address,json=OldAddress" json:"_old_address,omitempty"` // trezor <1.8.0, <2.1.0 - raw bytes of Ethereum address + Address *string `protobuf:"bytes,2,opt,name=address" json:"address,omitempty"` // Ethereum address as hex-encoded string unknownFields protoimpl.UnknownFields - - AddressBin []byte `protobuf:"bytes,1,opt,name=addressBin" json:"addressBin,omitempty"` // Ethereum address as 20 bytes (legacy firmwares) - AddressHex *string `protobuf:"bytes,2,opt,name=addressHex" json:"addressHex,omitempty"` // Ethereum address as hex string (newer firmwares) + sizeCache protoimpl.SizeCache } func (x *EthereumAddress) Reset() { *x = EthereumAddress{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_ethereum_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_messages_ethereum_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EthereumAddress) String() string { @@ -231,7 +238,7 @@ func (*EthereumAddress) ProtoMessage() {} func (x *EthereumAddress) ProtoReflect() protoreflect.Message { mi := &file_messages_ethereum_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -246,52 +253,65 @@ func (*EthereumAddress) Descriptor() ([]byte, []int) { return file_messages_ethereum_proto_rawDescGZIP(), []int{3} } -func (x *EthereumAddress) GetAddressBin() []byte { +// Deprecated: Marked as deprecated in messages-ethereum.proto. +func (x *EthereumAddress) GetXOldAddress() []byte { if x != nil { - return x.AddressBin + return x.XOldAddress } return nil } -func (x *EthereumAddress) GetAddressHex() string { - if x != nil && x.AddressHex != nil { - return *x.AddressHex +func (x *EthereumAddress) GetAddress() string { + if x != nil && x.Address != nil { + return *x.Address } return "" } // * // Request: Ask device to sign transaction -// All fields are optional from the protocol's point of view. Each field defaults to value `0` if missing. +// gas_price, gas_limit and chain_id must be provided and non-zero. +// All other fields are optional and default to value `0` if missing. // Note: the first at most 1024 bytes of data MUST be transmitted as part of this message. // @start // @next EthereumTxRequest // @next Failure type EthereumSignTx struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState `protogen:"open.v1"` + AddressN []uint32 `protobuf:"varint,1,rep,name=address_n,json=addressN" json:"address_n,omitempty"` // BIP-32 path to derive the key from master node + Nonce []byte `protobuf:"bytes,2,opt,name=nonce,def=" json:"nonce,omitempty"` // <=256 bit unsigned big endian + GasPrice []byte `protobuf:"bytes,3,req,name=gas_price,json=gasPrice" json:"gas_price,omitempty"` // <=256 bit unsigned big endian (in wei) + GasLimit []byte `protobuf:"bytes,4,req,name=gas_limit,json=gasLimit" json:"gas_limit,omitempty"` // <=256 bit unsigned big endian + To *string `protobuf:"bytes,11,opt,name=to,def=" json:"to,omitempty"` // recipient address + Value []byte `protobuf:"bytes,6,opt,name=value,def=" json:"value,omitempty"` // <=256 bit unsigned big endian (in wei) + DataInitialChunk []byte `protobuf:"bytes,7,opt,name=data_initial_chunk,json=dataInitialChunk,def=" json:"data_initial_chunk,omitempty"` // The initial data chunk (<= 1024 bytes) + DataLength *uint32 `protobuf:"varint,8,opt,name=data_length,json=dataLength,def=0" json:"data_length,omitempty"` // Length of transaction payload + ChainId *uint64 `protobuf:"varint,9,req,name=chain_id,json=chainId" json:"chain_id,omitempty"` // Chain Id for EIP 155 + TxType *uint32 `protobuf:"varint,10,opt,name=tx_type,json=txType" json:"tx_type,omitempty"` // Used for Wanchain + Definitions *EthereumDefinitions `protobuf:"bytes,12,opt,name=definitions" json:"definitions,omitempty"` // network and/or token definitions for tx + Chunkify *bool `protobuf:"varint,13,opt,name=chunkify" json:"chunkify,omitempty"` // display the address in chunks of 4 characters + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +// Default values for EthereumSignTx fields. +const ( + Default_EthereumSignTx_To = string("") + Default_EthereumSignTx_DataLength = uint32(0) +) - AddressN []uint32 `protobuf:"varint,1,rep,name=address_n,json=addressN" json:"address_n,omitempty"` // BIP-32 path to derive the key from master node - Nonce []byte `protobuf:"bytes,2,opt,name=nonce" json:"nonce,omitempty"` // <=256 bit unsigned big endian - GasPrice []byte `protobuf:"bytes,3,opt,name=gas_price,json=gasPrice" json:"gas_price,omitempty"` // <=256 bit unsigned big endian (in wei) - GasLimit []byte `protobuf:"bytes,4,opt,name=gas_limit,json=gasLimit" json:"gas_limit,omitempty"` // <=256 bit unsigned big endian - ToBin []byte `protobuf:"bytes,5,opt,name=toBin" json:"toBin,omitempty"` // recipient address (20 bytes, legacy firmware) - ToHex *string `protobuf:"bytes,11,opt,name=toHex" json:"toHex,omitempty"` // recipient address (hex string, newer firmware) - Value []byte `protobuf:"bytes,6,opt,name=value" json:"value,omitempty"` // <=256 bit unsigned big endian (in wei) - DataInitialChunk []byte `protobuf:"bytes,7,opt,name=data_initial_chunk,json=dataInitialChunk" json:"data_initial_chunk,omitempty"` // The initial data chunk (<= 1024 bytes) - DataLength *uint32 `protobuf:"varint,8,opt,name=data_length,json=dataLength" json:"data_length,omitempty"` // Length of transaction payload - ChainId *uint32 `protobuf:"varint,9,opt,name=chain_id,json=chainId" json:"chain_id,omitempty"` // Chain Id for EIP 155 - TxType *uint32 `protobuf:"varint,10,opt,name=tx_type,json=txType" json:"tx_type,omitempty"` // (only for Wanchain) -} +// Default values for EthereumSignTx fields. +var ( + Default_EthereumSignTx_Nonce = []byte("") + Default_EthereumSignTx_Value = []byte("") + Default_EthereumSignTx_DataInitialChunk = []byte("") +) func (x *EthereumSignTx) Reset() { *x = EthereumSignTx{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_ethereum_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_messages_ethereum_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EthereumSignTx) String() string { @@ -302,7 +322,7 @@ func (*EthereumSignTx) ProtoMessage() {} func (x *EthereumSignTx) ProtoReflect() protoreflect.Message { mi := &file_messages_ethereum_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -325,10 +345,10 @@ func (x *EthereumSignTx) GetAddressN() []uint32 { } func (x *EthereumSignTx) GetNonce() []byte { - if x != nil { + if x != nil && x.Nonce != nil { return x.Nonce } - return nil + return append([]byte(nil), Default_EthereumSignTx_Nonce...) } func (x *EthereumSignTx) GetGasPrice() []byte { @@ -345,53 +365,216 @@ func (x *EthereumSignTx) GetGasLimit() []byte { return nil } -func (x *EthereumSignTx) GetToBin() []byte { +func (x *EthereumSignTx) GetTo() string { + if x != nil && x.To != nil { + return *x.To + } + return Default_EthereumSignTx_To +} + +func (x *EthereumSignTx) GetValue() []byte { + if x != nil && x.Value != nil { + return x.Value + } + return append([]byte(nil), Default_EthereumSignTx_Value...) +} + +func (x *EthereumSignTx) GetDataInitialChunk() []byte { + if x != nil && x.DataInitialChunk != nil { + return x.DataInitialChunk + } + return append([]byte(nil), Default_EthereumSignTx_DataInitialChunk...) +} + +func (x *EthereumSignTx) GetDataLength() uint32 { + if x != nil && x.DataLength != nil { + return *x.DataLength + } + return Default_EthereumSignTx_DataLength +} + +func (x *EthereumSignTx) GetChainId() uint64 { + if x != nil && x.ChainId != nil { + return *x.ChainId + } + return 0 +} + +func (x *EthereumSignTx) GetTxType() uint32 { + if x != nil && x.TxType != nil { + return *x.TxType + } + return 0 +} + +func (x *EthereumSignTx) GetDefinitions() *EthereumDefinitions { if x != nil { - return x.ToBin + return x.Definitions } return nil } -func (x *EthereumSignTx) GetToHex() string { - if x != nil && x.ToHex != nil { - return *x.ToHex +func (x *EthereumSignTx) GetChunkify() bool { + if x != nil && x.Chunkify != nil { + return *x.Chunkify } - return "" + return false } -func (x *EthereumSignTx) GetValue() []byte { +// * +// Request: Ask device to sign EIP1559 transaction +// Note: the first at most 1024 bytes of data MUST be transmitted as part of this message. +// @start +// @next EthereumTxRequest +// @next Failure +type EthereumSignTxEIP1559 struct { + state protoimpl.MessageState `protogen:"open.v1"` + AddressN []uint32 `protobuf:"varint,1,rep,name=address_n,json=addressN" json:"address_n,omitempty"` // BIP-32 path to derive the key from master node + Nonce []byte `protobuf:"bytes,2,req,name=nonce" json:"nonce,omitempty"` // <=256 bit unsigned big endian + MaxGasFee []byte `protobuf:"bytes,3,req,name=max_gas_fee,json=maxGasFee" json:"max_gas_fee,omitempty"` // <=256 bit unsigned big endian (in wei) + MaxPriorityFee []byte `protobuf:"bytes,4,req,name=max_priority_fee,json=maxPriorityFee" json:"max_priority_fee,omitempty"` // <=256 bit unsigned big endian (in wei) + GasLimit []byte `protobuf:"bytes,5,req,name=gas_limit,json=gasLimit" json:"gas_limit,omitempty"` // <=256 bit unsigned big endian + To *string `protobuf:"bytes,6,opt,name=to,def=" json:"to,omitempty"` // recipient address + Value []byte `protobuf:"bytes,7,req,name=value" json:"value,omitempty"` // <=256 bit unsigned big endian (in wei) + DataInitialChunk []byte `protobuf:"bytes,8,opt,name=data_initial_chunk,json=dataInitialChunk,def=" json:"data_initial_chunk,omitempty"` // The initial data chunk (<= 1024 bytes) + DataLength *uint32 `protobuf:"varint,9,req,name=data_length,json=dataLength" json:"data_length,omitempty"` // Length of transaction payload + ChainId *uint64 `protobuf:"varint,10,req,name=chain_id,json=chainId" json:"chain_id,omitempty"` // Chain Id for EIP 155 + AccessList []*EthereumSignTxEIP1559_EthereumAccessList `protobuf:"bytes,11,rep,name=access_list,json=accessList" json:"access_list,omitempty"` // Access List + Definitions *EthereumDefinitions `protobuf:"bytes,12,opt,name=definitions" json:"definitions,omitempty"` // network and/or token definitions for tx + Chunkify *bool `protobuf:"varint,13,opt,name=chunkify" json:"chunkify,omitempty"` // display the address in chunks of 4 characters + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +// Default values for EthereumSignTxEIP1559 fields. +const ( + Default_EthereumSignTxEIP1559_To = string("") +) + +// Default values for EthereumSignTxEIP1559 fields. +var ( + Default_EthereumSignTxEIP1559_DataInitialChunk = []byte("") +) + +func (x *EthereumSignTxEIP1559) Reset() { + *x = EthereumSignTxEIP1559{} + mi := &file_messages_ethereum_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EthereumSignTxEIP1559) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EthereumSignTxEIP1559) ProtoMessage() {} + +func (x *EthereumSignTxEIP1559) ProtoReflect() protoreflect.Message { + mi := &file_messages_ethereum_proto_msgTypes[5] if x != nil { - return x.Value + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EthereumSignTxEIP1559.ProtoReflect.Descriptor instead. +func (*EthereumSignTxEIP1559) Descriptor() ([]byte, []int) { + return file_messages_ethereum_proto_rawDescGZIP(), []int{5} +} + +func (x *EthereumSignTxEIP1559) GetAddressN() []uint32 { + if x != nil { + return x.AddressN } return nil } -func (x *EthereumSignTx) GetDataInitialChunk() []byte { +func (x *EthereumSignTxEIP1559) GetNonce() []byte { if x != nil { - return x.DataInitialChunk + return x.Nonce } return nil } -func (x *EthereumSignTx) GetDataLength() uint32 { +func (x *EthereumSignTxEIP1559) GetMaxGasFee() []byte { + if x != nil { + return x.MaxGasFee + } + return nil +} + +func (x *EthereumSignTxEIP1559) GetMaxPriorityFee() []byte { + if x != nil { + return x.MaxPriorityFee + } + return nil +} + +func (x *EthereumSignTxEIP1559) GetGasLimit() []byte { + if x != nil { + return x.GasLimit + } + return nil +} + +func (x *EthereumSignTxEIP1559) GetTo() string { + if x != nil && x.To != nil { + return *x.To + } + return Default_EthereumSignTxEIP1559_To +} + +func (x *EthereumSignTxEIP1559) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +func (x *EthereumSignTxEIP1559) GetDataInitialChunk() []byte { + if x != nil && x.DataInitialChunk != nil { + return x.DataInitialChunk + } + return append([]byte(nil), Default_EthereumSignTxEIP1559_DataInitialChunk...) +} + +func (x *EthereumSignTxEIP1559) GetDataLength() uint32 { if x != nil && x.DataLength != nil { return *x.DataLength } return 0 } -func (x *EthereumSignTx) GetChainId() uint32 { +func (x *EthereumSignTxEIP1559) GetChainId() uint64 { if x != nil && x.ChainId != nil { return *x.ChainId } return 0 } -func (x *EthereumSignTx) GetTxType() uint32 { - if x != nil && x.TxType != nil { - return *x.TxType +func (x *EthereumSignTxEIP1559) GetAccessList() []*EthereumSignTxEIP1559_EthereumAccessList { + if x != nil { + return x.AccessList } - return 0 + return nil +} + +func (x *EthereumSignTxEIP1559) GetDefinitions() *EthereumDefinitions { + if x != nil { + return x.Definitions + } + return nil +} + +func (x *EthereumSignTxEIP1559) GetChunkify() bool { + if x != nil && x.Chunkify != nil { + return *x.Chunkify + } + return false } // * @@ -401,23 +584,20 @@ func (x *EthereumSignTx) GetTxType() uint32 { // @end // @next EthereumTxAck type EthereumTxRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + DataLength *uint32 `protobuf:"varint,1,opt,name=data_length,json=dataLength" json:"data_length,omitempty"` // Number of bytes being requested (<= 1024) + SignatureV *uint32 `protobuf:"varint,2,opt,name=signature_v,json=signatureV" json:"signature_v,omitempty"` // Computed signature (recovery parameter, limited to 27 or 28) + SignatureR []byte `protobuf:"bytes,3,opt,name=signature_r,json=signatureR" json:"signature_r,omitempty"` // Computed signature R component (256 bit) + SignatureS []byte `protobuf:"bytes,4,opt,name=signature_s,json=signatureS" json:"signature_s,omitempty"` // Computed signature S component (256 bit) unknownFields protoimpl.UnknownFields - - DataLength *uint32 `protobuf:"varint,1,opt,name=data_length,json=dataLength" json:"data_length,omitempty"` // Number of bytes being requested (<= 1024) - SignatureV *uint32 `protobuf:"varint,2,opt,name=signature_v,json=signatureV" json:"signature_v,omitempty"` // Computed signature (recovery parameter, limited to 27 or 28) - SignatureR []byte `protobuf:"bytes,3,opt,name=signature_r,json=signatureR" json:"signature_r,omitempty"` // Computed signature R component (256 bit) - SignatureS []byte `protobuf:"bytes,4,opt,name=signature_s,json=signatureS" json:"signature_s,omitempty"` // Computed signature S component (256 bit) + sizeCache protoimpl.SizeCache } func (x *EthereumTxRequest) Reset() { *x = EthereumTxRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_ethereum_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_messages_ethereum_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EthereumTxRequest) String() string { @@ -427,8 +607,8 @@ func (x *EthereumTxRequest) String() string { func (*EthereumTxRequest) ProtoMessage() {} func (x *EthereumTxRequest) ProtoReflect() protoreflect.Message { - mi := &file_messages_ethereum_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_messages_ethereum_proto_msgTypes[6] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -440,7 +620,7 @@ func (x *EthereumTxRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use EthereumTxRequest.ProtoReflect.Descriptor instead. func (*EthereumTxRequest) Descriptor() ([]byte, []int) { - return file_messages_ethereum_proto_rawDescGZIP(), []int{5} + return file_messages_ethereum_proto_rawDescGZIP(), []int{6} } func (x *EthereumTxRequest) GetDataLength() uint32 { @@ -475,20 +655,17 @@ func (x *EthereumTxRequest) GetSignatureS() []byte { // Request: Transaction payload data. // @next EthereumTxRequest type EthereumTxAck struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + DataChunk []byte `protobuf:"bytes,1,req,name=data_chunk,json=dataChunk" json:"data_chunk,omitempty"` // Bytes from transaction payload (<= 1024 bytes) unknownFields protoimpl.UnknownFields - - DataChunk []byte `protobuf:"bytes,1,opt,name=data_chunk,json=dataChunk" json:"data_chunk,omitempty"` // Bytes from transaction payload (<= 1024 bytes) + sizeCache protoimpl.SizeCache } func (x *EthereumTxAck) Reset() { *x = EthereumTxAck{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_ethereum_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_messages_ethereum_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EthereumTxAck) String() string { @@ -498,8 +675,8 @@ func (x *EthereumTxAck) String() string { func (*EthereumTxAck) ProtoMessage() {} func (x *EthereumTxAck) ProtoReflect() protoreflect.Message { - mi := &file_messages_ethereum_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_messages_ethereum_proto_msgTypes[7] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -511,7 +688,7 @@ func (x *EthereumTxAck) ProtoReflect() protoreflect.Message { // Deprecated: Use EthereumTxAck.ProtoReflect.Descriptor instead. func (*EthereumTxAck) Descriptor() ([]byte, []int) { - return file_messages_ethereum_proto_rawDescGZIP(), []int{6} + return file_messages_ethereum_proto_rawDescGZIP(), []int{7} } func (x *EthereumTxAck) GetDataChunk() []byte { @@ -527,21 +704,20 @@ func (x *EthereumTxAck) GetDataChunk() []byte { // @next EthereumMessageSignature // @next Failure type EthereumSignMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AddressN []uint32 `protobuf:"varint,1,rep,name=address_n,json=addressN" json:"address_n,omitempty"` // BIP-32 path to derive the key from master node - Message []byte `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` // message to be signed + state protoimpl.MessageState `protogen:"open.v1"` + AddressN []uint32 `protobuf:"varint,1,rep,name=address_n,json=addressN" json:"address_n,omitempty"` // BIP-32 path to derive the key from master node + Message []byte `protobuf:"bytes,2,req,name=message" json:"message,omitempty"` // message to be signed + EncodedNetwork []byte `protobuf:"bytes,3,opt,name=encoded_network,json=encodedNetwork" json:"encoded_network,omitempty"` // encoded Ethereum network, see external-definitions.md for details + Chunkify *bool `protobuf:"varint,4,opt,name=chunkify" json:"chunkify,omitempty"` // display the address in chunks of 4 characters + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *EthereumSignMessage) Reset() { *x = EthereumSignMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_ethereum_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_messages_ethereum_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EthereumSignMessage) String() string { @@ -551,8 +727,8 @@ func (x *EthereumSignMessage) String() string { func (*EthereumSignMessage) ProtoMessage() {} func (x *EthereumSignMessage) ProtoReflect() protoreflect.Message { - mi := &file_messages_ethereum_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_messages_ethereum_proto_msgTypes[8] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -564,7 +740,7 @@ func (x *EthereumSignMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use EthereumSignMessage.ProtoReflect.Descriptor instead. func (*EthereumSignMessage) Descriptor() ([]byte, []int) { - return file_messages_ethereum_proto_rawDescGZIP(), []int{7} + return file_messages_ethereum_proto_rawDescGZIP(), []int{8} } func (x *EthereumSignMessage) GetAddressN() []uint32 { @@ -581,26 +757,36 @@ func (x *EthereumSignMessage) GetMessage() []byte { return nil } +func (x *EthereumSignMessage) GetEncodedNetwork() []byte { + if x != nil { + return x.EncodedNetwork + } + return nil +} + +func (x *EthereumSignMessage) GetChunkify() bool { + if x != nil && x.Chunkify != nil { + return *x.Chunkify + } + return false +} + // * // Response: Signed message // @end type EthereumMessageSignature struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Signature []byte `protobuf:"bytes,2,req,name=signature" json:"signature,omitempty"` // signature of the message + Address *string `protobuf:"bytes,3,req,name=address" json:"address,omitempty"` // address used to sign the message unknownFields protoimpl.UnknownFields - - AddressBin []byte `protobuf:"bytes,1,opt,name=addressBin" json:"addressBin,omitempty"` // address used to sign the message (20 bytes, legacy firmware) - Signature []byte `protobuf:"bytes,2,opt,name=signature" json:"signature,omitempty"` // signature of the message - AddressHex *string `protobuf:"bytes,3,opt,name=addressHex" json:"addressHex,omitempty"` // address used to sign the message (hex string, newer firmware) + sizeCache protoimpl.SizeCache } func (x *EthereumMessageSignature) Reset() { *x = EthereumMessageSignature{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_ethereum_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_messages_ethereum_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EthereumMessageSignature) String() string { @@ -610,8 +796,8 @@ func (x *EthereumMessageSignature) String() string { func (*EthereumMessageSignature) ProtoMessage() {} func (x *EthereumMessageSignature) ProtoReflect() protoreflect.Message { - mi := &file_messages_ethereum_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_messages_ethereum_proto_msgTypes[9] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -623,14 +809,7 @@ func (x *EthereumMessageSignature) ProtoReflect() protoreflect.Message { // Deprecated: Use EthereumMessageSignature.ProtoReflect.Descriptor instead. func (*EthereumMessageSignature) Descriptor() ([]byte, []int) { - return file_messages_ethereum_proto_rawDescGZIP(), []int{8} -} - -func (x *EthereumMessageSignature) GetAddressBin() []byte { - if x != nil { - return x.AddressBin - } - return nil + return file_messages_ethereum_proto_rawDescGZIP(), []int{9} } func (x *EthereumMessageSignature) GetSignature() []byte { @@ -640,9 +819,9 @@ func (x *EthereumMessageSignature) GetSignature() []byte { return nil } -func (x *EthereumMessageSignature) GetAddressHex() string { - if x != nil && x.AddressHex != nil { - return *x.AddressHex +func (x *EthereumMessageSignature) GetAddress() string { + if x != nil && x.Address != nil { + return *x.Address } return "" } @@ -653,23 +832,20 @@ func (x *EthereumMessageSignature) GetAddressHex() string { // @next Success // @next Failure type EthereumVerifyMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Signature []byte `protobuf:"bytes,2,req,name=signature" json:"signature,omitempty"` // signature to verify + Message []byte `protobuf:"bytes,3,req,name=message" json:"message,omitempty"` // message to verify + Address *string `protobuf:"bytes,4,req,name=address" json:"address,omitempty"` // address to verify + Chunkify *bool `protobuf:"varint,5,opt,name=chunkify" json:"chunkify,omitempty"` // display the address in chunks of 4 characters unknownFields protoimpl.UnknownFields - - AddressBin []byte `protobuf:"bytes,1,opt,name=addressBin" json:"addressBin,omitempty"` // address to verify (20 bytes, legacy firmware) - Signature []byte `protobuf:"bytes,2,opt,name=signature" json:"signature,omitempty"` // signature to verify - Message []byte `protobuf:"bytes,3,opt,name=message" json:"message,omitempty"` // message to verify - AddressHex *string `protobuf:"bytes,4,opt,name=addressHex" json:"addressHex,omitempty"` // address to verify (hex string, newer firmware) + sizeCache protoimpl.SizeCache } func (x *EthereumVerifyMessage) Reset() { *x = EthereumVerifyMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_ethereum_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_messages_ethereum_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EthereumVerifyMessage) String() string { @@ -679,8 +855,8 @@ func (x *EthereumVerifyMessage) String() string { func (*EthereumVerifyMessage) ProtoMessage() {} func (x *EthereumVerifyMessage) ProtoReflect() protoreflect.Message { - mi := &file_messages_ethereum_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_messages_ethereum_proto_msgTypes[10] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -692,165 +868,406 @@ func (x *EthereumVerifyMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use EthereumVerifyMessage.ProtoReflect.Descriptor instead. func (*EthereumVerifyMessage) Descriptor() ([]byte, []int) { - return file_messages_ethereum_proto_rawDescGZIP(), []int{9} + return file_messages_ethereum_proto_rawDescGZIP(), []int{10} } -func (x *EthereumVerifyMessage) GetAddressBin() []byte { +func (x *EthereumVerifyMessage) GetSignature() []byte { if x != nil { - return x.AddressBin + return x.Signature } return nil } -func (x *EthereumVerifyMessage) GetSignature() []byte { +func (x *EthereumVerifyMessage) GetMessage() []byte { + if x != nil { + return x.Message + } + return nil +} + +func (x *EthereumVerifyMessage) GetAddress() string { + if x != nil && x.Address != nil { + return *x.Address + } + return "" +} + +func (x *EthereumVerifyMessage) GetChunkify() bool { + if x != nil && x.Chunkify != nil { + return *x.Chunkify + } + return false +} + +// * +// Request: Ask device to sign hash of typed data +// @start +// @next EthereumTypedDataSignature +// @next Failure +type EthereumSignTypedHash struct { + state protoimpl.MessageState `protogen:"open.v1"` + AddressN []uint32 `protobuf:"varint,1,rep,name=address_n,json=addressN" json:"address_n,omitempty"` // BIP-32 path to derive the key from master node + DomainSeparatorHash []byte `protobuf:"bytes,2,req,name=domain_separator_hash,json=domainSeparatorHash" json:"domain_separator_hash,omitempty"` // Hash of domainSeparator of typed data to be signed + MessageHash []byte `protobuf:"bytes,3,opt,name=message_hash,json=messageHash" json:"message_hash,omitempty"` // Hash of the data of typed data to be signed (empty if domain-only data) + EncodedNetwork []byte `protobuf:"bytes,4,opt,name=encoded_network,json=encodedNetwork" json:"encoded_network,omitempty"` // encoded Ethereum network, see external-definitions.md for details + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EthereumSignTypedHash) Reset() { + *x = EthereumSignTypedHash{} + mi := &file_messages_ethereum_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EthereumSignTypedHash) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EthereumSignTypedHash) ProtoMessage() {} + +func (x *EthereumSignTypedHash) ProtoReflect() protoreflect.Message { + mi := &file_messages_ethereum_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EthereumSignTypedHash.ProtoReflect.Descriptor instead. +func (*EthereumSignTypedHash) Descriptor() ([]byte, []int) { + return file_messages_ethereum_proto_rawDescGZIP(), []int{11} +} + +func (x *EthereumSignTypedHash) GetAddressN() []uint32 { + if x != nil { + return x.AddressN + } + return nil +} + +func (x *EthereumSignTypedHash) GetDomainSeparatorHash() []byte { + if x != nil { + return x.DomainSeparatorHash + } + return nil +} + +func (x *EthereumSignTypedHash) GetMessageHash() []byte { + if x != nil { + return x.MessageHash + } + return nil +} + +func (x *EthereumSignTypedHash) GetEncodedNetwork() []byte { + if x != nil { + return x.EncodedNetwork + } + return nil +} + +// * +// Response: Signed typed data +// @end +type EthereumTypedDataSignature struct { + state protoimpl.MessageState `protogen:"open.v1"` + Signature []byte `protobuf:"bytes,1,req,name=signature" json:"signature,omitempty"` // signature of the typed data + Address *string `protobuf:"bytes,2,req,name=address" json:"address,omitempty"` // address used to sign the typed data + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EthereumTypedDataSignature) Reset() { + *x = EthereumTypedDataSignature{} + mi := &file_messages_ethereum_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EthereumTypedDataSignature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EthereumTypedDataSignature) ProtoMessage() {} + +func (x *EthereumTypedDataSignature) ProtoReflect() protoreflect.Message { + mi := &file_messages_ethereum_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EthereumTypedDataSignature.ProtoReflect.Descriptor instead. +func (*EthereumTypedDataSignature) Descriptor() ([]byte, []int) { + return file_messages_ethereum_proto_rawDescGZIP(), []int{12} +} + +func (x *EthereumTypedDataSignature) GetSignature() []byte { if x != nil { return x.Signature } return nil } -func (x *EthereumVerifyMessage) GetMessage() []byte { +func (x *EthereumTypedDataSignature) GetAddress() string { + if x != nil && x.Address != nil { + return *x.Address + } + return "" +} + +// * +// Contains an encoded network and/or token definition. See external-definitions.md for details. +// @embed +type EthereumDefinitions struct { + state protoimpl.MessageState `protogen:"open.v1"` + EncodedNetwork []byte `protobuf:"bytes,1,opt,name=encoded_network,json=encodedNetwork" json:"encoded_network,omitempty"` // encoded ethereum network + EncodedToken []byte `protobuf:"bytes,2,opt,name=encoded_token,json=encodedToken" json:"encoded_token,omitempty"` // encoded ethereum token + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EthereumDefinitions) Reset() { + *x = EthereumDefinitions{} + mi := &file_messages_ethereum_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EthereumDefinitions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EthereumDefinitions) ProtoMessage() {} + +func (x *EthereumDefinitions) ProtoReflect() protoreflect.Message { + mi := &file_messages_ethereum_proto_msgTypes[13] if x != nil { - return x.Message + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EthereumDefinitions.ProtoReflect.Descriptor instead. +func (*EthereumDefinitions) Descriptor() ([]byte, []int) { + return file_messages_ethereum_proto_rawDescGZIP(), []int{13} +} + +func (x *EthereumDefinitions) GetEncodedNetwork() []byte { + if x != nil { + return x.EncodedNetwork } return nil } -func (x *EthereumVerifyMessage) GetAddressHex() string { - if x != nil && x.AddressHex != nil { - return *x.AddressHex +func (x *EthereumDefinitions) GetEncodedToken() []byte { + if x != nil { + return x.EncodedToken + } + return nil +} + +type EthereumSignTxEIP1559_EthereumAccessList struct { + state protoimpl.MessageState `protogen:"open.v1"` + Address *string `protobuf:"bytes,1,req,name=address" json:"address,omitempty"` + StorageKeys [][]byte `protobuf:"bytes,2,rep,name=storage_keys,json=storageKeys" json:"storage_keys,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EthereumSignTxEIP1559_EthereumAccessList) Reset() { + *x = EthereumSignTxEIP1559_EthereumAccessList{} + mi := &file_messages_ethereum_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EthereumSignTxEIP1559_EthereumAccessList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EthereumSignTxEIP1559_EthereumAccessList) ProtoMessage() {} + +func (x *EthereumSignTxEIP1559_EthereumAccessList) ProtoReflect() protoreflect.Message { + mi := &file_messages_ethereum_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EthereumSignTxEIP1559_EthereumAccessList.ProtoReflect.Descriptor instead. +func (*EthereumSignTxEIP1559_EthereumAccessList) Descriptor() ([]byte, []int) { + return file_messages_ethereum_proto_rawDescGZIP(), []int{5, 0} +} + +func (x *EthereumSignTxEIP1559_EthereumAccessList) GetAddress() string { + if x != nil && x.Address != nil { + return *x.Address } return "" } +func (x *EthereumSignTxEIP1559_EthereumAccessList) GetStorageKeys() [][]byte { + if x != nil { + return x.StorageKeys + } + return nil +} + var File_messages_ethereum_proto protoreflect.FileDescriptor -var file_messages_ethereum_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2d, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x68, 0x77, 0x2e, 0x74, 0x72, - 0x65, 0x7a, 0x6f, 0x72, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x1a, 0x15, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, - 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x56, 0x0a, - 0x14, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x5f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x08, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x4e, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x6c, - 0x61, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x73, 0x68, 0x6f, 0x77, 0x44, 0x69, - 0x73, 0x70, 0x6c, 0x61, 0x79, 0x22, 0x62, 0x0a, 0x11, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x04, 0x6e, 0x6f, - 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x68, 0x77, 0x2e, 0x74, 0x72, - 0x65, 0x7a, 0x6f, 0x72, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x48, 0x44, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x78, 0x70, 0x75, 0x62, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x78, 0x70, 0x75, 0x62, 0x22, 0x54, 0x0a, 0x12, 0x45, 0x74, 0x68, - 0x65, 0x72, 0x65, 0x75, 0x6d, 0x47, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x1b, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x6e, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0d, 0x52, 0x08, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4e, 0x12, 0x21, 0x0a, 0x0c, - 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0b, 0x73, 0x68, 0x6f, 0x77, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x22, - 0x51, 0x0a, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x69, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, - 0x69, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x65, 0x78, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, - 0x65, 0x78, 0x22, 0xc2, 0x02, 0x0a, 0x0e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x53, - 0x69, 0x67, 0x6e, 0x54, 0x78, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x5f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x08, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x4e, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, - 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x67, 0x61, 0x73, - 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x42, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x05, 0x74, 0x6f, 0x42, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x48, 0x65, - 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x48, 0x65, 0x78, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x10, 0x64, 0x61, 0x74, 0x61, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x43, 0x68, 0x75, - 0x6e, 0x6b, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x4c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x17, - 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x06, 0x74, 0x78, 0x54, 0x79, 0x70, 0x65, 0x22, 0x97, 0x01, 0x0a, 0x11, 0x45, 0x74, 0x68, 0x65, - 0x72, 0x65, 0x75, 0x6d, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, - 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1f, - 0x0a, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x76, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x56, 0x12, - 0x1f, 0x0a, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, - 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x53, 0x22, 0x2e, 0x0a, 0x0d, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x54, 0x78, 0x41, - 0x63, 0x6b, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, 0x43, 0x68, 0x75, 0x6e, - 0x6b, 0x22, 0x4c, 0x0a, 0x13, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x53, 0x69, 0x67, - 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x5f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x08, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x4e, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, - 0x78, 0x0a, 0x18, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x0a, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x69, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x48, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x65, 0x78, 0x22, 0x8f, 0x01, 0x0a, 0x15, 0x45, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x69, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x42, 0x69, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x65, 0x78, 0x42, 0x77, 0x0a, 0x23, 0x63, - 0x6f, 0x6d, 0x2e, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x6c, 0x61, 0x62, 0x73, 0x2e, 0x74, - 0x72, 0x65, 0x7a, 0x6f, 0x72, 0x2e, 0x6c, 0x69, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x42, 0x15, 0x54, 0x72, 0x65, 0x7a, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2f, 0x67, - 0x6f, 0x2d, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x62, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2f, 0x74, 0x72, - 0x65, 0x7a, 0x6f, 0x72, -} +const file_messages_ethereum_proto_rawDesc = "" + + "\n" + + "\x17messages-ethereum.proto\x12\x1bhw.trezor.messages.ethereum\x1a\x15messages-common.proto\"V\n" + + "\x14EthereumGetPublicKey\x12\x1b\n" + + "\taddress_n\x18\x01 \x03(\rR\baddressN\x12!\n" + + "\fshow_display\x18\x02 \x01(\bR\vshowDisplay\"b\n" + + "\x11EthereumPublicKey\x129\n" + + "\x04node\x18\x01 \x02(\v2%.hw.trezor.messages.common.HDNodeTypeR\x04node\x12\x12\n" + + "\x04xpub\x18\x02 \x02(\tR\x04xpub\"\x99\x01\n" + + "\x12EthereumGetAddress\x12\x1b\n" + + "\taddress_n\x18\x01 \x03(\rR\baddressN\x12!\n" + + "\fshow_display\x18\x02 \x01(\bR\vshowDisplay\x12'\n" + + "\x0fencoded_network\x18\x03 \x01(\fR\x0eencodedNetwork\x12\x1a\n" + + "\bchunkify\x18\x04 \x01(\bR\bchunkify\"Q\n" + + "\x0fEthereumAddress\x12$\n" + + "\f_old_address\x18\x01 \x01(\fB\x02\x18\x01R\n" + + "OldAddress\x12\x18\n" + + "\aaddress\x18\x02 \x01(\tR\aaddress\"\xa1\x03\n" + + "\x0eEthereumSignTx\x12\x1b\n" + + "\taddress_n\x18\x01 \x03(\rR\baddressN\x12\x16\n" + + "\x05nonce\x18\x02 \x01(\f:\x00R\x05nonce\x12\x1b\n" + + "\tgas_price\x18\x03 \x02(\fR\bgasPrice\x12\x1b\n" + + "\tgas_limit\x18\x04 \x02(\fR\bgasLimit\x12\x10\n" + + "\x02to\x18\v \x01(\t:\x00R\x02to\x12\x16\n" + + "\x05value\x18\x06 \x01(\f:\x00R\x05value\x12.\n" + + "\x12data_initial_chunk\x18\a \x01(\f:\x00R\x10dataInitialChunk\x12\"\n" + + "\vdata_length\x18\b \x01(\r:\x010R\n" + + "dataLength\x12\x19\n" + + "\bchain_id\x18\t \x02(\x04R\achainId\x12\x17\n" + + "\atx_type\x18\n" + + " \x01(\rR\x06txType\x12R\n" + + "\vdefinitions\x18\f \x01(\v20.hw.trezor.messages.ethereum.EthereumDefinitionsR\vdefinitions\x12\x1a\n" + + "\bchunkify\x18\r \x01(\bR\bchunkify\"\xf0\x04\n" + + "\x15EthereumSignTxEIP1559\x12\x1b\n" + + "\taddress_n\x18\x01 \x03(\rR\baddressN\x12\x14\n" + + "\x05nonce\x18\x02 \x02(\fR\x05nonce\x12\x1e\n" + + "\vmax_gas_fee\x18\x03 \x02(\fR\tmaxGasFee\x12(\n" + + "\x10max_priority_fee\x18\x04 \x02(\fR\x0emaxPriorityFee\x12\x1b\n" + + "\tgas_limit\x18\x05 \x02(\fR\bgasLimit\x12\x10\n" + + "\x02to\x18\x06 \x01(\t:\x00R\x02to\x12\x14\n" + + "\x05value\x18\a \x02(\fR\x05value\x12.\n" + + "\x12data_initial_chunk\x18\b \x01(\f:\x00R\x10dataInitialChunk\x12\x1f\n" + + "\vdata_length\x18\t \x02(\rR\n" + + "dataLength\x12\x19\n" + + "\bchain_id\x18\n" + + " \x02(\x04R\achainId\x12f\n" + + "\vaccess_list\x18\v \x03(\v2E.hw.trezor.messages.ethereum.EthereumSignTxEIP1559.EthereumAccessListR\n" + + "accessList\x12R\n" + + "\vdefinitions\x18\f \x01(\v20.hw.trezor.messages.ethereum.EthereumDefinitionsR\vdefinitions\x12\x1a\n" + + "\bchunkify\x18\r \x01(\bR\bchunkify\x1aQ\n" + + "\x12EthereumAccessList\x12\x18\n" + + "\aaddress\x18\x01 \x02(\tR\aaddress\x12!\n" + + "\fstorage_keys\x18\x02 \x03(\fR\vstorageKeys\"\x97\x01\n" + + "\x11EthereumTxRequest\x12\x1f\n" + + "\vdata_length\x18\x01 \x01(\rR\n" + + "dataLength\x12\x1f\n" + + "\vsignature_v\x18\x02 \x01(\rR\n" + + "signatureV\x12\x1f\n" + + "\vsignature_r\x18\x03 \x01(\fR\n" + + "signatureR\x12\x1f\n" + + "\vsignature_s\x18\x04 \x01(\fR\n" + + "signatureS\".\n" + + "\rEthereumTxAck\x12\x1d\n" + + "\n" + + "data_chunk\x18\x01 \x02(\fR\tdataChunk\"\x91\x01\n" + + "\x13EthereumSignMessage\x12\x1b\n" + + "\taddress_n\x18\x01 \x03(\rR\baddressN\x12\x18\n" + + "\amessage\x18\x02 \x02(\fR\amessage\x12'\n" + + "\x0fencoded_network\x18\x03 \x01(\fR\x0eencodedNetwork\x12\x1a\n" + + "\bchunkify\x18\x04 \x01(\bR\bchunkify\"R\n" + + "\x18EthereumMessageSignature\x12\x1c\n" + + "\tsignature\x18\x02 \x02(\fR\tsignature\x12\x18\n" + + "\aaddress\x18\x03 \x02(\tR\aaddress\"\x85\x01\n" + + "\x15EthereumVerifyMessage\x12\x1c\n" + + "\tsignature\x18\x02 \x02(\fR\tsignature\x12\x18\n" + + "\amessage\x18\x03 \x02(\fR\amessage\x12\x18\n" + + "\aaddress\x18\x04 \x02(\tR\aaddress\x12\x1a\n" + + "\bchunkify\x18\x05 \x01(\bR\bchunkify\"\xb4\x01\n" + + "\x15EthereumSignTypedHash\x12\x1b\n" + + "\taddress_n\x18\x01 \x03(\rR\baddressN\x122\n" + + "\x15domain_separator_hash\x18\x02 \x02(\fR\x13domainSeparatorHash\x12!\n" + + "\fmessage_hash\x18\x03 \x01(\fR\vmessageHash\x12'\n" + + "\x0fencoded_network\x18\x04 \x01(\fR\x0eencodedNetwork\"T\n" + + "\x1aEthereumTypedDataSignature\x12\x1c\n" + + "\tsignature\x18\x01 \x02(\fR\tsignature\x12\x18\n" + + "\aaddress\x18\x02 \x02(\tR\aaddress\"c\n" + + "\x13EthereumDefinitions\x12'\n" + + "\x0fencoded_network\x18\x01 \x01(\fR\x0eencodedNetwork\x12#\n" + + "\rencoded_token\x18\x02 \x01(\fR\fencodedTokenBw\n" + + "#com.satoshilabs.trezor.lib.protobufB\x15TrezorMessageEthereumZ9github.com/ethereum/go-ethereum/accounts/usbwallet/trezor" var ( file_messages_ethereum_proto_rawDescOnce sync.Once - file_messages_ethereum_proto_rawDescData = file_messages_ethereum_proto_rawDesc + file_messages_ethereum_proto_rawDescData []byte ) func file_messages_ethereum_proto_rawDescGZIP() []byte { file_messages_ethereum_proto_rawDescOnce.Do(func() { - file_messages_ethereum_proto_rawDescData = protoimpl.X.CompressGZIP(file_messages_ethereum_proto_rawDescData) + file_messages_ethereum_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_messages_ethereum_proto_rawDesc), len(file_messages_ethereum_proto_rawDesc))) }) return file_messages_ethereum_proto_rawDescData } -var file_messages_ethereum_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_messages_ethereum_proto_msgTypes = make([]protoimpl.MessageInfo, 15) var file_messages_ethereum_proto_goTypes = []any{ - (*EthereumGetPublicKey)(nil), // 0: hw.trezor.messages.ethereum.EthereumGetPublicKey - (*EthereumPublicKey)(nil), // 1: hw.trezor.messages.ethereum.EthereumPublicKey - (*EthereumGetAddress)(nil), // 2: hw.trezor.messages.ethereum.EthereumGetAddress - (*EthereumAddress)(nil), // 3: hw.trezor.messages.ethereum.EthereumAddress - (*EthereumSignTx)(nil), // 4: hw.trezor.messages.ethereum.EthereumSignTx - (*EthereumTxRequest)(nil), // 5: hw.trezor.messages.ethereum.EthereumTxRequest - (*EthereumTxAck)(nil), // 6: hw.trezor.messages.ethereum.EthereumTxAck - (*EthereumSignMessage)(nil), // 7: hw.trezor.messages.ethereum.EthereumSignMessage - (*EthereumMessageSignature)(nil), // 8: hw.trezor.messages.ethereum.EthereumMessageSignature - (*EthereumVerifyMessage)(nil), // 9: hw.trezor.messages.ethereum.EthereumVerifyMessage - (*HDNodeType)(nil), // 10: hw.trezor.messages.common.HDNodeType + (*EthereumGetPublicKey)(nil), // 0: hw.trezor.messages.ethereum.EthereumGetPublicKey + (*EthereumPublicKey)(nil), // 1: hw.trezor.messages.ethereum.EthereumPublicKey + (*EthereumGetAddress)(nil), // 2: hw.trezor.messages.ethereum.EthereumGetAddress + (*EthereumAddress)(nil), // 3: hw.trezor.messages.ethereum.EthereumAddress + (*EthereumSignTx)(nil), // 4: hw.trezor.messages.ethereum.EthereumSignTx + (*EthereumSignTxEIP1559)(nil), // 5: hw.trezor.messages.ethereum.EthereumSignTxEIP1559 + (*EthereumTxRequest)(nil), // 6: hw.trezor.messages.ethereum.EthereumTxRequest + (*EthereumTxAck)(nil), // 7: hw.trezor.messages.ethereum.EthereumTxAck + (*EthereumSignMessage)(nil), // 8: hw.trezor.messages.ethereum.EthereumSignMessage + (*EthereumMessageSignature)(nil), // 9: hw.trezor.messages.ethereum.EthereumMessageSignature + (*EthereumVerifyMessage)(nil), // 10: hw.trezor.messages.ethereum.EthereumVerifyMessage + (*EthereumSignTypedHash)(nil), // 11: hw.trezor.messages.ethereum.EthereumSignTypedHash + (*EthereumTypedDataSignature)(nil), // 12: hw.trezor.messages.ethereum.EthereumTypedDataSignature + (*EthereumDefinitions)(nil), // 13: hw.trezor.messages.ethereum.EthereumDefinitions + (*EthereumSignTxEIP1559_EthereumAccessList)(nil), // 14: hw.trezor.messages.ethereum.EthereumSignTxEIP1559.EthereumAccessList + (*HDNodeType)(nil), // 15: hw.trezor.messages.common.HDNodeType } var file_messages_ethereum_proto_depIdxs = []int32{ - 10, // 0: hw.trezor.messages.ethereum.EthereumPublicKey.node:type_name -> hw.trezor.messages.common.HDNodeType - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 15, // 0: hw.trezor.messages.ethereum.EthereumPublicKey.node:type_name -> hw.trezor.messages.common.HDNodeType + 13, // 1: hw.trezor.messages.ethereum.EthereumSignTx.definitions:type_name -> hw.trezor.messages.ethereum.EthereumDefinitions + 14, // 2: hw.trezor.messages.ethereum.EthereumSignTxEIP1559.access_list:type_name -> hw.trezor.messages.ethereum.EthereumSignTxEIP1559.EthereumAccessList + 13, // 3: hw.trezor.messages.ethereum.EthereumSignTxEIP1559.definitions:type_name -> hw.trezor.messages.ethereum.EthereumDefinitions + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_messages_ethereum_proto_init() } @@ -859,135 +1276,13 @@ func file_messages_ethereum_proto_init() { return } file_messages_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_messages_ethereum_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EthereumGetPublicKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_ethereum_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EthereumPublicKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_ethereum_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*EthereumGetAddress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_ethereum_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*EthereumAddress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_ethereum_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*EthereumSignTx); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_ethereum_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*EthereumTxRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_ethereum_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*EthereumTxAck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_ethereum_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*EthereumSignMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_ethereum_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*EthereumMessageSignature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_ethereum_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*EthereumVerifyMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_messages_ethereum_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_messages_ethereum_proto_rawDesc), len(file_messages_ethereum_proto_rawDesc)), NumEnums: 0, - NumMessages: 10, + NumMessages: 15, NumExtensions: 0, NumServices: 0, }, @@ -996,7 +1291,6 @@ func file_messages_ethereum_proto_init() { MessageInfos: file_messages_ethereum_proto_msgTypes, }.Build() File_messages_ethereum_proto = out.File - file_messages_ethereum_proto_rawDesc = nil file_messages_ethereum_proto_goTypes = nil file_messages_ethereum_proto_depIdxs = nil } diff --git a/accounts/usbwallet/trezor/messages-ethereum.proto b/accounts/usbwallet/trezor/messages-ethereum.proto index 8e1150abb6b..cb033a8dc3d 100644 --- a/accounts/usbwallet/trezor/messages-ethereum.proto +++ b/accounts/usbwallet/trezor/messages-ethereum.proto @@ -1,6 +1,6 @@ // This file originates from the SatoshiLabs Trezor `common` repository at: // https://github.com/trezor/trezor-common/blob/master/protob/messages-ethereum.proto -// dated 28.05.2019, commit 893fd219d4a01bcffa0cd9cfa631856371ec5aa9. +// dated 30.06.2025, commit 421b45d4677f2499234692b0f54010bc45b3ae5f. syntax = "proto2"; package hw.trezor.messages.ethereum; @@ -13,7 +13,6 @@ option java_outer_classname = "TrezorMessageEthereum"; import "messages-common.proto"; - /** * Request: Ask device for public key corresponding to address_n path * @start @@ -21,8 +20,8 @@ import "messages-common.proto"; * @next Failure */ message EthereumGetPublicKey { - repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node - optional bool show_display = 2; // optionally show on display before sending the result + repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node + optional bool show_display = 2; // optionally show on display before sending the result } /** @@ -30,8 +29,8 @@ message EthereumGetPublicKey { * @end */ message EthereumPublicKey { - optional hw.trezor.messages.common.HDNodeType node = 1; // BIP32 public node - optional string xpub = 2; // serialized form of public node + required hw.trezor.messages.common.HDNodeType node = 1; // BIP32 public node + required string xpub = 2; // serialized form of public node } /** @@ -41,8 +40,10 @@ message EthereumPublicKey { * @next Failure */ message EthereumGetAddress { - repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node - optional bool show_display = 2; // optionally show on display before sending the result + repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node + optional bool show_display = 2; // optionally show on display before sending the result + optional bytes encoded_network = 3; // encoded Ethereum network, see external-definitions.md for details + optional bool chunkify = 4; // display the address in chunks of 4 characters } /** @@ -50,30 +51,60 @@ message EthereumGetAddress { * @end */ message EthereumAddress { - optional bytes addressBin = 1; // Ethereum address as 20 bytes (legacy firmwares) - optional string addressHex = 2; // Ethereum address as hex string (newer firmwares) + optional bytes _old_address = 1 [deprecated=true]; // trezor <1.8.0, <2.1.0 - raw bytes of Ethereum address + optional string address = 2; // Ethereum address as hex-encoded string } /** * Request: Ask device to sign transaction - * All fields are optional from the protocol's point of view. Each field defaults to value `0` if missing. + * gas_price, gas_limit and chain_id must be provided and non-zero. + * All other fields are optional and default to value `0` if missing. * Note: the first at most 1024 bytes of data MUST be transmitted as part of this message. * @start * @next EthereumTxRequest * @next Failure */ message EthereumSignTx { - repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node - optional bytes nonce = 2; // <=256 bit unsigned big endian - optional bytes gas_price = 3; // <=256 bit unsigned big endian (in wei) - optional bytes gas_limit = 4; // <=256 bit unsigned big endian - optional bytes toBin = 5; // recipient address (20 bytes, legacy firmware) - optional string toHex = 11; // recipient address (hex string, newer firmware) - optional bytes value = 6; // <=256 bit unsigned big endian (in wei) - optional bytes data_initial_chunk = 7; // The initial data chunk (<= 1024 bytes) - optional uint32 data_length = 8; // Length of transaction payload - optional uint32 chain_id = 9; // Chain Id for EIP 155 - optional uint32 tx_type = 10; // (only for Wanchain) + repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node + optional bytes nonce = 2 [default='']; // <=256 bit unsigned big endian + required bytes gas_price = 3; // <=256 bit unsigned big endian (in wei) + required bytes gas_limit = 4; // <=256 bit unsigned big endian + optional string to = 11 [default='']; // recipient address + optional bytes value = 6 [default='']; // <=256 bit unsigned big endian (in wei) + optional bytes data_initial_chunk = 7 [default='']; // The initial data chunk (<= 1024 bytes) + optional uint32 data_length = 8 [default=0]; // Length of transaction payload + required uint64 chain_id = 9; // Chain Id for EIP 155 + optional uint32 tx_type = 10; // Used for Wanchain + optional EthereumDefinitions definitions = 12; // network and/or token definitions for tx + optional bool chunkify = 13; // display the address in chunks of 4 characters +} + +/** + * Request: Ask device to sign EIP1559 transaction + * Note: the first at most 1024 bytes of data MUST be transmitted as part of this message. + * @start + * @next EthereumTxRequest + * @next Failure + */ +message EthereumSignTxEIP1559 { + repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node + required bytes nonce = 2; // <=256 bit unsigned big endian + required bytes max_gas_fee = 3; // <=256 bit unsigned big endian (in wei) + required bytes max_priority_fee = 4; // <=256 bit unsigned big endian (in wei) + required bytes gas_limit = 5; // <=256 bit unsigned big endian + optional string to = 6 [default='']; // recipient address + required bytes value = 7; // <=256 bit unsigned big endian (in wei) + optional bytes data_initial_chunk = 8 [default='']; // The initial data chunk (<= 1024 bytes) + required uint32 data_length = 9; // Length of transaction payload + required uint64 chain_id = 10; // Chain Id for EIP 155 + repeated EthereumAccessList access_list = 11; // Access List + optional EthereumDefinitions definitions = 12; // network and/or token definitions for tx + optional bool chunkify = 13; // display the address in chunks of 4 characters + + message EthereumAccessList { + required string address = 1; + repeated bytes storage_keys = 2; + } } /** @@ -84,10 +115,10 @@ message EthereumSignTx { * @next EthereumTxAck */ message EthereumTxRequest { - optional uint32 data_length = 1; // Number of bytes being requested (<= 1024) - optional uint32 signature_v = 2; // Computed signature (recovery parameter, limited to 27 or 28) - optional bytes signature_r = 3; // Computed signature R component (256 bit) - optional bytes signature_s = 4; // Computed signature S component (256 bit) + optional uint32 data_length = 1; // Number of bytes being requested (<= 1024) + optional uint32 signature_v = 2; // Computed signature (recovery parameter, limited to 27 or 28) + optional bytes signature_r = 3; // Computed signature R component (256 bit) + optional bytes signature_s = 4; // Computed signature S component (256 bit) } /** @@ -95,7 +126,7 @@ message EthereumTxRequest { * @next EthereumTxRequest */ message EthereumTxAck { - optional bytes data_chunk = 1; // Bytes from transaction payload (<= 1024 bytes) + required bytes data_chunk = 1; // Bytes from transaction payload (<= 1024 bytes) } /** @@ -105,8 +136,10 @@ message EthereumTxAck { * @next Failure */ message EthereumSignMessage { - repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node - optional bytes message = 2; // message to be signed + repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node + required bytes message = 2; // message to be signed + optional bytes encoded_network = 3; // encoded Ethereum network, see external-definitions.md for details + optional bool chunkify = 4; // display the address in chunks of 4 characters } /** @@ -114,9 +147,8 @@ message EthereumSignMessage { * @end */ message EthereumMessageSignature { - optional bytes addressBin = 1; // address used to sign the message (20 bytes, legacy firmware) - optional bytes signature = 2; // signature of the message - optional string addressHex = 3; // address used to sign the message (hex string, newer firmware) + required bytes signature = 2; // signature of the message + required string address = 3; // address used to sign the message } /** @@ -126,8 +158,39 @@ message EthereumMessageSignature { * @next Failure */ message EthereumVerifyMessage { - optional bytes addressBin = 1; // address to verify (20 bytes, legacy firmware) - optional bytes signature = 2; // signature to verify - optional bytes message = 3; // message to verify - optional string addressHex = 4; // address to verify (hex string, newer firmware) + required bytes signature = 2; // signature to verify + required bytes message = 3; // message to verify + required string address = 4; // address to verify + optional bool chunkify = 5; // display the address in chunks of 4 characters +} + +/** + * Request: Ask device to sign hash of typed data + * @start + * @next EthereumTypedDataSignature + * @next Failure + */ +message EthereumSignTypedHash { + repeated uint32 address_n = 1; // BIP-32 path to derive the key from master node + required bytes domain_separator_hash = 2; // Hash of domainSeparator of typed data to be signed + optional bytes message_hash = 3; // Hash of the data of typed data to be signed (empty if domain-only data) + optional bytes encoded_network = 4; // encoded Ethereum network, see external-definitions.md for details +} + +/** + * Response: Signed typed data + * @end + */ +message EthereumTypedDataSignature { + required bytes signature = 1; // signature of the typed data + required string address = 2; // address used to sign the typed data } + +/** + * Contains an encoded network and/or token definition. See external-definitions.md for details. + * @embed + */ +message EthereumDefinitions { + optional bytes encoded_network = 1; // encoded ethereum network + optional bytes encoded_token = 2; // encoded ethereum token +} \ No newline at end of file diff --git a/accounts/usbwallet/trezor/messages-management.pb.go b/accounts/usbwallet/trezor/messages-management.pb.go index 983e2d281df..e5573eea21a 100644 --- a/accounts/usbwallet/trezor/messages-management.pb.go +++ b/accounts/usbwallet/trezor/messages-management.pb.go @@ -1,20 +1,22 @@ // This file originates from the SatoshiLabs Trezor `common` repository at: // https://github.com/trezor/trezor-common/blob/master/protob/messages-management.proto -// dated 28.05.2019, commit 893fd219d4a01bcffa0cd9cfa631856371ec5aa9. +// dated 30.06.2025, commit 421b45d4677f2499234692b0f54010bc45b3ae5f. // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v5.27.1 +// protoc-gen-go v1.36.6 +// protoc v4.25.3 // source: messages-management.proto package trezor import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -25,472 +27,1121 @@ const ( ) // * -// Structure representing passphrase source -type ApplySettings_PassphraseSourceType int32 +// Type of the mnemonic backup given/received by the device during reset/recovery. +type BackupType int32 const ( - ApplySettings_ASK ApplySettings_PassphraseSourceType = 0 - ApplySettings_DEVICE ApplySettings_PassphraseSourceType = 1 - ApplySettings_HOST ApplySettings_PassphraseSourceType = 2 + BackupType_Bip39 BackupType = 0 // also called "Single Backup", see BIP-0039 + BackupType_Slip39_Basic BackupType = 1 // also called "Shamir Backup", see SLIP-0039 + BackupType_Slip39_Advanced BackupType = 2 // also called "Super Shamir" or "Shamir with Groups", see SLIP-0039#two-level-scheme + BackupType_Slip39_Single_Extendable BackupType = 3 // extendable single-share Shamir backup + BackupType_Slip39_Basic_Extendable BackupType = 4 // extendable multi-share Shamir backup + BackupType_Slip39_Advanced_Extendable BackupType = 5 // extendable multi-share Shamir backup with groups ) -// Enum value maps for ApplySettings_PassphraseSourceType. +// Enum value maps for BackupType. var ( - ApplySettings_PassphraseSourceType_name = map[int32]string{ - 0: "ASK", - 1: "DEVICE", - 2: "HOST", + BackupType_name = map[int32]string{ + 0: "Bip39", + 1: "Slip39_Basic", + 2: "Slip39_Advanced", + 3: "Slip39_Single_Extendable", + 4: "Slip39_Basic_Extendable", + 5: "Slip39_Advanced_Extendable", } - ApplySettings_PassphraseSourceType_value = map[string]int32{ - "ASK": 0, - "DEVICE": 1, - "HOST": 2, + BackupType_value = map[string]int32{ + "Bip39": 0, + "Slip39_Basic": 1, + "Slip39_Advanced": 2, + "Slip39_Single_Extendable": 3, + "Slip39_Basic_Extendable": 4, + "Slip39_Advanced_Extendable": 5, } ) -func (x ApplySettings_PassphraseSourceType) Enum() *ApplySettings_PassphraseSourceType { - p := new(ApplySettings_PassphraseSourceType) +func (x BackupType) Enum() *BackupType { + p := new(BackupType) *p = x return p } -func (x ApplySettings_PassphraseSourceType) String() string { +func (x BackupType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (ApplySettings_PassphraseSourceType) Descriptor() protoreflect.EnumDescriptor { +func (BackupType) Descriptor() protoreflect.EnumDescriptor { return file_messages_management_proto_enumTypes[0].Descriptor() } -func (ApplySettings_PassphraseSourceType) Type() protoreflect.EnumType { +func (BackupType) Type() protoreflect.EnumType { return &file_messages_management_proto_enumTypes[0] } -func (x ApplySettings_PassphraseSourceType) Number() protoreflect.EnumNumber { +func (x BackupType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. -func (x *ApplySettings_PassphraseSourceType) UnmarshalJSON(b []byte) error { +func (x *BackupType) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = ApplySettings_PassphraseSourceType(num) + *x = BackupType(num) return nil } -// Deprecated: Use ApplySettings_PassphraseSourceType.Descriptor instead. -func (ApplySettings_PassphraseSourceType) EnumDescriptor() ([]byte, []int) { - return file_messages_management_proto_rawDescGZIP(), []int{4, 0} +// Deprecated: Use BackupType.Descriptor instead. +func (BackupType) EnumDescriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{0} } // * -// Type of recovery procedure. These should be used as bitmask, e.g., -// `RecoveryDeviceType_ScrambledWords | RecoveryDeviceType_Matrix` -// listing every method supported by the host computer. -// -// Note that ScrambledWords must be supported by every implementation -// for backward compatibility; there is no way to not support it. -type RecoveryDevice_RecoveryDeviceType int32 +// Level of safety checks for unsafe actions like spending from invalid path namespace or setting high transaction fee. +type SafetyCheckLevel int32 const ( - // use powers of two when extending this field - RecoveryDevice_RecoveryDeviceType_ScrambledWords RecoveryDevice_RecoveryDeviceType = 0 // words in scrambled order - RecoveryDevice_RecoveryDeviceType_Matrix RecoveryDevice_RecoveryDeviceType = 1 // matrix recovery type + SafetyCheckLevel_Strict SafetyCheckLevel = 0 // disallow unsafe actions, this is the default + SafetyCheckLevel_PromptAlways SafetyCheckLevel = 1 // ask user before unsafe action + SafetyCheckLevel_PromptTemporarily SafetyCheckLevel = 2 // like PromptAlways but reverts to Strict after reboot ) -// Enum value maps for RecoveryDevice_RecoveryDeviceType. +// Enum value maps for SafetyCheckLevel. var ( - RecoveryDevice_RecoveryDeviceType_name = map[int32]string{ - 0: "RecoveryDeviceType_ScrambledWords", - 1: "RecoveryDeviceType_Matrix", + SafetyCheckLevel_name = map[int32]string{ + 0: "Strict", + 1: "PromptAlways", + 2: "PromptTemporarily", } - RecoveryDevice_RecoveryDeviceType_value = map[string]int32{ - "RecoveryDeviceType_ScrambledWords": 0, - "RecoveryDeviceType_Matrix": 1, + SafetyCheckLevel_value = map[string]int32{ + "Strict": 0, + "PromptAlways": 1, + "PromptTemporarily": 2, } ) -func (x RecoveryDevice_RecoveryDeviceType) Enum() *RecoveryDevice_RecoveryDeviceType { - p := new(RecoveryDevice_RecoveryDeviceType) +func (x SafetyCheckLevel) Enum() *SafetyCheckLevel { + p := new(SafetyCheckLevel) *p = x return p } -func (x RecoveryDevice_RecoveryDeviceType) String() string { +func (x SafetyCheckLevel) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (RecoveryDevice_RecoveryDeviceType) Descriptor() protoreflect.EnumDescriptor { +func (SafetyCheckLevel) Descriptor() protoreflect.EnumDescriptor { return file_messages_management_proto_enumTypes[1].Descriptor() } -func (RecoveryDevice_RecoveryDeviceType) Type() protoreflect.EnumType { +func (SafetyCheckLevel) Type() protoreflect.EnumType { return &file_messages_management_proto_enumTypes[1] } -func (x RecoveryDevice_RecoveryDeviceType) Number() protoreflect.EnumNumber { +func (x SafetyCheckLevel) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. -func (x *RecoveryDevice_RecoveryDeviceType) UnmarshalJSON(b []byte) error { +func (x *SafetyCheckLevel) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = RecoveryDevice_RecoveryDeviceType(num) + *x = SafetyCheckLevel(num) return nil } -// Deprecated: Use RecoveryDevice_RecoveryDeviceType.Descriptor instead. -func (RecoveryDevice_RecoveryDeviceType) EnumDescriptor() ([]byte, []int) { - return file_messages_management_proto_rawDescGZIP(), []int{17, 0} +// Deprecated: Use SafetyCheckLevel.Descriptor instead. +func (SafetyCheckLevel) EnumDescriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{1} } // * -// Type of Recovery Word request -type WordRequest_WordRequestType int32 +// Allowed display rotation angles (in degrees from North) +type DisplayRotation int32 const ( - WordRequest_WordRequestType_Plain WordRequest_WordRequestType = 0 - WordRequest_WordRequestType_Matrix9 WordRequest_WordRequestType = 1 - WordRequest_WordRequestType_Matrix6 WordRequest_WordRequestType = 2 + DisplayRotation_North DisplayRotation = 0 + DisplayRotation_East DisplayRotation = 90 + DisplayRotation_South DisplayRotation = 180 + DisplayRotation_West DisplayRotation = 270 ) -// Enum value maps for WordRequest_WordRequestType. +// Enum value maps for DisplayRotation. var ( - WordRequest_WordRequestType_name = map[int32]string{ - 0: "WordRequestType_Plain", - 1: "WordRequestType_Matrix9", - 2: "WordRequestType_Matrix6", + DisplayRotation_name = map[int32]string{ + 0: "North", + 90: "East", + 180: "South", + 270: "West", } - WordRequest_WordRequestType_value = map[string]int32{ - "WordRequestType_Plain": 0, - "WordRequestType_Matrix9": 1, - "WordRequestType_Matrix6": 2, + DisplayRotation_value = map[string]int32{ + "North": 0, + "East": 90, + "South": 180, + "West": 270, } ) -func (x WordRequest_WordRequestType) Enum() *WordRequest_WordRequestType { - p := new(WordRequest_WordRequestType) +func (x DisplayRotation) Enum() *DisplayRotation { + p := new(DisplayRotation) *p = x return p } -func (x WordRequest_WordRequestType) String() string { +func (x DisplayRotation) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (WordRequest_WordRequestType) Descriptor() protoreflect.EnumDescriptor { +func (DisplayRotation) Descriptor() protoreflect.EnumDescriptor { return file_messages_management_proto_enumTypes[2].Descriptor() } -func (WordRequest_WordRequestType) Type() protoreflect.EnumType { +func (DisplayRotation) Type() protoreflect.EnumType { return &file_messages_management_proto_enumTypes[2] } -func (x WordRequest_WordRequestType) Number() protoreflect.EnumNumber { +func (x DisplayRotation) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. -func (x *WordRequest_WordRequestType) UnmarshalJSON(b []byte) error { +func (x *DisplayRotation) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = WordRequest_WordRequestType(num) + *x = DisplayRotation(num) return nil } -// Deprecated: Use WordRequest_WordRequestType.Descriptor instead. -func (WordRequest_WordRequestType) EnumDescriptor() ([]byte, []int) { - return file_messages_management_proto_rawDescGZIP(), []int{18, 0} +// Deprecated: Use DisplayRotation.Descriptor instead. +func (DisplayRotation) EnumDescriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{2} } // * -// Request: Reset device to default state and ask for device details -// @start -// @next Features -type Initialize struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +// Format of the homescreen image +type HomescreenFormat int32 - State []byte `protobuf:"bytes,1,opt,name=state" json:"state,omitempty"` // assumed device state, clear session if set and different - SkipPassphrase *bool `protobuf:"varint,2,opt,name=skip_passphrase,json=skipPassphrase" json:"skip_passphrase,omitempty"` // this session should always assume empty passphrase -} +const ( + HomescreenFormat_Toif HomescreenFormat = 1 // full-color toif + HomescreenFormat_Jpeg HomescreenFormat = 2 // jpeg + HomescreenFormat_ToiG HomescreenFormat = 3 // greyscale toif +) -func (x *Initialize) Reset() { - *x = Initialize{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_management_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +// Enum value maps for HomescreenFormat. +var ( + HomescreenFormat_name = map[int32]string{ + 1: "Toif", + 2: "Jpeg", + 3: "ToiG", + } + HomescreenFormat_value = map[string]int32{ + "Toif": 1, + "Jpeg": 2, + "ToiG": 3, } +) + +func (x HomescreenFormat) Enum() *HomescreenFormat { + p := new(HomescreenFormat) + *p = x + return p } -func (x *Initialize) String() string { - return protoimpl.X.MessageStringOf(x) +func (x HomescreenFormat) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (*Initialize) ProtoMessage() {} +func (HomescreenFormat) Descriptor() protoreflect.EnumDescriptor { + return file_messages_management_proto_enumTypes[3].Descriptor() +} -func (x *Initialize) ProtoReflect() protoreflect.Message { - mi := &file_messages_management_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) +func (HomescreenFormat) Type() protoreflect.EnumType { + return &file_messages_management_proto_enumTypes[3] } -// Deprecated: Use Initialize.ProtoReflect.Descriptor instead. -func (*Initialize) Descriptor() ([]byte, []int) { - return file_messages_management_proto_rawDescGZIP(), []int{0} +func (x HomescreenFormat) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (x *Initialize) GetState() []byte { - if x != nil { - return x.State +// Deprecated: Do not use. +func (x *HomescreenFormat) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err } + *x = HomescreenFormat(num) return nil } -func (x *Initialize) GetSkipPassphrase() bool { - if x != nil && x.SkipPassphrase != nil { - return *x.SkipPassphrase - } - return false +// Deprecated: Use HomescreenFormat.Descriptor instead. +func (HomescreenFormat) EnumDescriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{3} } -// * -// Request: Ask for device details (no device reset) -// @start -// @next Features -type GetFeatures struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} +type RecoveryType int32 -func (x *GetFeatures) Reset() { - *x = GetFeatures{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_management_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +const ( + RecoveryType_NormalRecovery RecoveryType = 0 // recovery from seedphrase on an uninitialized device + RecoveryType_DryRun RecoveryType = 1 // mnemonic validation + RecoveryType_UnlockRepeatedBackup RecoveryType = 2 // unlock SLIP-39 repeated backup +) + +// Enum value maps for RecoveryType. +var ( + RecoveryType_name = map[int32]string{ + 0: "NormalRecovery", + 1: "DryRun", + 2: "UnlockRepeatedBackup", } -} + RecoveryType_value = map[string]int32{ + "NormalRecovery": 0, + "DryRun": 1, + "UnlockRepeatedBackup": 2, + } +) -func (x *GetFeatures) String() string { - return protoimpl.X.MessageStringOf(x) +func (x RecoveryType) Enum() *RecoveryType { + p := new(RecoveryType) + *p = x + return p } -func (*GetFeatures) ProtoMessage() {} - -func (x *GetFeatures) ProtoReflect() protoreflect.Message { - mi := &file_messages_management_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) +func (x RecoveryType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -// Deprecated: Use GetFeatures.ProtoReflect.Descriptor instead. -func (*GetFeatures) Descriptor() ([]byte, []int) { - return file_messages_management_proto_rawDescGZIP(), []int{1} +func (RecoveryType) Descriptor() protoreflect.EnumDescriptor { + return file_messages_management_proto_enumTypes[4].Descriptor() } -// * -// Response: Reports various information about the device -// @end -type Features struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (RecoveryType) Type() protoreflect.EnumType { + return &file_messages_management_proto_enumTypes[4] +} - Vendor *string `protobuf:"bytes,1,opt,name=vendor" json:"vendor,omitempty"` // name of the manufacturer, e.g. "trezor.io" - MajorVersion *uint32 `protobuf:"varint,2,opt,name=major_version,json=majorVersion" json:"major_version,omitempty"` // major version of the firmware/bootloader, e.g. 1 - MinorVersion *uint32 `protobuf:"varint,3,opt,name=minor_version,json=minorVersion" json:"minor_version,omitempty"` // minor version of the firmware/bootloader, e.g. 0 - PatchVersion *uint32 `protobuf:"varint,4,opt,name=patch_version,json=patchVersion" json:"patch_version,omitempty"` // patch version of the firmware/bootloader, e.g. 0 - BootloaderMode *bool `protobuf:"varint,5,opt,name=bootloader_mode,json=bootloaderMode" json:"bootloader_mode,omitempty"` // is device in bootloader mode? - DeviceId *string `protobuf:"bytes,6,opt,name=device_id,json=deviceId" json:"device_id,omitempty"` // device's unique identifier - PinProtection *bool `protobuf:"varint,7,opt,name=pin_protection,json=pinProtection" json:"pin_protection,omitempty"` // is device protected by PIN? - PassphraseProtection *bool `protobuf:"varint,8,opt,name=passphrase_protection,json=passphraseProtection" json:"passphrase_protection,omitempty"` // is node/mnemonic encrypted using passphrase? - Language *string `protobuf:"bytes,9,opt,name=language" json:"language,omitempty"` // device language - Label *string `protobuf:"bytes,10,opt,name=label" json:"label,omitempty"` // device description label - Initialized *bool `protobuf:"varint,12,opt,name=initialized" json:"initialized,omitempty"` // does device contain seed? - Revision []byte `protobuf:"bytes,13,opt,name=revision" json:"revision,omitempty"` // SCM revision of firmware - BootloaderHash []byte `protobuf:"bytes,14,opt,name=bootloader_hash,json=bootloaderHash" json:"bootloader_hash,omitempty"` // hash of the bootloader - Imported *bool `protobuf:"varint,15,opt,name=imported" json:"imported,omitempty"` // was storage imported from an external source? - PinCached *bool `protobuf:"varint,16,opt,name=pin_cached,json=pinCached" json:"pin_cached,omitempty"` // is PIN already cached in session? - PassphraseCached *bool `protobuf:"varint,17,opt,name=passphrase_cached,json=passphraseCached" json:"passphrase_cached,omitempty"` // is passphrase already cached in session? - FirmwarePresent *bool `protobuf:"varint,18,opt,name=firmware_present,json=firmwarePresent" json:"firmware_present,omitempty"` // is valid firmware loaded? - NeedsBackup *bool `protobuf:"varint,19,opt,name=needs_backup,json=needsBackup" json:"needs_backup,omitempty"` // does storage need backup? (equals to Storage.needs_backup) - Flags *uint32 `protobuf:"varint,20,opt,name=flags" json:"flags,omitempty"` // device flags (equals to Storage.flags) - Model *string `protobuf:"bytes,21,opt,name=model" json:"model,omitempty"` // device hardware model - FwMajor *uint32 `protobuf:"varint,22,opt,name=fw_major,json=fwMajor" json:"fw_major,omitempty"` // reported firmware version if in bootloader mode - FwMinor *uint32 `protobuf:"varint,23,opt,name=fw_minor,json=fwMinor" json:"fw_minor,omitempty"` // reported firmware version if in bootloader mode - FwPatch *uint32 `protobuf:"varint,24,opt,name=fw_patch,json=fwPatch" json:"fw_patch,omitempty"` // reported firmware version if in bootloader mode - FwVendor *string `protobuf:"bytes,25,opt,name=fw_vendor,json=fwVendor" json:"fw_vendor,omitempty"` // reported firmware vendor if in bootloader mode - FwVendorKeys []byte `protobuf:"bytes,26,opt,name=fw_vendor_keys,json=fwVendorKeys" json:"fw_vendor_keys,omitempty"` // reported firmware vendor keys (their hash) - UnfinishedBackup *bool `protobuf:"varint,27,opt,name=unfinished_backup,json=unfinishedBackup" json:"unfinished_backup,omitempty"` // report unfinished backup (equals to Storage.unfinished_backup) - NoBackup *bool `protobuf:"varint,28,opt,name=no_backup,json=noBackup" json:"no_backup,omitempty"` // report no backup (equals to Storage.no_backup) +func (x RecoveryType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (x *Features) Reset() { - *x = Features{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_management_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +// Deprecated: Do not use. +func (x *RecoveryType) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err } + *x = RecoveryType(num) + return nil } -func (x *Features) String() string { - return protoimpl.X.MessageStringOf(x) +// Deprecated: Use RecoveryType.Descriptor instead. +func (RecoveryType) EnumDescriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{4} } -func (*Features) ProtoMessage() {} +type Features_BackupAvailability int32 -func (x *Features) ProtoReflect() protoreflect.Message { - mi := &file_messages_management_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +const ( + // / Device is already backed up, or a previous backup has failed. + Features_NotAvailable Features_BackupAvailability = 0 + // / Device is not backed up. Backup is required. + Features_Required Features_BackupAvailability = 1 + // / Device is already backed up and can be backed up again. + Features_Available Features_BackupAvailability = 2 +) + +// Enum value maps for Features_BackupAvailability. +var ( + Features_BackupAvailability_name = map[int32]string{ + 0: "NotAvailable", + 1: "Required", + 2: "Available", } - return mi.MessageOf(x) -} + Features_BackupAvailability_value = map[string]int32{ + "NotAvailable": 0, + "Required": 1, + "Available": 2, + } +) -// Deprecated: Use Features.ProtoReflect.Descriptor instead. -func (*Features) Descriptor() ([]byte, []int) { - return file_messages_management_proto_rawDescGZIP(), []int{2} +func (x Features_BackupAvailability) Enum() *Features_BackupAvailability { + p := new(Features_BackupAvailability) + *p = x + return p } -func (x *Features) GetVendor() string { - if x != nil && x.Vendor != nil { - return *x.Vendor - } - return "" +func (x Features_BackupAvailability) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (x *Features) GetMajorVersion() uint32 { - if x != nil && x.MajorVersion != nil { - return *x.MajorVersion - } - return 0 +func (Features_BackupAvailability) Descriptor() protoreflect.EnumDescriptor { + return file_messages_management_proto_enumTypes[5].Descriptor() } -func (x *Features) GetMinorVersion() uint32 { - if x != nil && x.MinorVersion != nil { - return *x.MinorVersion - } - return 0 +func (Features_BackupAvailability) Type() protoreflect.EnumType { + return &file_messages_management_proto_enumTypes[5] } -func (x *Features) GetPatchVersion() uint32 { - if x != nil && x.PatchVersion != nil { - return *x.PatchVersion - } - return 0 +func (x Features_BackupAvailability) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (x *Features) GetBootloaderMode() bool { - if x != nil && x.BootloaderMode != nil { - return *x.BootloaderMode +// Deprecated: Do not use. +func (x *Features_BackupAvailability) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err } - return false + *x = Features_BackupAvailability(num) + return nil } -func (x *Features) GetDeviceId() string { - if x != nil && x.DeviceId != nil { - return *x.DeviceId - } - return "" +// Deprecated: Use Features_BackupAvailability.Descriptor instead. +func (Features_BackupAvailability) EnumDescriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{2, 0} } -func (x *Features) GetPinProtection() bool { - if x != nil && x.PinProtection != nil { - return *x.PinProtection - } - return false -} +type Features_RecoveryStatus int32 -func (x *Features) GetPassphraseProtection() bool { - if x != nil && x.PassphraseProtection != nil { - return *x.PassphraseProtection +const ( + Features_Nothing Features_RecoveryStatus = 0 // we are not in recovery mode + Features_Recovery Features_RecoveryStatus = 1 // we are in "Normal" or "DryRun" recovery + Features_Backup Features_RecoveryStatus = 2 // we are in repeated backup mode +) + +// Enum value maps for Features_RecoveryStatus. +var ( + Features_RecoveryStatus_name = map[int32]string{ + 0: "Nothing", + 1: "Recovery", + 2: "Backup", } - return false + Features_RecoveryStatus_value = map[string]int32{ + "Nothing": 0, + "Recovery": 1, + "Backup": 2, + } +) + +func (x Features_RecoveryStatus) Enum() *Features_RecoveryStatus { + p := new(Features_RecoveryStatus) + *p = x + return p } -func (x *Features) GetLanguage() string { - if x != nil && x.Language != nil { - return *x.Language - } - return "" +func (x Features_RecoveryStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (x *Features) GetLabel() string { - if x != nil && x.Label != nil { - return *x.Label - } - return "" +func (Features_RecoveryStatus) Descriptor() protoreflect.EnumDescriptor { + return file_messages_management_proto_enumTypes[6].Descriptor() } -func (x *Features) GetInitialized() bool { - if x != nil && x.Initialized != nil { - return *x.Initialized - } - return false +func (Features_RecoveryStatus) Type() protoreflect.EnumType { + return &file_messages_management_proto_enumTypes[6] } -func (x *Features) GetRevision() []byte { - if x != nil { - return x.Revision - } - return nil +func (x Features_RecoveryStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (x *Features) GetBootloaderHash() []byte { - if x != nil { - return x.BootloaderHash +// Deprecated: Do not use. +func (x *Features_RecoveryStatus) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err } + *x = Features_RecoveryStatus(num) return nil } -func (x *Features) GetImported() bool { - if x != nil && x.Imported != nil { - return *x.Imported - } - return false +// Deprecated: Use Features_RecoveryStatus.Descriptor instead. +func (Features_RecoveryStatus) EnumDescriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{2, 1} } -func (x *Features) GetPinCached() bool { - if x != nil && x.PinCached != nil { - return *x.PinCached - } - return false -} +type Features_Capability int32 -func (x *Features) GetPassphraseCached() bool { - if x != nil && x.PassphraseCached != nil { - return *x.PassphraseCached - } - return false -} +const ( + Features_Capability_Bitcoin Features_Capability = 1 + Features_Capability_Bitcoin_like Features_Capability = 2 // Altcoins based on the Bitcoin source code + Features_Capability_Binance Features_Capability = 3 // BNB Smart Chain + Features_Capability_Cardano Features_Capability = 4 + Features_Capability_Crypto Features_Capability = 5 // generic crypto operations for GPG, SSH, etc. + Features_Capability_EOS Features_Capability = 6 + Features_Capability_Ethereum Features_Capability = 7 + // Deprecated: Marked as deprecated in messages-management.proto. + Features_Capability_Lisk Features_Capability = 8 + Features_Capability_Monero Features_Capability = 9 + Features_Capability_NEM Features_Capability = 10 + Features_Capability_Ripple Features_Capability = 11 + Features_Capability_Stellar Features_Capability = 12 + Features_Capability_Tezos Features_Capability = 13 + Features_Capability_U2F Features_Capability = 14 + Features_Capability_Shamir Features_Capability = 15 + Features_Capability_ShamirGroups Features_Capability = 16 + Features_Capability_PassphraseEntry Features_Capability = 17 // the device is capable of passphrase entry directly on the device + Features_Capability_Solana Features_Capability = 18 + Features_Capability_Translations Features_Capability = 19 + Features_Capability_Brightness Features_Capability = 20 + Features_Capability_Haptic Features_Capability = 21 + Features_Capability_BLE Features_Capability = 22 // Bluetooth Low Energy + Features_Capability_NFC Features_Capability = 23 // Near Field Communications +) + +// Enum value maps for Features_Capability. +var ( + Features_Capability_name = map[int32]string{ + 1: "Capability_Bitcoin", + 2: "Capability_Bitcoin_like", + 3: "Capability_Binance", + 4: "Capability_Cardano", + 5: "Capability_Crypto", + 6: "Capability_EOS", + 7: "Capability_Ethereum", + 8: "Capability_Lisk", + 9: "Capability_Monero", + 10: "Capability_NEM", + 11: "Capability_Ripple", + 12: "Capability_Stellar", + 13: "Capability_Tezos", + 14: "Capability_U2F", + 15: "Capability_Shamir", + 16: "Capability_ShamirGroups", + 17: "Capability_PassphraseEntry", + 18: "Capability_Solana", + 19: "Capability_Translations", + 20: "Capability_Brightness", + 21: "Capability_Haptic", + 22: "Capability_BLE", + 23: "Capability_NFC", + } + Features_Capability_value = map[string]int32{ + "Capability_Bitcoin": 1, + "Capability_Bitcoin_like": 2, + "Capability_Binance": 3, + "Capability_Cardano": 4, + "Capability_Crypto": 5, + "Capability_EOS": 6, + "Capability_Ethereum": 7, + "Capability_Lisk": 8, + "Capability_Monero": 9, + "Capability_NEM": 10, + "Capability_Ripple": 11, + "Capability_Stellar": 12, + "Capability_Tezos": 13, + "Capability_U2F": 14, + "Capability_Shamir": 15, + "Capability_ShamirGroups": 16, + "Capability_PassphraseEntry": 17, + "Capability_Solana": 18, + "Capability_Translations": 19, + "Capability_Brightness": 20, + "Capability_Haptic": 21, + "Capability_BLE": 22, + "Capability_NFC": 23, + } +) + +func (x Features_Capability) Enum() *Features_Capability { + p := new(Features_Capability) + *p = x + return p +} + +func (x Features_Capability) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Features_Capability) Descriptor() protoreflect.EnumDescriptor { + return file_messages_management_proto_enumTypes[7].Descriptor() +} + +func (Features_Capability) Type() protoreflect.EnumType { + return &file_messages_management_proto_enumTypes[7] +} + +func (x Features_Capability) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *Features_Capability) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = Features_Capability(num) + return nil +} + +// Deprecated: Use Features_Capability.Descriptor instead. +func (Features_Capability) EnumDescriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{2, 2} +} + +// * +// Structure representing SD card protection operation +type SdProtect_SdProtectOperationType int32 + +const ( + SdProtect_DISABLE SdProtect_SdProtectOperationType = 0 + SdProtect_ENABLE SdProtect_SdProtectOperationType = 1 + SdProtect_REFRESH SdProtect_SdProtectOperationType = 2 +) + +// Enum value maps for SdProtect_SdProtectOperationType. +var ( + SdProtect_SdProtectOperationType_name = map[int32]string{ + 0: "DISABLE", + 1: "ENABLE", + 2: "REFRESH", + } + SdProtect_SdProtectOperationType_value = map[string]int32{ + "DISABLE": 0, + "ENABLE": 1, + "REFRESH": 2, + } +) + +func (x SdProtect_SdProtectOperationType) Enum() *SdProtect_SdProtectOperationType { + p := new(SdProtect_SdProtectOperationType) + *p = x + return p +} + +func (x SdProtect_SdProtectOperationType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SdProtect_SdProtectOperationType) Descriptor() protoreflect.EnumDescriptor { + return file_messages_management_proto_enumTypes[8].Descriptor() +} + +func (SdProtect_SdProtectOperationType) Type() protoreflect.EnumType { + return &file_messages_management_proto_enumTypes[8] +} + +func (x SdProtect_SdProtectOperationType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *SdProtect_SdProtectOperationType) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = SdProtect_SdProtectOperationType(num) + return nil +} + +// Deprecated: Use SdProtect_SdProtectOperationType.Descriptor instead. +func (SdProtect_SdProtectOperationType) EnumDescriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{13, 0} +} + +// * +// Type of recovery procedure. These should be used as bitmask, e.g., +// `RecoveryDeviceInputMethod_ScrambledWords | RecoveryDeviceInputMethod_Matrix` +// listing every method supported by the host computer. +// +// Note that ScrambledWords must be supported by every implementation +// for backward compatibility; there is no way to not support it. +type RecoveryDevice_RecoveryDeviceInputMethod int32 + +const ( + // use powers of two when extending this field + RecoveryDevice_ScrambledWords RecoveryDevice_RecoveryDeviceInputMethod = 0 // words in scrambled order + RecoveryDevice_Matrix RecoveryDevice_RecoveryDeviceInputMethod = 1 // matrix recovery type +) + +// Enum value maps for RecoveryDevice_RecoveryDeviceInputMethod. +var ( + RecoveryDevice_RecoveryDeviceInputMethod_name = map[int32]string{ + 0: "ScrambledWords", + 1: "Matrix", + } + RecoveryDevice_RecoveryDeviceInputMethod_value = map[string]int32{ + "ScrambledWords": 0, + "Matrix": 1, + } +) + +func (x RecoveryDevice_RecoveryDeviceInputMethod) Enum() *RecoveryDevice_RecoveryDeviceInputMethod { + p := new(RecoveryDevice_RecoveryDeviceInputMethod) + *p = x + return p +} + +func (x RecoveryDevice_RecoveryDeviceInputMethod) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RecoveryDevice_RecoveryDeviceInputMethod) Descriptor() protoreflect.EnumDescriptor { + return file_messages_management_proto_enumTypes[9].Descriptor() +} + +func (RecoveryDevice_RecoveryDeviceInputMethod) Type() protoreflect.EnumType { + return &file_messages_management_proto_enumTypes[9] +} + +func (x RecoveryDevice_RecoveryDeviceInputMethod) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *RecoveryDevice_RecoveryDeviceInputMethod) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = RecoveryDevice_RecoveryDeviceInputMethod(num) + return nil +} + +// Deprecated: Use RecoveryDevice_RecoveryDeviceInputMethod.Descriptor instead. +func (RecoveryDevice_RecoveryDeviceInputMethod) EnumDescriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{30, 0} +} + +// * +// Type of Recovery Word request +type WordRequest_WordRequestType int32 + +const ( + WordRequest_WordRequestType_Plain WordRequest_WordRequestType = 0 + WordRequest_WordRequestType_Matrix9 WordRequest_WordRequestType = 1 + WordRequest_WordRequestType_Matrix6 WordRequest_WordRequestType = 2 +) + +// Enum value maps for WordRequest_WordRequestType. +var ( + WordRequest_WordRequestType_name = map[int32]string{ + 0: "WordRequestType_Plain", + 1: "WordRequestType_Matrix9", + 2: "WordRequestType_Matrix6", + } + WordRequest_WordRequestType_value = map[string]int32{ + "WordRequestType_Plain": 0, + "WordRequestType_Matrix9": 1, + "WordRequestType_Matrix6": 2, + } +) + +func (x WordRequest_WordRequestType) Enum() *WordRequest_WordRequestType { + p := new(WordRequest_WordRequestType) + *p = x + return p +} + +func (x WordRequest_WordRequestType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (WordRequest_WordRequestType) Descriptor() protoreflect.EnumDescriptor { + return file_messages_management_proto_enumTypes[10].Descriptor() +} + +func (WordRequest_WordRequestType) Type() protoreflect.EnumType { + return &file_messages_management_proto_enumTypes[10] +} + +func (x WordRequest_WordRequestType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *WordRequest_WordRequestType) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = WordRequest_WordRequestType(num) + return nil +} + +// Deprecated: Use WordRequest_WordRequestType.Descriptor instead. +func (WordRequest_WordRequestType) EnumDescriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{31, 0} +} + +type RebootToBootloader_BootCommand int32 + +const ( + // Go to bootloader menu + RebootToBootloader_STOP_AND_WAIT RebootToBootloader_BootCommand = 0 + // Connect to host and wait for firmware update + RebootToBootloader_INSTALL_UPGRADE RebootToBootloader_BootCommand = 1 +) + +// Enum value maps for RebootToBootloader_BootCommand. +var ( + RebootToBootloader_BootCommand_name = map[int32]string{ + 0: "STOP_AND_WAIT", + 1: "INSTALL_UPGRADE", + } + RebootToBootloader_BootCommand_value = map[string]int32{ + "STOP_AND_WAIT": 0, + "INSTALL_UPGRADE": 1, + } +) + +func (x RebootToBootloader_BootCommand) Enum() *RebootToBootloader_BootCommand { + p := new(RebootToBootloader_BootCommand) + *p = x + return p +} + +func (x RebootToBootloader_BootCommand) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RebootToBootloader_BootCommand) Descriptor() protoreflect.EnumDescriptor { + return file_messages_management_proto_enumTypes[11].Descriptor() +} + +func (RebootToBootloader_BootCommand) Type() protoreflect.EnumType { + return &file_messages_management_proto_enumTypes[11] +} + +func (x RebootToBootloader_BootCommand) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *RebootToBootloader_BootCommand) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = RebootToBootloader_BootCommand(num) + return nil +} + +// Deprecated: Use RebootToBootloader_BootCommand.Descriptor instead. +func (RebootToBootloader_BootCommand) EnumDescriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{39, 0} +} + +// * +// Request: Reset device to default state and ask for device details +// @start +// @next Features +type Initialize struct { + state protoimpl.MessageState `protogen:"open.v1"` + SessionId []byte `protobuf:"bytes,1,opt,name=session_id,json=sessionId" json:"session_id,omitempty"` // assumed device session id; Trezor clears caches if it is different or empty + // Deprecated: Marked as deprecated in messages-management.proto. + XSkipPassphrase *bool `protobuf:"varint,2,opt,name=_skip_passphrase,json=SkipPassphrase" json:"_skip_passphrase,omitempty"` // removed as part of passphrase redesign + DeriveCardano *bool `protobuf:"varint,3,opt,name=derive_cardano,json=deriveCardano" json:"derive_cardano,omitempty"` // whether to derive Cardano Icarus root keys in this session + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Initialize) Reset() { + *x = Initialize{} + mi := &file_messages_management_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Initialize) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Initialize) ProtoMessage() {} + +func (x *Initialize) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Initialize.ProtoReflect.Descriptor instead. +func (*Initialize) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{0} +} + +func (x *Initialize) GetSessionId() []byte { + if x != nil { + return x.SessionId + } + return nil +} + +// Deprecated: Marked as deprecated in messages-management.proto. +func (x *Initialize) GetXSkipPassphrase() bool { + if x != nil && x.XSkipPassphrase != nil { + return *x.XSkipPassphrase + } + return false +} + +func (x *Initialize) GetDeriveCardano() bool { + if x != nil && x.DeriveCardano != nil { + return *x.DeriveCardano + } + return false +} + +// * +// Request: Ask for device details (no device reset) +// @start +// @next Features +type GetFeatures struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetFeatures) Reset() { + *x = GetFeatures{} + mi := &file_messages_management_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetFeatures) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFeatures) ProtoMessage() {} + +func (x *GetFeatures) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFeatures.ProtoReflect.Descriptor instead. +func (*GetFeatures) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{1} +} + +// * +// Response: Reports various information about the device +// @end +type Features struct { + state protoimpl.MessageState `protogen:"open.v1"` + Vendor *string `protobuf:"bytes,1,opt,name=vendor" json:"vendor,omitempty"` // name of the manufacturer, e.g. "trezor.io" + MajorVersion *uint32 `protobuf:"varint,2,req,name=major_version,json=majorVersion" json:"major_version,omitempty"` // major version of the firmware/bootloader, e.g. 1 + MinorVersion *uint32 `protobuf:"varint,3,req,name=minor_version,json=minorVersion" json:"minor_version,omitempty"` // minor version of the firmware/bootloader, e.g. 0 + PatchVersion *uint32 `protobuf:"varint,4,req,name=patch_version,json=patchVersion" json:"patch_version,omitempty"` // patch version of the firmware/bootloader, e.g. 0 + BootloaderMode *bool `protobuf:"varint,5,opt,name=bootloader_mode,json=bootloaderMode" json:"bootloader_mode,omitempty"` // is device in bootloader mode? + DeviceId *string `protobuf:"bytes,6,opt,name=device_id,json=deviceId" json:"device_id,omitempty"` // device's unique identifier + PinProtection *bool `protobuf:"varint,7,opt,name=pin_protection,json=pinProtection" json:"pin_protection,omitempty"` // is device protected by PIN? + PassphraseProtection *bool `protobuf:"varint,8,opt,name=passphrase_protection,json=passphraseProtection" json:"passphrase_protection,omitempty"` // is node/mnemonic encrypted using passphrase? + Language *string `protobuf:"bytes,9,opt,name=language" json:"language,omitempty"` // device language + Label *string `protobuf:"bytes,10,opt,name=label" json:"label,omitempty"` // device description label + Initialized *bool `protobuf:"varint,12,opt,name=initialized" json:"initialized,omitempty"` // does device contain seed? + Revision []byte `protobuf:"bytes,13,opt,name=revision" json:"revision,omitempty"` // SCM revision of firmware + BootloaderHash []byte `protobuf:"bytes,14,opt,name=bootloader_hash,json=bootloaderHash" json:"bootloader_hash,omitempty"` // hash of the bootloader + Imported *bool `protobuf:"varint,15,opt,name=imported" json:"imported,omitempty"` // was storage imported from an external source? + Unlocked *bool `protobuf:"varint,16,opt,name=unlocked" json:"unlocked,omitempty"` // is the device unlocked? called "pin_cached" previously + // Deprecated: Marked as deprecated in messages-management.proto. + XPassphraseCached *bool `protobuf:"varint,17,opt,name=_passphrase_cached,json=PassphraseCached" json:"_passphrase_cached,omitempty"` // is passphrase already cached in session? + FirmwarePresent *bool `protobuf:"varint,18,opt,name=firmware_present,json=firmwarePresent" json:"firmware_present,omitempty"` // is valid firmware loaded? + BackupAvailability *Features_BackupAvailability `protobuf:"varint,19,opt,name=backup_availability,json=backupAvailability,enum=hw.trezor.messages.management.Features_BackupAvailability" json:"backup_availability,omitempty"` // does storage need backup? is repeated backup unlocked? + Flags *uint32 `protobuf:"varint,20,opt,name=flags" json:"flags,omitempty"` // device flags (equals to Storage.flags) + Model *string `protobuf:"bytes,21,opt,name=model" json:"model,omitempty"` // device hardware model + FwMajor *uint32 `protobuf:"varint,22,opt,name=fw_major,json=fwMajor" json:"fw_major,omitempty"` // reported firmware version if in bootloader mode + FwMinor *uint32 `protobuf:"varint,23,opt,name=fw_minor,json=fwMinor" json:"fw_minor,omitempty"` // reported firmware version if in bootloader mode + FwPatch *uint32 `protobuf:"varint,24,opt,name=fw_patch,json=fwPatch" json:"fw_patch,omitempty"` // reported firmware version if in bootloader mode + FwVendor *string `protobuf:"bytes,25,opt,name=fw_vendor,json=fwVendor" json:"fw_vendor,omitempty"` // reported firmware vendor if in bootloader mode + // optional bytes fw_vendor_keys = 26; // obsoleted, use fw_vendor + UnfinishedBackup *bool `protobuf:"varint,27,opt,name=unfinished_backup,json=unfinishedBackup" json:"unfinished_backup,omitempty"` // report unfinished backup (equals to Storage.unfinished_backup) + NoBackup *bool `protobuf:"varint,28,opt,name=no_backup,json=noBackup" json:"no_backup,omitempty"` // report no backup (equals to Storage.no_backup) + RecoveryStatus *Features_RecoveryStatus `protobuf:"varint,29,opt,name=recovery_status,json=recoveryStatus,enum=hw.trezor.messages.management.Features_RecoveryStatus" json:"recovery_status,omitempty"` // whether or not we are in recovery mode and of what kind + Capabilities []Features_Capability `protobuf:"varint,30,rep,name=capabilities,enum=hw.trezor.messages.management.Features_Capability" json:"capabilities,omitempty"` // list of supported capabilities + BackupType *BackupType `protobuf:"varint,31,opt,name=backup_type,json=backupType,enum=hw.trezor.messages.management.BackupType" json:"backup_type,omitempty"` // type of device backup (BIP-39 / SLIP-39 basic / SLIP-39 advanced) + SdCardPresent *bool `protobuf:"varint,32,opt,name=sd_card_present,json=sdCardPresent" json:"sd_card_present,omitempty"` // is SD card present + SdProtection *bool `protobuf:"varint,33,opt,name=sd_protection,json=sdProtection" json:"sd_protection,omitempty"` // is SD Protect enabled + WipeCodeProtection *bool `protobuf:"varint,34,opt,name=wipe_code_protection,json=wipeCodeProtection" json:"wipe_code_protection,omitempty"` // is wipe code protection enabled + SessionId []byte `protobuf:"bytes,35,opt,name=session_id,json=sessionId" json:"session_id,omitempty"` + PassphraseAlwaysOnDevice *bool `protobuf:"varint,36,opt,name=passphrase_always_on_device,json=passphraseAlwaysOnDevice" json:"passphrase_always_on_device,omitempty"` // device enforces passphrase entry on Trezor + SafetyChecks *SafetyCheckLevel `protobuf:"varint,37,opt,name=safety_checks,json=safetyChecks,enum=hw.trezor.messages.management.SafetyCheckLevel" json:"safety_checks,omitempty"` // safety check level, set to Prompt to limit path namespace enforcement + AutoLockDelayMs *uint32 `protobuf:"varint,38,opt,name=auto_lock_delay_ms,json=autoLockDelayMs" json:"auto_lock_delay_ms,omitempty"` // number of milliseconds after which the device locks itself + DisplayRotation *DisplayRotation `protobuf:"varint,39,opt,name=display_rotation,json=displayRotation,enum=hw.trezor.messages.management.DisplayRotation" json:"display_rotation,omitempty"` // rotation of display (in degrees from North) + ExperimentalFeatures *bool `protobuf:"varint,40,opt,name=experimental_features,json=experimentalFeatures" json:"experimental_features,omitempty"` // are experimental message types enabled? + Busy *bool `protobuf:"varint,41,opt,name=busy" json:"busy,omitempty"` // is the device busy, showing "Do not disconnect"? + HomescreenFormat *HomescreenFormat `protobuf:"varint,42,opt,name=homescreen_format,json=homescreenFormat,enum=hw.trezor.messages.management.HomescreenFormat" json:"homescreen_format,omitempty"` // format of the homescreen, 1 = TOIf, 2 = jpg, 3 = TOIG + HidePassphraseFromHost *bool `protobuf:"varint,43,opt,name=hide_passphrase_from_host,json=hidePassphraseFromHost" json:"hide_passphrase_from_host,omitempty"` // should we hide the passphrase when it comes from host? + InternalModel *string `protobuf:"bytes,44,opt,name=internal_model,json=internalModel" json:"internal_model,omitempty"` // internal model name + UnitColor *uint32 `protobuf:"varint,45,opt,name=unit_color,json=unitColor" json:"unit_color,omitempty"` // color of the unit/device + UnitBtconly *bool `protobuf:"varint,46,opt,name=unit_btconly,json=unitBtconly" json:"unit_btconly,omitempty"` // unit/device is intended as bitcoin only + HomescreenWidth *uint32 `protobuf:"varint,47,opt,name=homescreen_width,json=homescreenWidth" json:"homescreen_width,omitempty"` // homescreen width in pixels + HomescreenHeight *uint32 `protobuf:"varint,48,opt,name=homescreen_height,json=homescreenHeight" json:"homescreen_height,omitempty"` // homescreen height in pixels + BootloaderLocked *bool `protobuf:"varint,49,opt,name=bootloader_locked,json=bootloaderLocked" json:"bootloader_locked,omitempty"` // bootloader is locked + LanguageVersionMatches *bool `protobuf:"varint,50,opt,name=language_version_matches,json=languageVersionMatches,def=1" json:"language_version_matches,omitempty"` // translation blob version matches firmware version + UnitPackaging *uint32 `protobuf:"varint,51,opt,name=unit_packaging,json=unitPackaging" json:"unit_packaging,omitempty"` // unit/device packaging version + HapticFeedback *bool `protobuf:"varint,52,opt,name=haptic_feedback,json=hapticFeedback" json:"haptic_feedback,omitempty"` // haptic feedback is enabled + RecoveryType *RecoveryType `protobuf:"varint,53,opt,name=recovery_type,json=recoveryType,enum=hw.trezor.messages.management.RecoveryType" json:"recovery_type,omitempty"` // what type of recovery we are in. NB: this works in conjunction with recovery_status + OptigaSec *uint32 `protobuf:"varint,54,opt,name=optiga_sec,json=optigaSec" json:"optiga_sec,omitempty"` // Optiga's security event counter. + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +// Default values for Features fields. +const ( + Default_Features_LanguageVersionMatches = bool(true) +) + +func (x *Features) Reset() { + *x = Features{} + mi := &file_messages_management_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Features) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Features) ProtoMessage() {} + +func (x *Features) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Features.ProtoReflect.Descriptor instead. +func (*Features) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{2} +} + +func (x *Features) GetVendor() string { + if x != nil && x.Vendor != nil { + return *x.Vendor + } + return "" +} + +func (x *Features) GetMajorVersion() uint32 { + if x != nil && x.MajorVersion != nil { + return *x.MajorVersion + } + return 0 +} + +func (x *Features) GetMinorVersion() uint32 { + if x != nil && x.MinorVersion != nil { + return *x.MinorVersion + } + return 0 +} + +func (x *Features) GetPatchVersion() uint32 { + if x != nil && x.PatchVersion != nil { + return *x.PatchVersion + } + return 0 +} + +func (x *Features) GetBootloaderMode() bool { + if x != nil && x.BootloaderMode != nil { + return *x.BootloaderMode + } + return false +} + +func (x *Features) GetDeviceId() string { + if x != nil && x.DeviceId != nil { + return *x.DeviceId + } + return "" +} + +func (x *Features) GetPinProtection() bool { + if x != nil && x.PinProtection != nil { + return *x.PinProtection + } + return false +} + +func (x *Features) GetPassphraseProtection() bool { + if x != nil && x.PassphraseProtection != nil { + return *x.PassphraseProtection + } + return false +} + +func (x *Features) GetLanguage() string { + if x != nil && x.Language != nil { + return *x.Language + } + return "" +} + +func (x *Features) GetLabel() string { + if x != nil && x.Label != nil { + return *x.Label + } + return "" +} + +func (x *Features) GetInitialized() bool { + if x != nil && x.Initialized != nil { + return *x.Initialized + } + return false +} + +func (x *Features) GetRevision() []byte { + if x != nil { + return x.Revision + } + return nil +} + +func (x *Features) GetBootloaderHash() []byte { + if x != nil { + return x.BootloaderHash + } + return nil +} + +func (x *Features) GetImported() bool { + if x != nil && x.Imported != nil { + return *x.Imported + } + return false +} + +func (x *Features) GetUnlocked() bool { + if x != nil && x.Unlocked != nil { + return *x.Unlocked + } + return false +} + +// Deprecated: Marked as deprecated in messages-management.proto. +func (x *Features) GetXPassphraseCached() bool { + if x != nil && x.XPassphraseCached != nil { + return *x.XPassphraseCached + } + return false +} func (x *Features) GetFirmwarePresent() bool { if x != nil && x.FirmwarePresent != nil { @@ -499,104 +1150,1609 @@ func (x *Features) GetFirmwarePresent() bool { return false } -func (x *Features) GetNeedsBackup() bool { +func (x *Features) GetBackupAvailability() Features_BackupAvailability { + if x != nil && x.BackupAvailability != nil { + return *x.BackupAvailability + } + return Features_NotAvailable +} + +func (x *Features) GetFlags() uint32 { + if x != nil && x.Flags != nil { + return *x.Flags + } + return 0 +} + +func (x *Features) GetModel() string { + if x != nil && x.Model != nil { + return *x.Model + } + return "" +} + +func (x *Features) GetFwMajor() uint32 { + if x != nil && x.FwMajor != nil { + return *x.FwMajor + } + return 0 +} + +func (x *Features) GetFwMinor() uint32 { + if x != nil && x.FwMinor != nil { + return *x.FwMinor + } + return 0 +} + +func (x *Features) GetFwPatch() uint32 { + if x != nil && x.FwPatch != nil { + return *x.FwPatch + } + return 0 +} + +func (x *Features) GetFwVendor() string { + if x != nil && x.FwVendor != nil { + return *x.FwVendor + } + return "" +} + +func (x *Features) GetUnfinishedBackup() bool { + if x != nil && x.UnfinishedBackup != nil { + return *x.UnfinishedBackup + } + return false +} + +func (x *Features) GetNoBackup() bool { + if x != nil && x.NoBackup != nil { + return *x.NoBackup + } + return false +} + +func (x *Features) GetRecoveryStatus() Features_RecoveryStatus { + if x != nil && x.RecoveryStatus != nil { + return *x.RecoveryStatus + } + return Features_Nothing +} + +func (x *Features) GetCapabilities() []Features_Capability { + if x != nil { + return x.Capabilities + } + return nil +} + +func (x *Features) GetBackupType() BackupType { + if x != nil && x.BackupType != nil { + return *x.BackupType + } + return BackupType_Bip39 +} + +func (x *Features) GetSdCardPresent() bool { + if x != nil && x.SdCardPresent != nil { + return *x.SdCardPresent + } + return false +} + +func (x *Features) GetSdProtection() bool { + if x != nil && x.SdProtection != nil { + return *x.SdProtection + } + return false +} + +func (x *Features) GetWipeCodeProtection() bool { + if x != nil && x.WipeCodeProtection != nil { + return *x.WipeCodeProtection + } + return false +} + +func (x *Features) GetSessionId() []byte { + if x != nil { + return x.SessionId + } + return nil +} + +func (x *Features) GetPassphraseAlwaysOnDevice() bool { + if x != nil && x.PassphraseAlwaysOnDevice != nil { + return *x.PassphraseAlwaysOnDevice + } + return false +} + +func (x *Features) GetSafetyChecks() SafetyCheckLevel { + if x != nil && x.SafetyChecks != nil { + return *x.SafetyChecks + } + return SafetyCheckLevel_Strict +} + +func (x *Features) GetAutoLockDelayMs() uint32 { + if x != nil && x.AutoLockDelayMs != nil { + return *x.AutoLockDelayMs + } + return 0 +} + +func (x *Features) GetDisplayRotation() DisplayRotation { + if x != nil && x.DisplayRotation != nil { + return *x.DisplayRotation + } + return DisplayRotation_North +} + +func (x *Features) GetExperimentalFeatures() bool { + if x != nil && x.ExperimentalFeatures != nil { + return *x.ExperimentalFeatures + } + return false +} + +func (x *Features) GetBusy() bool { + if x != nil && x.Busy != nil { + return *x.Busy + } + return false +} + +func (x *Features) GetHomescreenFormat() HomescreenFormat { + if x != nil && x.HomescreenFormat != nil { + return *x.HomescreenFormat + } + return HomescreenFormat_Toif +} + +func (x *Features) GetHidePassphraseFromHost() bool { + if x != nil && x.HidePassphraseFromHost != nil { + return *x.HidePassphraseFromHost + } + return false +} + +func (x *Features) GetInternalModel() string { + if x != nil && x.InternalModel != nil { + return *x.InternalModel + } + return "" +} + +func (x *Features) GetUnitColor() uint32 { + if x != nil && x.UnitColor != nil { + return *x.UnitColor + } + return 0 +} + +func (x *Features) GetUnitBtconly() bool { + if x != nil && x.UnitBtconly != nil { + return *x.UnitBtconly + } + return false +} + +func (x *Features) GetHomescreenWidth() uint32 { + if x != nil && x.HomescreenWidth != nil { + return *x.HomescreenWidth + } + return 0 +} + +func (x *Features) GetHomescreenHeight() uint32 { + if x != nil && x.HomescreenHeight != nil { + return *x.HomescreenHeight + } + return 0 +} + +func (x *Features) GetBootloaderLocked() bool { + if x != nil && x.BootloaderLocked != nil { + return *x.BootloaderLocked + } + return false +} + +func (x *Features) GetLanguageVersionMatches() bool { + if x != nil && x.LanguageVersionMatches != nil { + return *x.LanguageVersionMatches + } + return Default_Features_LanguageVersionMatches +} + +func (x *Features) GetUnitPackaging() uint32 { + if x != nil && x.UnitPackaging != nil { + return *x.UnitPackaging + } + return 0 +} + +func (x *Features) GetHapticFeedback() bool { + if x != nil && x.HapticFeedback != nil { + return *x.HapticFeedback + } + return false +} + +func (x *Features) GetRecoveryType() RecoveryType { + if x != nil && x.RecoveryType != nil { + return *x.RecoveryType + } + return RecoveryType_NormalRecovery +} + +func (x *Features) GetOptigaSec() uint32 { + if x != nil && x.OptigaSec != nil { + return *x.OptigaSec + } + return 0 +} + +// * +// Request: soft-lock the device. Following actions will require PIN. Passphrases remain cached. +// @start +// @next Success +type LockDevice struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LockDevice) Reset() { + *x = LockDevice{} + mi := &file_messages_management_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LockDevice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LockDevice) ProtoMessage() {} + +func (x *LockDevice) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LockDevice.ProtoReflect.Descriptor instead. +func (*LockDevice) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{3} +} + +// * +// Request: Show a "Do not disconnect" dialog instead of the standard homescreen. +// @start +// @next Success +type SetBusy struct { + state protoimpl.MessageState `protogen:"open.v1"` + ExpiryMs *uint32 `protobuf:"varint,1,opt,name=expiry_ms,json=expiryMs" json:"expiry_ms,omitempty"` // The time in milliseconds after which the dialog will automatically disappear. Overrides any previously set expiry. If not set, then the dialog is hidden. + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetBusy) Reset() { + *x = SetBusy{} + mi := &file_messages_management_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetBusy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetBusy) ProtoMessage() {} + +func (x *SetBusy) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetBusy.ProtoReflect.Descriptor instead. +func (*SetBusy) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{4} +} + +func (x *SetBusy) GetExpiryMs() uint32 { + if x != nil && x.ExpiryMs != nil { + return *x.ExpiryMs + } + return 0 +} + +// * +// Request: end the current sesson. Following actions must call Initialize again. +// Cache for the current session is discarded, other sessions remain intact. +// Device is not PIN-locked. +// @start +// @next Success +type EndSession struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EndSession) Reset() { + *x = EndSession{} + mi := &file_messages_management_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EndSession) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EndSession) ProtoMessage() {} + +func (x *EndSession) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EndSession.ProtoReflect.Descriptor instead. +func (*EndSession) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{5} +} + +// * +// Request: change some property of the device, e.g. label or homescreen +// @start +// @next Success +// @next DataChunkRequest +// @next Failure +type ApplySettings struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Deprecated: Marked as deprecated in messages-management.proto. + Language *string `protobuf:"bytes,1,opt,name=language" json:"language,omitempty"` + Label *string `protobuf:"bytes,2,opt,name=label" json:"label,omitempty"` + UsePassphrase *bool `protobuf:"varint,3,opt,name=use_passphrase,json=usePassphrase" json:"use_passphrase,omitempty"` + Homescreen []byte `protobuf:"bytes,4,opt,name=homescreen" json:"homescreen,omitempty"` // homescreen image in single array, deprecated for 14 + // Deprecated: Marked as deprecated in messages-management.proto. + XPassphraseSource *uint32 `protobuf:"varint,5,opt,name=_passphrase_source,json=PassphraseSource" json:"_passphrase_source,omitempty"` // ASK = 0; DEVICE = 1; HOST = 2; + AutoLockDelayMs *uint32 `protobuf:"varint,6,opt,name=auto_lock_delay_ms,json=autoLockDelayMs" json:"auto_lock_delay_ms,omitempty"` + DisplayRotation *DisplayRotation `protobuf:"varint,7,opt,name=display_rotation,json=displayRotation,enum=hw.trezor.messages.management.DisplayRotation" json:"display_rotation,omitempty"` // rotation of display (in degrees from North) + PassphraseAlwaysOnDevice *bool `protobuf:"varint,8,opt,name=passphrase_always_on_device,json=passphraseAlwaysOnDevice" json:"passphrase_always_on_device,omitempty"` // do not prompt for passphrase, enforce device entry + SafetyChecks *SafetyCheckLevel `protobuf:"varint,9,opt,name=safety_checks,json=safetyChecks,enum=hw.trezor.messages.management.SafetyCheckLevel" json:"safety_checks,omitempty"` // Safety check level, set to Prompt to limit path namespace enforcement + ExperimentalFeatures *bool `protobuf:"varint,10,opt,name=experimental_features,json=experimentalFeatures" json:"experimental_features,omitempty"` // enable experimental message types + HidePassphraseFromHost *bool `protobuf:"varint,11,opt,name=hide_passphrase_from_host,json=hidePassphraseFromHost" json:"hide_passphrase_from_host,omitempty"` // do not show passphrase coming from host + HapticFeedback *bool `protobuf:"varint,13,opt,name=haptic_feedback,json=hapticFeedback" json:"haptic_feedback,omitempty"` // enable haptic feedback + HomescreenLength *uint32 `protobuf:"varint,14,opt,name=homescreen_length,json=homescreenLength" json:"homescreen_length,omitempty"` // byte length of new homescreen, device will request chunks + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ApplySettings) Reset() { + *x = ApplySettings{} + mi := &file_messages_management_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ApplySettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApplySettings) ProtoMessage() {} + +func (x *ApplySettings) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApplySettings.ProtoReflect.Descriptor instead. +func (*ApplySettings) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{6} +} + +// Deprecated: Marked as deprecated in messages-management.proto. +func (x *ApplySettings) GetLanguage() string { + if x != nil && x.Language != nil { + return *x.Language + } + return "" +} + +func (x *ApplySettings) GetLabel() string { + if x != nil && x.Label != nil { + return *x.Label + } + return "" +} + +func (x *ApplySettings) GetUsePassphrase() bool { + if x != nil && x.UsePassphrase != nil { + return *x.UsePassphrase + } + return false +} + +func (x *ApplySettings) GetHomescreen() []byte { + if x != nil { + return x.Homescreen + } + return nil +} + +// Deprecated: Marked as deprecated in messages-management.proto. +func (x *ApplySettings) GetXPassphraseSource() uint32 { + if x != nil && x.XPassphraseSource != nil { + return *x.XPassphraseSource + } + return 0 +} + +func (x *ApplySettings) GetAutoLockDelayMs() uint32 { + if x != nil && x.AutoLockDelayMs != nil { + return *x.AutoLockDelayMs + } + return 0 +} + +func (x *ApplySettings) GetDisplayRotation() DisplayRotation { + if x != nil && x.DisplayRotation != nil { + return *x.DisplayRotation + } + return DisplayRotation_North +} + +func (x *ApplySettings) GetPassphraseAlwaysOnDevice() bool { + if x != nil && x.PassphraseAlwaysOnDevice != nil { + return *x.PassphraseAlwaysOnDevice + } + return false +} + +func (x *ApplySettings) GetSafetyChecks() SafetyCheckLevel { + if x != nil && x.SafetyChecks != nil { + return *x.SafetyChecks + } + return SafetyCheckLevel_Strict +} + +func (x *ApplySettings) GetExperimentalFeatures() bool { + if x != nil && x.ExperimentalFeatures != nil { + return *x.ExperimentalFeatures + } + return false +} + +func (x *ApplySettings) GetHidePassphraseFromHost() bool { + if x != nil && x.HidePassphraseFromHost != nil { + return *x.HidePassphraseFromHost + } + return false +} + +func (x *ApplySettings) GetHapticFeedback() bool { + if x != nil && x.HapticFeedback != nil { + return *x.HapticFeedback + } + return false +} + +func (x *ApplySettings) GetHomescreenLength() uint32 { + if x != nil && x.HomescreenLength != nil { + return *x.HomescreenLength + } + return 0 +} + +// * +// Request: change the device language via translation data. +// Does not send the translation data itself, as they are too large for one message. +// Device will request the translation data in chunks. +// @start +// @next DataChunkRequest +// @next Failure +type ChangeLanguage struct { + state protoimpl.MessageState `protogen:"open.v1"` + // byte length of the whole translation blob (set to 0 for default language - english) + DataLength *uint32 `protobuf:"varint,1,req,name=data_length,json=dataLength" json:"data_length,omitempty"` + // Prompt the user on screen. + // In certain conditions (such as freshly installed device), the confirmation prompt + // is not mandatory. Setting show_display=false will skip the prompt if that's + // the case. If the device does not allow skipping the prompt, a request with + // show_display=false will return a failure. (This way the host can safely try + // to change the language without invoking a prompt.) + // Setting show_display to true will always show the prompt. + // Leaving the option unset will show the prompt only when necessary. + ShowDisplay *bool `protobuf:"varint,2,opt,name=show_display,json=showDisplay" json:"show_display,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChangeLanguage) Reset() { + *x = ChangeLanguage{} + mi := &file_messages_management_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChangeLanguage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeLanguage) ProtoMessage() {} + +func (x *ChangeLanguage) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangeLanguage.ProtoReflect.Descriptor instead. +func (*ChangeLanguage) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{7} +} + +func (x *ChangeLanguage) GetDataLength() uint32 { + if x != nil && x.DataLength != nil { + return *x.DataLength + } + return 0 +} + +func (x *ChangeLanguage) GetShowDisplay() bool { + if x != nil && x.ShowDisplay != nil { + return *x.ShowDisplay + } + return false +} + +// * +// Response: Device asks for more data from translation/homescreen image. +// @end +// @next DataChunkAck +type DataChunkRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + DataLength *uint32 `protobuf:"varint,1,req,name=data_length,json=dataLength" json:"data_length,omitempty"` // Number of bytes being requested + DataOffset *uint32 `protobuf:"varint,2,req,name=data_offset,json=dataOffset" json:"data_offset,omitempty"` // Offset of the first byte being requested + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DataChunkRequest) Reset() { + *x = DataChunkRequest{} + mi := &file_messages_management_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DataChunkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataChunkRequest) ProtoMessage() {} + +func (x *DataChunkRequest) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DataChunkRequest.ProtoReflect.Descriptor instead. +func (*DataChunkRequest) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{8} +} + +func (x *DataChunkRequest) GetDataLength() uint32 { + if x != nil && x.DataLength != nil { + return *x.DataLength + } + return 0 +} + +func (x *DataChunkRequest) GetDataOffset() uint32 { + if x != nil && x.DataOffset != nil { + return *x.DataOffset + } + return 0 +} + +// * +// Request: Translation/homescreen payload data. +// @next DataChunkRequest +// @next Success +type DataChunkAck struct { + state protoimpl.MessageState `protogen:"open.v1"` + DataChunk []byte `protobuf:"bytes,1,req,name=data_chunk,json=dataChunk" json:"data_chunk,omitempty"` // Bytes from translation/homescreen payload + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DataChunkAck) Reset() { + *x = DataChunkAck{} + mi := &file_messages_management_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DataChunkAck) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataChunkAck) ProtoMessage() {} + +func (x *DataChunkAck) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DataChunkAck.ProtoReflect.Descriptor instead. +func (*DataChunkAck) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{9} +} + +func (x *DataChunkAck) GetDataChunk() []byte { + if x != nil { + return x.DataChunk + } + return nil +} + +// * +// Request: set flags of the device +// @start +// @next Success +// @next Failure +type ApplyFlags struct { + state protoimpl.MessageState `protogen:"open.v1"` + Flags *uint32 `protobuf:"varint,1,req,name=flags" json:"flags,omitempty"` // bitmask, can only set bits, not unset + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ApplyFlags) Reset() { + *x = ApplyFlags{} + mi := &file_messages_management_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ApplyFlags) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApplyFlags) ProtoMessage() {} + +func (x *ApplyFlags) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApplyFlags.ProtoReflect.Descriptor instead. +func (*ApplyFlags) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{10} +} + +func (x *ApplyFlags) GetFlags() uint32 { + if x != nil && x.Flags != nil { + return *x.Flags + } + return 0 +} + +// * +// Request: Starts workflow for setting/changing/removing the PIN +// @start +// @next Success +// @next Failure +type ChangePin struct { + state protoimpl.MessageState `protogen:"open.v1"` + Remove *bool `protobuf:"varint,1,opt,name=remove" json:"remove,omitempty"` // is PIN removal requested? + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChangePin) Reset() { + *x = ChangePin{} + mi := &file_messages_management_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChangePin) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangePin) ProtoMessage() {} + +func (x *ChangePin) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangePin.ProtoReflect.Descriptor instead. +func (*ChangePin) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{11} +} + +func (x *ChangePin) GetRemove() bool { + if x != nil && x.Remove != nil { + return *x.Remove + } + return false +} + +// * +// Request: Starts workflow for setting/removing the wipe code +// @start +// @next Success +// @next Failure +type ChangeWipeCode struct { + state protoimpl.MessageState `protogen:"open.v1"` + Remove *bool `protobuf:"varint,1,opt,name=remove" json:"remove,omitempty"` // is wipe code removal requested? + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChangeWipeCode) Reset() { + *x = ChangeWipeCode{} + mi := &file_messages_management_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChangeWipeCode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeWipeCode) ProtoMessage() {} + +func (x *ChangeWipeCode) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangeWipeCode.ProtoReflect.Descriptor instead. +func (*ChangeWipeCode) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{12} +} + +func (x *ChangeWipeCode) GetRemove() bool { + if x != nil && x.Remove != nil { + return *x.Remove + } + return false +} + +// * +// Request: Starts workflow for enabling/regenerating/disabling SD card protection +// @start +// @next Success +// @next Failure +type SdProtect struct { + state protoimpl.MessageState `protogen:"open.v1"` + Operation *SdProtect_SdProtectOperationType `protobuf:"varint,1,req,name=operation,enum=hw.trezor.messages.management.SdProtect_SdProtectOperationType" json:"operation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SdProtect) Reset() { + *x = SdProtect{} + mi := &file_messages_management_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SdProtect) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SdProtect) ProtoMessage() {} + +func (x *SdProtect) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SdProtect.ProtoReflect.Descriptor instead. +func (*SdProtect) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{13} +} + +func (x *SdProtect) GetOperation() SdProtect_SdProtectOperationType { + if x != nil && x.Operation != nil { + return *x.Operation + } + return SdProtect_DISABLE +} + +// * +// Request: Test if the device is alive, device sends back the message in Success response +// @start +// @next Success +type Ping struct { + state protoimpl.MessageState `protogen:"open.v1"` + Message *string `protobuf:"bytes,1,opt,name=message,def=" json:"message,omitempty"` // message to send back in Success message + ButtonProtection *bool `protobuf:"varint,2,opt,name=button_protection,json=buttonProtection" json:"button_protection,omitempty"` // ask for button press + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +// Default values for Ping fields. +const ( + Default_Ping_Message = string("") +) + +func (x *Ping) Reset() { + *x = Ping{} + mi := &file_messages_management_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Ping) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Ping) ProtoMessage() {} + +func (x *Ping) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Ping.ProtoReflect.Descriptor instead. +func (*Ping) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{14} +} + +func (x *Ping) GetMessage() string { + if x != nil && x.Message != nil { + return *x.Message + } + return Default_Ping_Message +} + +func (x *Ping) GetButtonProtection() bool { + if x != nil && x.ButtonProtection != nil { + return *x.ButtonProtection + } + return false +} + +// * +// Request: Abort last operation that required user interaction +// @start +// @next Failure +type Cancel struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Cancel) Reset() { + *x = Cancel{} + mi := &file_messages_management_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Cancel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Cancel) ProtoMessage() {} + +func (x *Cancel) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Cancel.ProtoReflect.Descriptor instead. +func (*Cancel) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{15} +} + +// * +// Request: Request a sample of random data generated by hardware RNG. May be used for testing. +// @start +// @next Entropy +// @next Failure +type GetEntropy struct { + state protoimpl.MessageState `protogen:"open.v1"` + Size *uint32 `protobuf:"varint,1,req,name=size" json:"size,omitempty"` // size of requested entropy + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetEntropy) Reset() { + *x = GetEntropy{} + mi := &file_messages_management_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetEntropy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetEntropy) ProtoMessage() {} + +func (x *GetEntropy) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetEntropy.ProtoReflect.Descriptor instead. +func (*GetEntropy) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{16} +} + +func (x *GetEntropy) GetSize() uint32 { + if x != nil && x.Size != nil { + return *x.Size + } + return 0 +} + +// * +// Response: Reply with random data generated by internal RNG +// @end +type Entropy struct { + state protoimpl.MessageState `protogen:"open.v1"` + Entropy []byte `protobuf:"bytes,1,req,name=entropy" json:"entropy,omitempty"` // chunk of random generated bytes + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Entropy) Reset() { + *x = Entropy{} + mi := &file_messages_management_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Entropy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Entropy) ProtoMessage() {} + +func (x *Entropy) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Entropy.ProtoReflect.Descriptor instead. +func (*Entropy) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{17} +} + +func (x *Entropy) GetEntropy() []byte { + if x != nil { + return x.Entropy + } + return nil +} + +// * +// Request: Get a hash of the installed firmware combined with an optional challenge. +// @start +// @next FirmwareHash +// @next Failure +type GetFirmwareHash struct { + state protoimpl.MessageState `protogen:"open.v1"` + Challenge []byte `protobuf:"bytes,1,opt,name=challenge" json:"challenge,omitempty"` // Blake2s key up to 32 bytes in length. + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetFirmwareHash) Reset() { + *x = GetFirmwareHash{} + mi := &file_messages_management_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetFirmwareHash) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFirmwareHash) ProtoMessage() {} + +func (x *GetFirmwareHash) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFirmwareHash.ProtoReflect.Descriptor instead. +func (*GetFirmwareHash) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{18} +} + +func (x *GetFirmwareHash) GetChallenge() []byte { + if x != nil { + return x.Challenge + } + return nil +} + +// * +// Response: Hash of the installed firmware combined with the optional challenge. +// @end +type FirmwareHash struct { + state protoimpl.MessageState `protogen:"open.v1"` + Hash []byte `protobuf:"bytes,1,req,name=hash" json:"hash,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FirmwareHash) Reset() { + *x = FirmwareHash{} + mi := &file_messages_management_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FirmwareHash) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FirmwareHash) ProtoMessage() {} + +func (x *FirmwareHash) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FirmwareHash.ProtoReflect.Descriptor instead. +func (*FirmwareHash) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{19} +} + +func (x *FirmwareHash) GetHash() []byte { + if x != nil { + return x.Hash + } + return nil +} + +// * +// Request: Request a signature of the provided challenge. +// @start +// @next AuthenticityProof +// @next Failure +type AuthenticateDevice struct { + state protoimpl.MessageState `protogen:"open.v1"` + Challenge []byte `protobuf:"bytes,1,req,name=challenge" json:"challenge,omitempty"` // A random challenge to sign. + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AuthenticateDevice) Reset() { + *x = AuthenticateDevice{} + mi := &file_messages_management_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AuthenticateDevice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuthenticateDevice) ProtoMessage() {} + +func (x *AuthenticateDevice) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuthenticateDevice.ProtoReflect.Descriptor instead. +func (*AuthenticateDevice) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{20} +} + +func (x *AuthenticateDevice) GetChallenge() []byte { + if x != nil { + return x.Challenge + } + return nil +} + +// * +// Response: Signature of the provided challenge along with a certificate issued by the Trezor company. +// @end +type AuthenticityProof struct { + state protoimpl.MessageState `protogen:"open.v1"` + Certificates [][]byte `protobuf:"bytes,1,rep,name=certificates" json:"certificates,omitempty"` // A certificate chain starting with the device certificate, followed by intermediate CA certificates, the last of which is signed by Trezor company's root CA. + Signature []byte `protobuf:"bytes,2,req,name=signature" json:"signature,omitempty"` // A DER-encoded signature of "\0x13AuthenticateDevice:" + length-prefixed challenge that should be verified using the device certificate. + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AuthenticityProof) Reset() { + *x = AuthenticityProof{} + mi := &file_messages_management_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AuthenticityProof) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuthenticityProof) ProtoMessage() {} + +func (x *AuthenticityProof) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuthenticityProof.ProtoReflect.Descriptor instead. +func (*AuthenticityProof) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{21} +} + +func (x *AuthenticityProof) GetCertificates() [][]byte { + if x != nil { + return x.Certificates + } + return nil +} + +func (x *AuthenticityProof) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +// * +// Request: Request device to wipe all sensitive data and settings +// @start +// @next Success +// @next Failure +type WipeDevice struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WipeDevice) Reset() { + *x = WipeDevice{} + mi := &file_messages_management_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WipeDevice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WipeDevice) ProtoMessage() {} + +func (x *WipeDevice) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WipeDevice.ProtoReflect.Descriptor instead. +func (*WipeDevice) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{22} +} + +// * +// Request: Load seed and related internal settings from the computer +// @start +// @next Success +// @next Failure +type LoadDevice struct { + state protoimpl.MessageState `protogen:"open.v1"` + Mnemonics []string `protobuf:"bytes,1,rep,name=mnemonics" json:"mnemonics,omitempty"` // seed encoded as mnemonic (12, 18 or 24 words for BIP39, 20 or 33 for SLIP39) + Pin *string `protobuf:"bytes,3,opt,name=pin" json:"pin,omitempty"` // set PIN protection + PassphraseProtection *bool `protobuf:"varint,4,opt,name=passphrase_protection,json=passphraseProtection" json:"passphrase_protection,omitempty"` // enable master node encryption using passphrase + // Deprecated: Marked as deprecated in messages-management.proto. + Language *string `protobuf:"bytes,5,opt,name=language" json:"language,omitempty"` // deprecated (use ChangeLanguage) + Label *string `protobuf:"bytes,6,opt,name=label" json:"label,omitempty"` // device label + SkipChecksum *bool `protobuf:"varint,7,opt,name=skip_checksum,json=skipChecksum" json:"skip_checksum,omitempty"` // do not test mnemonic for valid BIP-39 checksum + U2FCounter *uint32 `protobuf:"varint,8,opt,name=u2f_counter,json=u2fCounter" json:"u2f_counter,omitempty"` // U2F counter + NeedsBackup *bool `protobuf:"varint,9,opt,name=needs_backup,json=needsBackup" json:"needs_backup,omitempty"` // set "needs backup" flag + NoBackup *bool `protobuf:"varint,10,opt,name=no_backup,json=noBackup" json:"no_backup,omitempty"` // indicate that no backup is going to be made + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LoadDevice) Reset() { + *x = LoadDevice{} + mi := &file_messages_management_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LoadDevice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LoadDevice) ProtoMessage() {} + +func (x *LoadDevice) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LoadDevice.ProtoReflect.Descriptor instead. +func (*LoadDevice) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{23} +} + +func (x *LoadDevice) GetMnemonics() []string { + if x != nil { + return x.Mnemonics + } + return nil +} + +func (x *LoadDevice) GetPin() string { + if x != nil && x.Pin != nil { + return *x.Pin + } + return "" +} + +func (x *LoadDevice) GetPassphraseProtection() bool { + if x != nil && x.PassphraseProtection != nil { + return *x.PassphraseProtection + } + return false +} + +// Deprecated: Marked as deprecated in messages-management.proto. +func (x *LoadDevice) GetLanguage() string { + if x != nil && x.Language != nil { + return *x.Language + } + return "" +} + +func (x *LoadDevice) GetLabel() string { + if x != nil && x.Label != nil { + return *x.Label + } + return "" +} + +func (x *LoadDevice) GetSkipChecksum() bool { + if x != nil && x.SkipChecksum != nil { + return *x.SkipChecksum + } + return false +} + +func (x *LoadDevice) GetU2FCounter() uint32 { + if x != nil && x.U2FCounter != nil { + return *x.U2FCounter + } + return 0 +} + +func (x *LoadDevice) GetNeedsBackup() bool { if x != nil && x.NeedsBackup != nil { return *x.NeedsBackup } return false } -func (x *Features) GetFlags() uint32 { - if x != nil && x.Flags != nil { - return *x.Flags +func (x *LoadDevice) GetNoBackup() bool { + if x != nil && x.NoBackup != nil { + return *x.NoBackup } - return 0 + return false } -func (x *Features) GetModel() string { - if x != nil && x.Model != nil { - return *x.Model +// * +// Request: Ask device to do initialization involving user interaction +// @start +// @next EntropyRequest +// @next Failure +type ResetDevice struct { + state protoimpl.MessageState `protogen:"open.v1"` + Strength *uint32 `protobuf:"varint,2,opt,name=strength,def=256" json:"strength,omitempty"` // strength of seed in bits + PassphraseProtection *bool `protobuf:"varint,3,opt,name=passphrase_protection,json=passphraseProtection" json:"passphrase_protection,omitempty"` // enable master node encryption using passphrase + PinProtection *bool `protobuf:"varint,4,opt,name=pin_protection,json=pinProtection" json:"pin_protection,omitempty"` // enable PIN protection + // Deprecated: Marked as deprecated in messages-management.proto. + Language *string `protobuf:"bytes,5,opt,name=language" json:"language,omitempty"` // deprecated (use ChangeLanguage) + Label *string `protobuf:"bytes,6,opt,name=label" json:"label,omitempty"` // device label + U2FCounter *uint32 `protobuf:"varint,7,opt,name=u2f_counter,json=u2fCounter" json:"u2f_counter,omitempty"` // U2F counter + SkipBackup *bool `protobuf:"varint,8,opt,name=skip_backup,json=skipBackup" json:"skip_backup,omitempty"` // postpone seed backup to BackupDevice workflow + NoBackup *bool `protobuf:"varint,9,opt,name=no_backup,json=noBackup" json:"no_backup,omitempty"` // indicate that no backup is going to be made + BackupType *BackupType `protobuf:"varint,10,opt,name=backup_type,json=backupType,enum=hw.trezor.messages.management.BackupType,def=0" json:"backup_type,omitempty"` // type of the mnemonic backup + EntropyCheck *bool `protobuf:"varint,11,opt,name=entropy_check,json=entropyCheck" json:"entropy_check,omitempty"` // run with entropy check protocol + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +// Default values for ResetDevice fields. +const ( + Default_ResetDevice_Strength = uint32(256) + Default_ResetDevice_BackupType = BackupType_Bip39 +) + +func (x *ResetDevice) Reset() { + *x = ResetDevice{} + mi := &file_messages_management_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResetDevice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResetDevice) ProtoMessage() {} + +func (x *ResetDevice) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -func (x *Features) GetFwMajor() uint32 { - if x != nil && x.FwMajor != nil { - return *x.FwMajor +// Deprecated: Use ResetDevice.ProtoReflect.Descriptor instead. +func (*ResetDevice) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{24} +} + +func (x *ResetDevice) GetStrength() uint32 { + if x != nil && x.Strength != nil { + return *x.Strength } - return 0 + return Default_ResetDevice_Strength } -func (x *Features) GetFwMinor() uint32 { - if x != nil && x.FwMinor != nil { - return *x.FwMinor +func (x *ResetDevice) GetPassphraseProtection() bool { + if x != nil && x.PassphraseProtection != nil { + return *x.PassphraseProtection } - return 0 + return false } -func (x *Features) GetFwPatch() uint32 { - if x != nil && x.FwPatch != nil { - return *x.FwPatch +func (x *ResetDevice) GetPinProtection() bool { + if x != nil && x.PinProtection != nil { + return *x.PinProtection } - return 0 + return false } -func (x *Features) GetFwVendor() string { - if x != nil && x.FwVendor != nil { - return *x.FwVendor +// Deprecated: Marked as deprecated in messages-management.proto. +func (x *ResetDevice) GetLanguage() string { + if x != nil && x.Language != nil { + return *x.Language } return "" } -func (x *Features) GetFwVendorKeys() []byte { - if x != nil { - return x.FwVendorKeys +func (x *ResetDevice) GetLabel() string { + if x != nil && x.Label != nil { + return *x.Label } - return nil + return "" } -func (x *Features) GetUnfinishedBackup() bool { - if x != nil && x.UnfinishedBackup != nil { - return *x.UnfinishedBackup +func (x *ResetDevice) GetU2FCounter() uint32 { + if x != nil && x.U2FCounter != nil { + return *x.U2FCounter + } + return 0 +} + +func (x *ResetDevice) GetSkipBackup() bool { + if x != nil && x.SkipBackup != nil { + return *x.SkipBackup } return false } -func (x *Features) GetNoBackup() bool { +func (x *ResetDevice) GetNoBackup() bool { if x != nil && x.NoBackup != nil { return *x.NoBackup } return false } +func (x *ResetDevice) GetBackupType() BackupType { + if x != nil && x.BackupType != nil { + return *x.BackupType + } + return Default_ResetDevice_BackupType +} + +func (x *ResetDevice) GetEntropyCheck() bool { + if x != nil && x.EntropyCheck != nil { + return *x.EntropyCheck + } + return false +} + // * -// Request: clear session (removes cached PIN, passphrase, etc). +// Request: Perform backup of the device seed if not backed up using ResetDevice // @start // @next Success -type ClearSession struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +type BackupDevice struct { + state protoimpl.MessageState `protogen:"open.v1"` + GroupThreshold *uint32 `protobuf:"varint,1,opt,name=group_threshold,json=groupThreshold" json:"group_threshold,omitempty"` + Groups []*BackupDevice_Slip39Group `protobuf:"bytes,2,rep,name=groups" json:"groups,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *ClearSession) Reset() { - *x = ClearSession{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_management_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (x *BackupDevice) Reset() { + *x = BackupDevice{} + mi := &file_messages_management_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *ClearSession) String() string { +func (x *BackupDevice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ClearSession) ProtoMessage() {} +func (*BackupDevice) ProtoMessage() {} -func (x *ClearSession) ProtoReflect() protoreflect.Message { - mi := &file_messages_management_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { +func (x *BackupDevice) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[25] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -606,48 +2762,52 @@ func (x *ClearSession) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ClearSession.ProtoReflect.Descriptor instead. -func (*ClearSession) Descriptor() ([]byte, []int) { - return file_messages_management_proto_rawDescGZIP(), []int{3} +// Deprecated: Use BackupDevice.ProtoReflect.Descriptor instead. +func (*BackupDevice) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{25} } -// * -// Request: change language and/or label of the device -// @start -// @next Success -// @next Failure -type ApplySettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *BackupDevice) GetGroupThreshold() uint32 { + if x != nil && x.GroupThreshold != nil { + return *x.GroupThreshold + } + return 0 +} + +func (x *BackupDevice) GetGroups() []*BackupDevice_Slip39Group { + if x != nil { + return x.Groups + } + return nil +} - Language *string `protobuf:"bytes,1,opt,name=language" json:"language,omitempty"` - Label *string `protobuf:"bytes,2,opt,name=label" json:"label,omitempty"` - UsePassphrase *bool `protobuf:"varint,3,opt,name=use_passphrase,json=usePassphrase" json:"use_passphrase,omitempty"` - Homescreen []byte `protobuf:"bytes,4,opt,name=homescreen" json:"homescreen,omitempty"` - PassphraseSource *ApplySettings_PassphraseSourceType `protobuf:"varint,5,opt,name=passphrase_source,json=passphraseSource,enum=hw.trezor.messages.management.ApplySettings_PassphraseSourceType" json:"passphrase_source,omitempty"` - AutoLockDelayMs *uint32 `protobuf:"varint,6,opt,name=auto_lock_delay_ms,json=autoLockDelayMs" json:"auto_lock_delay_ms,omitempty"` - DisplayRotation *uint32 `protobuf:"varint,7,opt,name=display_rotation,json=displayRotation" json:"display_rotation,omitempty"` // in degrees from North +// * +// Response: Ask for additional entropy from host computer +// @next EntropyAck +type EntropyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + EntropyCommitment []byte `protobuf:"bytes,1,opt,name=entropy_commitment,json=entropyCommitment" json:"entropy_commitment,omitempty"` // HMAC-SHA256 of Trezor's internal entropy used in entropy check. + PrevEntropy []byte `protobuf:"bytes,2,opt,name=prev_entropy,json=prevEntropy" json:"prev_entropy,omitempty"` // Trezor's internal entropy from the previous round of entropy check. + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *ApplySettings) Reset() { - *x = ApplySettings{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_management_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (x *EntropyRequest) Reset() { + *x = EntropyRequest{} + mi := &file_messages_management_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *ApplySettings) String() string { +func (x *EntropyRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ApplySettings) ProtoMessage() {} +func (*EntropyRequest) ProtoMessage() {} -func (x *ApplySettings) ProtoReflect() protoreflect.Message { - mi := &file_messages_management_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { +func (x *EntropyRequest) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[26] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -657,91 +2817,99 @@ func (x *ApplySettings) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ApplySettings.ProtoReflect.Descriptor instead. -func (*ApplySettings) Descriptor() ([]byte, []int) { - return file_messages_management_proto_rawDescGZIP(), []int{4} +// Deprecated: Use EntropyRequest.ProtoReflect.Descriptor instead. +func (*EntropyRequest) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{26} } -func (x *ApplySettings) GetLanguage() string { - if x != nil && x.Language != nil { - return *x.Language +func (x *EntropyRequest) GetEntropyCommitment() []byte { + if x != nil { + return x.EntropyCommitment } - return "" + return nil } -func (x *ApplySettings) GetLabel() string { - if x != nil && x.Label != nil { - return *x.Label +func (x *EntropyRequest) GetPrevEntropy() []byte { + if x != nil { + return x.PrevEntropy } - return "" + return nil } -func (x *ApplySettings) GetUsePassphrase() bool { - if x != nil && x.UsePassphrase != nil { - return *x.UsePassphrase - } - return false +// * +// Request: Provide additional entropy for seed generation function +// @next Success +// @next EntropyCheckReady +type EntropyAck struct { + state protoimpl.MessageState `protogen:"open.v1"` + Entropy []byte `protobuf:"bytes,1,req,name=entropy" json:"entropy,omitempty"` // 256 bits (32 bytes) of the host's random data + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *ApplySettings) GetHomescreen() []byte { - if x != nil { - return x.Homescreen - } - return nil +func (x *EntropyAck) Reset() { + *x = EntropyAck{} + mi := &file_messages_management_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *ApplySettings) GetPassphraseSource() ApplySettings_PassphraseSourceType { - if x != nil && x.PassphraseSource != nil { - return *x.PassphraseSource - } - return ApplySettings_ASK +func (x *EntropyAck) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *ApplySettings) GetAutoLockDelayMs() uint32 { - if x != nil && x.AutoLockDelayMs != nil { - return *x.AutoLockDelayMs +func (*EntropyAck) ProtoMessage() {} + +func (x *EntropyAck) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -func (x *ApplySettings) GetDisplayRotation() uint32 { - if x != nil && x.DisplayRotation != nil { - return *x.DisplayRotation +// Deprecated: Use EntropyAck.ProtoReflect.Descriptor instead. +func (*EntropyAck) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{27} +} + +func (x *EntropyAck) GetEntropy() []byte { + if x != nil { + return x.Entropy } - return 0 + return nil } // * -// Request: set flags of the device -// @start -// @next Success -// @next Failure -type ApplyFlags struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +// Response: Trezor is ready for the next phase of the entropy check protocol. +// @next EntropyCheckContinue +// @next GetPublicKey +type EntropyCheckReady struct { + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields - - Flags *uint32 `protobuf:"varint,1,opt,name=flags" json:"flags,omitempty"` // bitmask, can only set bits, not unset + sizeCache protoimpl.SizeCache } -func (x *ApplyFlags) Reset() { - *x = ApplyFlags{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_management_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (x *EntropyCheckReady) Reset() { + *x = EntropyCheckReady{} + mi := &file_messages_management_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *ApplyFlags) String() string { +func (x *EntropyCheckReady) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ApplyFlags) ProtoMessage() {} +func (*EntropyCheckReady) ProtoMessage() {} -func (x *ApplyFlags) ProtoReflect() protoreflect.Message { - mi := &file_messages_management_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { +func (x *EntropyCheckReady) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[28] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -751,49 +2919,43 @@ func (x *ApplyFlags) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ApplyFlags.ProtoReflect.Descriptor instead. -func (*ApplyFlags) Descriptor() ([]byte, []int) { - return file_messages_management_proto_rawDescGZIP(), []int{5} -} - -func (x *ApplyFlags) GetFlags() uint32 { - if x != nil && x.Flags != nil { - return *x.Flags - } - return 0 +// Deprecated: Use EntropyCheckReady.ProtoReflect.Descriptor instead. +func (*EntropyCheckReady) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{28} } // * -// Request: Starts workflow for setting/changing/removing the PIN -// @start +// Request: Proceed with the next phase of the entropy check protocol, asking Trezor to either reveal its internal entropy or to finish and store the seed. // @next Success -// @next Failure -type ChangePin struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +// @next EntropyRequest +type EntropyCheckContinue struct { + state protoimpl.MessageState `protogen:"open.v1"` + Finish *bool `protobuf:"varint,1,opt,name=finish,def=0" json:"finish,omitempty"` // finish the entropy check protocol, store the seed unknownFields protoimpl.UnknownFields - - Remove *bool `protobuf:"varint,1,opt,name=remove" json:"remove,omitempty"` // is PIN removal requested? + sizeCache protoimpl.SizeCache } -func (x *ChangePin) Reset() { - *x = ChangePin{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_management_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +// Default values for EntropyCheckContinue fields. +const ( + Default_EntropyCheckContinue_Finish = bool(false) +) + +func (x *EntropyCheckContinue) Reset() { + *x = EntropyCheckContinue{} + mi := &file_messages_management_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *ChangePin) String() string { +func (x *EntropyCheckContinue) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ChangePin) ProtoMessage() {} +func (*EntropyCheckContinue) ProtoMessage() {} -func (x *ChangePin) ProtoReflect() protoreflect.Message { - mi := &file_messages_management_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { +func (x *EntropyCheckContinue) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[29] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -803,51 +2965,60 @@ func (x *ChangePin) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ChangePin.ProtoReflect.Descriptor instead. -func (*ChangePin) Descriptor() ([]byte, []int) { - return file_messages_management_proto_rawDescGZIP(), []int{6} +// Deprecated: Use EntropyCheckContinue.ProtoReflect.Descriptor instead. +func (*EntropyCheckContinue) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{29} } -func (x *ChangePin) GetRemove() bool { - if x != nil && x.Remove != nil { - return *x.Remove +func (x *EntropyCheckContinue) GetFinish() bool { + if x != nil && x.Finish != nil { + return *x.Finish } - return false + return Default_EntropyCheckContinue_Finish } // * -// Request: Test if the device is alive, device sends back the message in Success response +// Request: Start recovery workflow asking user for specific words of mnemonic +// Used to recovery device safely even on untrusted computer. // @start -// @next Success -type Ping struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Message *string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"` // message to send back in Success message - ButtonProtection *bool `protobuf:"varint,2,opt,name=button_protection,json=buttonProtection" json:"button_protection,omitempty"` // ask for button press - PinProtection *bool `protobuf:"varint,3,opt,name=pin_protection,json=pinProtection" json:"pin_protection,omitempty"` // ask for PIN if set in device - PassphraseProtection *bool `protobuf:"varint,4,opt,name=passphrase_protection,json=passphraseProtection" json:"passphrase_protection,omitempty"` // ask for passphrase if set in device +// @next WordRequest +type RecoveryDevice struct { + state protoimpl.MessageState `protogen:"open.v1"` + WordCount *uint32 `protobuf:"varint,1,opt,name=word_count,json=wordCount" json:"word_count,omitempty"` // number of words in BIP-39 mnemonic (T1 only) + PassphraseProtection *bool `protobuf:"varint,2,opt,name=passphrase_protection,json=passphraseProtection" json:"passphrase_protection,omitempty"` // enable master node encryption using passphrase + PinProtection *bool `protobuf:"varint,3,opt,name=pin_protection,json=pinProtection" json:"pin_protection,omitempty"` // enable PIN protection + // Deprecated: Marked as deprecated in messages-management.proto. + Language *string `protobuf:"bytes,4,opt,name=language" json:"language,omitempty"` // deprecated (use ChangeLanguage) + Label *string `protobuf:"bytes,5,opt,name=label" json:"label,omitempty"` // device label + EnforceWordlist *bool `protobuf:"varint,6,opt,name=enforce_wordlist,json=enforceWordlist" json:"enforce_wordlist,omitempty"` // enforce BIP-39 wordlist during the process (T1 only) + InputMethod *RecoveryDevice_RecoveryDeviceInputMethod `protobuf:"varint,8,opt,name=input_method,json=inputMethod,enum=hw.trezor.messages.management.RecoveryDevice_RecoveryDeviceInputMethod" json:"input_method,omitempty"` // supported recovery input method (T1 only) + U2FCounter *uint32 `protobuf:"varint,9,opt,name=u2f_counter,json=u2fCounter" json:"u2f_counter,omitempty"` // U2F counter + Type *RecoveryType `protobuf:"varint,10,opt,name=type,enum=hw.trezor.messages.management.RecoveryType,def=0" json:"type,omitempty"` // the type of recovery to perform + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *Ping) Reset() { - *x = Ping{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_management_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +// Default values for RecoveryDevice fields. +const ( + Default_RecoveryDevice_Type = RecoveryType_NormalRecovery +) + +func (x *RecoveryDevice) Reset() { + *x = RecoveryDevice{} + mi := &file_messages_management_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *Ping) String() string { +func (x *RecoveryDevice) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Ping) ProtoMessage() {} +func (*RecoveryDevice) ProtoMessage() {} -func (x *Ping) ProtoReflect() protoreflect.Message { - mi := &file_messages_management_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { +func (x *RecoveryDevice) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[30] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -857,112 +3028,102 @@ func (x *Ping) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Ping.ProtoReflect.Descriptor instead. -func (*Ping) Descriptor() ([]byte, []int) { - return file_messages_management_proto_rawDescGZIP(), []int{7} +// Deprecated: Use RecoveryDevice.ProtoReflect.Descriptor instead. +func (*RecoveryDevice) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{30} } -func (x *Ping) GetMessage() string { - if x != nil && x.Message != nil { - return *x.Message +func (x *RecoveryDevice) GetWordCount() uint32 { + if x != nil && x.WordCount != nil { + return *x.WordCount } - return "" + return 0 } -func (x *Ping) GetButtonProtection() bool { - if x != nil && x.ButtonProtection != nil { - return *x.ButtonProtection +func (x *RecoveryDevice) GetPassphraseProtection() bool { + if x != nil && x.PassphraseProtection != nil { + return *x.PassphraseProtection } return false } -func (x *Ping) GetPinProtection() bool { +func (x *RecoveryDevice) GetPinProtection() bool { if x != nil && x.PinProtection != nil { return *x.PinProtection } return false } -func (x *Ping) GetPassphraseProtection() bool { - if x != nil && x.PassphraseProtection != nil { - return *x.PassphraseProtection +// Deprecated: Marked as deprecated in messages-management.proto. +func (x *RecoveryDevice) GetLanguage() string { + if x != nil && x.Language != nil { + return *x.Language } - return false + return "" } -// * -// Request: Abort last operation that required user interaction -// @start -// @next Failure -type Cancel struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *RecoveryDevice) GetLabel() string { + if x != nil && x.Label != nil { + return *x.Label + } + return "" } -func (x *Cancel) Reset() { - *x = Cancel{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_management_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *RecoveryDevice) GetEnforceWordlist() bool { + if x != nil && x.EnforceWordlist != nil { + return *x.EnforceWordlist } + return false } -func (x *Cancel) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *RecoveryDevice) GetInputMethod() RecoveryDevice_RecoveryDeviceInputMethod { + if x != nil && x.InputMethod != nil { + return *x.InputMethod + } + return RecoveryDevice_ScrambledWords } -func (*Cancel) ProtoMessage() {} - -func (x *Cancel) ProtoReflect() protoreflect.Message { - mi := &file_messages_management_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *RecoveryDevice) GetU2FCounter() uint32 { + if x != nil && x.U2FCounter != nil { + return *x.U2FCounter } - return mi.MessageOf(x) + return 0 } -// Deprecated: Use Cancel.ProtoReflect.Descriptor instead. -func (*Cancel) Descriptor() ([]byte, []int) { - return file_messages_management_proto_rawDescGZIP(), []int{8} +func (x *RecoveryDevice) GetType() RecoveryType { + if x != nil && x.Type != nil { + return *x.Type + } + return Default_RecoveryDevice_Type } // * -// Request: Request a sample of random data generated by hardware RNG. May be used for testing. -// @start -// @next Entropy -// @next Failure -type GetEntropy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +// Response: Device is waiting for user to enter word of the mnemonic +// Its position is shown only on device's internal display. +// @next WordAck +type WordRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Type *WordRequest_WordRequestType `protobuf:"varint,1,req,name=type,enum=hw.trezor.messages.management.WordRequest_WordRequestType" json:"type,omitempty"` unknownFields protoimpl.UnknownFields - - Size *uint32 `protobuf:"varint,1,req,name=size" json:"size,omitempty"` // size of requested entropy + sizeCache protoimpl.SizeCache } -func (x *GetEntropy) Reset() { - *x = GetEntropy{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_management_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (x *WordRequest) Reset() { + *x = WordRequest{} + mi := &file_messages_management_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *GetEntropy) String() string { +func (x *WordRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetEntropy) ProtoMessage() {} +func (*WordRequest) ProtoMessage() {} -func (x *GetEntropy) ProtoReflect() protoreflect.Message { - mi := &file_messages_management_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { +func (x *WordRequest) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[31] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -972,47 +3133,46 @@ func (x *GetEntropy) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetEntropy.ProtoReflect.Descriptor instead. -func (*GetEntropy) Descriptor() ([]byte, []int) { - return file_messages_management_proto_rawDescGZIP(), []int{9} +// Deprecated: Use WordRequest.ProtoReflect.Descriptor instead. +func (*WordRequest) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{31} } -func (x *GetEntropy) GetSize() uint32 { - if x != nil && x.Size != nil { - return *x.Size +func (x *WordRequest) GetType() WordRequest_WordRequestType { + if x != nil && x.Type != nil { + return *x.Type } - return 0 + return WordRequest_WordRequestType_Plain } // * -// Response: Reply with random data generated by internal RNG -// @end -type Entropy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +// Request: Computer replies with word from the mnemonic +// @next WordRequest +// @next Success +// @next Failure +type WordAck struct { + state protoimpl.MessageState `protogen:"open.v1"` + Word *string `protobuf:"bytes,1,req,name=word" json:"word,omitempty"` // one word of mnemonic on asked position unknownFields protoimpl.UnknownFields - - Entropy []byte `protobuf:"bytes,1,req,name=entropy" json:"entropy,omitempty"` // chunk of random generated bytes + sizeCache protoimpl.SizeCache } -func (x *Entropy) Reset() { - *x = Entropy{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_management_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (x *WordAck) Reset() { + *x = WordAck{} + mi := &file_messages_management_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *Entropy) String() string { +func (x *WordAck) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Entropy) ProtoMessage() {} +func (*WordAck) ProtoMessage() {} -func (x *Entropy) ProtoReflect() protoreflect.Message { - mi := &file_messages_management_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { +func (x *WordAck) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[32] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1022,47 +3182,45 @@ func (x *Entropy) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Entropy.ProtoReflect.Descriptor instead. -func (*Entropy) Descriptor() ([]byte, []int) { - return file_messages_management_proto_rawDescGZIP(), []int{10} +// Deprecated: Use WordAck.ProtoReflect.Descriptor instead. +func (*WordAck) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{32} } -func (x *Entropy) GetEntropy() []byte { - if x != nil { - return x.Entropy +func (x *WordAck) GetWord() string { + if x != nil && x.Word != nil { + return *x.Word } - return nil + return "" } // * -// Request: Request device to wipe all sensitive data and settings +// Request: Set U2F counter // @start // @next Success -// @next Failure -type WipeDevice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type SetU2FCounter struct { + state protoimpl.MessageState `protogen:"open.v1"` + U2FCounter *uint32 `protobuf:"varint,1,req,name=u2f_counter,json=u2fCounter" json:"u2f_counter,omitempty"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *WipeDevice) Reset() { - *x = WipeDevice{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_management_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (x *SetU2FCounter) Reset() { + *x = SetU2FCounter{} + mi := &file_messages_management_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *WipeDevice) String() string { +func (x *SetU2FCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*WipeDevice) ProtoMessage() {} +func (*SetU2FCounter) ProtoMessage() {} -func (x *WipeDevice) ProtoReflect() protoreflect.Message { - mi := &file_messages_management_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { +func (x *SetU2FCounter) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[33] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1072,54 +3230,44 @@ func (x *WipeDevice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use WipeDevice.ProtoReflect.Descriptor instead. -func (*WipeDevice) Descriptor() ([]byte, []int) { - return file_messages_management_proto_rawDescGZIP(), []int{11} +// Deprecated: Use SetU2FCounter.ProtoReflect.Descriptor instead. +func (*SetU2FCounter) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{33} +} + +func (x *SetU2FCounter) GetU2FCounter() uint32 { + if x != nil && x.U2FCounter != nil { + return *x.U2FCounter + } + return 0 } // * -// Request: Load seed and related internal settings from the computer +// Request: Set U2F counter // @start -// @next Success -// @next Failure -type LoadDevice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +// @next NextU2FCounter +type GetNextU2FCounter struct { + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields - - Mnemonic *string `protobuf:"bytes,1,opt,name=mnemonic" json:"mnemonic,omitempty"` // seed encoded as BIP-39 mnemonic (12, 18 or 24 words) - Node *HDNodeType `protobuf:"bytes,2,opt,name=node" json:"node,omitempty"` // BIP-32 node - Pin *string `protobuf:"bytes,3,opt,name=pin" json:"pin,omitempty"` // set PIN protection - PassphraseProtection *bool `protobuf:"varint,4,opt,name=passphrase_protection,json=passphraseProtection" json:"passphrase_protection,omitempty"` // enable master node encryption using passphrase - Language *string `protobuf:"bytes,5,opt,name=language,def=english" json:"language,omitempty"` // device language - Label *string `protobuf:"bytes,6,opt,name=label" json:"label,omitempty"` // device label - SkipChecksum *bool `protobuf:"varint,7,opt,name=skip_checksum,json=skipChecksum" json:"skip_checksum,omitempty"` // do not test mnemonic for valid BIP-39 checksum - U2FCounter *uint32 `protobuf:"varint,8,opt,name=u2f_counter,json=u2fCounter" json:"u2f_counter,omitempty"` // U2F counter + sizeCache protoimpl.SizeCache } -// Default values for LoadDevice fields. -const ( - Default_LoadDevice_Language = string("english") -) - -func (x *LoadDevice) Reset() { - *x = LoadDevice{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_management_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (x *GetNextU2FCounter) Reset() { + *x = GetNextU2FCounter{} + mi := &file_messages_management_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *LoadDevice) String() string { +func (x *GetNextU2FCounter) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LoadDevice) ProtoMessage() {} +func (*GetNextU2FCounter) ProtoMessage() {} -func (x *LoadDevice) ProtoReflect() protoreflect.Message { - mi := &file_messages_management_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { +func (x *GetNextU2FCounter) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[34] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1129,61 +3277,52 @@ func (x *LoadDevice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LoadDevice.ProtoReflect.Descriptor instead. -func (*LoadDevice) Descriptor() ([]byte, []int) { - return file_messages_management_proto_rawDescGZIP(), []int{12} -} - -func (x *LoadDevice) GetMnemonic() string { - if x != nil && x.Mnemonic != nil { - return *x.Mnemonic - } - return "" +// Deprecated: Use GetNextU2FCounter.ProtoReflect.Descriptor instead. +func (*GetNextU2FCounter) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{34} } -func (x *LoadDevice) GetNode() *HDNodeType { - if x != nil { - return x.Node - } - return nil +// * +// Request: Set U2F counter +// @end +type NextU2FCounter struct { + state protoimpl.MessageState `protogen:"open.v1"` + U2FCounter *uint32 `protobuf:"varint,1,req,name=u2f_counter,json=u2fCounter" json:"u2f_counter,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *LoadDevice) GetPin() string { - if x != nil && x.Pin != nil { - return *x.Pin - } - return "" +func (x *NextU2FCounter) Reset() { + *x = NextU2FCounter{} + mi := &file_messages_management_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *LoadDevice) GetPassphraseProtection() bool { - if x != nil && x.PassphraseProtection != nil { - return *x.PassphraseProtection - } - return false +func (x *NextU2FCounter) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *LoadDevice) GetLanguage() string { - if x != nil && x.Language != nil { - return *x.Language - } - return Default_LoadDevice_Language -} +func (*NextU2FCounter) ProtoMessage() {} -func (x *LoadDevice) GetLabel() string { - if x != nil && x.Label != nil { - return *x.Label +func (x *NextU2FCounter) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -func (x *LoadDevice) GetSkipChecksum() bool { - if x != nil && x.SkipChecksum != nil { - return *x.SkipChecksum - } - return false +// Deprecated: Use NextU2FCounter.ProtoReflect.Descriptor instead. +func (*NextU2FCounter) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{35} } -func (x *LoadDevice) GetU2FCounter() uint32 { +func (x *NextU2FCounter) GetU2FCounter() uint32 { if x != nil && x.U2FCounter != nil { return *x.U2FCounter } @@ -1191,50 +3330,32 @@ func (x *LoadDevice) GetU2FCounter() uint32 { } // * -// Request: Ask device to do initialization involving user interaction +// Request: Ask device to prepare for a preauthorized operation. // @start -// @next EntropyRequest +// @next PreauthorizedRequest // @next Failure -type ResetDevice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type DoPreauthorized struct { + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields - - DisplayRandom *bool `protobuf:"varint,1,opt,name=display_random,json=displayRandom" json:"display_random,omitempty"` // display entropy generated by the device before asking for additional entropy - Strength *uint32 `protobuf:"varint,2,opt,name=strength,def=256" json:"strength,omitempty"` // strength of seed in bits - PassphraseProtection *bool `protobuf:"varint,3,opt,name=passphrase_protection,json=passphraseProtection" json:"passphrase_protection,omitempty"` // enable master node encryption using passphrase - PinProtection *bool `protobuf:"varint,4,opt,name=pin_protection,json=pinProtection" json:"pin_protection,omitempty"` // enable PIN protection - Language *string `protobuf:"bytes,5,opt,name=language,def=english" json:"language,omitempty"` // device language - Label *string `protobuf:"bytes,6,opt,name=label" json:"label,omitempty"` // device label - U2FCounter *uint32 `protobuf:"varint,7,opt,name=u2f_counter,json=u2fCounter" json:"u2f_counter,omitempty"` // U2F counter - SkipBackup *bool `protobuf:"varint,8,opt,name=skip_backup,json=skipBackup" json:"skip_backup,omitempty"` // postpone seed backup to BackupDevice workflow - NoBackup *bool `protobuf:"varint,9,opt,name=no_backup,json=noBackup" json:"no_backup,omitempty"` // indicate that no backup is going to be made + sizeCache protoimpl.SizeCache } -// Default values for ResetDevice fields. -const ( - Default_ResetDevice_Strength = uint32(256) - Default_ResetDevice_Language = string("english") -) - -func (x *ResetDevice) Reset() { - *x = ResetDevice{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_management_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (x *DoPreauthorized) Reset() { + *x = DoPreauthorized{} + mi := &file_messages_management_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *ResetDevice) String() string { +func (x *DoPreauthorized) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ResetDevice) ProtoMessage() {} +func (*DoPreauthorized) ProtoMessage() {} -func (x *ResetDevice) ProtoReflect() protoreflect.Message { - mi := &file_messages_management_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { +func (x *DoPreauthorized) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[36] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1244,102 +3365,132 @@ func (x *ResetDevice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ResetDevice.ProtoReflect.Descriptor instead. -func (*ResetDevice) Descriptor() ([]byte, []int) { - return file_messages_management_proto_rawDescGZIP(), []int{13} +// Deprecated: Use DoPreauthorized.ProtoReflect.Descriptor instead. +func (*DoPreauthorized) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{36} } -func (x *ResetDevice) GetDisplayRandom() bool { - if x != nil && x.DisplayRandom != nil { - return *x.DisplayRandom - } - return false +// * +// Request: Device awaits a preauthorized operation. +// @start +// @next SignTx +// @next GetOwnershipProof +type PreauthorizedRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *ResetDevice) GetStrength() uint32 { - if x != nil && x.Strength != nil { - return *x.Strength - } - return Default_ResetDevice_Strength +func (x *PreauthorizedRequest) Reset() { + *x = PreauthorizedRequest{} + mi := &file_messages_management_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *ResetDevice) GetPassphraseProtection() bool { - if x != nil && x.PassphraseProtection != nil { - return *x.PassphraseProtection - } - return false +func (x *PreauthorizedRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *ResetDevice) GetPinProtection() bool { - if x != nil && x.PinProtection != nil { - return *x.PinProtection +func (*PreauthorizedRequest) ProtoMessage() {} + +func (x *PreauthorizedRequest) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return false + return mi.MessageOf(x) } -func (x *ResetDevice) GetLanguage() string { - if x != nil && x.Language != nil { - return *x.Language - } - return Default_ResetDevice_Language +// Deprecated: Use PreauthorizedRequest.ProtoReflect.Descriptor instead. +func (*PreauthorizedRequest) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{37} } -func (x *ResetDevice) GetLabel() string { - if x != nil && x.Label != nil { - return *x.Label - } - return "" +// * +// Request: Cancel any outstanding authorization in the current session. +// @start +// @next Success +// @next Failure +type CancelAuthorization struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *ResetDevice) GetU2FCounter() uint32 { - if x != nil && x.U2FCounter != nil { - return *x.U2FCounter - } - return 0 +func (x *CancelAuthorization) Reset() { + *x = CancelAuthorization{} + mi := &file_messages_management_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *ResetDevice) GetSkipBackup() bool { - if x != nil && x.SkipBackup != nil { - return *x.SkipBackup - } - return false +func (x *CancelAuthorization) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *ResetDevice) GetNoBackup() bool { - if x != nil && x.NoBackup != nil { - return *x.NoBackup +func (*CancelAuthorization) ProtoMessage() {} + +func (x *CancelAuthorization) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[38] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return false + return mi.MessageOf(x) +} + +// Deprecated: Use CancelAuthorization.ProtoReflect.Descriptor instead. +func (*CancelAuthorization) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{38} } // * -// Request: Perform backup of the device seed if not backed up using ResetDevice +// Request: Reboot firmware to bootloader // @start // @next Success -type BackupDevice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *BackupDevice) Reset() { - *x = BackupDevice{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_management_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +// @next DataChunkRequest +type RebootToBootloader struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Action to be performed after rebooting to bootloader + BootCommand *RebootToBootloader_BootCommand `protobuf:"varint,1,opt,name=boot_command,json=bootCommand,enum=hw.trezor.messages.management.RebootToBootloader_BootCommand,def=0" json:"boot_command,omitempty"` + // Firmware header to be flashed after rebooting to bootloader + FirmwareHeader []byte `protobuf:"bytes,2,opt,name=firmware_header,json=firmwareHeader" json:"firmware_header,omitempty"` + // Length of language blob to be installed before upgrading firmware + LanguageDataLength *uint32 `protobuf:"varint,3,opt,name=language_data_length,json=languageDataLength,def=0" json:"language_data_length,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +// Default values for RebootToBootloader fields. +const ( + Default_RebootToBootloader_BootCommand = RebootToBootloader_STOP_AND_WAIT + Default_RebootToBootloader_LanguageDataLength = uint32(0) +) + +func (x *RebootToBootloader) Reset() { + *x = RebootToBootloader{} + mi := &file_messages_management_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *BackupDevice) String() string { +func (x *RebootToBootloader) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BackupDevice) ProtoMessage() {} +func (*RebootToBootloader) ProtoMessage() {} -func (x *BackupDevice) ProtoReflect() protoreflect.Message { - mi := &file_messages_management_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { +func (x *RebootToBootloader) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[39] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1349,38 +3500,58 @@ func (x *BackupDevice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BackupDevice.ProtoReflect.Descriptor instead. -func (*BackupDevice) Descriptor() ([]byte, []int) { - return file_messages_management_proto_rawDescGZIP(), []int{14} +// Deprecated: Use RebootToBootloader.ProtoReflect.Descriptor instead. +func (*RebootToBootloader) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{39} +} + +func (x *RebootToBootloader) GetBootCommand() RebootToBootloader_BootCommand { + if x != nil && x.BootCommand != nil { + return *x.BootCommand + } + return Default_RebootToBootloader_BootCommand +} + +func (x *RebootToBootloader) GetFirmwareHeader() []byte { + if x != nil { + return x.FirmwareHeader + } + return nil +} + +func (x *RebootToBootloader) GetLanguageDataLength() uint32 { + if x != nil && x.LanguageDataLength != nil { + return *x.LanguageDataLength + } + return Default_RebootToBootloader_LanguageDataLength } // * -// Response: Ask for additional entropy from host computer -// @next EntropyAck -type EntropyRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +// Request: Ask device to generate a random nonce and store it in the session's cache +// @start +// @next Nonce +type GetNonce struct { + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *EntropyRequest) Reset() { - *x = EntropyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_management_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (x *GetNonce) Reset() { + *x = GetNonce{} + mi := &file_messages_management_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *EntropyRequest) String() string { +func (x *GetNonce) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EntropyRequest) ProtoMessage() {} +func (*GetNonce) ProtoMessage() {} -func (x *EntropyRequest) ProtoReflect() protoreflect.Message { - mi := &file_messages_management_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { +func (x *GetNonce) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[40] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1390,40 +3561,37 @@ func (x *EntropyRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use EntropyRequest.ProtoReflect.Descriptor instead. -func (*EntropyRequest) Descriptor() ([]byte, []int) { - return file_messages_management_proto_rawDescGZIP(), []int{15} +// Deprecated: Use GetNonce.ProtoReflect.Descriptor instead. +func (*GetNonce) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{40} } // * -// Request: Provide additional entropy for seed generation function -// @next Success -type EntropyAck struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +// Response: Contains a random nonce +// @end +type Nonce struct { + state protoimpl.MessageState `protogen:"open.v1"` + Nonce []byte `protobuf:"bytes,1,req,name=nonce" json:"nonce,omitempty"` // a 32-byte random value generated by Trezor unknownFields protoimpl.UnknownFields - - Entropy []byte `protobuf:"bytes,1,opt,name=entropy" json:"entropy,omitempty"` // 256 bits (32 bytes) of random data + sizeCache protoimpl.SizeCache } -func (x *EntropyAck) Reset() { - *x = EntropyAck{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_management_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (x *Nonce) Reset() { + *x = Nonce{} + mi := &file_messages_management_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *EntropyAck) String() string { +func (x *Nonce) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EntropyAck) ProtoMessage() {} +func (*Nonce) ProtoMessage() {} -func (x *EntropyAck) ProtoReflect() protoreflect.Message { - mi := &file_messages_management_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { +func (x *Nonce) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[41] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1433,63 +3601,47 @@ func (x *EntropyAck) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use EntropyAck.ProtoReflect.Descriptor instead. -func (*EntropyAck) Descriptor() ([]byte, []int) { - return file_messages_management_proto_rawDescGZIP(), []int{16} +// Deprecated: Use Nonce.ProtoReflect.Descriptor instead. +func (*Nonce) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{41} } -func (x *EntropyAck) GetEntropy() []byte { +func (x *Nonce) GetNonce() []byte { if x != nil { - return x.Entropy + return x.Nonce } return nil } // * -// Request: Start recovery workflow asking user for specific words of mnemonic -// Used to recovery device safely even on untrusted computer. +// Request: Ask device to unlock a subtree of the keychain. // @start -// @next WordRequest -type RecoveryDevice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +// @next UnlockedPathRequest +// @next Failure +type UnlockPath struct { + state protoimpl.MessageState `protogen:"open.v1"` + AddressN []uint32 `protobuf:"varint,1,rep,name=address_n,json=addressN" json:"address_n,omitempty"` // prefix of the BIP-32 path leading to the account (m / purpose') + Mac []byte `protobuf:"bytes,2,opt,name=mac" json:"mac,omitempty"` // the MAC returned by UnlockedPathRequest unknownFields protoimpl.UnknownFields - - WordCount *uint32 `protobuf:"varint,1,opt,name=word_count,json=wordCount" json:"word_count,omitempty"` // number of words in BIP-39 mnemonic - PassphraseProtection *bool `protobuf:"varint,2,opt,name=passphrase_protection,json=passphraseProtection" json:"passphrase_protection,omitempty"` // enable master node encryption using passphrase - PinProtection *bool `protobuf:"varint,3,opt,name=pin_protection,json=pinProtection" json:"pin_protection,omitempty"` // enable PIN protection - Language *string `protobuf:"bytes,4,opt,name=language,def=english" json:"language,omitempty"` // device language - Label *string `protobuf:"bytes,5,opt,name=label" json:"label,omitempty"` // device label - EnforceWordlist *bool `protobuf:"varint,6,opt,name=enforce_wordlist,json=enforceWordlist" json:"enforce_wordlist,omitempty"` // enforce BIP-39 wordlist during the process - // 7 reserved for unused recovery method - Type *RecoveryDevice_RecoveryDeviceType `protobuf:"varint,8,opt,name=type,enum=hw.trezor.messages.management.RecoveryDevice_RecoveryDeviceType" json:"type,omitempty"` // supported recovery type - U2FCounter *uint32 `protobuf:"varint,9,opt,name=u2f_counter,json=u2fCounter" json:"u2f_counter,omitempty"` // U2F counter - DryRun *bool `protobuf:"varint,10,opt,name=dry_run,json=dryRun" json:"dry_run,omitempty"` // perform dry-run recovery workflow (for safe mnemonic validation) + sizeCache protoimpl.SizeCache } -// Default values for RecoveryDevice fields. -const ( - Default_RecoveryDevice_Language = string("english") -) - -func (x *RecoveryDevice) Reset() { - *x = RecoveryDevice{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_management_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (x *UnlockPath) Reset() { + *x = UnlockPath{} + mi := &file_messages_management_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *RecoveryDevice) String() string { +func (x *UnlockPath) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RecoveryDevice) ProtoMessage() {} +func (*UnlockPath) ProtoMessage() {} -func (x *RecoveryDevice) ProtoReflect() protoreflect.Message { - mi := &file_messages_management_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { +func (x *UnlockPath) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[42] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1499,104 +3651,101 @@ func (x *RecoveryDevice) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RecoveryDevice.ProtoReflect.Descriptor instead. -func (*RecoveryDevice) Descriptor() ([]byte, []int) { - return file_messages_management_proto_rawDescGZIP(), []int{17} +// Deprecated: Use UnlockPath.ProtoReflect.Descriptor instead. +func (*UnlockPath) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{42} } -func (x *RecoveryDevice) GetWordCount() uint32 { - if x != nil && x.WordCount != nil { - return *x.WordCount +func (x *UnlockPath) GetAddressN() []uint32 { + if x != nil { + return x.AddressN } - return 0 + return nil } -func (x *RecoveryDevice) GetPassphraseProtection() bool { - if x != nil && x.PassphraseProtection != nil { - return *x.PassphraseProtection +func (x *UnlockPath) GetMac() []byte { + if x != nil { + return x.Mac } - return false + return nil } -func (x *RecoveryDevice) GetPinProtection() bool { - if x != nil && x.PinProtection != nil { - return *x.PinProtection - } - return false +// * +// Request: Device awaits an operation. +// @start +// @next SignTx +// @next GetPublicKey +// @next GetAddress +type UnlockedPathRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Mac []byte `protobuf:"bytes,1,req,name=mac" json:"mac,omitempty"` // authentication code for future UnlockPath calls + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *RecoveryDevice) GetLanguage() string { - if x != nil && x.Language != nil { - return *x.Language - } - return Default_RecoveryDevice_Language +func (x *UnlockedPathRequest) Reset() { + *x = UnlockedPathRequest{} + mi := &file_messages_management_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *RecoveryDevice) GetLabel() string { - if x != nil && x.Label != nil { - return *x.Label - } - return "" +func (x *UnlockedPathRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *RecoveryDevice) GetEnforceWordlist() bool { - if x != nil && x.EnforceWordlist != nil { - return *x.EnforceWordlist - } - return false -} +func (*UnlockedPathRequest) ProtoMessage() {} -func (x *RecoveryDevice) GetType() RecoveryDevice_RecoveryDeviceType { - if x != nil && x.Type != nil { - return *x.Type +func (x *UnlockedPathRequest) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[43] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return RecoveryDevice_RecoveryDeviceType_ScrambledWords + return mi.MessageOf(x) } -func (x *RecoveryDevice) GetU2FCounter() uint32 { - if x != nil && x.U2FCounter != nil { - return *x.U2FCounter - } - return 0 +// Deprecated: Use UnlockedPathRequest.ProtoReflect.Descriptor instead. +func (*UnlockedPathRequest) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{43} } -func (x *RecoveryDevice) GetDryRun() bool { - if x != nil && x.DryRun != nil { - return *x.DryRun +func (x *UnlockedPathRequest) GetMac() []byte { + if x != nil { + return x.Mac } - return false + return nil } // * -// Response: Device is waiting for user to enter word of the mnemonic -// Its position is shown only on device's internal display. -// @next WordAck -type WordRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +// Request: Show tutorial screens on the device +// @start +// @next Success +type ShowDeviceTutorial struct { + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields - - Type *WordRequest_WordRequestType `protobuf:"varint,1,opt,name=type,enum=hw.trezor.messages.management.WordRequest_WordRequestType" json:"type,omitempty"` + sizeCache protoimpl.SizeCache } -func (x *WordRequest) Reset() { - *x = WordRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_management_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (x *ShowDeviceTutorial) Reset() { + *x = ShowDeviceTutorial{} + mi := &file_messages_management_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *WordRequest) String() string { +func (x *ShowDeviceTutorial) String() string { return protoimpl.X.MessageStringOf(x) } -func (*WordRequest) ProtoMessage() {} +func (*ShowDeviceTutorial) ProtoMessage() {} -func (x *WordRequest) ProtoReflect() protoreflect.Message { - mi := &file_messages_management_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { +func (x *ShowDeviceTutorial) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[44] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1606,49 +3755,38 @@ func (x *WordRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use WordRequest.ProtoReflect.Descriptor instead. -func (*WordRequest) Descriptor() ([]byte, []int) { - return file_messages_management_proto_rawDescGZIP(), []int{18} -} - -func (x *WordRequest) GetType() WordRequest_WordRequestType { - if x != nil && x.Type != nil { - return *x.Type - } - return WordRequest_WordRequestType_Plain +// Deprecated: Use ShowDeviceTutorial.ProtoReflect.Descriptor instead. +func (*ShowDeviceTutorial) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{44} } // * -// Request: Computer replies with word from the mnemonic -// @next WordRequest +// Request: Unlocks bootloader, !irreversible! +// @start // @next Success // @next Failure -type WordAck struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type UnlockBootloader struct { + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields - - Word *string `protobuf:"bytes,1,req,name=word" json:"word,omitempty"` // one word of mnemonic on asked position + sizeCache protoimpl.SizeCache } -func (x *WordAck) Reset() { - *x = WordAck{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_management_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +func (x *UnlockBootloader) Reset() { + *x = UnlockBootloader{} + mi := &file_messages_management_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *WordAck) String() string { +func (x *UnlockBootloader) String() string { return protoimpl.X.MessageStringOf(x) } -func (*WordAck) ProtoMessage() {} +func (*UnlockBootloader) ProtoMessage() {} -func (x *WordAck) ProtoReflect() protoreflect.Message { - mi := &file_messages_management_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { +func (x *UnlockBootloader) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[45] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1658,48 +3796,83 @@ func (x *WordAck) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use WordAck.ProtoReflect.Descriptor instead. -func (*WordAck) Descriptor() ([]byte, []int) { - return file_messages_management_proto_rawDescGZIP(), []int{19} -} - -func (x *WordAck) GetWord() string { - if x != nil && x.Word != nil { - return *x.Word - } - return "" +// Deprecated: Use UnlockBootloader.ProtoReflect.Descriptor instead. +func (*UnlockBootloader) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{45} } // * -// Request: Set U2F counter +// Request: Set device brightness // @start // @next Success -type SetU2FCounter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type SetBrightness struct { + state protoimpl.MessageState `protogen:"open.v1"` + Value *uint32 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"` // if not specified, let the user choose unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} - U2FCounter *uint32 `protobuf:"varint,1,opt,name=u2f_counter,json=u2fCounter" json:"u2f_counter,omitempty"` // counter +func (x *SetBrightness) Reset() { + *x = SetBrightness{} + mi := &file_messages_management_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *SetU2FCounter) Reset() { - *x = SetU2FCounter{} - if protoimpl.UnsafeEnabled { - mi := &file_messages_management_proto_msgTypes[20] +func (x *SetBrightness) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetBrightness) ProtoMessage() {} + +func (x *SetBrightness) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[46] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetBrightness.ProtoReflect.Descriptor instead. +func (*SetBrightness) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{46} +} + +func (x *SetBrightness) GetValue() uint32 { + if x != nil && x.Value != nil { + return *x.Value } + return 0 } -func (x *SetU2FCounter) String() string { +type BackupDevice_Slip39Group struct { + state protoimpl.MessageState `protogen:"open.v1"` + MemberThreshold *uint32 `protobuf:"varint,1,req,name=member_threshold,json=memberThreshold" json:"member_threshold,omitempty"` + MemberCount *uint32 `protobuf:"varint,2,req,name=member_count,json=memberCount" json:"member_count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BackupDevice_Slip39Group) Reset() { + *x = BackupDevice_Slip39Group{} + mi := &file_messages_management_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BackupDevice_Slip39Group) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SetU2FCounter) ProtoMessage() {} +func (*BackupDevice_Slip39Group) ProtoMessage() {} -func (x *SetU2FCounter) ProtoReflect() protoreflect.Message { - mi := &file_messages_management_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { +func (x *BackupDevice_Slip39Group) ProtoReflect() protoreflect.Message { + mi := &file_messages_management_proto_msgTypes[47] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1709,289 +3882,426 @@ func (x *SetU2FCounter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SetU2FCounter.ProtoReflect.Descriptor instead. -func (*SetU2FCounter) Descriptor() ([]byte, []int) { - return file_messages_management_proto_rawDescGZIP(), []int{20} +// Deprecated: Use BackupDevice_Slip39Group.ProtoReflect.Descriptor instead. +func (*BackupDevice_Slip39Group) Descriptor() ([]byte, []int) { + return file_messages_management_proto_rawDescGZIP(), []int{25, 0} } -func (x *SetU2FCounter) GetU2FCounter() uint32 { - if x != nil && x.U2FCounter != nil { - return *x.U2FCounter +func (x *BackupDevice_Slip39Group) GetMemberThreshold() uint32 { + if x != nil && x.MemberThreshold != nil { + return *x.MemberThreshold + } + return 0 +} + +func (x *BackupDevice_Slip39Group) GetMemberCount() uint32 { + if x != nil && x.MemberCount != nil { + return *x.MemberCount } return 0 } var File_messages_management_proto protoreflect.FileDescriptor -var file_messages_management_proto_rawDesc = []byte{ - 0x0a, 0x19, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2d, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x68, 0x77, 0x2e, - 0x74, 0x72, 0x65, 0x7a, 0x6f, 0x72, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x15, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x73, 0x2d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x4b, 0x0a, 0x0a, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x70, 0x61, - 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, - 0x73, 0x6b, 0x69, 0x70, 0x50, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x22, 0x0d, - 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0x8c, 0x07, - 0x0a, 0x08, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x65, - 0x6e, 0x64, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x76, 0x65, 0x6e, 0x64, - 0x6f, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6d, 0x61, 0x6a, 0x6f, 0x72, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x69, 0x6e, 0x6f, 0x72, - 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, - 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, - 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x70, 0x61, 0x74, 0x63, 0x68, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x6f, 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x5f, - 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x62, 0x6f, 0x6f, 0x74, - 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x69, 0x6e, 0x5f, 0x70, - 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0d, 0x70, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, - 0x0a, 0x15, 0x70, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x72, 0x6f, - 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x70, - 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x6f, 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, - 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x62, 0x6f, - 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1a, 0x0a, 0x08, - 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, - 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x69, 0x6e, 0x5f, - 0x63, 0x61, 0x63, 0x68, 0x65, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x70, 0x69, - 0x6e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x61, 0x73, 0x73, 0x70, - 0x68, 0x72, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x64, 0x18, 0x11, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x10, 0x70, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x43, 0x61, - 0x63, 0x68, 0x65, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x66, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, - 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, - 0x66, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x12, - 0x21, 0x0a, 0x0c, 0x6e, 0x65, 0x65, 0x64, 0x73, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, - 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x6e, 0x65, 0x65, 0x64, 0x73, 0x42, 0x61, 0x63, 0x6b, - 0x75, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, - 0x6c, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x19, - 0x0a, 0x08, 0x66, 0x77, 0x5f, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x07, 0x66, 0x77, 0x4d, 0x61, 0x6a, 0x6f, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x77, 0x5f, - 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x66, 0x77, 0x4d, - 0x69, 0x6e, 0x6f, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x77, 0x5f, 0x70, 0x61, 0x74, 0x63, 0x68, - 0x18, 0x18, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x66, 0x77, 0x50, 0x61, 0x74, 0x63, 0x68, 0x12, - 0x1b, 0x0a, 0x09, 0x66, 0x77, 0x5f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x18, 0x19, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x66, 0x77, 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, 0x24, 0x0a, 0x0e, - 0x66, 0x77, 0x5f, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x1a, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x66, 0x77, 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x4b, 0x65, - 0x79, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x75, 0x6e, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, - 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x75, - 0x6e, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, - 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x1c, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x08, 0x6e, 0x6f, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x22, 0x0e, 0x0a, 0x0c, - 0x43, 0x6c, 0x65, 0x61, 0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x87, 0x03, 0x0a, - 0x0d, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1a, - 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x12, 0x25, 0x0a, 0x0e, 0x75, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, - 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x50, 0x61, 0x73, - 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x68, 0x6f, 0x6d, 0x65, 0x73, - 0x63, 0x72, 0x65, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x68, 0x6f, 0x6d, - 0x65, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x12, 0x6e, 0x0a, 0x11, 0x70, 0x61, 0x73, 0x73, 0x70, - 0x68, 0x72, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x41, 0x2e, 0x68, 0x77, 0x2e, 0x74, 0x72, 0x65, 0x7a, 0x6f, 0x72, 0x2e, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x2e, 0x50, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x10, 0x70, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, - 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x12, 0x61, 0x75, 0x74, 0x6f, 0x5f, - 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x6d, 0x73, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x61, 0x75, 0x74, 0x6f, 0x4c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6c, - 0x61, 0x79, 0x4d, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, - 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, - 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x35, 0x0a, 0x14, 0x50, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x53, 0x4b, 0x10, 0x00, - 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x56, 0x49, 0x43, 0x45, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, - 0x48, 0x4f, 0x53, 0x54, 0x10, 0x02, 0x22, 0x22, 0x0a, 0x0a, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x46, - 0x6c, 0x61, 0x67, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x22, 0x23, 0x0a, 0x09, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x50, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x22, - 0xa9, 0x01, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, - 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x62, - 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x25, 0x0a, 0x0e, 0x70, 0x69, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x70, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x15, 0x70, 0x61, 0x73, 0x73, 0x70, 0x68, - 0x72, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x70, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, - 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x08, 0x0a, 0x06, 0x43, - 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x22, 0x20, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, - 0x6f, 0x70, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, - 0x0d, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x23, 0x0a, 0x07, 0x45, 0x6e, 0x74, 0x72, 0x6f, - 0x70, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x18, 0x01, 0x20, - 0x02, 0x28, 0x0c, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x22, 0x0c, 0x0a, 0x0a, - 0x57, 0x69, 0x70, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0xab, 0x02, 0x0a, 0x0a, 0x4c, - 0x6f, 0x61, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x6e, 0x65, - 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x6e, 0x65, - 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x12, 0x39, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x68, 0x77, 0x2e, 0x74, 0x72, 0x65, 0x7a, 0x6f, 0x72, 0x2e, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x48, 0x44, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, - 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, - 0x69, 0x6e, 0x12, 0x33, 0x0a, 0x15, 0x70, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, - 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x14, 0x70, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, - 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x3a, 0x07, 0x65, 0x6e, 0x67, 0x6c, 0x69, - 0x73, 0x68, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, - 0x73, 0x75, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x73, 0x6b, 0x69, 0x70, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x32, 0x66, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x75, 0x32, - 0x66, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x22, 0xcb, 0x02, 0x0a, 0x0b, 0x52, 0x65, 0x73, - 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x69, 0x73, 0x70, - 0x6c, 0x61, 0x79, 0x5f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0d, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x12, - 0x1f, 0x0a, 0x08, 0x73, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x3a, 0x03, 0x32, 0x35, 0x36, 0x52, 0x08, 0x73, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x12, 0x33, 0x0a, 0x15, 0x70, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x5f, 0x70, - 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x14, 0x70, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x69, 0x6e, 0x5f, 0x70, 0x72, 0x6f, - 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x70, - 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x08, - 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x3a, 0x07, - 0x65, 0x6e, 0x67, 0x6c, 0x69, 0x73, 0x68, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x32, 0x66, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x75, 0x32, - 0x66, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6b, 0x69, 0x70, - 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, - 0x6b, 0x69, 0x70, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x5f, - 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, 0x6f, - 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x22, 0x0e, 0x0a, 0x0c, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0x10, 0x0a, 0x0e, 0x45, 0x6e, 0x74, 0x72, 0x6f, 0x70, - 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x26, 0x0a, 0x0a, 0x45, 0x6e, 0x74, 0x72, - 0x6f, 0x70, 0x79, 0x41, 0x63, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, - 0x22, 0xdd, 0x03, 0x0a, 0x0e, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x44, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x64, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x15, 0x70, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, - 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x14, 0x70, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x69, 0x6e, 0x5f, 0x70, - 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0d, 0x70, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, - 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x3a, 0x07, 0x65, 0x6e, 0x67, 0x6c, 0x69, 0x73, 0x68, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, - 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x6e, 0x66, - 0x6f, 0x72, 0x63, 0x65, 0x5f, 0x77, 0x6f, 0x72, 0x64, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x57, 0x6f, 0x72, 0x64, - 0x6c, 0x69, 0x73, 0x74, 0x12, 0x54, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x40, 0x2e, 0x68, 0x77, 0x2e, 0x74, 0x72, 0x65, 0x7a, 0x6f, 0x72, 0x2e, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x32, - 0x66, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x0a, 0x75, 0x32, 0x66, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x64, - 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x72, - 0x79, 0x52, 0x75, 0x6e, 0x22, 0x5a, 0x0a, 0x12, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x21, 0x52, 0x65, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x5f, 0x53, 0x63, 0x72, 0x61, 0x6d, 0x62, 0x6c, 0x65, 0x64, 0x57, 0x6f, 0x72, 0x64, 0x73, 0x10, - 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x44, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x10, 0x01, - 0x22, 0xc5, 0x01, 0x0a, 0x0b, 0x57, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x4e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, - 0x2e, 0x68, 0x77, 0x2e, 0x74, 0x72, 0x65, 0x7a, 0x6f, 0x72, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x73, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x57, - 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x22, 0x66, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x57, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x50, 0x6c, 0x61, 0x69, 0x6e, 0x10, 0x00, 0x12, 0x1b, - 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x5f, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x39, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x57, - 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, - 0x61, 0x74, 0x72, 0x69, 0x78, 0x36, 0x10, 0x02, 0x22, 0x1d, 0x0a, 0x07, 0x57, 0x6f, 0x72, 0x64, - 0x41, 0x63, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, - 0x09, 0x52, 0x04, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x30, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x55, 0x32, - 0x46, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x32, 0x66, 0x5f, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x75, - 0x32, 0x66, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x42, 0x79, 0x0a, 0x23, 0x63, 0x6f, 0x6d, - 0x2e, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x6c, 0x61, 0x62, 0x73, 0x2e, 0x74, 0x72, 0x65, - 0x7a, 0x6f, 0x72, 0x2e, 0x6c, 0x69, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x42, 0x17, 0x54, 0x72, 0x65, 0x7a, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2f, 0x67, - 0x6f, 0x2d, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x62, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2f, 0x74, 0x72, - 0x65, 0x7a, 0x6f, 0x72, -} +const file_messages_management_proto_rawDesc = "" + + "\n" + + "\x19messages-management.proto\x12\x1dhw.trezor.messages.management\x1a\roptions.proto\"\x80\x01\n" + + "\n" + + "Initialize\x12\x1d\n" + + "\n" + + "session_id\x18\x01 \x01(\fR\tsessionId\x12,\n" + + "\x10_skip_passphrase\x18\x02 \x01(\bB\x02\x18\x01R\x0eSkipPassphrase\x12%\n" + + "\x0ederive_cardano\x18\x03 \x01(\bR\rderiveCardano\"\r\n" + + "\vGetFeatures\"\xba\x18\n" + + "\bFeatures\x12\x16\n" + + "\x06vendor\x18\x01 \x01(\tR\x06vendor\x12#\n" + + "\rmajor_version\x18\x02 \x02(\rR\fmajorVersion\x12#\n" + + "\rminor_version\x18\x03 \x02(\rR\fminorVersion\x12#\n" + + "\rpatch_version\x18\x04 \x02(\rR\fpatchVersion\x12'\n" + + "\x0fbootloader_mode\x18\x05 \x01(\bR\x0ebootloaderMode\x12\x1b\n" + + "\tdevice_id\x18\x06 \x01(\tR\bdeviceId\x12%\n" + + "\x0epin_protection\x18\a \x01(\bR\rpinProtection\x123\n" + + "\x15passphrase_protection\x18\b \x01(\bR\x14passphraseProtection\x12\x1a\n" + + "\blanguage\x18\t \x01(\tR\blanguage\x12\x14\n" + + "\x05label\x18\n" + + " \x01(\tR\x05label\x12 \n" + + "\vinitialized\x18\f \x01(\bR\vinitialized\x12\x1a\n" + + "\brevision\x18\r \x01(\fR\brevision\x12'\n" + + "\x0fbootloader_hash\x18\x0e \x01(\fR\x0ebootloaderHash\x12\x1a\n" + + "\bimported\x18\x0f \x01(\bR\bimported\x12\x1a\n" + + "\bunlocked\x18\x10 \x01(\bR\bunlocked\x120\n" + + "\x12_passphrase_cached\x18\x11 \x01(\bB\x02\x18\x01R\x10PassphraseCached\x12)\n" + + "\x10firmware_present\x18\x12 \x01(\bR\x0ffirmwarePresent\x12k\n" + + "\x13backup_availability\x18\x13 \x01(\x0e2:.hw.trezor.messages.management.Features.BackupAvailabilityR\x12backupAvailability\x12\x14\n" + + "\x05flags\x18\x14 \x01(\rR\x05flags\x12\x14\n" + + "\x05model\x18\x15 \x01(\tR\x05model\x12\x19\n" + + "\bfw_major\x18\x16 \x01(\rR\afwMajor\x12\x19\n" + + "\bfw_minor\x18\x17 \x01(\rR\afwMinor\x12\x19\n" + + "\bfw_patch\x18\x18 \x01(\rR\afwPatch\x12\x1b\n" + + "\tfw_vendor\x18\x19 \x01(\tR\bfwVendor\x12+\n" + + "\x11unfinished_backup\x18\x1b \x01(\bR\x10unfinishedBackup\x12\x1b\n" + + "\tno_backup\x18\x1c \x01(\bR\bnoBackup\x12_\n" + + "\x0frecovery_status\x18\x1d \x01(\x0e26.hw.trezor.messages.management.Features.RecoveryStatusR\x0erecoveryStatus\x12V\n" + + "\fcapabilities\x18\x1e \x03(\x0e22.hw.trezor.messages.management.Features.CapabilityR\fcapabilities\x12J\n" + + "\vbackup_type\x18\x1f \x01(\x0e2).hw.trezor.messages.management.BackupTypeR\n" + + "backupType\x12&\n" + + "\x0fsd_card_present\x18 \x01(\bR\rsdCardPresent\x12#\n" + + "\rsd_protection\x18! \x01(\bR\fsdProtection\x120\n" + + "\x14wipe_code_protection\x18\" \x01(\bR\x12wipeCodeProtection\x12\x1d\n" + + "\n" + + "session_id\x18# \x01(\fR\tsessionId\x12=\n" + + "\x1bpassphrase_always_on_device\x18$ \x01(\bR\x18passphraseAlwaysOnDevice\x12T\n" + + "\rsafety_checks\x18% \x01(\x0e2/.hw.trezor.messages.management.SafetyCheckLevelR\fsafetyChecks\x12+\n" + + "\x12auto_lock_delay_ms\x18& \x01(\rR\x0fautoLockDelayMs\x12Y\n" + + "\x10display_rotation\x18' \x01(\x0e2..hw.trezor.messages.management.DisplayRotationR\x0fdisplayRotation\x123\n" + + "\x15experimental_features\x18( \x01(\bR\x14experimentalFeatures\x12\x12\n" + + "\x04busy\x18) \x01(\bR\x04busy\x12\\\n" + + "\x11homescreen_format\x18* \x01(\x0e2/.hw.trezor.messages.management.HomescreenFormatR\x10homescreenFormat\x129\n" + + "\x19hide_passphrase_from_host\x18+ \x01(\bR\x16hidePassphraseFromHost\x12%\n" + + "\x0einternal_model\x18, \x01(\tR\rinternalModel\x12\x1d\n" + + "\n" + + "unit_color\x18- \x01(\rR\tunitColor\x12!\n" + + "\funit_btconly\x18. \x01(\bR\vunitBtconly\x12)\n" + + "\x10homescreen_width\x18/ \x01(\rR\x0fhomescreenWidth\x12+\n" + + "\x11homescreen_height\x180 \x01(\rR\x10homescreenHeight\x12+\n" + + "\x11bootloader_locked\x181 \x01(\bR\x10bootloaderLocked\x12>\n" + + "\x18language_version_matches\x182 \x01(\b:\x04trueR\x16languageVersionMatches\x12%\n" + + "\x0eunit_packaging\x183 \x01(\rR\runitPackaging\x12'\n" + + "\x0fhaptic_feedback\x184 \x01(\bR\x0ehapticFeedback\x12P\n" + + "\rrecovery_type\x185 \x01(\x0e2+.hw.trezor.messages.management.RecoveryTypeR\frecoveryType\x12\x1d\n" + + "\n" + + "optiga_sec\x186 \x01(\rR\toptigaSec\"C\n" + + "\x12BackupAvailability\x12\x10\n" + + "\fNotAvailable\x10\x00\x12\f\n" + + "\bRequired\x10\x01\x12\r\n" + + "\tAvailable\x10\x02\"7\n" + + "\x0eRecoveryStatus\x12\v\n" + + "\aNothing\x10\x00\x12\f\n" + + "\bRecovery\x10\x01\x12\n" + + "\n" + + "\x06Backup\x10\x02\"\xf6\x04\n" + + "\n" + + "Capability\x12\x1c\n" + + "\x12Capability_Bitcoin\x10\x01\x1a\x04\x80\xa6\x1d\x01\x12\x1b\n" + + "\x17Capability_Bitcoin_like\x10\x02\x12\x16\n" + + "\x12Capability_Binance\x10\x03\x12\x16\n" + + "\x12Capability_Cardano\x10\x04\x12\x1b\n" + + "\x11Capability_Crypto\x10\x05\x1a\x04\x80\xa6\x1d\x01\x12\x12\n" + + "\x0eCapability_EOS\x10\x06\x12\x17\n" + + "\x13Capability_Ethereum\x10\a\x12\x17\n" + + "\x0fCapability_Lisk\x10\b\x1a\x02\b\x01\x12\x15\n" + + "\x11Capability_Monero\x10\t\x12\x12\n" + + "\x0eCapability_NEM\x10\n" + + "\x12\x15\n" + + "\x11Capability_Ripple\x10\v\x12\x16\n" + + "\x12Capability_Stellar\x10\f\x12\x14\n" + + "\x10Capability_Tezos\x10\r\x12\x12\n" + + "\x0eCapability_U2F\x10\x0e\x12\x1b\n" + + "\x11Capability_Shamir\x10\x0f\x1a\x04\x80\xa6\x1d\x01\x12!\n" + + "\x17Capability_ShamirGroups\x10\x10\x1a\x04\x80\xa6\x1d\x01\x12$\n" + + "\x1aCapability_PassphraseEntry\x10\x11\x1a\x04\x80\xa6\x1d\x01\x12\x15\n" + + "\x11Capability_Solana\x10\x12\x12!\n" + + "\x17Capability_Translations\x10\x13\x1a\x04\x80\xa6\x1d\x01\x12\x1f\n" + + "\x15Capability_Brightness\x10\x14\x1a\x04\x80\xa6\x1d\x01\x12\x1b\n" + + "\x11Capability_Haptic\x10\x15\x1a\x04\x80\xa6\x1d\x01\x12\x18\n" + + "\x0eCapability_BLE\x10\x16\x1a\x04\x80\xa6\x1d\x01\x12\x18\n" + + "\x0eCapability_NFC\x10\x17\x1a\x04\x80\xa6\x1d\x01\x1a\x04\xc8\xf3\x18\x01\"\f\n" + + "\n" + + "LockDevice\"&\n" + + "\aSetBusy\x12\x1b\n" + + "\texpiry_ms\x18\x01 \x01(\rR\bexpiryMs\"\f\n" + + "\n" + + "EndSession\"\xa1\x05\n" + + "\rApplySettings\x12\x1e\n" + + "\blanguage\x18\x01 \x01(\tB\x02\x18\x01R\blanguage\x12\x14\n" + + "\x05label\x18\x02 \x01(\tR\x05label\x12%\n" + + "\x0euse_passphrase\x18\x03 \x01(\bR\rusePassphrase\x12\x1e\n" + + "\n" + + "homescreen\x18\x04 \x01(\fR\n" + + "homescreen\x120\n" + + "\x12_passphrase_source\x18\x05 \x01(\rB\x02\x18\x01R\x10PassphraseSource\x12+\n" + + "\x12auto_lock_delay_ms\x18\x06 \x01(\rR\x0fautoLockDelayMs\x12Y\n" + + "\x10display_rotation\x18\a \x01(\x0e2..hw.trezor.messages.management.DisplayRotationR\x0fdisplayRotation\x12=\n" + + "\x1bpassphrase_always_on_device\x18\b \x01(\bR\x18passphraseAlwaysOnDevice\x12T\n" + + "\rsafety_checks\x18\t \x01(\x0e2/.hw.trezor.messages.management.SafetyCheckLevelR\fsafetyChecks\x123\n" + + "\x15experimental_features\x18\n" + + " \x01(\bR\x14experimentalFeatures\x129\n" + + "\x19hide_passphrase_from_host\x18\v \x01(\bR\x16hidePassphraseFromHost\x12'\n" + + "\x0fhaptic_feedback\x18\r \x01(\bR\x0ehapticFeedback\x12+\n" + + "\x11homescreen_length\x18\x0e \x01(\rR\x10homescreenLength\"T\n" + + "\x0eChangeLanguage\x12\x1f\n" + + "\vdata_length\x18\x01 \x02(\rR\n" + + "dataLength\x12!\n" + + "\fshow_display\x18\x02 \x01(\bR\vshowDisplay\"T\n" + + "\x10DataChunkRequest\x12\x1f\n" + + "\vdata_length\x18\x01 \x02(\rR\n" + + "dataLength\x12\x1f\n" + + "\vdata_offset\x18\x02 \x02(\rR\n" + + "dataOffset\"-\n" + + "\fDataChunkAck\x12\x1d\n" + + "\n" + + "data_chunk\x18\x01 \x02(\fR\tdataChunk\"\"\n" + + "\n" + + "ApplyFlags\x12\x14\n" + + "\x05flags\x18\x01 \x02(\rR\x05flags\"#\n" + + "\tChangePin\x12\x16\n" + + "\x06remove\x18\x01 \x01(\bR\x06remove\"(\n" + + "\x0eChangeWipeCode\x12\x16\n" + + "\x06remove\x18\x01 \x01(\bR\x06remove\"\xaa\x01\n" + + "\tSdProtect\x12]\n" + + "\toperation\x18\x01 \x02(\x0e2?.hw.trezor.messages.management.SdProtect.SdProtectOperationTypeR\toperation\">\n" + + "\x16SdProtectOperationType\x12\v\n" + + "\aDISABLE\x10\x00\x12\n" + + "\n" + + "\x06ENABLE\x10\x01\x12\v\n" + + "\aREFRESH\x10\x02\"O\n" + + "\x04Ping\x12\x1a\n" + + "\amessage\x18\x01 \x01(\t:\x00R\amessage\x12+\n" + + "\x11button_protection\x18\x02 \x01(\bR\x10buttonProtection\"\b\n" + + "\x06Cancel\" \n" + + "\n" + + "GetEntropy\x12\x12\n" + + "\x04size\x18\x01 \x02(\rR\x04size\"#\n" + + "\aEntropy\x12\x18\n" + + "\aentropy\x18\x01 \x02(\fR\aentropy\"/\n" + + "\x0fGetFirmwareHash\x12\x1c\n" + + "\tchallenge\x18\x01 \x01(\fR\tchallenge\"\"\n" + + "\fFirmwareHash\x12\x12\n" + + "\x04hash\x18\x01 \x02(\fR\x04hash\"2\n" + + "\x12AuthenticateDevice\x12\x1c\n" + + "\tchallenge\x18\x01 \x02(\fR\tchallenge\"U\n" + + "\x11AuthenticityProof\x12\"\n" + + "\fcertificates\x18\x01 \x03(\fR\fcertificates\x12\x1c\n" + + "\tsignature\x18\x02 \x02(\fR\tsignature\"\f\n" + + "\n" + + "WipeDevice\"\xad\x02\n" + + "\n" + + "LoadDevice\x12\x1c\n" + + "\tmnemonics\x18\x01 \x03(\tR\tmnemonics\x12\x10\n" + + "\x03pin\x18\x03 \x01(\tR\x03pin\x123\n" + + "\x15passphrase_protection\x18\x04 \x01(\bR\x14passphraseProtection\x12\x1e\n" + + "\blanguage\x18\x05 \x01(\tB\x02\x18\x01R\blanguage\x12\x14\n" + + "\x05label\x18\x06 \x01(\tR\x05label\x12#\n" + + "\rskip_checksum\x18\a \x01(\bR\fskipChecksum\x12\x1f\n" + + "\vu2f_counter\x18\b \x01(\rR\n" + + "u2fCounter\x12!\n" + + "\fneeds_backup\x18\t \x01(\bR\vneedsBackup\x12\x1b\n" + + "\tno_backup\x18\n" + + " \x01(\bR\bnoBackup\"\x9d\x03\n" + + "\vResetDevice\x12\x1f\n" + + "\bstrength\x18\x02 \x01(\r:\x03256R\bstrength\x123\n" + + "\x15passphrase_protection\x18\x03 \x01(\bR\x14passphraseProtection\x12%\n" + + "\x0epin_protection\x18\x04 \x01(\bR\rpinProtection\x12\x1e\n" + + "\blanguage\x18\x05 \x01(\tB\x02\x18\x01R\blanguage\x12\x14\n" + + "\x05label\x18\x06 \x01(\tR\x05label\x12\x1f\n" + + "\vu2f_counter\x18\a \x01(\rR\n" + + "u2fCounter\x12\x1f\n" + + "\vskip_backup\x18\b \x01(\bR\n" + + "skipBackup\x12\x1b\n" + + "\tno_backup\x18\t \x01(\bR\bnoBackup\x12Q\n" + + "\vbackup_type\x18\n" + + " \x01(\x0e2).hw.trezor.messages.management.BackupType:\x05Bip39R\n" + + "backupType\x12#\n" + + "\rentropy_check\x18\v \x01(\bR\fentropyCheckJ\x04\b\x01\x10\x02\"\xe5\x01\n" + + "\fBackupDevice\x12'\n" + + "\x0fgroup_threshold\x18\x01 \x01(\rR\x0egroupThreshold\x12O\n" + + "\x06groups\x18\x02 \x03(\v27.hw.trezor.messages.management.BackupDevice.Slip39GroupR\x06groups\x1a[\n" + + "\vSlip39Group\x12)\n" + + "\x10member_threshold\x18\x01 \x02(\rR\x0fmemberThreshold\x12!\n" + + "\fmember_count\x18\x02 \x02(\rR\vmemberCount\"b\n" + + "\x0eEntropyRequest\x12-\n" + + "\x12entropy_commitment\x18\x01 \x01(\fR\x11entropyCommitment\x12!\n" + + "\fprev_entropy\x18\x02 \x01(\fR\vprevEntropy\"&\n" + + "\n" + + "EntropyAck\x12\x18\n" + + "\aentropy\x18\x01 \x02(\fR\aentropy\"\x13\n" + + "\x11EntropyCheckReady\"5\n" + + "\x14EntropyCheckContinue\x12\x1d\n" + + "\x06finish\x18\x01 \x01(\b:\x05falseR\x06finish\"\x8d\x04\n" + + "\x0eRecoveryDevice\x12\x1d\n" + + "\n" + + "word_count\x18\x01 \x01(\rR\twordCount\x123\n" + + "\x15passphrase_protection\x18\x02 \x01(\bR\x14passphraseProtection\x12%\n" + + "\x0epin_protection\x18\x03 \x01(\bR\rpinProtection\x12\x1e\n" + + "\blanguage\x18\x04 \x01(\tB\x02\x18\x01R\blanguage\x12\x14\n" + + "\x05label\x18\x05 \x01(\tR\x05label\x12)\n" + + "\x10enforce_wordlist\x18\x06 \x01(\bR\x0fenforceWordlist\x12j\n" + + "\finput_method\x18\b \x01(\x0e2G.hw.trezor.messages.management.RecoveryDevice.RecoveryDeviceInputMethodR\vinputMethod\x12\x1f\n" + + "\vu2f_counter\x18\t \x01(\rR\n" + + "u2fCounter\x12O\n" + + "\x04type\x18\n" + + " \x01(\x0e2+.hw.trezor.messages.management.RecoveryType:\x0eNormalRecoveryR\x04type\";\n" + + "\x19RecoveryDeviceInputMethod\x12\x12\n" + + "\x0eScrambledWords\x10\x00\x12\n" + + "\n" + + "\x06Matrix\x10\x01J\x04\b\a\x10\b\"\xc5\x01\n" + + "\vWordRequest\x12N\n" + + "\x04type\x18\x01 \x02(\x0e2:.hw.trezor.messages.management.WordRequest.WordRequestTypeR\x04type\"f\n" + + "\x0fWordRequestType\x12\x19\n" + + "\x15WordRequestType_Plain\x10\x00\x12\x1b\n" + + "\x17WordRequestType_Matrix9\x10\x01\x12\x1b\n" + + "\x17WordRequestType_Matrix6\x10\x02\"\x1d\n" + + "\aWordAck\x12\x12\n" + + "\x04word\x18\x01 \x02(\tR\x04word\"0\n" + + "\rSetU2FCounter\x12\x1f\n" + + "\vu2f_counter\x18\x01 \x02(\rR\n" + + "u2fCounter\"\x13\n" + + "\x11GetNextU2FCounter\"1\n" + + "\x0eNextU2FCounter\x12\x1f\n" + + "\vu2f_counter\x18\x01 \x02(\rR\n" + + "u2fCounter\"\x11\n" + + "\x0fDoPreauthorized\"\x16\n" + + "\x14PreauthorizedRequest\"\x15\n" + + "\x13CancelAuthorization\"\x9a\x02\n" + + "\x12RebootToBootloader\x12o\n" + + "\fboot_command\x18\x01 \x01(\x0e2=.hw.trezor.messages.management.RebootToBootloader.BootCommand:\rSTOP_AND_WAITR\vbootCommand\x12'\n" + + "\x0ffirmware_header\x18\x02 \x01(\fR\x0efirmwareHeader\x123\n" + + "\x14language_data_length\x18\x03 \x01(\r:\x010R\x12languageDataLength\"5\n" + + "\vBootCommand\x12\x11\n" + + "\rSTOP_AND_WAIT\x10\x00\x12\x13\n" + + "\x0fINSTALL_UPGRADE\x10\x01\"\x10\n" + + "\bGetNonce:\x04\x88\xb2\x19\x01\"#\n" + + "\x05Nonce\x12\x14\n" + + "\x05nonce\x18\x01 \x02(\fR\x05nonce:\x04\x88\xb2\x19\x01\";\n" + + "\n" + + "UnlockPath\x12\x1b\n" + + "\taddress_n\x18\x01 \x03(\rR\baddressN\x12\x10\n" + + "\x03mac\x18\x02 \x01(\fR\x03mac\"'\n" + + "\x13UnlockedPathRequest\x12\x10\n" + + "\x03mac\x18\x01 \x02(\fR\x03mac\"\x14\n" + + "\x12ShowDeviceTutorial\"\x12\n" + + "\x10UnlockBootloader\"%\n" + + "\rSetBrightness\x12\x14\n" + + "\x05value\x18\x01 \x01(\rR\x05value*\x99\x01\n" + + "\n" + + "BackupType\x12\t\n" + + "\x05Bip39\x10\x00\x12\x10\n" + + "\fSlip39_Basic\x10\x01\x12\x13\n" + + "\x0fSlip39_Advanced\x10\x02\x12\x1c\n" + + "\x18Slip39_Single_Extendable\x10\x03\x12\x1b\n" + + "\x17Slip39_Basic_Extendable\x10\x04\x12\x1e\n" + + "\x1aSlip39_Advanced_Extendable\x10\x05*G\n" + + "\x10SafetyCheckLevel\x12\n" + + "\n" + + "\x06Strict\x10\x00\x12\x10\n" + + "\fPromptAlways\x10\x01\x12\x15\n" + + "\x11PromptTemporarily\x10\x02*=\n" + + "\x0fDisplayRotation\x12\t\n" + + "\x05North\x10\x00\x12\b\n" + + "\x04East\x10Z\x12\n" + + "\n" + + "\x05South\x10\xb4\x01\x12\t\n" + + "\x04West\x10\x8e\x02*0\n" + + "\x10HomescreenFormat\x12\b\n" + + "\x04Toif\x10\x01\x12\b\n" + + "\x04Jpeg\x10\x02\x12\b\n" + + "\x04ToiG\x10\x03*H\n" + + "\fRecoveryType\x12\x12\n" + + "\x0eNormalRecovery\x10\x00\x12\n" + + "\n" + + "\x06DryRun\x10\x01\x12\x18\n" + + "\x14UnlockRepeatedBackup\x10\x02B}\x80\xa6\x1d\x01\n" + + "#com.satoshilabs.trezor.lib.protobufB\x17TrezorMessageManagementZ9github.com/ethereum/go-ethereum/accounts/usbwallet/trezor" var ( file_messages_management_proto_rawDescOnce sync.Once - file_messages_management_proto_rawDescData = file_messages_management_proto_rawDesc + file_messages_management_proto_rawDescData []byte ) func file_messages_management_proto_rawDescGZIP() []byte { file_messages_management_proto_rawDescOnce.Do(func() { - file_messages_management_proto_rawDescData = protoimpl.X.CompressGZIP(file_messages_management_proto_rawDescData) + file_messages_management_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_messages_management_proto_rawDesc), len(file_messages_management_proto_rawDesc))) }) return file_messages_management_proto_rawDescData } -var file_messages_management_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_messages_management_proto_msgTypes = make([]protoimpl.MessageInfo, 21) +var file_messages_management_proto_enumTypes = make([]protoimpl.EnumInfo, 12) +var file_messages_management_proto_msgTypes = make([]protoimpl.MessageInfo, 48) var file_messages_management_proto_goTypes = []any{ - (ApplySettings_PassphraseSourceType)(0), // 0: hw.trezor.messages.management.ApplySettings.PassphraseSourceType - (RecoveryDevice_RecoveryDeviceType)(0), // 1: hw.trezor.messages.management.RecoveryDevice.RecoveryDeviceType - (WordRequest_WordRequestType)(0), // 2: hw.trezor.messages.management.WordRequest.WordRequestType - (*Initialize)(nil), // 3: hw.trezor.messages.management.Initialize - (*GetFeatures)(nil), // 4: hw.trezor.messages.management.GetFeatures - (*Features)(nil), // 5: hw.trezor.messages.management.Features - (*ClearSession)(nil), // 6: hw.trezor.messages.management.ClearSession - (*ApplySettings)(nil), // 7: hw.trezor.messages.management.ApplySettings - (*ApplyFlags)(nil), // 8: hw.trezor.messages.management.ApplyFlags - (*ChangePin)(nil), // 9: hw.trezor.messages.management.ChangePin - (*Ping)(nil), // 10: hw.trezor.messages.management.Ping - (*Cancel)(nil), // 11: hw.trezor.messages.management.Cancel - (*GetEntropy)(nil), // 12: hw.trezor.messages.management.GetEntropy - (*Entropy)(nil), // 13: hw.trezor.messages.management.Entropy - (*WipeDevice)(nil), // 14: hw.trezor.messages.management.WipeDevice - (*LoadDevice)(nil), // 15: hw.trezor.messages.management.LoadDevice - (*ResetDevice)(nil), // 16: hw.trezor.messages.management.ResetDevice - (*BackupDevice)(nil), // 17: hw.trezor.messages.management.BackupDevice - (*EntropyRequest)(nil), // 18: hw.trezor.messages.management.EntropyRequest - (*EntropyAck)(nil), // 19: hw.trezor.messages.management.EntropyAck - (*RecoveryDevice)(nil), // 20: hw.trezor.messages.management.RecoveryDevice - (*WordRequest)(nil), // 21: hw.trezor.messages.management.WordRequest - (*WordAck)(nil), // 22: hw.trezor.messages.management.WordAck - (*SetU2FCounter)(nil), // 23: hw.trezor.messages.management.SetU2FCounter - (*HDNodeType)(nil), // 24: hw.trezor.messages.common.HDNodeType + (BackupType)(0), // 0: hw.trezor.messages.management.BackupType + (SafetyCheckLevel)(0), // 1: hw.trezor.messages.management.SafetyCheckLevel + (DisplayRotation)(0), // 2: hw.trezor.messages.management.DisplayRotation + (HomescreenFormat)(0), // 3: hw.trezor.messages.management.HomescreenFormat + (RecoveryType)(0), // 4: hw.trezor.messages.management.RecoveryType + (Features_BackupAvailability)(0), // 5: hw.trezor.messages.management.Features.BackupAvailability + (Features_RecoveryStatus)(0), // 6: hw.trezor.messages.management.Features.RecoveryStatus + (Features_Capability)(0), // 7: hw.trezor.messages.management.Features.Capability + (SdProtect_SdProtectOperationType)(0), // 8: hw.trezor.messages.management.SdProtect.SdProtectOperationType + (RecoveryDevice_RecoveryDeviceInputMethod)(0), // 9: hw.trezor.messages.management.RecoveryDevice.RecoveryDeviceInputMethod + (WordRequest_WordRequestType)(0), // 10: hw.trezor.messages.management.WordRequest.WordRequestType + (RebootToBootloader_BootCommand)(0), // 11: hw.trezor.messages.management.RebootToBootloader.BootCommand + (*Initialize)(nil), // 12: hw.trezor.messages.management.Initialize + (*GetFeatures)(nil), // 13: hw.trezor.messages.management.GetFeatures + (*Features)(nil), // 14: hw.trezor.messages.management.Features + (*LockDevice)(nil), // 15: hw.trezor.messages.management.LockDevice + (*SetBusy)(nil), // 16: hw.trezor.messages.management.SetBusy + (*EndSession)(nil), // 17: hw.trezor.messages.management.EndSession + (*ApplySettings)(nil), // 18: hw.trezor.messages.management.ApplySettings + (*ChangeLanguage)(nil), // 19: hw.trezor.messages.management.ChangeLanguage + (*DataChunkRequest)(nil), // 20: hw.trezor.messages.management.DataChunkRequest + (*DataChunkAck)(nil), // 21: hw.trezor.messages.management.DataChunkAck + (*ApplyFlags)(nil), // 22: hw.trezor.messages.management.ApplyFlags + (*ChangePin)(nil), // 23: hw.trezor.messages.management.ChangePin + (*ChangeWipeCode)(nil), // 24: hw.trezor.messages.management.ChangeWipeCode + (*SdProtect)(nil), // 25: hw.trezor.messages.management.SdProtect + (*Ping)(nil), // 26: hw.trezor.messages.management.Ping + (*Cancel)(nil), // 27: hw.trezor.messages.management.Cancel + (*GetEntropy)(nil), // 28: hw.trezor.messages.management.GetEntropy + (*Entropy)(nil), // 29: hw.trezor.messages.management.Entropy + (*GetFirmwareHash)(nil), // 30: hw.trezor.messages.management.GetFirmwareHash + (*FirmwareHash)(nil), // 31: hw.trezor.messages.management.FirmwareHash + (*AuthenticateDevice)(nil), // 32: hw.trezor.messages.management.AuthenticateDevice + (*AuthenticityProof)(nil), // 33: hw.trezor.messages.management.AuthenticityProof + (*WipeDevice)(nil), // 34: hw.trezor.messages.management.WipeDevice + (*LoadDevice)(nil), // 35: hw.trezor.messages.management.LoadDevice + (*ResetDevice)(nil), // 36: hw.trezor.messages.management.ResetDevice + (*BackupDevice)(nil), // 37: hw.trezor.messages.management.BackupDevice + (*EntropyRequest)(nil), // 38: hw.trezor.messages.management.EntropyRequest + (*EntropyAck)(nil), // 39: hw.trezor.messages.management.EntropyAck + (*EntropyCheckReady)(nil), // 40: hw.trezor.messages.management.EntropyCheckReady + (*EntropyCheckContinue)(nil), // 41: hw.trezor.messages.management.EntropyCheckContinue + (*RecoveryDevice)(nil), // 42: hw.trezor.messages.management.RecoveryDevice + (*WordRequest)(nil), // 43: hw.trezor.messages.management.WordRequest + (*WordAck)(nil), // 44: hw.trezor.messages.management.WordAck + (*SetU2FCounter)(nil), // 45: hw.trezor.messages.management.SetU2FCounter + (*GetNextU2FCounter)(nil), // 46: hw.trezor.messages.management.GetNextU2FCounter + (*NextU2FCounter)(nil), // 47: hw.trezor.messages.management.NextU2FCounter + (*DoPreauthorized)(nil), // 48: hw.trezor.messages.management.DoPreauthorized + (*PreauthorizedRequest)(nil), // 49: hw.trezor.messages.management.PreauthorizedRequest + (*CancelAuthorization)(nil), // 50: hw.trezor.messages.management.CancelAuthorization + (*RebootToBootloader)(nil), // 51: hw.trezor.messages.management.RebootToBootloader + (*GetNonce)(nil), // 52: hw.trezor.messages.management.GetNonce + (*Nonce)(nil), // 53: hw.trezor.messages.management.Nonce + (*UnlockPath)(nil), // 54: hw.trezor.messages.management.UnlockPath + (*UnlockedPathRequest)(nil), // 55: hw.trezor.messages.management.UnlockedPathRequest + (*ShowDeviceTutorial)(nil), // 56: hw.trezor.messages.management.ShowDeviceTutorial + (*UnlockBootloader)(nil), // 57: hw.trezor.messages.management.UnlockBootloader + (*SetBrightness)(nil), // 58: hw.trezor.messages.management.SetBrightness + (*BackupDevice_Slip39Group)(nil), // 59: hw.trezor.messages.management.BackupDevice.Slip39Group } var file_messages_management_proto_depIdxs = []int32{ - 0, // 0: hw.trezor.messages.management.ApplySettings.passphrase_source:type_name -> hw.trezor.messages.management.ApplySettings.PassphraseSourceType - 24, // 1: hw.trezor.messages.management.LoadDevice.node:type_name -> hw.trezor.messages.common.HDNodeType - 1, // 2: hw.trezor.messages.management.RecoveryDevice.type:type_name -> hw.trezor.messages.management.RecoveryDevice.RecoveryDeviceType - 2, // 3: hw.trezor.messages.management.WordRequest.type:type_name -> hw.trezor.messages.management.WordRequest.WordRequestType - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 5, // 0: hw.trezor.messages.management.Features.backup_availability:type_name -> hw.trezor.messages.management.Features.BackupAvailability + 6, // 1: hw.trezor.messages.management.Features.recovery_status:type_name -> hw.trezor.messages.management.Features.RecoveryStatus + 7, // 2: hw.trezor.messages.management.Features.capabilities:type_name -> hw.trezor.messages.management.Features.Capability + 0, // 3: hw.trezor.messages.management.Features.backup_type:type_name -> hw.trezor.messages.management.BackupType + 1, // 4: hw.trezor.messages.management.Features.safety_checks:type_name -> hw.trezor.messages.management.SafetyCheckLevel + 2, // 5: hw.trezor.messages.management.Features.display_rotation:type_name -> hw.trezor.messages.management.DisplayRotation + 3, // 6: hw.trezor.messages.management.Features.homescreen_format:type_name -> hw.trezor.messages.management.HomescreenFormat + 4, // 7: hw.trezor.messages.management.Features.recovery_type:type_name -> hw.trezor.messages.management.RecoveryType + 2, // 8: hw.trezor.messages.management.ApplySettings.display_rotation:type_name -> hw.trezor.messages.management.DisplayRotation + 1, // 9: hw.trezor.messages.management.ApplySettings.safety_checks:type_name -> hw.trezor.messages.management.SafetyCheckLevel + 8, // 10: hw.trezor.messages.management.SdProtect.operation:type_name -> hw.trezor.messages.management.SdProtect.SdProtectOperationType + 0, // 11: hw.trezor.messages.management.ResetDevice.backup_type:type_name -> hw.trezor.messages.management.BackupType + 59, // 12: hw.trezor.messages.management.BackupDevice.groups:type_name -> hw.trezor.messages.management.BackupDevice.Slip39Group + 9, // 13: hw.trezor.messages.management.RecoveryDevice.input_method:type_name -> hw.trezor.messages.management.RecoveryDevice.RecoveryDeviceInputMethod + 4, // 14: hw.trezor.messages.management.RecoveryDevice.type:type_name -> hw.trezor.messages.management.RecoveryType + 10, // 15: hw.trezor.messages.management.WordRequest.type:type_name -> hw.trezor.messages.management.WordRequest.WordRequestType + 11, // 16: hw.trezor.messages.management.RebootToBootloader.boot_command:type_name -> hw.trezor.messages.management.RebootToBootloader.BootCommand + 17, // [17:17] is the sub-list for method output_type + 17, // [17:17] is the sub-list for method input_type + 17, // [17:17] is the sub-list for extension type_name + 17, // [17:17] is the sub-list for extension extendee + 0, // [0:17] is the sub-list for field type_name } func init() { file_messages_management_proto_init() } @@ -1999,268 +4309,14 @@ func file_messages_management_proto_init() { if File_messages_management_proto != nil { return } - file_messages_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_messages_management_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Initialize); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_management_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetFeatures); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_management_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Features); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_management_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ClearSession); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_management_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ApplySettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_management_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ApplyFlags); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_management_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ChangePin); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_management_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Ping); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_management_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Cancel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_management_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetEntropy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_management_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Entropy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_management_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*WipeDevice); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_management_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*LoadDevice); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_management_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ResetDevice); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_management_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*BackupDevice); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_management_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*EntropyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_management_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*EntropyAck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_management_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*RecoveryDevice); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_management_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*WordRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_management_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*WordAck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_messages_management_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*SetU2FCounter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } + file_options_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_messages_management_proto_rawDesc, - NumEnums: 3, - NumMessages: 21, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_messages_management_proto_rawDesc), len(file_messages_management_proto_rawDesc)), + NumEnums: 12, + NumMessages: 48, NumExtensions: 0, NumServices: 0, }, @@ -2270,7 +4326,6 @@ func file_messages_management_proto_init() { MessageInfos: file_messages_management_proto_msgTypes, }.Build() File_messages_management_proto = out.File - file_messages_management_proto_rawDesc = nil file_messages_management_proto_goTypes = nil file_messages_management_proto_depIdxs = nil } diff --git a/accounts/usbwallet/trezor/messages-management.proto b/accounts/usbwallet/trezor/messages-management.proto index 55eb58983ed..506d40cc003 100644 --- a/accounts/usbwallet/trezor/messages-management.proto +++ b/accounts/usbwallet/trezor/messages-management.proto @@ -1,6 +1,6 @@ // This file originates from the SatoshiLabs Trezor `common` repository at: // https://github.com/trezor/trezor-common/blob/master/protob/messages-management.proto -// dated 28.05.2019, commit 893fd219d4a01bcffa0cd9cfa631856371ec5aa9. +// dated 30.06.2025, commit 421b45d4677f2499234692b0f54010bc45b3ae5f. syntax = "proto2"; package hw.trezor.messages.management; @@ -11,7 +11,49 @@ option go_package = "github.com/ethereum/go-ethereum/accounts/usbwallet/trezor" option java_package = "com.satoshilabs.trezor.lib.protobuf"; option java_outer_classname = "TrezorMessageManagement"; -import "messages-common.proto"; +import "options.proto"; + +option (include_in_bitcoin_only) = true; + +/** + * Type of the mnemonic backup given/received by the device during reset/recovery. + */ +enum BackupType { + Bip39 = 0; // also called "Single Backup", see BIP-0039 + Slip39_Basic = 1; // also called "Shamir Backup", see SLIP-0039 + Slip39_Advanced = 2; // also called "Super Shamir" or "Shamir with Groups", see SLIP-0039#two-level-scheme + Slip39_Single_Extendable = 3; // extendable single-share Shamir backup + Slip39_Basic_Extendable = 4; // extendable multi-share Shamir backup + Slip39_Advanced_Extendable = 5; // extendable multi-share Shamir backup with groups +} + +/** + * Level of safety checks for unsafe actions like spending from invalid path namespace or setting high transaction fee. + */ +enum SafetyCheckLevel { + Strict = 0; // disallow unsafe actions, this is the default + PromptAlways = 1; // ask user before unsafe action + PromptTemporarily = 2; // like PromptAlways but reverts to Strict after reboot +} + +/** + * Allowed display rotation angles (in degrees from North) + */ +enum DisplayRotation { + North = 0; + East = 90; + South = 180; + West = 270; +} + +/** + * Format of the homescreen image + */ +enum HomescreenFormat { + Toif = 1; // full-color toif + Jpeg = 2; // jpeg + ToiG = 3; // greyscale toif +} /** * Request: Reset device to default state and ask for device details @@ -19,8 +61,9 @@ import "messages-common.proto"; * @next Features */ message Initialize { - optional bytes state = 1; // assumed device state, clear session if set and different - optional bool skip_passphrase = 2; // this session should always assume empty passphrase + optional bytes session_id = 1; // assumed device session id; Trezor clears caches if it is different or empty + optional bool _skip_passphrase = 2 [deprecated=true]; // removed as part of passphrase redesign + optional bool derive_cardano = 3; // whether to derive Cardano Icarus root keys in this session } /** @@ -36,65 +79,193 @@ message GetFeatures { * @end */ message Features { - optional string vendor = 1; // name of the manufacturer, e.g. "trezor.io" - optional uint32 major_version = 2; // major version of the firmware/bootloader, e.g. 1 - optional uint32 minor_version = 3; // minor version of the firmware/bootloader, e.g. 0 - optional uint32 patch_version = 4; // patch version of the firmware/bootloader, e.g. 0 - optional bool bootloader_mode = 5; // is device in bootloader mode? - optional string device_id = 6; // device's unique identifier - optional bool pin_protection = 7; // is device protected by PIN? - optional bool passphrase_protection = 8; // is node/mnemonic encrypted using passphrase? - optional string language = 9; // device language - optional string label = 10; // device description label - optional bool initialized = 12; // does device contain seed? - optional bytes revision = 13; // SCM revision of firmware - optional bytes bootloader_hash = 14; // hash of the bootloader - optional bool imported = 15; // was storage imported from an external source? - optional bool pin_cached = 16; // is PIN already cached in session? - optional bool passphrase_cached = 17; // is passphrase already cached in session? - optional bool firmware_present = 18; // is valid firmware loaded? - optional bool needs_backup = 19; // does storage need backup? (equals to Storage.needs_backup) - optional uint32 flags = 20; // device flags (equals to Storage.flags) - optional string model = 21; // device hardware model - optional uint32 fw_major = 22; // reported firmware version if in bootloader mode - optional uint32 fw_minor = 23; // reported firmware version if in bootloader mode - optional uint32 fw_patch = 24; // reported firmware version if in bootloader mode - optional string fw_vendor = 25; // reported firmware vendor if in bootloader mode - optional bytes fw_vendor_keys = 26; // reported firmware vendor keys (their hash) - optional bool unfinished_backup = 27; // report unfinished backup (equals to Storage.unfinished_backup) - optional bool no_backup = 28; // report no backup (equals to Storage.no_backup) -} - -/** - * Request: clear session (removes cached PIN, passphrase, etc). + optional string vendor = 1; // name of the manufacturer, e.g. "trezor.io" + required uint32 major_version = 2; // major version of the firmware/bootloader, e.g. 1 + required uint32 minor_version = 3; // minor version of the firmware/bootloader, e.g. 0 + required uint32 patch_version = 4; // patch version of the firmware/bootloader, e.g. 0 + optional bool bootloader_mode = 5; // is device in bootloader mode? + optional string device_id = 6; // device's unique identifier + optional bool pin_protection = 7; // is device protected by PIN? + optional bool passphrase_protection = 8; // is node/mnemonic encrypted using passphrase? + optional string language = 9; // device language + optional string label = 10; // device description label + optional bool initialized = 12; // does device contain seed? + optional bytes revision = 13; // SCM revision of firmware + optional bytes bootloader_hash = 14; // hash of the bootloader + optional bool imported = 15; // was storage imported from an external source? + optional bool unlocked = 16; // is the device unlocked? called "pin_cached" previously + optional bool _passphrase_cached = 17 [deprecated=true]; // is passphrase already cached in session? + optional bool firmware_present = 18; // is valid firmware loaded? + optional BackupAvailability backup_availability = 19; // does storage need backup? is repeated backup unlocked? + optional uint32 flags = 20; // device flags (equals to Storage.flags) + optional string model = 21; // device hardware model + optional uint32 fw_major = 22; // reported firmware version if in bootloader mode + optional uint32 fw_minor = 23; // reported firmware version if in bootloader mode + optional uint32 fw_patch = 24; // reported firmware version if in bootloader mode + optional string fw_vendor = 25; // reported firmware vendor if in bootloader mode + // optional bytes fw_vendor_keys = 26; // obsoleted, use fw_vendor + optional bool unfinished_backup = 27; // report unfinished backup (equals to Storage.unfinished_backup) + optional bool no_backup = 28; // report no backup (equals to Storage.no_backup) + optional RecoveryStatus recovery_status = 29; // whether or not we are in recovery mode and of what kind + repeated Capability capabilities = 30; // list of supported capabilities + optional BackupType backup_type = 31; // type of device backup (BIP-39 / SLIP-39 basic / SLIP-39 advanced) + optional bool sd_card_present = 32; // is SD card present + optional bool sd_protection = 33; // is SD Protect enabled + optional bool wipe_code_protection = 34; // is wipe code protection enabled + optional bytes session_id = 35; + optional bool passphrase_always_on_device = 36; // device enforces passphrase entry on Trezor + optional SafetyCheckLevel safety_checks = 37; // safety check level, set to Prompt to limit path namespace enforcement + optional uint32 auto_lock_delay_ms = 38; // number of milliseconds after which the device locks itself + optional DisplayRotation display_rotation = 39; // rotation of display (in degrees from North) + optional bool experimental_features = 40; // are experimental message types enabled? + optional bool busy = 41; // is the device busy, showing "Do not disconnect"? + optional HomescreenFormat homescreen_format = 42; // format of the homescreen, 1 = TOIf, 2 = jpg, 3 = TOIG + optional bool hide_passphrase_from_host = 43; // should we hide the passphrase when it comes from host? + optional string internal_model = 44; // internal model name + optional uint32 unit_color = 45; // color of the unit/device + optional bool unit_btconly = 46; // unit/device is intended as bitcoin only + optional uint32 homescreen_width = 47; // homescreen width in pixels + optional uint32 homescreen_height = 48; // homescreen height in pixels + optional bool bootloader_locked = 49; // bootloader is locked + optional bool language_version_matches = 50 [default=true]; // translation blob version matches firmware version + optional uint32 unit_packaging = 51; // unit/device packaging version + optional bool haptic_feedback = 52; // haptic feedback is enabled + optional RecoveryType recovery_type = 53; // what type of recovery we are in. NB: this works in conjunction with recovery_status + optional uint32 optiga_sec = 54; // Optiga's security event counter. + + enum BackupAvailability { + /// Device is already backed up, or a previous backup has failed. + NotAvailable = 0; + /// Device is not backed up. Backup is required. + Required = 1; + /// Device is already backed up and can be backed up again. + Available = 2; + } + + enum RecoveryStatus { + Nothing = 0; // we are not in recovery mode + Recovery = 1; // we are in "Normal" or "DryRun" recovery + Backup = 2; // we are in repeated backup mode + } + + enum Capability { + option (has_bitcoin_only_values) = true; + + Capability_Bitcoin = 1 [(bitcoin_only) = true]; + Capability_Bitcoin_like = 2; // Altcoins based on the Bitcoin source code + Capability_Binance = 3; // BNB Smart Chain + Capability_Cardano = 4; + Capability_Crypto = 5 [(bitcoin_only) = true]; // generic crypto operations for GPG, SSH, etc. + Capability_EOS = 6; + Capability_Ethereum = 7; + Capability_Lisk = 8 [deprecated = true]; + Capability_Monero = 9; + Capability_NEM = 10; + Capability_Ripple = 11; + Capability_Stellar = 12; + Capability_Tezos = 13; + Capability_U2F = 14; + Capability_Shamir = 15 [(bitcoin_only) = true]; + Capability_ShamirGroups = 16 [(bitcoin_only) = true]; + Capability_PassphraseEntry = 17 [(bitcoin_only) = true]; // the device is capable of passphrase entry directly on the device + Capability_Solana = 18; + Capability_Translations = 19 [(bitcoin_only) = true]; + Capability_Brightness = 20 [(bitcoin_only) = true]; + Capability_Haptic = 21 [(bitcoin_only) = true]; + Capability_BLE = 22 [(bitcoin_only) = true]; // Bluetooth Low Energy + Capability_NFC = 23 [(bitcoin_only) = true]; // Near Field Communications + } +} + +/** + * Request: soft-lock the device. Following actions will require PIN. Passphrases remain cached. + * @start + * @next Success + */ +message LockDevice { +} + +/** + * Request: Show a "Do not disconnect" dialog instead of the standard homescreen. + * @start + * @next Success + */ +message SetBusy { + optional uint32 expiry_ms = 1; // The time in milliseconds after which the dialog will automatically disappear. Overrides any previously set expiry. If not set, then the dialog is hidden. +} + +/** + * Request: end the current sesson. Following actions must call Initialize again. + * Cache for the current session is discarded, other sessions remain intact. + * Device is not PIN-locked. * @start * @next Success */ -message ClearSession { +message EndSession { } /** - * Request: change language and/or label of the device + * Request: change some property of the device, e.g. label or homescreen * @start * @next Success + * @next DataChunkRequest * @next Failure */ message ApplySettings { - optional string language = 1; - optional string label = 2; - optional bool use_passphrase = 3; - optional bytes homescreen = 4; - optional PassphraseSourceType passphrase_source = 5; - optional uint32 auto_lock_delay_ms = 6; - optional uint32 display_rotation = 7; // in degrees from North - /** - * Structure representing passphrase source - */ - enum PassphraseSourceType { - ASK = 0; - DEVICE = 1; - HOST = 2; - } + optional string language = 1 [deprecated=true]; + optional string label = 2; + optional bool use_passphrase = 3; + optional bytes homescreen = 4; // homescreen image in single array, deprecated for 14 + optional uint32 _passphrase_source = 5 [deprecated=true]; // ASK = 0; DEVICE = 1; HOST = 2; + optional uint32 auto_lock_delay_ms = 6; + optional DisplayRotation display_rotation = 7; // rotation of display (in degrees from North) + optional bool passphrase_always_on_device = 8; // do not prompt for passphrase, enforce device entry + optional SafetyCheckLevel safety_checks = 9; // Safety check level, set to Prompt to limit path namespace enforcement + optional bool experimental_features = 10; // enable experimental message types + optional bool hide_passphrase_from_host = 11; // do not show passphrase coming from host + optional bool haptic_feedback = 13; // enable haptic feedback + optional uint32 homescreen_length = 14; // byte length of new homescreen, device will request chunks +} + +/** + * Request: change the device language via translation data. + * Does not send the translation data itself, as they are too large for one message. + * Device will request the translation data in chunks. + * @start + * @next DataChunkRequest + * @next Failure + */ +message ChangeLanguage { + // byte length of the whole translation blob (set to 0 for default language - english) + required uint32 data_length = 1; + // Prompt the user on screen. + // In certain conditions (such as freshly installed device), the confirmation prompt + // is not mandatory. Setting show_display=false will skip the prompt if that's + // the case. If the device does not allow skipping the prompt, a request with + // show_display=false will return a failure. (This way the host can safely try + // to change the language without invoking a prompt.) + // Setting show_display to true will always show the prompt. + // Leaving the option unset will show the prompt only when necessary. + optional bool show_display = 2; +} + +/** + * Response: Device asks for more data from translation/homescreen image. + * @end + * @next DataChunkAck + */ +message DataChunkRequest { + required uint32 data_length = 1; // Number of bytes being requested + required uint32 data_offset = 2; // Offset of the first byte being requested +} + +/** + * Request: Translation/homescreen payload data. + * @next DataChunkRequest + * @next Success + */ +message DataChunkAck { + required bytes data_chunk = 1; // Bytes from translation/homescreen payload } /** @@ -104,7 +275,7 @@ message ApplySettings { * @next Failure */ message ApplyFlags { - optional uint32 flags = 1; // bitmask, can only set bits, not unset + required uint32 flags = 1; // bitmask, can only set bits, not unset } /** @@ -114,7 +285,35 @@ message ApplyFlags { * @next Failure */ message ChangePin { - optional bool remove = 1; // is PIN removal requested? + optional bool remove = 1; // is PIN removal requested? +} + +/** + * Request: Starts workflow for setting/removing the wipe code + * @start + * @next Success + * @next Failure + */ +message ChangeWipeCode { + optional bool remove = 1; // is wipe code removal requested? +} + +/** + * Request: Starts workflow for enabling/regenerating/disabling SD card protection + * @start + * @next Success + * @next Failure + */ +message SdProtect { + required SdProtectOperationType operation = 1; + /** + * Structure representing SD card protection operation + */ + enum SdProtectOperationType { + DISABLE = 0; + ENABLE = 1; + REFRESH = 2; + } } /** @@ -123,10 +322,8 @@ message ChangePin { * @next Success */ message Ping { - optional string message = 1; // message to send back in Success message - optional bool button_protection = 2; // ask for button press - optional bool pin_protection = 3; // ask for PIN if set in device - optional bool passphrase_protection = 4; // ask for passphrase if set in device + optional string message = 1 [default=""]; // message to send back in Success message + optional bool button_protection = 2; // ask for button press } /** @@ -144,7 +341,7 @@ message Cancel { * @next Failure */ message GetEntropy { - required uint32 size = 1; // size of requested entropy + required uint32 size = 1; // size of requested entropy } /** @@ -152,7 +349,44 @@ message GetEntropy { * @end */ message Entropy { - required bytes entropy = 1; // chunk of random generated bytes + required bytes entropy = 1; // chunk of random generated bytes +} + +/** + * Request: Get a hash of the installed firmware combined with an optional challenge. + * @start + * @next FirmwareHash + * @next Failure + */ +message GetFirmwareHash { + optional bytes challenge = 1; // Blake2s key up to 32 bytes in length. +} + +/** + * Response: Hash of the installed firmware combined with the optional challenge. + * @end + */ +message FirmwareHash { + required bytes hash = 1; +} + +/** + * Request: Request a signature of the provided challenge. + * @start + * @next AuthenticityProof + * @next Failure + */ +message AuthenticateDevice { + required bytes challenge = 1; // A random challenge to sign. +} + +/** + * Response: Signature of the provided challenge along with a certificate issued by the Trezor company. + * @end + */ +message AuthenticityProof { + repeated bytes certificates = 1; // A certificate chain starting with the device certificate, followed by intermediate CA certificates, the last of which is signed by Trezor company's root CA. + required bytes signature = 2; // A DER-encoded signature of "\0x13AuthenticateDevice:" + length-prefixed challenge that should be verified using the device certificate. } /** @@ -171,14 +405,15 @@ message WipeDevice { * @next Failure */ message LoadDevice { - optional string mnemonic = 1; // seed encoded as BIP-39 mnemonic (12, 18 or 24 words) - optional hw.trezor.messages.common.HDNodeType node = 2; // BIP-32 node - optional string pin = 3; // set PIN protection - optional bool passphrase_protection = 4; // enable master node encryption using passphrase - optional string language = 5 [default='english']; // device language - optional string label = 6; // device label - optional bool skip_checksum = 7; // do not test mnemonic for valid BIP-39 checksum - optional uint32 u2f_counter = 8; // U2F counter + repeated string mnemonics = 1; // seed encoded as mnemonic (12, 18 or 24 words for BIP39, 20 or 33 for SLIP39) + optional string pin = 3; // set PIN protection + optional bool passphrase_protection = 4; // enable master node encryption using passphrase + optional string language = 5 [deprecated=true]; // deprecated (use ChangeLanguage) + optional string label = 6; // device label + optional bool skip_checksum = 7; // do not test mnemonic for valid BIP-39 checksum + optional uint32 u2f_counter = 8; // U2F counter + optional bool needs_backup = 9; // set "needs backup" flag + optional bool no_backup = 10; // indicate that no backup is going to be made } /** @@ -188,15 +423,17 @@ message LoadDevice { * @next Failure */ message ResetDevice { - optional bool display_random = 1; // display entropy generated by the device before asking for additional entropy - optional uint32 strength = 2 [default=256]; // strength of seed in bits - optional bool passphrase_protection = 3; // enable master node encryption using passphrase - optional bool pin_protection = 4; // enable PIN protection - optional string language = 5 [default='english']; // device language - optional string label = 6; // device label - optional uint32 u2f_counter = 7; // U2F counter - optional bool skip_backup = 8; // postpone seed backup to BackupDevice workflow - optional bool no_backup = 9; // indicate that no backup is going to be made + reserved 1; // unused display_random + optional uint32 strength = 2 [default=256]; // strength of seed in bits + optional bool passphrase_protection = 3; // enable master node encryption using passphrase + optional bool pin_protection = 4; // enable PIN protection + optional string language = 5 [deprecated=true]; // deprecated (use ChangeLanguage) + optional string label = 6; // device label + optional uint32 u2f_counter = 7; // U2F counter + optional bool skip_backup = 8; // postpone seed backup to BackupDevice workflow + optional bool no_backup = 9; // indicate that no backup is going to be made + optional BackupType backup_type = 10 [default=Bip39]; // type of the mnemonic backup + optional bool entropy_check = 11; // run with entropy check protocol } /** @@ -205,6 +442,12 @@ message ResetDevice { * @next Success */ message BackupDevice { + optional uint32 group_threshold = 1; + message Slip39Group { + required uint32 member_threshold = 1; + required uint32 member_count = 2; + } + repeated Slip39Group groups = 2; } /** @@ -212,14 +455,34 @@ message BackupDevice { * @next EntropyAck */ message EntropyRequest { + optional bytes entropy_commitment = 1; // HMAC-SHA256 of Trezor's internal entropy used in entropy check. + optional bytes prev_entropy = 2; // Trezor's internal entropy from the previous round of entropy check. } /** * Request: Provide additional entropy for seed generation function * @next Success + * @next EntropyCheckReady */ message EntropyAck { - optional bytes entropy = 1; // 256 bits (32 bytes) of random data + required bytes entropy = 1; // 256 bits (32 bytes) of the host's random data +} + +/** + * Response: Trezor is ready for the next phase of the entropy check protocol. + * @next EntropyCheckContinue + * @next GetPublicKey + */ +message EntropyCheckReady { +} + +/** + * Request: Proceed with the next phase of the entropy check protocol, asking Trezor to either reveal its internal entropy or to finish and store the seed. + * @next Success + * @next EntropyRequest + */ +message EntropyCheckContinue { + optional bool finish = 1 [default=false]; // finish the entropy check protocol, store the seed } /** @@ -229,29 +492,35 @@ message EntropyAck { * @next WordRequest */ message RecoveryDevice { - optional uint32 word_count = 1; // number of words in BIP-39 mnemonic - optional bool passphrase_protection = 2; // enable master node encryption using passphrase - optional bool pin_protection = 3; // enable PIN protection - optional string language = 4 [default='english']; // device language - optional string label = 5; // device label - optional bool enforce_wordlist = 6; // enforce BIP-39 wordlist during the process - // 7 reserved for unused recovery method - optional RecoveryDeviceType type = 8; // supported recovery type - optional uint32 u2f_counter = 9; // U2F counter - optional bool dry_run = 10; // perform dry-run recovery workflow (for safe mnemonic validation) - /** - * Type of recovery procedure. These should be used as bitmask, e.g., - * `RecoveryDeviceType_ScrambledWords | RecoveryDeviceType_Matrix` - * listing every method supported by the host computer. - * - * Note that ScrambledWords must be supported by every implementation - * for backward compatibility; there is no way to not support it. - */ - enum RecoveryDeviceType { - // use powers of two when extending this field - RecoveryDeviceType_ScrambledWords = 0; // words in scrambled order - RecoveryDeviceType_Matrix = 1; // matrix recovery type - } + optional uint32 word_count = 1; // number of words in BIP-39 mnemonic (T1 only) + optional bool passphrase_protection = 2; // enable master node encryption using passphrase + optional bool pin_protection = 3; // enable PIN protection + optional string language = 4 [deprecated=true]; // deprecated (use ChangeLanguage) + optional string label = 5; // device label + optional bool enforce_wordlist = 6; // enforce BIP-39 wordlist during the process (T1 only) + reserved 7; // unused recovery method + optional RecoveryDeviceInputMethod input_method = 8; // supported recovery input method (T1 only) + optional uint32 u2f_counter = 9; // U2F counter + optional RecoveryType type = 10 [default=NormalRecovery]; // the type of recovery to perform + /** + * Type of recovery procedure. These should be used as bitmask, e.g., + * `RecoveryDeviceInputMethod_ScrambledWords | RecoveryDeviceInputMethod_Matrix` + * listing every method supported by the host computer. + * + * Note that ScrambledWords must be supported by every implementation + * for backward compatibility; there is no way to not support it. + */ + enum RecoveryDeviceInputMethod { + // use powers of two when extending this field + ScrambledWords = 0; // words in scrambled order + Matrix = 1; // matrix recovery type + } +} + +enum RecoveryType { + NormalRecovery = 0; // recovery from seedphrase on an uninitialized device + DryRun = 1; // mnemonic validation + UnlockRepeatedBackup = 2; // unlock SLIP-39 repeated backup } /** @@ -260,15 +529,15 @@ message RecoveryDevice { * @next WordAck */ message WordRequest { - optional WordRequestType type = 1; - /** - * Type of Recovery Word request - */ - enum WordRequestType { - WordRequestType_Plain = 0; - WordRequestType_Matrix9 = 1; - WordRequestType_Matrix6 = 2; - } + required WordRequestType type = 1; + /** + * Type of Recovery Word request + */ + enum WordRequestType { + WordRequestType_Plain = 0; + WordRequestType_Matrix9 = 1; + WordRequestType_Matrix6 = 2; + } } /** @@ -278,7 +547,7 @@ message WordRequest { * @next Failure */ message WordAck { - required string word = 1; // one word of mnemonic on asked position + required string word = 1; // one word of mnemonic on asked position } /** @@ -287,5 +556,137 @@ message WordAck { * @next Success */ message SetU2FCounter { - optional uint32 u2f_counter = 1; // counter + required uint32 u2f_counter = 1; +} + +/** + * Request: Set U2F counter + * @start + * @next NextU2FCounter + */ +message GetNextU2FCounter { +} + +/** + * Request: Set U2F counter + * @end + */ +message NextU2FCounter { + required 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 { +} + +/** + * Request: Cancel any outstanding authorization in the current session. + * @start + * @next Success + * @next Failure + */ +message CancelAuthorization { +} + +/** + * Request: Reboot firmware to bootloader + * @start + * @next Success + * @next DataChunkRequest + */ +message RebootToBootloader { + // Action to be performed after rebooting to bootloader + optional BootCommand boot_command = 1 [default=STOP_AND_WAIT]; + // Firmware header to be flashed after rebooting to bootloader + optional bytes firmware_header = 2; + // Length of language blob to be installed before upgrading firmware + optional uint32 language_data_length = 3 [default=0]; + + enum BootCommand { + // Go to bootloader menu + STOP_AND_WAIT = 0; + // Connect to host and wait for firmware update + INSTALL_UPGRADE = 1; + } +} + +/** + * Request: Ask device to generate a random nonce and store it in the session's cache + * @start + * @next Nonce + */ +message GetNonce { + option (experimental_message) = true; +} + +/** + * Response: Contains a random nonce + * @end + */ +message Nonce { + option (experimental_message) = true; + + required bytes nonce = 1; // a 32-byte random value generated by Trezor +} + +/** + * Request: Ask device to unlock a subtree of the keychain. + * @start + * @next UnlockedPathRequest + * @next Failure + */ +message UnlockPath { + repeated uint32 address_n = 1; // prefix of the BIP-32 path leading to the account (m / purpose') + optional bytes mac = 2; // the MAC returned by UnlockedPathRequest +} + +/** + * Request: Device awaits an operation. + * @start + * @next SignTx + * @next GetPublicKey + * @next GetAddress + */ +message UnlockedPathRequest { + required bytes mac = 1; // authentication code for future UnlockPath calls +} + +/** + * Request: Show tutorial screens on the device + * @start + * @next Success + */ +message ShowDeviceTutorial { +} + +/** + * Request: Unlocks bootloader, !irreversible! + * @start + * @next Success + * @next Failure + */ +message UnlockBootloader { } + +/** + * Request: Set device brightness + * @start + * @next Success + */ +message SetBrightness { + optional uint32 value = 1; // if not specified, let the user choose +} \ No newline at end of file diff --git a/accounts/usbwallet/trezor/messages.pb.go b/accounts/usbwallet/trezor/messages.pb.go index 4518db679e9..e91f2e0845f 100644 --- a/accounts/usbwallet/trezor/messages.pb.go +++ b/accounts/usbwallet/trezor/messages.pb.go @@ -1,21 +1,22 @@ // This file originates from the SatoshiLabs Trezor `common` repository at: // https://github.com/trezor/trezor-common/blob/master/protob/messages.proto -// dated 28.05.2019, commit 893fd219d4a01bcffa0cd9cfa631856371ec5aa9. +// dated 30.06.2025, commit 421b45d4677f2499234692b0f54010bc45b3ae5f. // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v5.27.1 +// protoc-gen-go v1.36.6 +// protoc v4.25.3 // source: messages.proto package trezor import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -26,58 +27,96 @@ const ( ) // * -// Mapping between TREZOR wire identifier (uint) and a protobuf message +// Mapping between Trezor wire identifier (uint) and a protobuf message type MessageType int32 const ( // Management - MessageType_MessageType_Initialize MessageType = 0 - MessageType_MessageType_Ping MessageType = 1 - MessageType_MessageType_Success MessageType = 2 - MessageType_MessageType_Failure MessageType = 3 - MessageType_MessageType_ChangePin MessageType = 4 - MessageType_MessageType_WipeDevice MessageType = 5 - MessageType_MessageType_GetEntropy MessageType = 9 - MessageType_MessageType_Entropy MessageType = 10 - MessageType_MessageType_LoadDevice MessageType = 13 - MessageType_MessageType_ResetDevice MessageType = 14 - MessageType_MessageType_Features MessageType = 17 - MessageType_MessageType_PinMatrixRequest MessageType = 18 - MessageType_MessageType_PinMatrixAck MessageType = 19 - MessageType_MessageType_Cancel MessageType = 20 - MessageType_MessageType_ClearSession MessageType = 24 - MessageType_MessageType_ApplySettings MessageType = 25 - MessageType_MessageType_ButtonRequest MessageType = 26 - MessageType_MessageType_ButtonAck MessageType = 27 - MessageType_MessageType_ApplyFlags MessageType = 28 - MessageType_MessageType_BackupDevice MessageType = 34 - MessageType_MessageType_EntropyRequest MessageType = 35 - MessageType_MessageType_EntropyAck MessageType = 36 - MessageType_MessageType_PassphraseRequest MessageType = 41 - MessageType_MessageType_PassphraseAck MessageType = 42 - MessageType_MessageType_PassphraseStateRequest MessageType = 77 - MessageType_MessageType_PassphraseStateAck MessageType = 78 - MessageType_MessageType_RecoveryDevice MessageType = 45 - MessageType_MessageType_WordRequest MessageType = 46 - MessageType_MessageType_WordAck MessageType = 47 - MessageType_MessageType_GetFeatures MessageType = 55 - MessageType_MessageType_SetU2FCounter MessageType = 63 + MessageType_MessageType_Initialize MessageType = 0 + MessageType_MessageType_Ping MessageType = 1 + MessageType_MessageType_Success MessageType = 2 + MessageType_MessageType_Failure MessageType = 3 + MessageType_MessageType_ChangePin MessageType = 4 + MessageType_MessageType_WipeDevice MessageType = 5 + MessageType_MessageType_GetEntropy MessageType = 9 + MessageType_MessageType_Entropy MessageType = 10 + MessageType_MessageType_LoadDevice MessageType = 13 + MessageType_MessageType_ResetDevice MessageType = 14 + MessageType_MessageType_SetBusy MessageType = 16 + MessageType_MessageType_Features MessageType = 17 + MessageType_MessageType_PinMatrixRequest MessageType = 18 + MessageType_MessageType_PinMatrixAck MessageType = 19 + MessageType_MessageType_Cancel MessageType = 20 + MessageType_MessageType_LockDevice MessageType = 24 + MessageType_MessageType_ApplySettings MessageType = 25 + MessageType_MessageType_ButtonRequest MessageType = 26 + MessageType_MessageType_ButtonAck MessageType = 27 + MessageType_MessageType_ApplyFlags MessageType = 28 + MessageType_MessageType_GetNonce MessageType = 31 + MessageType_MessageType_Nonce MessageType = 33 + MessageType_MessageType_BackupDevice MessageType = 34 + MessageType_MessageType_EntropyRequest MessageType = 35 + MessageType_MessageType_EntropyAck MessageType = 36 + MessageType_MessageType_EntropyCheckReady MessageType = 994 + MessageType_MessageType_EntropyCheckContinue MessageType = 995 + MessageType_MessageType_PassphraseRequest MessageType = 41 + MessageType_MessageType_PassphraseAck MessageType = 42 + MessageType_MessageType_RecoveryDevice MessageType = 45 + MessageType_MessageType_WordRequest MessageType = 46 + MessageType_MessageType_WordAck MessageType = 47 + MessageType_MessageType_GetFeatures MessageType = 55 + MessageType_MessageType_SdProtect MessageType = 79 + MessageType_MessageType_ChangeWipeCode MessageType = 82 + MessageType_MessageType_EndSession MessageType = 83 + MessageType_MessageType_DoPreauthorized MessageType = 84 + MessageType_MessageType_PreauthorizedRequest MessageType = 85 + MessageType_MessageType_CancelAuthorization MessageType = 86 + MessageType_MessageType_RebootToBootloader MessageType = 87 + MessageType_MessageType_GetFirmwareHash MessageType = 88 + MessageType_MessageType_FirmwareHash MessageType = 89 + MessageType_MessageType_UnlockPath MessageType = 93 + MessageType_MessageType_UnlockedPathRequest MessageType = 94 + MessageType_MessageType_ShowDeviceTutorial MessageType = 95 + MessageType_MessageType_UnlockBootloader MessageType = 96 + MessageType_MessageType_AuthenticateDevice MessageType = 97 + MessageType_MessageType_AuthenticityProof MessageType = 98 + MessageType_MessageType_ChangeLanguage MessageType = 990 + MessageType_MessageType_DataChunkRequest MessageType = 991 + MessageType_MessageType_DataChunkAck MessageType = 992 + MessageType_MessageType_SetBrightness MessageType = 993 + MessageType_MessageType_SetU2FCounter MessageType = 63 + MessageType_MessageType_GetNextU2FCounter MessageType = 80 + MessageType_MessageType_NextU2FCounter MessageType = 81 + // Deprecated messages, kept for protobuf compatibility. + // + // Deprecated: Marked as deprecated in messages.proto. + MessageType_MessageType_Deprecated_PassphraseStateRequest MessageType = 77 + // Deprecated: Marked as deprecated in messages.proto. + MessageType_MessageType_Deprecated_PassphraseStateAck MessageType = 78 // Bootloader MessageType_MessageType_FirmwareErase MessageType = 6 MessageType_MessageType_FirmwareUpload MessageType = 7 MessageType_MessageType_FirmwareRequest MessageType = 8 - MessageType_MessageType_SelfTest MessageType = 32 + MessageType_MessageType_ProdTestT1 MessageType = 32 + // BLE + MessageType_MessageType_BleUnpair MessageType = 8001 // Bitcoin - MessageType_MessageType_GetPublicKey MessageType = 11 - MessageType_MessageType_PublicKey MessageType = 12 - MessageType_MessageType_SignTx MessageType = 15 - MessageType_MessageType_TxRequest MessageType = 21 - MessageType_MessageType_TxAck MessageType = 22 - MessageType_MessageType_GetAddress MessageType = 29 - MessageType_MessageType_Address MessageType = 30 - MessageType_MessageType_SignMessage MessageType = 38 - MessageType_MessageType_VerifyMessage MessageType = 39 - MessageType_MessageType_MessageSignature MessageType = 40 + MessageType_MessageType_GetPublicKey MessageType = 11 + MessageType_MessageType_PublicKey MessageType = 12 + MessageType_MessageType_SignTx MessageType = 15 + MessageType_MessageType_TxRequest MessageType = 21 + MessageType_MessageType_TxAck MessageType = 22 + MessageType_MessageType_GetAddress MessageType = 29 + MessageType_MessageType_Address MessageType = 30 + MessageType_MessageType_TxAckPaymentRequest MessageType = 37 + MessageType_MessageType_SignMessage MessageType = 38 + MessageType_MessageType_VerifyMessage MessageType = 39 + MessageType_MessageType_MessageSignature MessageType = 40 + MessageType_MessageType_GetOwnershipId MessageType = 43 + MessageType_MessageType_OwnershipId MessageType = 44 + MessageType_MessageType_GetOwnershipProof MessageType = 49 + MessageType_MessageType_OwnershipProof MessageType = 50 + MessageType_MessageType_AuthorizeCoinJoin MessageType = 51 // Crypto MessageType_MessageType_CipherKeyValue MessageType = 23 MessageType_MessageType_CipheredKeyValue MessageType = 48 @@ -85,31 +124,46 @@ const ( MessageType_MessageType_SignedIdentity MessageType = 54 MessageType_MessageType_GetECDHSessionKey MessageType = 61 MessageType_MessageType_ECDHSessionKey MessageType = 62 - MessageType_MessageType_CosiCommit MessageType = 71 - MessageType_MessageType_CosiCommitment MessageType = 72 - MessageType_MessageType_CosiSign MessageType = 73 - MessageType_MessageType_CosiSignature MessageType = 74 // Debug - MessageType_MessageType_DebugLinkDecision MessageType = 100 - MessageType_MessageType_DebugLinkGetState MessageType = 101 - MessageType_MessageType_DebugLinkState MessageType = 102 - MessageType_MessageType_DebugLinkStop MessageType = 103 - MessageType_MessageType_DebugLinkLog MessageType = 104 - MessageType_MessageType_DebugLinkMemoryRead MessageType = 110 - MessageType_MessageType_DebugLinkMemory MessageType = 111 - MessageType_MessageType_DebugLinkMemoryWrite MessageType = 112 - MessageType_MessageType_DebugLinkFlashErase MessageType = 113 + MessageType_MessageType_DebugLinkDecision MessageType = 100 + MessageType_MessageType_DebugLinkGetState MessageType = 101 + MessageType_MessageType_DebugLinkState MessageType = 102 + MessageType_MessageType_DebugLinkStop MessageType = 103 + MessageType_MessageType_DebugLinkLog MessageType = 104 + MessageType_MessageType_DebugLinkMemoryRead MessageType = 110 + MessageType_MessageType_DebugLinkMemory MessageType = 111 + MessageType_MessageType_DebugLinkMemoryWrite MessageType = 112 + MessageType_MessageType_DebugLinkFlashErase MessageType = 113 + MessageType_MessageType_DebugLinkLayout MessageType = 9001 + MessageType_MessageType_DebugLinkReseedRandom MessageType = 9002 + MessageType_MessageType_DebugLinkRecordScreen MessageType = 9003 + MessageType_MessageType_DebugLinkEraseSdCard MessageType = 9005 + MessageType_MessageType_DebugLinkWatchLayout MessageType = 9006 + MessageType_MessageType_DebugLinkResetDebugEvents MessageType = 9007 + MessageType_MessageType_DebugLinkOptigaSetSecMax MessageType = 9008 + MessageType_MessageType_DebugLinkGetGcInfo MessageType = 9009 + MessageType_MessageType_DebugLinkGcInfo MessageType = 9010 + MessageType_MessageType_DebugLinkGetPairingInfo MessageType = 9011 + MessageType_MessageType_DebugLinkPairingInfo MessageType = 9012 // Ethereum - MessageType_MessageType_EthereumGetPublicKey MessageType = 450 - MessageType_MessageType_EthereumPublicKey MessageType = 451 - MessageType_MessageType_EthereumGetAddress MessageType = 56 - MessageType_MessageType_EthereumAddress MessageType = 57 - MessageType_MessageType_EthereumSignTx MessageType = 58 - MessageType_MessageType_EthereumTxRequest MessageType = 59 - MessageType_MessageType_EthereumTxAck MessageType = 60 - MessageType_MessageType_EthereumSignMessage MessageType = 64 - MessageType_MessageType_EthereumVerifyMessage MessageType = 65 - MessageType_MessageType_EthereumMessageSignature MessageType = 66 + MessageType_MessageType_EthereumGetPublicKey MessageType = 450 + MessageType_MessageType_EthereumPublicKey MessageType = 451 + MessageType_MessageType_EthereumGetAddress MessageType = 56 + MessageType_MessageType_EthereumAddress MessageType = 57 + MessageType_MessageType_EthereumSignTx MessageType = 58 + MessageType_MessageType_EthereumSignTxEIP1559 MessageType = 452 + MessageType_MessageType_EthereumTxRequest MessageType = 59 + MessageType_MessageType_EthereumTxAck MessageType = 60 + MessageType_MessageType_EthereumSignMessage MessageType = 64 + MessageType_MessageType_EthereumVerifyMessage MessageType = 65 + MessageType_MessageType_EthereumMessageSignature MessageType = 66 + MessageType_MessageType_EthereumSignTypedData MessageType = 464 + MessageType_MessageType_EthereumTypedDataStructRequest MessageType = 465 + MessageType_MessageType_EthereumTypedDataStructAck MessageType = 466 + MessageType_MessageType_EthereumTypedDataValueRequest MessageType = 467 + MessageType_MessageType_EthereumTypedDataValueAck MessageType = 468 + MessageType_MessageType_EthereumTypedDataSignature MessageType = 469 + MessageType_MessageType_EthereumSignTypedHash MessageType = 470 // NEM MessageType_MessageType_NEMGetAddress MessageType = 67 MessageType_MessageType_NEMAddress MessageType = 68 @@ -117,16 +171,6 @@ const ( MessageType_MessageType_NEMSignedTx MessageType = 70 MessageType_MessageType_NEMDecryptMessage MessageType = 75 MessageType_MessageType_NEMDecryptedMessage MessageType = 76 - // Lisk - MessageType_MessageType_LiskGetAddress MessageType = 114 - MessageType_MessageType_LiskAddress MessageType = 115 - MessageType_MessageType_LiskSignTx MessageType = 116 - MessageType_MessageType_LiskSignedTx MessageType = 117 - MessageType_MessageType_LiskSignMessage MessageType = 118 - MessageType_MessageType_LiskMessageSignature MessageType = 119 - MessageType_MessageType_LiskVerifyMessage MessageType = 120 - MessageType_MessageType_LiskGetPublicKey MessageType = 121 - MessageType_MessageType_LiskPublicKey MessageType = 122 // Tezos MessageType_MessageType_TezosGetAddress MessageType = 150 MessageType_MessageType_TezosAddress MessageType = 151 @@ -135,95 +179,96 @@ const ( MessageType_MessageType_TezosGetPublicKey MessageType = 154 MessageType_MessageType_TezosPublicKey MessageType = 155 // Stellar - MessageType_MessageType_StellarSignTx MessageType = 202 - MessageType_MessageType_StellarTxOpRequest MessageType = 203 - MessageType_MessageType_StellarGetAddress MessageType = 207 - MessageType_MessageType_StellarAddress MessageType = 208 - MessageType_MessageType_StellarCreateAccountOp MessageType = 210 - MessageType_MessageType_StellarPaymentOp MessageType = 211 - MessageType_MessageType_StellarPathPaymentOp MessageType = 212 - MessageType_MessageType_StellarManageOfferOp MessageType = 213 - MessageType_MessageType_StellarCreatePassiveOfferOp MessageType = 214 - MessageType_MessageType_StellarSetOptionsOp MessageType = 215 - MessageType_MessageType_StellarChangeTrustOp MessageType = 216 - MessageType_MessageType_StellarAllowTrustOp MessageType = 217 - MessageType_MessageType_StellarAccountMergeOp MessageType = 218 - // omitted: StellarInflationOp is not a supported operation, would be 219 - MessageType_MessageType_StellarManageDataOp MessageType = 220 - MessageType_MessageType_StellarBumpSequenceOp MessageType = 221 - MessageType_MessageType_StellarSignedTx MessageType = 230 - // TRON - MessageType_MessageType_TronGetAddress MessageType = 250 - MessageType_MessageType_TronAddress MessageType = 251 - MessageType_MessageType_TronSignTx MessageType = 252 - MessageType_MessageType_TronSignedTx MessageType = 253 - // Cardano - // dropped Sign/VerifyMessage ids 300-302 - MessageType_MessageType_CardanoSignTx MessageType = 303 - MessageType_MessageType_CardanoTxRequest MessageType = 304 - MessageType_MessageType_CardanoGetPublicKey MessageType = 305 - MessageType_MessageType_CardanoPublicKey MessageType = 306 - MessageType_MessageType_CardanoGetAddress MessageType = 307 - MessageType_MessageType_CardanoAddress MessageType = 308 - MessageType_MessageType_CardanoTxAck MessageType = 309 - MessageType_MessageType_CardanoSignedTx MessageType = 310 - // Ontology - MessageType_MessageType_OntologyGetAddress MessageType = 350 - MessageType_MessageType_OntologyAddress MessageType = 351 - MessageType_MessageType_OntologyGetPublicKey MessageType = 352 - MessageType_MessageType_OntologyPublicKey MessageType = 353 - MessageType_MessageType_OntologySignTransfer MessageType = 354 - MessageType_MessageType_OntologySignedTransfer MessageType = 355 - MessageType_MessageType_OntologySignWithdrawOng MessageType = 356 - MessageType_MessageType_OntologySignedWithdrawOng MessageType = 357 - MessageType_MessageType_OntologySignOntIdRegister MessageType = 358 - MessageType_MessageType_OntologySignedOntIdRegister MessageType = 359 - MessageType_MessageType_OntologySignOntIdAddAttributes MessageType = 360 - MessageType_MessageType_OntologySignedOntIdAddAttributes MessageType = 361 + MessageType_MessageType_StellarSignTx MessageType = 202 + MessageType_MessageType_StellarTxOpRequest MessageType = 203 + MessageType_MessageType_StellarGetAddress MessageType = 207 + MessageType_MessageType_StellarAddress MessageType = 208 + MessageType_MessageType_StellarCreateAccountOp MessageType = 210 + MessageType_MessageType_StellarPaymentOp MessageType = 211 + MessageType_MessageType_StellarPathPaymentStrictReceiveOp MessageType = 212 + MessageType_MessageType_StellarManageSellOfferOp MessageType = 213 + MessageType_MessageType_StellarCreatePassiveSellOfferOp MessageType = 214 + MessageType_MessageType_StellarSetOptionsOp MessageType = 215 + MessageType_MessageType_StellarChangeTrustOp MessageType = 216 + MessageType_MessageType_StellarAllowTrustOp MessageType = 217 + MessageType_MessageType_StellarAccountMergeOp MessageType = 218 + MessageType_MessageType_StellarManageDataOp MessageType = 220 + MessageType_MessageType_StellarBumpSequenceOp MessageType = 221 + MessageType_MessageType_StellarManageBuyOfferOp MessageType = 222 + MessageType_MessageType_StellarPathPaymentStrictSendOp MessageType = 223 + MessageType_MessageType_StellarClaimClaimableBalanceOp MessageType = 225 + MessageType_MessageType_StellarSignedTx MessageType = 230 + MessageType_MessageType_CardanoGetPublicKey MessageType = 305 + MessageType_MessageType_CardanoPublicKey MessageType = 306 + MessageType_MessageType_CardanoGetAddress MessageType = 307 + MessageType_MessageType_CardanoAddress MessageType = 308 + MessageType_MessageType_CardanoTxItemAck MessageType = 313 + MessageType_MessageType_CardanoTxAuxiliaryDataSupplement MessageType = 314 + MessageType_MessageType_CardanoTxWitnessRequest MessageType = 315 + MessageType_MessageType_CardanoTxWitnessResponse MessageType = 316 + MessageType_MessageType_CardanoTxHostAck MessageType = 317 + MessageType_MessageType_CardanoTxBodyHash MessageType = 318 + MessageType_MessageType_CardanoSignTxFinished MessageType = 319 + MessageType_MessageType_CardanoSignTxInit MessageType = 320 + MessageType_MessageType_CardanoTxInput MessageType = 321 + MessageType_MessageType_CardanoTxOutput MessageType = 322 + MessageType_MessageType_CardanoAssetGroup MessageType = 323 + MessageType_MessageType_CardanoToken MessageType = 324 + MessageType_MessageType_CardanoTxCertificate MessageType = 325 + MessageType_MessageType_CardanoTxWithdrawal MessageType = 326 + MessageType_MessageType_CardanoTxAuxiliaryData MessageType = 327 + MessageType_MessageType_CardanoPoolOwner MessageType = 328 + MessageType_MessageType_CardanoPoolRelayParameters MessageType = 329 + MessageType_MessageType_CardanoGetNativeScriptHash MessageType = 330 + MessageType_MessageType_CardanoNativeScriptHash MessageType = 331 + MessageType_MessageType_CardanoTxMint MessageType = 332 + MessageType_MessageType_CardanoTxCollateralInput MessageType = 333 + MessageType_MessageType_CardanoTxRequiredSigner MessageType = 334 + MessageType_MessageType_CardanoTxInlineDatumChunk MessageType = 335 + MessageType_MessageType_CardanoTxReferenceScriptChunk MessageType = 336 + MessageType_MessageType_CardanoTxReferenceInput MessageType = 337 // Ripple MessageType_MessageType_RippleGetAddress MessageType = 400 MessageType_MessageType_RippleAddress MessageType = 401 MessageType_MessageType_RippleSignTx MessageType = 402 MessageType_MessageType_RippleSignedTx MessageType = 403 // Monero - MessageType_MessageType_MoneroTransactionInitRequest MessageType = 501 - MessageType_MessageType_MoneroTransactionInitAck MessageType = 502 - MessageType_MessageType_MoneroTransactionSetInputRequest MessageType = 503 - MessageType_MessageType_MoneroTransactionSetInputAck MessageType = 504 - MessageType_MessageType_MoneroTransactionInputsPermutationRequest MessageType = 505 - MessageType_MessageType_MoneroTransactionInputsPermutationAck MessageType = 506 - MessageType_MessageType_MoneroTransactionInputViniRequest MessageType = 507 - MessageType_MessageType_MoneroTransactionInputViniAck MessageType = 508 - MessageType_MessageType_MoneroTransactionAllInputsSetRequest MessageType = 509 - MessageType_MessageType_MoneroTransactionAllInputsSetAck MessageType = 510 - MessageType_MessageType_MoneroTransactionSetOutputRequest MessageType = 511 - MessageType_MessageType_MoneroTransactionSetOutputAck MessageType = 512 - MessageType_MessageType_MoneroTransactionAllOutSetRequest MessageType = 513 - MessageType_MessageType_MoneroTransactionAllOutSetAck MessageType = 514 - MessageType_MessageType_MoneroTransactionSignInputRequest MessageType = 515 - MessageType_MessageType_MoneroTransactionSignInputAck MessageType = 516 - MessageType_MessageType_MoneroTransactionFinalRequest MessageType = 517 - MessageType_MessageType_MoneroTransactionFinalAck MessageType = 518 - MessageType_MessageType_MoneroKeyImageExportInitRequest MessageType = 530 - MessageType_MessageType_MoneroKeyImageExportInitAck MessageType = 531 - MessageType_MessageType_MoneroKeyImageSyncStepRequest MessageType = 532 - MessageType_MessageType_MoneroKeyImageSyncStepAck MessageType = 533 - MessageType_MessageType_MoneroKeyImageSyncFinalRequest MessageType = 534 - MessageType_MessageType_MoneroKeyImageSyncFinalAck MessageType = 535 - MessageType_MessageType_MoneroGetAddress MessageType = 540 - MessageType_MessageType_MoneroAddress MessageType = 541 - MessageType_MessageType_MoneroGetWatchKey MessageType = 542 - MessageType_MessageType_MoneroWatchKey MessageType = 543 - MessageType_MessageType_DebugMoneroDiagRequest MessageType = 546 - MessageType_MessageType_DebugMoneroDiagAck MessageType = 547 - MessageType_MessageType_MoneroGetTxKeyRequest MessageType = 550 - MessageType_MessageType_MoneroGetTxKeyAck MessageType = 551 - MessageType_MessageType_MoneroLiveRefreshStartRequest MessageType = 552 - MessageType_MessageType_MoneroLiveRefreshStartAck MessageType = 553 - MessageType_MessageType_MoneroLiveRefreshStepRequest MessageType = 554 - MessageType_MessageType_MoneroLiveRefreshStepAck MessageType = 555 - MessageType_MessageType_MoneroLiveRefreshFinalRequest MessageType = 556 - MessageType_MessageType_MoneroLiveRefreshFinalAck MessageType = 557 + MessageType_MessageType_MoneroTransactionInitRequest MessageType = 501 + MessageType_MessageType_MoneroTransactionInitAck MessageType = 502 + MessageType_MessageType_MoneroTransactionSetInputRequest MessageType = 503 + MessageType_MessageType_MoneroTransactionSetInputAck MessageType = 504 + MessageType_MessageType_MoneroTransactionInputViniRequest MessageType = 507 + MessageType_MessageType_MoneroTransactionInputViniAck MessageType = 508 + MessageType_MessageType_MoneroTransactionAllInputsSetRequest MessageType = 509 + MessageType_MessageType_MoneroTransactionAllInputsSetAck MessageType = 510 + MessageType_MessageType_MoneroTransactionSetOutputRequest MessageType = 511 + MessageType_MessageType_MoneroTransactionSetOutputAck MessageType = 512 + MessageType_MessageType_MoneroTransactionAllOutSetRequest MessageType = 513 + MessageType_MessageType_MoneroTransactionAllOutSetAck MessageType = 514 + MessageType_MessageType_MoneroTransactionSignInputRequest MessageType = 515 + MessageType_MessageType_MoneroTransactionSignInputAck MessageType = 516 + MessageType_MessageType_MoneroTransactionFinalRequest MessageType = 517 + MessageType_MessageType_MoneroTransactionFinalAck MessageType = 518 + MessageType_MessageType_MoneroKeyImageExportInitRequest MessageType = 530 + MessageType_MessageType_MoneroKeyImageExportInitAck MessageType = 531 + MessageType_MessageType_MoneroKeyImageSyncStepRequest MessageType = 532 + MessageType_MessageType_MoneroKeyImageSyncStepAck MessageType = 533 + MessageType_MessageType_MoneroKeyImageSyncFinalRequest MessageType = 534 + MessageType_MessageType_MoneroKeyImageSyncFinalAck MessageType = 535 + MessageType_MessageType_MoneroGetAddress MessageType = 540 + MessageType_MessageType_MoneroAddress MessageType = 541 + MessageType_MessageType_MoneroGetWatchKey MessageType = 542 + MessageType_MessageType_MoneroWatchKey MessageType = 543 + MessageType_MessageType_DebugMoneroDiagRequest MessageType = 546 + MessageType_MessageType_DebugMoneroDiagAck MessageType = 547 + MessageType_MessageType_MoneroGetTxKeyRequest MessageType = 550 + MessageType_MessageType_MoneroGetTxKeyAck MessageType = 551 + MessageType_MessageType_MoneroLiveRefreshStartRequest MessageType = 552 + MessageType_MessageType_MoneroLiveRefreshStartAck MessageType = 553 + MessageType_MessageType_MoneroLiveRefreshStepRequest MessageType = 554 + MessageType_MessageType_MoneroLiveRefreshStepAck MessageType = 555 + MessageType_MessageType_MoneroLiveRefreshFinalRequest MessageType = 556 + MessageType_MessageType_MoneroLiveRefreshFinalAck MessageType = 557 // EOS MessageType_MessageType_EosGetPublicKey MessageType = 600 MessageType_MessageType_EosPublicKey MessageType = 601 @@ -231,410 +276,582 @@ const ( MessageType_MessageType_EosTxActionRequest MessageType = 603 MessageType_MessageType_EosTxActionAck MessageType = 604 MessageType_MessageType_EosSignedTx MessageType = 605 - // Binance - MessageType_MessageType_BinanceGetAddress MessageType = 700 - MessageType_MessageType_BinanceAddress MessageType = 701 - MessageType_MessageType_BinanceGetPublicKey MessageType = 702 - MessageType_MessageType_BinancePublicKey MessageType = 703 - MessageType_MessageType_BinanceSignTx MessageType = 704 - MessageType_MessageType_BinanceTxRequest MessageType = 705 - MessageType_MessageType_BinanceTransferMsg MessageType = 706 - MessageType_MessageType_BinanceOrderMsg MessageType = 707 - MessageType_MessageType_BinanceCancelMsg MessageType = 708 - MessageType_MessageType_BinanceSignedTx MessageType = 709 + // WebAuthn + MessageType_MessageType_WebAuthnListResidentCredentials MessageType = 800 + MessageType_MessageType_WebAuthnCredentials MessageType = 801 + MessageType_MessageType_WebAuthnAddResidentCredential MessageType = 802 + MessageType_MessageType_WebAuthnRemoveResidentCredential MessageType = 803 + // Solana + MessageType_MessageType_SolanaGetPublicKey MessageType = 900 + MessageType_MessageType_SolanaPublicKey MessageType = 901 + MessageType_MessageType_SolanaGetAddress MessageType = 902 + MessageType_MessageType_SolanaAddress MessageType = 903 + MessageType_MessageType_SolanaSignTx MessageType = 904 + MessageType_MessageType_SolanaTxSignature MessageType = 905 + // THP + MessageType_MessageType_ThpCreateNewSession MessageType = 1000 + MessageType_MessageType_ThpPairingRequest MessageType = 1006 + MessageType_MessageType_ThpPairingRequestApproved MessageType = 1007 + MessageType_MessageType_ThpSelectMethod MessageType = 1008 + MessageType_MessageType_ThpPairingPreparationsFinished MessageType = 1009 + MessageType_MessageType_ThpCredentialRequest MessageType = 1010 + MessageType_MessageType_ThpCredentialResponse MessageType = 1011 + MessageType_MessageType_ThpEndRequest MessageType = 1012 + MessageType_MessageType_ThpEndResponse MessageType = 1013 + MessageType_MessageType_ThpCodeEntryCommitment MessageType = 1016 + MessageType_MessageType_ThpCodeEntryChallenge MessageType = 1017 + MessageType_MessageType_ThpCodeEntryCpaceTrezor MessageType = 1018 + MessageType_MessageType_ThpCodeEntryCpaceHostTag MessageType = 1019 + MessageType_MessageType_ThpCodeEntrySecret MessageType = 1020 + MessageType_MessageType_ThpQrCodeTag MessageType = 1024 + MessageType_MessageType_ThpQrCodeSecret MessageType = 1025 + MessageType_MessageType_ThpNfcTagHost MessageType = 1032 + MessageType_MessageType_ThpNfcTagTrezor MessageType = 1033 + // Nostr + MessageType_MessageType_NostrGetPubkey MessageType = 2001 + MessageType_MessageType_NostrPubkey MessageType = 2002 + MessageType_MessageType_NostrSignEvent MessageType = 2003 + MessageType_MessageType_NostrEventSignature MessageType = 2004 + // Benchmark + MessageType_MessageType_BenchmarkListNames MessageType = 9100 + MessageType_MessageType_BenchmarkNames MessageType = 9101 + MessageType_MessageType_BenchmarkRun MessageType = 9102 + MessageType_MessageType_BenchmarkResult MessageType = 9103 ) // Enum value maps for MessageType. var ( MessageType_name = map[int32]string{ - 0: "MessageType_Initialize", - 1: "MessageType_Ping", - 2: "MessageType_Success", - 3: "MessageType_Failure", - 4: "MessageType_ChangePin", - 5: "MessageType_WipeDevice", - 9: "MessageType_GetEntropy", - 10: "MessageType_Entropy", - 13: "MessageType_LoadDevice", - 14: "MessageType_ResetDevice", - 17: "MessageType_Features", - 18: "MessageType_PinMatrixRequest", - 19: "MessageType_PinMatrixAck", - 20: "MessageType_Cancel", - 24: "MessageType_ClearSession", - 25: "MessageType_ApplySettings", - 26: "MessageType_ButtonRequest", - 27: "MessageType_ButtonAck", - 28: "MessageType_ApplyFlags", - 34: "MessageType_BackupDevice", - 35: "MessageType_EntropyRequest", - 36: "MessageType_EntropyAck", - 41: "MessageType_PassphraseRequest", - 42: "MessageType_PassphraseAck", - 77: "MessageType_PassphraseStateRequest", - 78: "MessageType_PassphraseStateAck", - 45: "MessageType_RecoveryDevice", - 46: "MessageType_WordRequest", - 47: "MessageType_WordAck", - 55: "MessageType_GetFeatures", - 63: "MessageType_SetU2FCounter", - 6: "MessageType_FirmwareErase", - 7: "MessageType_FirmwareUpload", - 8: "MessageType_FirmwareRequest", - 32: "MessageType_SelfTest", - 11: "MessageType_GetPublicKey", - 12: "MessageType_PublicKey", - 15: "MessageType_SignTx", - 21: "MessageType_TxRequest", - 22: "MessageType_TxAck", - 29: "MessageType_GetAddress", - 30: "MessageType_Address", - 38: "MessageType_SignMessage", - 39: "MessageType_VerifyMessage", - 40: "MessageType_MessageSignature", - 23: "MessageType_CipherKeyValue", - 48: "MessageType_CipheredKeyValue", - 53: "MessageType_SignIdentity", - 54: "MessageType_SignedIdentity", - 61: "MessageType_GetECDHSessionKey", - 62: "MessageType_ECDHSessionKey", - 71: "MessageType_CosiCommit", - 72: "MessageType_CosiCommitment", - 73: "MessageType_CosiSign", - 74: "MessageType_CosiSignature", - 100: "MessageType_DebugLinkDecision", - 101: "MessageType_DebugLinkGetState", - 102: "MessageType_DebugLinkState", - 103: "MessageType_DebugLinkStop", - 104: "MessageType_DebugLinkLog", - 110: "MessageType_DebugLinkMemoryRead", - 111: "MessageType_DebugLinkMemory", - 112: "MessageType_DebugLinkMemoryWrite", - 113: "MessageType_DebugLinkFlashErase", - 450: "MessageType_EthereumGetPublicKey", - 451: "MessageType_EthereumPublicKey", - 56: "MessageType_EthereumGetAddress", - 57: "MessageType_EthereumAddress", - 58: "MessageType_EthereumSignTx", - 59: "MessageType_EthereumTxRequest", - 60: "MessageType_EthereumTxAck", - 64: "MessageType_EthereumSignMessage", - 65: "MessageType_EthereumVerifyMessage", - 66: "MessageType_EthereumMessageSignature", - 67: "MessageType_NEMGetAddress", - 68: "MessageType_NEMAddress", - 69: "MessageType_NEMSignTx", - 70: "MessageType_NEMSignedTx", - 75: "MessageType_NEMDecryptMessage", - 76: "MessageType_NEMDecryptedMessage", - 114: "MessageType_LiskGetAddress", - 115: "MessageType_LiskAddress", - 116: "MessageType_LiskSignTx", - 117: "MessageType_LiskSignedTx", - 118: "MessageType_LiskSignMessage", - 119: "MessageType_LiskMessageSignature", - 120: "MessageType_LiskVerifyMessage", - 121: "MessageType_LiskGetPublicKey", - 122: "MessageType_LiskPublicKey", - 150: "MessageType_TezosGetAddress", - 151: "MessageType_TezosAddress", - 152: "MessageType_TezosSignTx", - 153: "MessageType_TezosSignedTx", - 154: "MessageType_TezosGetPublicKey", - 155: "MessageType_TezosPublicKey", - 202: "MessageType_StellarSignTx", - 203: "MessageType_StellarTxOpRequest", - 207: "MessageType_StellarGetAddress", - 208: "MessageType_StellarAddress", - 210: "MessageType_StellarCreateAccountOp", - 211: "MessageType_StellarPaymentOp", - 212: "MessageType_StellarPathPaymentOp", - 213: "MessageType_StellarManageOfferOp", - 214: "MessageType_StellarCreatePassiveOfferOp", - 215: "MessageType_StellarSetOptionsOp", - 216: "MessageType_StellarChangeTrustOp", - 217: "MessageType_StellarAllowTrustOp", - 218: "MessageType_StellarAccountMergeOp", - 220: "MessageType_StellarManageDataOp", - 221: "MessageType_StellarBumpSequenceOp", - 230: "MessageType_StellarSignedTx", - 250: "MessageType_TronGetAddress", - 251: "MessageType_TronAddress", - 252: "MessageType_TronSignTx", - 253: "MessageType_TronSignedTx", - 303: "MessageType_CardanoSignTx", - 304: "MessageType_CardanoTxRequest", - 305: "MessageType_CardanoGetPublicKey", - 306: "MessageType_CardanoPublicKey", - 307: "MessageType_CardanoGetAddress", - 308: "MessageType_CardanoAddress", - 309: "MessageType_CardanoTxAck", - 310: "MessageType_CardanoSignedTx", - 350: "MessageType_OntologyGetAddress", - 351: "MessageType_OntologyAddress", - 352: "MessageType_OntologyGetPublicKey", - 353: "MessageType_OntologyPublicKey", - 354: "MessageType_OntologySignTransfer", - 355: "MessageType_OntologySignedTransfer", - 356: "MessageType_OntologySignWithdrawOng", - 357: "MessageType_OntologySignedWithdrawOng", - 358: "MessageType_OntologySignOntIdRegister", - 359: "MessageType_OntologySignedOntIdRegister", - 360: "MessageType_OntologySignOntIdAddAttributes", - 361: "MessageType_OntologySignedOntIdAddAttributes", - 400: "MessageType_RippleGetAddress", - 401: "MessageType_RippleAddress", - 402: "MessageType_RippleSignTx", - 403: "MessageType_RippleSignedTx", - 501: "MessageType_MoneroTransactionInitRequest", - 502: "MessageType_MoneroTransactionInitAck", - 503: "MessageType_MoneroTransactionSetInputRequest", - 504: "MessageType_MoneroTransactionSetInputAck", - 505: "MessageType_MoneroTransactionInputsPermutationRequest", - 506: "MessageType_MoneroTransactionInputsPermutationAck", - 507: "MessageType_MoneroTransactionInputViniRequest", - 508: "MessageType_MoneroTransactionInputViniAck", - 509: "MessageType_MoneroTransactionAllInputsSetRequest", - 510: "MessageType_MoneroTransactionAllInputsSetAck", - 511: "MessageType_MoneroTransactionSetOutputRequest", - 512: "MessageType_MoneroTransactionSetOutputAck", - 513: "MessageType_MoneroTransactionAllOutSetRequest", - 514: "MessageType_MoneroTransactionAllOutSetAck", - 515: "MessageType_MoneroTransactionSignInputRequest", - 516: "MessageType_MoneroTransactionSignInputAck", - 517: "MessageType_MoneroTransactionFinalRequest", - 518: "MessageType_MoneroTransactionFinalAck", - 530: "MessageType_MoneroKeyImageExportInitRequest", - 531: "MessageType_MoneroKeyImageExportInitAck", - 532: "MessageType_MoneroKeyImageSyncStepRequest", - 533: "MessageType_MoneroKeyImageSyncStepAck", - 534: "MessageType_MoneroKeyImageSyncFinalRequest", - 535: "MessageType_MoneroKeyImageSyncFinalAck", - 540: "MessageType_MoneroGetAddress", - 541: "MessageType_MoneroAddress", - 542: "MessageType_MoneroGetWatchKey", - 543: "MessageType_MoneroWatchKey", - 546: "MessageType_DebugMoneroDiagRequest", - 547: "MessageType_DebugMoneroDiagAck", - 550: "MessageType_MoneroGetTxKeyRequest", - 551: "MessageType_MoneroGetTxKeyAck", - 552: "MessageType_MoneroLiveRefreshStartRequest", - 553: "MessageType_MoneroLiveRefreshStartAck", - 554: "MessageType_MoneroLiveRefreshStepRequest", - 555: "MessageType_MoneroLiveRefreshStepAck", - 556: "MessageType_MoneroLiveRefreshFinalRequest", - 557: "MessageType_MoneroLiveRefreshFinalAck", - 600: "MessageType_EosGetPublicKey", - 601: "MessageType_EosPublicKey", - 602: "MessageType_EosSignTx", - 603: "MessageType_EosTxActionRequest", - 604: "MessageType_EosTxActionAck", - 605: "MessageType_EosSignedTx", - 700: "MessageType_BinanceGetAddress", - 701: "MessageType_BinanceAddress", - 702: "MessageType_BinanceGetPublicKey", - 703: "MessageType_BinancePublicKey", - 704: "MessageType_BinanceSignTx", - 705: "MessageType_BinanceTxRequest", - 706: "MessageType_BinanceTransferMsg", - 707: "MessageType_BinanceOrderMsg", - 708: "MessageType_BinanceCancelMsg", - 709: "MessageType_BinanceSignedTx", + 0: "MessageType_Initialize", + 1: "MessageType_Ping", + 2: "MessageType_Success", + 3: "MessageType_Failure", + 4: "MessageType_ChangePin", + 5: "MessageType_WipeDevice", + 9: "MessageType_GetEntropy", + 10: "MessageType_Entropy", + 13: "MessageType_LoadDevice", + 14: "MessageType_ResetDevice", + 16: "MessageType_SetBusy", + 17: "MessageType_Features", + 18: "MessageType_PinMatrixRequest", + 19: "MessageType_PinMatrixAck", + 20: "MessageType_Cancel", + 24: "MessageType_LockDevice", + 25: "MessageType_ApplySettings", + 26: "MessageType_ButtonRequest", + 27: "MessageType_ButtonAck", + 28: "MessageType_ApplyFlags", + 31: "MessageType_GetNonce", + 33: "MessageType_Nonce", + 34: "MessageType_BackupDevice", + 35: "MessageType_EntropyRequest", + 36: "MessageType_EntropyAck", + 994: "MessageType_EntropyCheckReady", + 995: "MessageType_EntropyCheckContinue", + 41: "MessageType_PassphraseRequest", + 42: "MessageType_PassphraseAck", + 45: "MessageType_RecoveryDevice", + 46: "MessageType_WordRequest", + 47: "MessageType_WordAck", + 55: "MessageType_GetFeatures", + 79: "MessageType_SdProtect", + 82: "MessageType_ChangeWipeCode", + 83: "MessageType_EndSession", + 84: "MessageType_DoPreauthorized", + 85: "MessageType_PreauthorizedRequest", + 86: "MessageType_CancelAuthorization", + 87: "MessageType_RebootToBootloader", + 88: "MessageType_GetFirmwareHash", + 89: "MessageType_FirmwareHash", + 93: "MessageType_UnlockPath", + 94: "MessageType_UnlockedPathRequest", + 95: "MessageType_ShowDeviceTutorial", + 96: "MessageType_UnlockBootloader", + 97: "MessageType_AuthenticateDevice", + 98: "MessageType_AuthenticityProof", + 990: "MessageType_ChangeLanguage", + 991: "MessageType_DataChunkRequest", + 992: "MessageType_DataChunkAck", + 993: "MessageType_SetBrightness", + 63: "MessageType_SetU2FCounter", + 80: "MessageType_GetNextU2FCounter", + 81: "MessageType_NextU2FCounter", + 77: "MessageType_Deprecated_PassphraseStateRequest", + 78: "MessageType_Deprecated_PassphraseStateAck", + 6: "MessageType_FirmwareErase", + 7: "MessageType_FirmwareUpload", + 8: "MessageType_FirmwareRequest", + 32: "MessageType_ProdTestT1", + 8001: "MessageType_BleUnpair", + 11: "MessageType_GetPublicKey", + 12: "MessageType_PublicKey", + 15: "MessageType_SignTx", + 21: "MessageType_TxRequest", + 22: "MessageType_TxAck", + 29: "MessageType_GetAddress", + 30: "MessageType_Address", + 37: "MessageType_TxAckPaymentRequest", + 38: "MessageType_SignMessage", + 39: "MessageType_VerifyMessage", + 40: "MessageType_MessageSignature", + 43: "MessageType_GetOwnershipId", + 44: "MessageType_OwnershipId", + 49: "MessageType_GetOwnershipProof", + 50: "MessageType_OwnershipProof", + 51: "MessageType_AuthorizeCoinJoin", + 23: "MessageType_CipherKeyValue", + 48: "MessageType_CipheredKeyValue", + 53: "MessageType_SignIdentity", + 54: "MessageType_SignedIdentity", + 61: "MessageType_GetECDHSessionKey", + 62: "MessageType_ECDHSessionKey", + 100: "MessageType_DebugLinkDecision", + 101: "MessageType_DebugLinkGetState", + 102: "MessageType_DebugLinkState", + 103: "MessageType_DebugLinkStop", + 104: "MessageType_DebugLinkLog", + 110: "MessageType_DebugLinkMemoryRead", + 111: "MessageType_DebugLinkMemory", + 112: "MessageType_DebugLinkMemoryWrite", + 113: "MessageType_DebugLinkFlashErase", + 9001: "MessageType_DebugLinkLayout", + 9002: "MessageType_DebugLinkReseedRandom", + 9003: "MessageType_DebugLinkRecordScreen", + 9005: "MessageType_DebugLinkEraseSdCard", + 9006: "MessageType_DebugLinkWatchLayout", + 9007: "MessageType_DebugLinkResetDebugEvents", + 9008: "MessageType_DebugLinkOptigaSetSecMax", + 9009: "MessageType_DebugLinkGetGcInfo", + 9010: "MessageType_DebugLinkGcInfo", + 9011: "MessageType_DebugLinkGetPairingInfo", + 9012: "MessageType_DebugLinkPairingInfo", + 450: "MessageType_EthereumGetPublicKey", + 451: "MessageType_EthereumPublicKey", + 56: "MessageType_EthereumGetAddress", + 57: "MessageType_EthereumAddress", + 58: "MessageType_EthereumSignTx", + 452: "MessageType_EthereumSignTxEIP1559", + 59: "MessageType_EthereumTxRequest", + 60: "MessageType_EthereumTxAck", + 64: "MessageType_EthereumSignMessage", + 65: "MessageType_EthereumVerifyMessage", + 66: "MessageType_EthereumMessageSignature", + 464: "MessageType_EthereumSignTypedData", + 465: "MessageType_EthereumTypedDataStructRequest", + 466: "MessageType_EthereumTypedDataStructAck", + 467: "MessageType_EthereumTypedDataValueRequest", + 468: "MessageType_EthereumTypedDataValueAck", + 469: "MessageType_EthereumTypedDataSignature", + 470: "MessageType_EthereumSignTypedHash", + 67: "MessageType_NEMGetAddress", + 68: "MessageType_NEMAddress", + 69: "MessageType_NEMSignTx", + 70: "MessageType_NEMSignedTx", + 75: "MessageType_NEMDecryptMessage", + 76: "MessageType_NEMDecryptedMessage", + 150: "MessageType_TezosGetAddress", + 151: "MessageType_TezosAddress", + 152: "MessageType_TezosSignTx", + 153: "MessageType_TezosSignedTx", + 154: "MessageType_TezosGetPublicKey", + 155: "MessageType_TezosPublicKey", + 202: "MessageType_StellarSignTx", + 203: "MessageType_StellarTxOpRequest", + 207: "MessageType_StellarGetAddress", + 208: "MessageType_StellarAddress", + 210: "MessageType_StellarCreateAccountOp", + 211: "MessageType_StellarPaymentOp", + 212: "MessageType_StellarPathPaymentStrictReceiveOp", + 213: "MessageType_StellarManageSellOfferOp", + 214: "MessageType_StellarCreatePassiveSellOfferOp", + 215: "MessageType_StellarSetOptionsOp", + 216: "MessageType_StellarChangeTrustOp", + 217: "MessageType_StellarAllowTrustOp", + 218: "MessageType_StellarAccountMergeOp", + 220: "MessageType_StellarManageDataOp", + 221: "MessageType_StellarBumpSequenceOp", + 222: "MessageType_StellarManageBuyOfferOp", + 223: "MessageType_StellarPathPaymentStrictSendOp", + 225: "MessageType_StellarClaimClaimableBalanceOp", + 230: "MessageType_StellarSignedTx", + 305: "MessageType_CardanoGetPublicKey", + 306: "MessageType_CardanoPublicKey", + 307: "MessageType_CardanoGetAddress", + 308: "MessageType_CardanoAddress", + 313: "MessageType_CardanoTxItemAck", + 314: "MessageType_CardanoTxAuxiliaryDataSupplement", + 315: "MessageType_CardanoTxWitnessRequest", + 316: "MessageType_CardanoTxWitnessResponse", + 317: "MessageType_CardanoTxHostAck", + 318: "MessageType_CardanoTxBodyHash", + 319: "MessageType_CardanoSignTxFinished", + 320: "MessageType_CardanoSignTxInit", + 321: "MessageType_CardanoTxInput", + 322: "MessageType_CardanoTxOutput", + 323: "MessageType_CardanoAssetGroup", + 324: "MessageType_CardanoToken", + 325: "MessageType_CardanoTxCertificate", + 326: "MessageType_CardanoTxWithdrawal", + 327: "MessageType_CardanoTxAuxiliaryData", + 328: "MessageType_CardanoPoolOwner", + 329: "MessageType_CardanoPoolRelayParameters", + 330: "MessageType_CardanoGetNativeScriptHash", + 331: "MessageType_CardanoNativeScriptHash", + 332: "MessageType_CardanoTxMint", + 333: "MessageType_CardanoTxCollateralInput", + 334: "MessageType_CardanoTxRequiredSigner", + 335: "MessageType_CardanoTxInlineDatumChunk", + 336: "MessageType_CardanoTxReferenceScriptChunk", + 337: "MessageType_CardanoTxReferenceInput", + 400: "MessageType_RippleGetAddress", + 401: "MessageType_RippleAddress", + 402: "MessageType_RippleSignTx", + 403: "MessageType_RippleSignedTx", + 501: "MessageType_MoneroTransactionInitRequest", + 502: "MessageType_MoneroTransactionInitAck", + 503: "MessageType_MoneroTransactionSetInputRequest", + 504: "MessageType_MoneroTransactionSetInputAck", + 507: "MessageType_MoneroTransactionInputViniRequest", + 508: "MessageType_MoneroTransactionInputViniAck", + 509: "MessageType_MoneroTransactionAllInputsSetRequest", + 510: "MessageType_MoneroTransactionAllInputsSetAck", + 511: "MessageType_MoneroTransactionSetOutputRequest", + 512: "MessageType_MoneroTransactionSetOutputAck", + 513: "MessageType_MoneroTransactionAllOutSetRequest", + 514: "MessageType_MoneroTransactionAllOutSetAck", + 515: "MessageType_MoneroTransactionSignInputRequest", + 516: "MessageType_MoneroTransactionSignInputAck", + 517: "MessageType_MoneroTransactionFinalRequest", + 518: "MessageType_MoneroTransactionFinalAck", + 530: "MessageType_MoneroKeyImageExportInitRequest", + 531: "MessageType_MoneroKeyImageExportInitAck", + 532: "MessageType_MoneroKeyImageSyncStepRequest", + 533: "MessageType_MoneroKeyImageSyncStepAck", + 534: "MessageType_MoneroKeyImageSyncFinalRequest", + 535: "MessageType_MoneroKeyImageSyncFinalAck", + 540: "MessageType_MoneroGetAddress", + 541: "MessageType_MoneroAddress", + 542: "MessageType_MoneroGetWatchKey", + 543: "MessageType_MoneroWatchKey", + 546: "MessageType_DebugMoneroDiagRequest", + 547: "MessageType_DebugMoneroDiagAck", + 550: "MessageType_MoneroGetTxKeyRequest", + 551: "MessageType_MoneroGetTxKeyAck", + 552: "MessageType_MoneroLiveRefreshStartRequest", + 553: "MessageType_MoneroLiveRefreshStartAck", + 554: "MessageType_MoneroLiveRefreshStepRequest", + 555: "MessageType_MoneroLiveRefreshStepAck", + 556: "MessageType_MoneroLiveRefreshFinalRequest", + 557: "MessageType_MoneroLiveRefreshFinalAck", + 600: "MessageType_EosGetPublicKey", + 601: "MessageType_EosPublicKey", + 602: "MessageType_EosSignTx", + 603: "MessageType_EosTxActionRequest", + 604: "MessageType_EosTxActionAck", + 605: "MessageType_EosSignedTx", + 800: "MessageType_WebAuthnListResidentCredentials", + 801: "MessageType_WebAuthnCredentials", + 802: "MessageType_WebAuthnAddResidentCredential", + 803: "MessageType_WebAuthnRemoveResidentCredential", + 900: "MessageType_SolanaGetPublicKey", + 901: "MessageType_SolanaPublicKey", + 902: "MessageType_SolanaGetAddress", + 903: "MessageType_SolanaAddress", + 904: "MessageType_SolanaSignTx", + 905: "MessageType_SolanaTxSignature", + 1000: "MessageType_ThpCreateNewSession", + 1006: "MessageType_ThpPairingRequest", + 1007: "MessageType_ThpPairingRequestApproved", + 1008: "MessageType_ThpSelectMethod", + 1009: "MessageType_ThpPairingPreparationsFinished", + 1010: "MessageType_ThpCredentialRequest", + 1011: "MessageType_ThpCredentialResponse", + 1012: "MessageType_ThpEndRequest", + 1013: "MessageType_ThpEndResponse", + 1016: "MessageType_ThpCodeEntryCommitment", + 1017: "MessageType_ThpCodeEntryChallenge", + 1018: "MessageType_ThpCodeEntryCpaceTrezor", + 1019: "MessageType_ThpCodeEntryCpaceHostTag", + 1020: "MessageType_ThpCodeEntrySecret", + 1024: "MessageType_ThpQrCodeTag", + 1025: "MessageType_ThpQrCodeSecret", + 1032: "MessageType_ThpNfcTagHost", + 1033: "MessageType_ThpNfcTagTrezor", + 2001: "MessageType_NostrGetPubkey", + 2002: "MessageType_NostrPubkey", + 2003: "MessageType_NostrSignEvent", + 2004: "MessageType_NostrEventSignature", + 9100: "MessageType_BenchmarkListNames", + 9101: "MessageType_BenchmarkNames", + 9102: "MessageType_BenchmarkRun", + 9103: "MessageType_BenchmarkResult", } MessageType_value = map[string]int32{ - "MessageType_Initialize": 0, - "MessageType_Ping": 1, - "MessageType_Success": 2, - "MessageType_Failure": 3, - "MessageType_ChangePin": 4, - "MessageType_WipeDevice": 5, - "MessageType_GetEntropy": 9, - "MessageType_Entropy": 10, - "MessageType_LoadDevice": 13, - "MessageType_ResetDevice": 14, - "MessageType_Features": 17, - "MessageType_PinMatrixRequest": 18, - "MessageType_PinMatrixAck": 19, - "MessageType_Cancel": 20, - "MessageType_ClearSession": 24, - "MessageType_ApplySettings": 25, - "MessageType_ButtonRequest": 26, - "MessageType_ButtonAck": 27, - "MessageType_ApplyFlags": 28, - "MessageType_BackupDevice": 34, - "MessageType_EntropyRequest": 35, - "MessageType_EntropyAck": 36, - "MessageType_PassphraseRequest": 41, - "MessageType_PassphraseAck": 42, - "MessageType_PassphraseStateRequest": 77, - "MessageType_PassphraseStateAck": 78, - "MessageType_RecoveryDevice": 45, - "MessageType_WordRequest": 46, - "MessageType_WordAck": 47, - "MessageType_GetFeatures": 55, - "MessageType_SetU2FCounter": 63, - "MessageType_FirmwareErase": 6, - "MessageType_FirmwareUpload": 7, - "MessageType_FirmwareRequest": 8, - "MessageType_SelfTest": 32, - "MessageType_GetPublicKey": 11, - "MessageType_PublicKey": 12, - "MessageType_SignTx": 15, - "MessageType_TxRequest": 21, - "MessageType_TxAck": 22, - "MessageType_GetAddress": 29, - "MessageType_Address": 30, - "MessageType_SignMessage": 38, - "MessageType_VerifyMessage": 39, - "MessageType_MessageSignature": 40, - "MessageType_CipherKeyValue": 23, - "MessageType_CipheredKeyValue": 48, - "MessageType_SignIdentity": 53, - "MessageType_SignedIdentity": 54, - "MessageType_GetECDHSessionKey": 61, - "MessageType_ECDHSessionKey": 62, - "MessageType_CosiCommit": 71, - "MessageType_CosiCommitment": 72, - "MessageType_CosiSign": 73, - "MessageType_CosiSignature": 74, - "MessageType_DebugLinkDecision": 100, - "MessageType_DebugLinkGetState": 101, - "MessageType_DebugLinkState": 102, - "MessageType_DebugLinkStop": 103, - "MessageType_DebugLinkLog": 104, - "MessageType_DebugLinkMemoryRead": 110, - "MessageType_DebugLinkMemory": 111, - "MessageType_DebugLinkMemoryWrite": 112, - "MessageType_DebugLinkFlashErase": 113, - "MessageType_EthereumGetPublicKey": 450, - "MessageType_EthereumPublicKey": 451, - "MessageType_EthereumGetAddress": 56, - "MessageType_EthereumAddress": 57, - "MessageType_EthereumSignTx": 58, - "MessageType_EthereumTxRequest": 59, - "MessageType_EthereumTxAck": 60, - "MessageType_EthereumSignMessage": 64, - "MessageType_EthereumVerifyMessage": 65, - "MessageType_EthereumMessageSignature": 66, - "MessageType_NEMGetAddress": 67, - "MessageType_NEMAddress": 68, - "MessageType_NEMSignTx": 69, - "MessageType_NEMSignedTx": 70, - "MessageType_NEMDecryptMessage": 75, - "MessageType_NEMDecryptedMessage": 76, - "MessageType_LiskGetAddress": 114, - "MessageType_LiskAddress": 115, - "MessageType_LiskSignTx": 116, - "MessageType_LiskSignedTx": 117, - "MessageType_LiskSignMessage": 118, - "MessageType_LiskMessageSignature": 119, - "MessageType_LiskVerifyMessage": 120, - "MessageType_LiskGetPublicKey": 121, - "MessageType_LiskPublicKey": 122, - "MessageType_TezosGetAddress": 150, - "MessageType_TezosAddress": 151, - "MessageType_TezosSignTx": 152, - "MessageType_TezosSignedTx": 153, - "MessageType_TezosGetPublicKey": 154, - "MessageType_TezosPublicKey": 155, - "MessageType_StellarSignTx": 202, - "MessageType_StellarTxOpRequest": 203, - "MessageType_StellarGetAddress": 207, - "MessageType_StellarAddress": 208, - "MessageType_StellarCreateAccountOp": 210, - "MessageType_StellarPaymentOp": 211, - "MessageType_StellarPathPaymentOp": 212, - "MessageType_StellarManageOfferOp": 213, - "MessageType_StellarCreatePassiveOfferOp": 214, - "MessageType_StellarSetOptionsOp": 215, - "MessageType_StellarChangeTrustOp": 216, - "MessageType_StellarAllowTrustOp": 217, - "MessageType_StellarAccountMergeOp": 218, - "MessageType_StellarManageDataOp": 220, - "MessageType_StellarBumpSequenceOp": 221, - "MessageType_StellarSignedTx": 230, - "MessageType_TronGetAddress": 250, - "MessageType_TronAddress": 251, - "MessageType_TronSignTx": 252, - "MessageType_TronSignedTx": 253, - "MessageType_CardanoSignTx": 303, - "MessageType_CardanoTxRequest": 304, - "MessageType_CardanoGetPublicKey": 305, - "MessageType_CardanoPublicKey": 306, - "MessageType_CardanoGetAddress": 307, - "MessageType_CardanoAddress": 308, - "MessageType_CardanoTxAck": 309, - "MessageType_CardanoSignedTx": 310, - "MessageType_OntologyGetAddress": 350, - "MessageType_OntologyAddress": 351, - "MessageType_OntologyGetPublicKey": 352, - "MessageType_OntologyPublicKey": 353, - "MessageType_OntologySignTransfer": 354, - "MessageType_OntologySignedTransfer": 355, - "MessageType_OntologySignWithdrawOng": 356, - "MessageType_OntologySignedWithdrawOng": 357, - "MessageType_OntologySignOntIdRegister": 358, - "MessageType_OntologySignedOntIdRegister": 359, - "MessageType_OntologySignOntIdAddAttributes": 360, - "MessageType_OntologySignedOntIdAddAttributes": 361, - "MessageType_RippleGetAddress": 400, - "MessageType_RippleAddress": 401, - "MessageType_RippleSignTx": 402, - "MessageType_RippleSignedTx": 403, - "MessageType_MoneroTransactionInitRequest": 501, - "MessageType_MoneroTransactionInitAck": 502, - "MessageType_MoneroTransactionSetInputRequest": 503, - "MessageType_MoneroTransactionSetInputAck": 504, - "MessageType_MoneroTransactionInputsPermutationRequest": 505, - "MessageType_MoneroTransactionInputsPermutationAck": 506, - "MessageType_MoneroTransactionInputViniRequest": 507, - "MessageType_MoneroTransactionInputViniAck": 508, - "MessageType_MoneroTransactionAllInputsSetRequest": 509, - "MessageType_MoneroTransactionAllInputsSetAck": 510, - "MessageType_MoneroTransactionSetOutputRequest": 511, - "MessageType_MoneroTransactionSetOutputAck": 512, - "MessageType_MoneroTransactionAllOutSetRequest": 513, - "MessageType_MoneroTransactionAllOutSetAck": 514, - "MessageType_MoneroTransactionSignInputRequest": 515, - "MessageType_MoneroTransactionSignInputAck": 516, - "MessageType_MoneroTransactionFinalRequest": 517, - "MessageType_MoneroTransactionFinalAck": 518, - "MessageType_MoneroKeyImageExportInitRequest": 530, - "MessageType_MoneroKeyImageExportInitAck": 531, - "MessageType_MoneroKeyImageSyncStepRequest": 532, - "MessageType_MoneroKeyImageSyncStepAck": 533, - "MessageType_MoneroKeyImageSyncFinalRequest": 534, - "MessageType_MoneroKeyImageSyncFinalAck": 535, - "MessageType_MoneroGetAddress": 540, - "MessageType_MoneroAddress": 541, - "MessageType_MoneroGetWatchKey": 542, - "MessageType_MoneroWatchKey": 543, - "MessageType_DebugMoneroDiagRequest": 546, - "MessageType_DebugMoneroDiagAck": 547, - "MessageType_MoneroGetTxKeyRequest": 550, - "MessageType_MoneroGetTxKeyAck": 551, - "MessageType_MoneroLiveRefreshStartRequest": 552, - "MessageType_MoneroLiveRefreshStartAck": 553, - "MessageType_MoneroLiveRefreshStepRequest": 554, - "MessageType_MoneroLiveRefreshStepAck": 555, - "MessageType_MoneroLiveRefreshFinalRequest": 556, - "MessageType_MoneroLiveRefreshFinalAck": 557, - "MessageType_EosGetPublicKey": 600, - "MessageType_EosPublicKey": 601, - "MessageType_EosSignTx": 602, - "MessageType_EosTxActionRequest": 603, - "MessageType_EosTxActionAck": 604, - "MessageType_EosSignedTx": 605, - "MessageType_BinanceGetAddress": 700, - "MessageType_BinanceAddress": 701, - "MessageType_BinanceGetPublicKey": 702, - "MessageType_BinancePublicKey": 703, - "MessageType_BinanceSignTx": 704, - "MessageType_BinanceTxRequest": 705, - "MessageType_BinanceTransferMsg": 706, - "MessageType_BinanceOrderMsg": 707, - "MessageType_BinanceCancelMsg": 708, - "MessageType_BinanceSignedTx": 709, + "MessageType_Initialize": 0, + "MessageType_Ping": 1, + "MessageType_Success": 2, + "MessageType_Failure": 3, + "MessageType_ChangePin": 4, + "MessageType_WipeDevice": 5, + "MessageType_GetEntropy": 9, + "MessageType_Entropy": 10, + "MessageType_LoadDevice": 13, + "MessageType_ResetDevice": 14, + "MessageType_SetBusy": 16, + "MessageType_Features": 17, + "MessageType_PinMatrixRequest": 18, + "MessageType_PinMatrixAck": 19, + "MessageType_Cancel": 20, + "MessageType_LockDevice": 24, + "MessageType_ApplySettings": 25, + "MessageType_ButtonRequest": 26, + "MessageType_ButtonAck": 27, + "MessageType_ApplyFlags": 28, + "MessageType_GetNonce": 31, + "MessageType_Nonce": 33, + "MessageType_BackupDevice": 34, + "MessageType_EntropyRequest": 35, + "MessageType_EntropyAck": 36, + "MessageType_EntropyCheckReady": 994, + "MessageType_EntropyCheckContinue": 995, + "MessageType_PassphraseRequest": 41, + "MessageType_PassphraseAck": 42, + "MessageType_RecoveryDevice": 45, + "MessageType_WordRequest": 46, + "MessageType_WordAck": 47, + "MessageType_GetFeatures": 55, + "MessageType_SdProtect": 79, + "MessageType_ChangeWipeCode": 82, + "MessageType_EndSession": 83, + "MessageType_DoPreauthorized": 84, + "MessageType_PreauthorizedRequest": 85, + "MessageType_CancelAuthorization": 86, + "MessageType_RebootToBootloader": 87, + "MessageType_GetFirmwareHash": 88, + "MessageType_FirmwareHash": 89, + "MessageType_UnlockPath": 93, + "MessageType_UnlockedPathRequest": 94, + "MessageType_ShowDeviceTutorial": 95, + "MessageType_UnlockBootloader": 96, + "MessageType_AuthenticateDevice": 97, + "MessageType_AuthenticityProof": 98, + "MessageType_ChangeLanguage": 990, + "MessageType_DataChunkRequest": 991, + "MessageType_DataChunkAck": 992, + "MessageType_SetBrightness": 993, + "MessageType_SetU2FCounter": 63, + "MessageType_GetNextU2FCounter": 80, + "MessageType_NextU2FCounter": 81, + "MessageType_Deprecated_PassphraseStateRequest": 77, + "MessageType_Deprecated_PassphraseStateAck": 78, + "MessageType_FirmwareErase": 6, + "MessageType_FirmwareUpload": 7, + "MessageType_FirmwareRequest": 8, + "MessageType_ProdTestT1": 32, + "MessageType_BleUnpair": 8001, + "MessageType_GetPublicKey": 11, + "MessageType_PublicKey": 12, + "MessageType_SignTx": 15, + "MessageType_TxRequest": 21, + "MessageType_TxAck": 22, + "MessageType_GetAddress": 29, + "MessageType_Address": 30, + "MessageType_TxAckPaymentRequest": 37, + "MessageType_SignMessage": 38, + "MessageType_VerifyMessage": 39, + "MessageType_MessageSignature": 40, + "MessageType_GetOwnershipId": 43, + "MessageType_OwnershipId": 44, + "MessageType_GetOwnershipProof": 49, + "MessageType_OwnershipProof": 50, + "MessageType_AuthorizeCoinJoin": 51, + "MessageType_CipherKeyValue": 23, + "MessageType_CipheredKeyValue": 48, + "MessageType_SignIdentity": 53, + "MessageType_SignedIdentity": 54, + "MessageType_GetECDHSessionKey": 61, + "MessageType_ECDHSessionKey": 62, + "MessageType_DebugLinkDecision": 100, + "MessageType_DebugLinkGetState": 101, + "MessageType_DebugLinkState": 102, + "MessageType_DebugLinkStop": 103, + "MessageType_DebugLinkLog": 104, + "MessageType_DebugLinkMemoryRead": 110, + "MessageType_DebugLinkMemory": 111, + "MessageType_DebugLinkMemoryWrite": 112, + "MessageType_DebugLinkFlashErase": 113, + "MessageType_DebugLinkLayout": 9001, + "MessageType_DebugLinkReseedRandom": 9002, + "MessageType_DebugLinkRecordScreen": 9003, + "MessageType_DebugLinkEraseSdCard": 9005, + "MessageType_DebugLinkWatchLayout": 9006, + "MessageType_DebugLinkResetDebugEvents": 9007, + "MessageType_DebugLinkOptigaSetSecMax": 9008, + "MessageType_DebugLinkGetGcInfo": 9009, + "MessageType_DebugLinkGcInfo": 9010, + "MessageType_DebugLinkGetPairingInfo": 9011, + "MessageType_DebugLinkPairingInfo": 9012, + "MessageType_EthereumGetPublicKey": 450, + "MessageType_EthereumPublicKey": 451, + "MessageType_EthereumGetAddress": 56, + "MessageType_EthereumAddress": 57, + "MessageType_EthereumSignTx": 58, + "MessageType_EthereumSignTxEIP1559": 452, + "MessageType_EthereumTxRequest": 59, + "MessageType_EthereumTxAck": 60, + "MessageType_EthereumSignMessage": 64, + "MessageType_EthereumVerifyMessage": 65, + "MessageType_EthereumMessageSignature": 66, + "MessageType_EthereumSignTypedData": 464, + "MessageType_EthereumTypedDataStructRequest": 465, + "MessageType_EthereumTypedDataStructAck": 466, + "MessageType_EthereumTypedDataValueRequest": 467, + "MessageType_EthereumTypedDataValueAck": 468, + "MessageType_EthereumTypedDataSignature": 469, + "MessageType_EthereumSignTypedHash": 470, + "MessageType_NEMGetAddress": 67, + "MessageType_NEMAddress": 68, + "MessageType_NEMSignTx": 69, + "MessageType_NEMSignedTx": 70, + "MessageType_NEMDecryptMessage": 75, + "MessageType_NEMDecryptedMessage": 76, + "MessageType_TezosGetAddress": 150, + "MessageType_TezosAddress": 151, + "MessageType_TezosSignTx": 152, + "MessageType_TezosSignedTx": 153, + "MessageType_TezosGetPublicKey": 154, + "MessageType_TezosPublicKey": 155, + "MessageType_StellarSignTx": 202, + "MessageType_StellarTxOpRequest": 203, + "MessageType_StellarGetAddress": 207, + "MessageType_StellarAddress": 208, + "MessageType_StellarCreateAccountOp": 210, + "MessageType_StellarPaymentOp": 211, + "MessageType_StellarPathPaymentStrictReceiveOp": 212, + "MessageType_StellarManageSellOfferOp": 213, + "MessageType_StellarCreatePassiveSellOfferOp": 214, + "MessageType_StellarSetOptionsOp": 215, + "MessageType_StellarChangeTrustOp": 216, + "MessageType_StellarAllowTrustOp": 217, + "MessageType_StellarAccountMergeOp": 218, + "MessageType_StellarManageDataOp": 220, + "MessageType_StellarBumpSequenceOp": 221, + "MessageType_StellarManageBuyOfferOp": 222, + "MessageType_StellarPathPaymentStrictSendOp": 223, + "MessageType_StellarClaimClaimableBalanceOp": 225, + "MessageType_StellarSignedTx": 230, + "MessageType_CardanoGetPublicKey": 305, + "MessageType_CardanoPublicKey": 306, + "MessageType_CardanoGetAddress": 307, + "MessageType_CardanoAddress": 308, + "MessageType_CardanoTxItemAck": 313, + "MessageType_CardanoTxAuxiliaryDataSupplement": 314, + "MessageType_CardanoTxWitnessRequest": 315, + "MessageType_CardanoTxWitnessResponse": 316, + "MessageType_CardanoTxHostAck": 317, + "MessageType_CardanoTxBodyHash": 318, + "MessageType_CardanoSignTxFinished": 319, + "MessageType_CardanoSignTxInit": 320, + "MessageType_CardanoTxInput": 321, + "MessageType_CardanoTxOutput": 322, + "MessageType_CardanoAssetGroup": 323, + "MessageType_CardanoToken": 324, + "MessageType_CardanoTxCertificate": 325, + "MessageType_CardanoTxWithdrawal": 326, + "MessageType_CardanoTxAuxiliaryData": 327, + "MessageType_CardanoPoolOwner": 328, + "MessageType_CardanoPoolRelayParameters": 329, + "MessageType_CardanoGetNativeScriptHash": 330, + "MessageType_CardanoNativeScriptHash": 331, + "MessageType_CardanoTxMint": 332, + "MessageType_CardanoTxCollateralInput": 333, + "MessageType_CardanoTxRequiredSigner": 334, + "MessageType_CardanoTxInlineDatumChunk": 335, + "MessageType_CardanoTxReferenceScriptChunk": 336, + "MessageType_CardanoTxReferenceInput": 337, + "MessageType_RippleGetAddress": 400, + "MessageType_RippleAddress": 401, + "MessageType_RippleSignTx": 402, + "MessageType_RippleSignedTx": 403, + "MessageType_MoneroTransactionInitRequest": 501, + "MessageType_MoneroTransactionInitAck": 502, + "MessageType_MoneroTransactionSetInputRequest": 503, + "MessageType_MoneroTransactionSetInputAck": 504, + "MessageType_MoneroTransactionInputViniRequest": 507, + "MessageType_MoneroTransactionInputViniAck": 508, + "MessageType_MoneroTransactionAllInputsSetRequest": 509, + "MessageType_MoneroTransactionAllInputsSetAck": 510, + "MessageType_MoneroTransactionSetOutputRequest": 511, + "MessageType_MoneroTransactionSetOutputAck": 512, + "MessageType_MoneroTransactionAllOutSetRequest": 513, + "MessageType_MoneroTransactionAllOutSetAck": 514, + "MessageType_MoneroTransactionSignInputRequest": 515, + "MessageType_MoneroTransactionSignInputAck": 516, + "MessageType_MoneroTransactionFinalRequest": 517, + "MessageType_MoneroTransactionFinalAck": 518, + "MessageType_MoneroKeyImageExportInitRequest": 530, + "MessageType_MoneroKeyImageExportInitAck": 531, + "MessageType_MoneroKeyImageSyncStepRequest": 532, + "MessageType_MoneroKeyImageSyncStepAck": 533, + "MessageType_MoneroKeyImageSyncFinalRequest": 534, + "MessageType_MoneroKeyImageSyncFinalAck": 535, + "MessageType_MoneroGetAddress": 540, + "MessageType_MoneroAddress": 541, + "MessageType_MoneroGetWatchKey": 542, + "MessageType_MoneroWatchKey": 543, + "MessageType_DebugMoneroDiagRequest": 546, + "MessageType_DebugMoneroDiagAck": 547, + "MessageType_MoneroGetTxKeyRequest": 550, + "MessageType_MoneroGetTxKeyAck": 551, + "MessageType_MoneroLiveRefreshStartRequest": 552, + "MessageType_MoneroLiveRefreshStartAck": 553, + "MessageType_MoneroLiveRefreshStepRequest": 554, + "MessageType_MoneroLiveRefreshStepAck": 555, + "MessageType_MoneroLiveRefreshFinalRequest": 556, + "MessageType_MoneroLiveRefreshFinalAck": 557, + "MessageType_EosGetPublicKey": 600, + "MessageType_EosPublicKey": 601, + "MessageType_EosSignTx": 602, + "MessageType_EosTxActionRequest": 603, + "MessageType_EosTxActionAck": 604, + "MessageType_EosSignedTx": 605, + "MessageType_WebAuthnListResidentCredentials": 800, + "MessageType_WebAuthnCredentials": 801, + "MessageType_WebAuthnAddResidentCredential": 802, + "MessageType_WebAuthnRemoveResidentCredential": 803, + "MessageType_SolanaGetPublicKey": 900, + "MessageType_SolanaPublicKey": 901, + "MessageType_SolanaGetAddress": 902, + "MessageType_SolanaAddress": 903, + "MessageType_SolanaSignTx": 904, + "MessageType_SolanaTxSignature": 905, + "MessageType_ThpCreateNewSession": 1000, + "MessageType_ThpPairingRequest": 1006, + "MessageType_ThpPairingRequestApproved": 1007, + "MessageType_ThpSelectMethod": 1008, + "MessageType_ThpPairingPreparationsFinished": 1009, + "MessageType_ThpCredentialRequest": 1010, + "MessageType_ThpCredentialResponse": 1011, + "MessageType_ThpEndRequest": 1012, + "MessageType_ThpEndResponse": 1013, + "MessageType_ThpCodeEntryCommitment": 1016, + "MessageType_ThpCodeEntryChallenge": 1017, + "MessageType_ThpCodeEntryCpaceTrezor": 1018, + "MessageType_ThpCodeEntryCpaceHostTag": 1019, + "MessageType_ThpCodeEntrySecret": 1020, + "MessageType_ThpQrCodeTag": 1024, + "MessageType_ThpQrCodeSecret": 1025, + "MessageType_ThpNfcTagHost": 1032, + "MessageType_ThpNfcTagTrezor": 1033, + "MessageType_NostrGetPubkey": 2001, + "MessageType_NostrPubkey": 2002, + "MessageType_NostrSignEvent": 2003, + "MessageType_NostrEventSignature": 2004, + "MessageType_BenchmarkListNames": 9100, + "MessageType_BenchmarkNames": 9101, + "MessageType_BenchmarkRun": 9102, + "MessageType_BenchmarkResult": 9103, } ) @@ -675,667 +892,300 @@ func (MessageType) EnumDescriptor() ([]byte, []int) { return file_messages_proto_rawDescGZIP(), []int{0} } -var file_messages_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.EnumValueOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 50002, - Name: "hw.trezor.messages.wire_in", - Tag: "varint,50002,opt,name=wire_in", - Filename: "messages.proto", - }, - { - ExtendedType: (*descriptorpb.EnumValueOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 50003, - Name: "hw.trezor.messages.wire_out", - Tag: "varint,50003,opt,name=wire_out", - Filename: "messages.proto", - }, - { - ExtendedType: (*descriptorpb.EnumValueOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 50004, - Name: "hw.trezor.messages.wire_debug_in", - Tag: "varint,50004,opt,name=wire_debug_in", - Filename: "messages.proto", - }, - { - ExtendedType: (*descriptorpb.EnumValueOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 50005, - Name: "hw.trezor.messages.wire_debug_out", - Tag: "varint,50005,opt,name=wire_debug_out", - Filename: "messages.proto", - }, - { - ExtendedType: (*descriptorpb.EnumValueOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 50006, - Name: "hw.trezor.messages.wire_tiny", - Tag: "varint,50006,opt,name=wire_tiny", - Filename: "messages.proto", - }, - { - ExtendedType: (*descriptorpb.EnumValueOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 50007, - Name: "hw.trezor.messages.wire_bootloader", - Tag: "varint,50007,opt,name=wire_bootloader", - Filename: "messages.proto", - }, - { - ExtendedType: (*descriptorpb.EnumValueOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 50008, - Name: "hw.trezor.messages.wire_no_fsm", - Tag: "varint,50008,opt,name=wire_no_fsm", - Filename: "messages.proto", - }, -} - -// Extension fields to descriptorpb.EnumValueOptions. -var ( - // optional bool wire_in = 50002; - E_WireIn = &file_messages_proto_extTypes[0] // message can be transmitted via wire from PC to TREZOR - // optional bool wire_out = 50003; - E_WireOut = &file_messages_proto_extTypes[1] // message can be transmitted via wire from TREZOR to PC - // optional bool wire_debug_in = 50004; - E_WireDebugIn = &file_messages_proto_extTypes[2] // message can be transmitted via debug wire from PC to TREZOR - // optional bool wire_debug_out = 50005; - E_WireDebugOut = &file_messages_proto_extTypes[3] // message can be transmitted via debug wire from TREZOR to PC - // optional bool wire_tiny = 50006; - E_WireTiny = &file_messages_proto_extTypes[4] // message is handled by TREZOR when the USB stack is in tiny mode - // optional bool wire_bootloader = 50007; - E_WireBootloader = &file_messages_proto_extTypes[5] // message is only handled by TREZOR Bootloader - // optional bool wire_no_fsm = 50008; - E_WireNoFsm = &file_messages_proto_extTypes[6] // message is not handled by TREZOR unless the USB stack is in tiny mode -) - var File_messages_proto protoreflect.FileDescriptor -var file_messages_proto_rawDesc = []byte{ - 0x0a, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x12, 0x68, 0x77, 0x2e, 0x74, 0x72, 0x65, 0x7a, 0x6f, 0x72, 0x2e, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x73, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2a, 0xb9, 0x3f, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x16, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, - 0x10, 0x00, 0x1a, 0x08, 0x90, 0xb5, 0x18, 0x01, 0xb0, 0xb5, 0x18, 0x01, 0x12, 0x1a, 0x0a, 0x10, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x50, 0x69, 0x6e, 0x67, - 0x10, 0x01, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x1d, 0x0a, 0x13, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, - 0x02, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x1d, 0x0a, 0x13, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x10, 0x03, - 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x1f, 0x0a, 0x15, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x69, 0x6e, 0x10, - 0x04, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x20, 0x0a, 0x16, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x57, 0x69, 0x70, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x10, 0x05, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x20, 0x0a, 0x16, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, - 0x6f, 0x70, 0x79, 0x10, 0x09, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x1d, 0x0a, 0x13, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x45, 0x6e, 0x74, 0x72, 0x6f, - 0x70, 0x79, 0x10, 0x0a, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x20, 0x0a, 0x16, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4c, 0x6f, 0x61, 0x64, 0x44, 0x65, - 0x76, 0x69, 0x63, 0x65, 0x10, 0x0d, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x21, 0x0a, 0x17, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x52, 0x65, 0x73, 0x65, - 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x10, 0x0e, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, - 0x1e, 0x0a, 0x14, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x46, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x10, 0x11, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, - 0x26, 0x0a, 0x1c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x50, - 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, - 0x12, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x2a, 0x0a, 0x18, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x50, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, - 0x41, 0x63, 0x6b, 0x10, 0x13, 0x1a, 0x0c, 0x90, 0xb5, 0x18, 0x01, 0xb0, 0xb5, 0x18, 0x01, 0xc0, - 0xb5, 0x18, 0x01, 0x12, 0x20, 0x0a, 0x12, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x5f, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x10, 0x14, 0x1a, 0x08, 0x90, 0xb5, 0x18, - 0x01, 0xb0, 0xb5, 0x18, 0x01, 0x12, 0x22, 0x0a, 0x18, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x5f, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x10, 0x18, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x23, 0x0a, 0x19, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x10, 0x19, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x23, - 0x0a, 0x19, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x42, 0x75, - 0x74, 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x1a, 0x1a, 0x04, 0x98, - 0xb5, 0x18, 0x01, 0x12, 0x27, 0x0a, 0x15, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x5f, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x41, 0x63, 0x6b, 0x10, 0x1b, 0x1a, 0x0c, - 0x90, 0xb5, 0x18, 0x01, 0xb0, 0xb5, 0x18, 0x01, 0xc0, 0xb5, 0x18, 0x01, 0x12, 0x20, 0x0a, 0x16, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x41, 0x70, 0x70, 0x6c, - 0x79, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x10, 0x1c, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x22, - 0x0a, 0x18, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x42, 0x61, - 0x63, 0x6b, 0x75, 0x70, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x10, 0x22, 0x1a, 0x04, 0x90, 0xb5, - 0x18, 0x01, 0x12, 0x24, 0x0a, 0x1a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x5f, 0x45, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x10, 0x23, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x20, 0x0a, 0x16, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x45, 0x6e, 0x74, 0x72, 0x6f, 0x70, 0x79, 0x41, - 0x63, 0x6b, 0x10, 0x24, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x27, 0x0a, 0x1d, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x50, 0x61, 0x73, 0x73, 0x70, 0x68, - 0x72, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x29, 0x1a, 0x04, 0x98, - 0xb5, 0x18, 0x01, 0x12, 0x2b, 0x0a, 0x19, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x5f, 0x50, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x41, 0x63, 0x6b, - 0x10, 0x2a, 0x1a, 0x0c, 0x90, 0xb5, 0x18, 0x01, 0xb0, 0xb5, 0x18, 0x01, 0xc0, 0xb5, 0x18, 0x01, - 0x12, 0x2c, 0x0a, 0x22, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, - 0x50, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x4d, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x30, - 0x0a, 0x1e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x50, 0x61, - 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x41, 0x63, 0x6b, - 0x10, 0x4e, 0x1a, 0x0c, 0x90, 0xb5, 0x18, 0x01, 0xb0, 0xb5, 0x18, 0x01, 0xc0, 0xb5, 0x18, 0x01, - 0x12, 0x24, 0x0a, 0x1a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, - 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x10, 0x2d, - 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x21, 0x0a, 0x17, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x57, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x10, 0x2e, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x1d, 0x0a, 0x13, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x57, 0x6f, 0x72, 0x64, 0x41, 0x63, 0x6b, - 0x10, 0x2f, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x21, 0x0a, 0x17, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x47, 0x65, 0x74, 0x46, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x10, 0x37, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x23, 0x0a, 0x19, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x65, 0x74, 0x55, 0x32, - 0x46, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x10, 0x3f, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, - 0x12, 0x27, 0x0a, 0x19, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, - 0x46, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x45, 0x72, 0x61, 0x73, 0x65, 0x10, 0x06, 0x1a, - 0x08, 0x90, 0xb5, 0x18, 0x01, 0xb8, 0xb5, 0x18, 0x01, 0x12, 0x28, 0x0a, 0x1a, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x46, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, - 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x10, 0x07, 0x1a, 0x08, 0x90, 0xb5, 0x18, 0x01, 0xb8, - 0xb5, 0x18, 0x01, 0x12, 0x29, 0x0a, 0x1b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x5f, 0x46, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x10, 0x08, 0x1a, 0x08, 0x98, 0xb5, 0x18, 0x01, 0xb8, 0xb5, 0x18, 0x01, 0x12, 0x22, - 0x0a, 0x14, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x65, - 0x6c, 0x66, 0x54, 0x65, 0x73, 0x74, 0x10, 0x20, 0x1a, 0x08, 0x90, 0xb5, 0x18, 0x01, 0xb8, 0xb5, - 0x18, 0x01, 0x12, 0x22, 0x0a, 0x18, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x5f, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x10, 0x0b, - 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x1f, 0x0a, 0x15, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x10, - 0x0c, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x1c, 0x0a, 0x12, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x69, 0x67, 0x6e, 0x54, 0x78, 0x10, 0x0f, 0x1a, - 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x1f, 0x0a, 0x15, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x5f, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x15, - 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x1b, 0x0a, 0x11, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x54, 0x78, 0x41, 0x63, 0x6b, 0x10, 0x16, 0x1a, 0x04, 0x90, - 0xb5, 0x18, 0x01, 0x12, 0x20, 0x0a, 0x16, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x5f, 0x47, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x1d, 0x1a, - 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x1d, 0x0a, 0x13, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x5f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x1e, 0x1a, 0x04, - 0x98, 0xb5, 0x18, 0x01, 0x12, 0x21, 0x0a, 0x17, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x5f, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x10, - 0x26, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x23, 0x0a, 0x19, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x10, 0x27, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x26, 0x0a, 0x1c, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x10, 0x28, 0x1a, 0x04, - 0x98, 0xb5, 0x18, 0x01, 0x12, 0x24, 0x0a, 0x1a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x5f, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x10, 0x17, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x26, 0x0a, 0x1c, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, - 0x65, 0x64, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x10, 0x30, 0x1a, 0x04, 0x98, 0xb5, - 0x18, 0x01, 0x12, 0x22, 0x0a, 0x18, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x5f, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x10, 0x35, - 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x24, 0x0a, 0x1a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x49, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x10, 0x36, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x27, 0x0a, 0x1d, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x47, 0x65, 0x74, 0x45, - 0x43, 0x44, 0x48, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x10, 0x3d, 0x1a, - 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x24, 0x0a, 0x1a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x5f, 0x45, 0x43, 0x44, 0x48, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x4b, 0x65, 0x79, 0x10, 0x3e, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x20, 0x0a, 0x16, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x43, 0x6f, 0x73, 0x69, 0x43, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x10, 0x47, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x24, 0x0a, - 0x1a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x43, 0x6f, 0x73, - 0x69, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x48, 0x1a, 0x04, 0x98, - 0xb5, 0x18, 0x01, 0x12, 0x1e, 0x0a, 0x14, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x5f, 0x43, 0x6f, 0x73, 0x69, 0x53, 0x69, 0x67, 0x6e, 0x10, 0x49, 0x1a, 0x04, 0x90, - 0xb5, 0x18, 0x01, 0x12, 0x23, 0x0a, 0x19, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x5f, 0x43, 0x6f, 0x73, 0x69, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x10, 0x4a, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x2f, 0x0a, 0x1d, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x44, 0x65, 0x62, 0x75, 0x67, 0x4c, 0x69, 0x6e, - 0x6b, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x10, 0x64, 0x1a, 0x0c, 0xa0, 0xb5, 0x18, - 0x01, 0xb0, 0xb5, 0x18, 0x01, 0xc0, 0xb5, 0x18, 0x01, 0x12, 0x2b, 0x0a, 0x1d, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x44, 0x65, 0x62, 0x75, 0x67, 0x4c, 0x69, - 0x6e, 0x6b, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x10, 0x65, 0x1a, 0x08, 0xa0, 0xb5, - 0x18, 0x01, 0xb0, 0xb5, 0x18, 0x01, 0x12, 0x24, 0x0a, 0x1a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x44, 0x65, 0x62, 0x75, 0x67, 0x4c, 0x69, 0x6e, 0x6b, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x10, 0x66, 0x1a, 0x04, 0xa8, 0xb5, 0x18, 0x01, 0x12, 0x23, 0x0a, 0x19, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x44, 0x65, 0x62, 0x75, - 0x67, 0x4c, 0x69, 0x6e, 0x6b, 0x53, 0x74, 0x6f, 0x70, 0x10, 0x67, 0x1a, 0x04, 0xa0, 0xb5, 0x18, - 0x01, 0x12, 0x22, 0x0a, 0x18, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x5f, 0x44, 0x65, 0x62, 0x75, 0x67, 0x4c, 0x69, 0x6e, 0x6b, 0x4c, 0x6f, 0x67, 0x10, 0x68, 0x1a, - 0x04, 0xa8, 0xb5, 0x18, 0x01, 0x12, 0x29, 0x0a, 0x1f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x5f, 0x44, 0x65, 0x62, 0x75, 0x67, 0x4c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, - 0x6d, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x61, 0x64, 0x10, 0x6e, 0x1a, 0x04, 0xa0, 0xb5, 0x18, 0x01, - 0x12, 0x25, 0x0a, 0x1b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, - 0x44, 0x65, 0x62, 0x75, 0x67, 0x4c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x10, - 0x6f, 0x1a, 0x04, 0xa8, 0xb5, 0x18, 0x01, 0x12, 0x2a, 0x0a, 0x20, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x44, 0x65, 0x62, 0x75, 0x67, 0x4c, 0x69, 0x6e, 0x6b, - 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x57, 0x72, 0x69, 0x74, 0x65, 0x10, 0x70, 0x1a, 0x04, 0xa0, - 0xb5, 0x18, 0x01, 0x12, 0x29, 0x0a, 0x1f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x5f, 0x44, 0x65, 0x62, 0x75, 0x67, 0x4c, 0x69, 0x6e, 0x6b, 0x46, 0x6c, 0x61, 0x73, - 0x68, 0x45, 0x72, 0x61, 0x73, 0x65, 0x10, 0x71, 0x1a, 0x04, 0xa0, 0xb5, 0x18, 0x01, 0x12, 0x2b, - 0x0a, 0x20, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x45, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, - 0x65, 0x79, 0x10, 0xc2, 0x03, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x28, 0x0a, 0x1d, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x45, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x10, 0xc3, 0x03, 0x1a, - 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x28, 0x0a, 0x1e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x5f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x47, 0x65, 0x74, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x38, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, - 0x25, 0x0a, 0x1b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x45, - 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x39, - 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x24, 0x0a, 0x1a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x53, 0x69, - 0x67, 0x6e, 0x54, 0x78, 0x10, 0x3a, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x27, 0x0a, 0x1d, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x45, 0x74, 0x68, 0x65, - 0x72, 0x65, 0x75, 0x6d, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x3b, 0x1a, - 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x23, 0x0a, 0x19, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x5f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x54, 0x78, 0x41, - 0x63, 0x6b, 0x10, 0x3c, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x29, 0x0a, 0x1f, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x10, 0x40, 0x1a, - 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x2b, 0x0a, 0x21, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x5f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x56, 0x65, 0x72, - 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x10, 0x41, 0x1a, 0x04, 0x90, 0xb5, - 0x18, 0x01, 0x12, 0x2e, 0x0a, 0x24, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x5f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x10, 0x42, 0x1a, 0x04, 0x98, 0xb5, - 0x18, 0x01, 0x12, 0x23, 0x0a, 0x19, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x5f, 0x4e, 0x45, 0x4d, 0x47, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, - 0x43, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x20, 0x0a, 0x16, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4e, 0x45, 0x4d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x10, 0x44, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x1f, 0x0a, 0x15, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4e, 0x45, 0x4d, 0x53, 0x69, 0x67, 0x6e, - 0x54, 0x78, 0x10, 0x45, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x21, 0x0a, 0x17, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4e, 0x45, 0x4d, 0x53, 0x69, 0x67, - 0x6e, 0x65, 0x64, 0x54, 0x78, 0x10, 0x46, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x27, 0x0a, - 0x1d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4e, 0x45, 0x4d, - 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x10, 0x4b, - 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x29, 0x0a, 0x1f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4e, 0x45, 0x4d, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x10, 0x4c, 0x1a, 0x04, 0x98, 0xb5, 0x18, - 0x01, 0x12, 0x24, 0x0a, 0x1a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x5f, 0x4c, 0x69, 0x73, 0x6b, 0x47, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, - 0x72, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x21, 0x0a, 0x17, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4c, 0x69, 0x73, 0x6b, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x10, 0x73, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x20, 0x0a, 0x16, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4c, 0x69, 0x73, 0x6b, 0x53, 0x69, - 0x67, 0x6e, 0x54, 0x78, 0x10, 0x74, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x22, 0x0a, 0x18, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4c, 0x69, 0x73, 0x6b, - 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x78, 0x10, 0x75, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, - 0x12, 0x25, 0x0a, 0x1b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, - 0x4c, 0x69, 0x73, 0x6b, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x10, - 0x76, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x2a, 0x0a, 0x20, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4c, 0x69, 0x73, 0x6b, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x10, 0x77, 0x1a, 0x04, 0x98, - 0xb5, 0x18, 0x01, 0x12, 0x27, 0x0a, 0x1d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x5f, 0x4c, 0x69, 0x73, 0x6b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x10, 0x78, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x26, 0x0a, 0x1c, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4c, 0x69, 0x73, 0x6b, - 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x10, 0x79, 0x1a, 0x04, - 0x90, 0xb5, 0x18, 0x01, 0x12, 0x23, 0x0a, 0x19, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x5f, 0x4c, 0x69, 0x73, 0x6b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, - 0x79, 0x10, 0x7a, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x26, 0x0a, 0x1b, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x54, 0x65, 0x7a, 0x6f, 0x73, 0x47, 0x65, - 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x96, 0x01, 0x1a, 0x04, 0x90, 0xb5, 0x18, - 0x01, 0x12, 0x23, 0x0a, 0x18, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x5f, 0x54, 0x65, 0x7a, 0x6f, 0x73, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x97, 0x01, - 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x22, 0x0a, 0x17, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x54, 0x65, 0x7a, 0x6f, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x54, - 0x78, 0x10, 0x98, 0x01, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x24, 0x0a, 0x19, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x54, 0x65, 0x7a, 0x6f, 0x73, 0x53, - 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x78, 0x10, 0x99, 0x01, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, - 0x12, 0x28, 0x0a, 0x1d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, - 0x54, 0x65, 0x7a, 0x6f, 0x73, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, - 0x79, 0x10, 0x9a, 0x01, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x25, 0x0a, 0x1a, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x54, 0x65, 0x7a, 0x6f, 0x73, 0x50, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x10, 0x9b, 0x01, 0x1a, 0x04, 0x98, 0xb5, 0x18, - 0x01, 0x12, 0x24, 0x0a, 0x19, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x5f, 0x53, 0x74, 0x65, 0x6c, 0x6c, 0x61, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x54, 0x78, 0x10, 0xca, - 0x01, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x29, 0x0a, 0x1e, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x74, 0x65, 0x6c, 0x6c, 0x61, 0x72, 0x54, 0x78, - 0x4f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0xcb, 0x01, 0x1a, 0x04, 0x98, 0xb5, - 0x18, 0x01, 0x12, 0x28, 0x0a, 0x1d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x5f, 0x53, 0x74, 0x65, 0x6c, 0x6c, 0x61, 0x72, 0x47, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x10, 0xcf, 0x01, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x25, 0x0a, 0x1a, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x74, 0x65, 0x6c, - 0x6c, 0x61, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0xd0, 0x01, 0x1a, 0x04, 0x98, - 0xb5, 0x18, 0x01, 0x12, 0x2d, 0x0a, 0x22, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x5f, 0x53, 0x74, 0x65, 0x6c, 0x6c, 0x61, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x70, 0x10, 0xd2, 0x01, 0x1a, 0x04, 0x90, 0xb5, - 0x18, 0x01, 0x12, 0x27, 0x0a, 0x1c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x5f, 0x53, 0x74, 0x65, 0x6c, 0x6c, 0x61, 0x72, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x4f, 0x70, 0x10, 0xd3, 0x01, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x2b, 0x0a, 0x20, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x74, 0x65, 0x6c, 0x6c, - 0x61, 0x72, 0x50, 0x61, 0x74, 0x68, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x10, - 0xd4, 0x01, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x2b, 0x0a, 0x20, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x74, 0x65, 0x6c, 0x6c, 0x61, 0x72, 0x4d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x4f, 0x70, 0x10, 0xd5, 0x01, 0x1a, - 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x32, 0x0a, 0x27, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x74, 0x65, 0x6c, 0x6c, 0x61, 0x72, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x50, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 0x4f, 0x66, 0x66, 0x65, 0x72, 0x4f, 0x70, - 0x10, 0xd6, 0x01, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x2a, 0x0a, 0x1f, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x74, 0x65, 0x6c, 0x6c, 0x61, 0x72, - 0x53, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4f, 0x70, 0x10, 0xd7, 0x01, 0x1a, - 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x2b, 0x0a, 0x20, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x74, 0x65, 0x6c, 0x6c, 0x61, 0x72, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x54, 0x72, 0x75, 0x73, 0x74, 0x4f, 0x70, 0x10, 0xd8, 0x01, 0x1a, 0x04, 0x90, 0xb5, - 0x18, 0x01, 0x12, 0x2a, 0x0a, 0x1f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x5f, 0x53, 0x74, 0x65, 0x6c, 0x6c, 0x61, 0x72, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x54, 0x72, - 0x75, 0x73, 0x74, 0x4f, 0x70, 0x10, 0xd9, 0x01, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x2c, - 0x0a, 0x21, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x74, - 0x65, 0x6c, 0x6c, 0x61, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x72, 0x67, - 0x65, 0x4f, 0x70, 0x10, 0xda, 0x01, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x2a, 0x0a, 0x1f, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x74, 0x65, 0x6c, - 0x6c, 0x61, 0x72, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x70, 0x10, - 0xdc, 0x01, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x2c, 0x0a, 0x21, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x74, 0x65, 0x6c, 0x6c, 0x61, 0x72, 0x42, - 0x75, 0x6d, 0x70, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4f, 0x70, 0x10, 0xdd, 0x01, - 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x26, 0x0a, 0x1b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x74, 0x65, 0x6c, 0x6c, 0x61, 0x72, 0x53, 0x69, 0x67, - 0x6e, 0x65, 0x64, 0x54, 0x78, 0x10, 0xe6, 0x01, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x25, - 0x0a, 0x1a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x54, 0x72, - 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0xfa, 0x01, 0x1a, - 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x22, 0x0a, 0x17, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x5f, 0x54, 0x72, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x10, 0xfb, 0x01, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x21, 0x0a, 0x16, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x54, 0x72, 0x6f, 0x6e, 0x53, 0x69, 0x67, - 0x6e, 0x54, 0x78, 0x10, 0xfc, 0x01, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x23, 0x0a, 0x18, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x54, 0x72, 0x6f, 0x6e, - 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x78, 0x10, 0xfd, 0x01, 0x1a, 0x04, 0x98, 0xb5, 0x18, - 0x01, 0x12, 0x24, 0x0a, 0x19, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x5f, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x54, 0x78, 0x10, 0xaf, - 0x02, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x27, 0x0a, 0x1c, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x54, 0x78, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0xb0, 0x02, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, - 0x12, 0x2a, 0x0a, 0x1f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, - 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x4b, 0x65, 0x79, 0x10, 0xb1, 0x02, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x27, 0x0a, 0x1c, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x43, 0x61, 0x72, 0x64, - 0x61, 0x6e, 0x6f, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x10, 0xb2, 0x02, 0x1a, - 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x28, 0x0a, 0x1d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x5f, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x47, 0x65, 0x74, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0xb3, 0x02, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, - 0x25, 0x0a, 0x1a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x43, - 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0xb4, 0x02, - 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x23, 0x0a, 0x18, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x54, 0x78, 0x41, - 0x63, 0x6b, 0x10, 0xb5, 0x02, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x26, 0x0a, 0x1b, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x43, 0x61, 0x72, 0x64, 0x61, - 0x6e, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x78, 0x10, 0xb6, 0x02, 0x1a, 0x04, 0x98, - 0xb5, 0x18, 0x01, 0x12, 0x29, 0x0a, 0x1e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x5f, 0x4f, 0x6e, 0x74, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x47, 0x65, 0x74, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0xde, 0x02, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x26, - 0x0a, 0x1b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4f, 0x6e, - 0x74, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0xdf, 0x02, - 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x2b, 0x0a, 0x20, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4f, 0x6e, 0x74, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x47, 0x65, - 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x10, 0xe0, 0x02, 0x1a, 0x04, 0x90, - 0xb5, 0x18, 0x01, 0x12, 0x28, 0x0a, 0x1d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x5f, 0x4f, 0x6e, 0x74, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x50, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x4b, 0x65, 0x79, 0x10, 0xe1, 0x02, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x2b, 0x0a, - 0x20, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4f, 0x6e, 0x74, - 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, - 0x72, 0x10, 0xe2, 0x02, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x2d, 0x0a, 0x22, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4f, 0x6e, 0x74, 0x6f, 0x6c, 0x6f, - 0x67, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, - 0x10, 0xe3, 0x02, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x2e, 0x0a, 0x23, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4f, 0x6e, 0x74, 0x6f, 0x6c, 0x6f, 0x67, - 0x79, 0x53, 0x69, 0x67, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x4f, 0x6e, 0x67, - 0x10, 0xe4, 0x02, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x30, 0x0a, 0x25, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4f, 0x6e, 0x74, 0x6f, 0x6c, 0x6f, 0x67, - 0x79, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x4f, - 0x6e, 0x67, 0x10, 0xe5, 0x02, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x30, 0x0a, 0x25, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4f, 0x6e, 0x74, 0x6f, 0x6c, - 0x6f, 0x67, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x4f, 0x6e, 0x74, 0x49, 0x64, 0x52, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x65, 0x72, 0x10, 0xe6, 0x02, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x32, 0x0a, - 0x27, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4f, 0x6e, 0x74, - 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x4f, 0x6e, 0x74, 0x49, 0x64, - 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x10, 0xe7, 0x02, 0x1a, 0x04, 0x98, 0xb5, 0x18, - 0x01, 0x12, 0x35, 0x0a, 0x2a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x5f, 0x4f, 0x6e, 0x74, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x4f, 0x6e, 0x74, - 0x49, 0x64, 0x41, 0x64, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x10, - 0xe8, 0x02, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x37, 0x0a, 0x2c, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4f, 0x6e, 0x74, 0x6f, 0x6c, 0x6f, 0x67, 0x79, - 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x4f, 0x6e, 0x74, 0x49, 0x64, 0x41, 0x64, 0x64, 0x41, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x10, 0xe9, 0x02, 0x1a, 0x04, 0x98, 0xb5, 0x18, - 0x01, 0x12, 0x27, 0x0a, 0x1c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x5f, 0x52, 0x69, 0x70, 0x70, 0x6c, 0x65, 0x47, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x10, 0x90, 0x03, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x24, 0x0a, 0x19, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x52, 0x69, 0x70, 0x70, 0x6c, 0x65, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x91, 0x03, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, - 0x12, 0x23, 0x0a, 0x18, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, - 0x52, 0x69, 0x70, 0x70, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x54, 0x78, 0x10, 0x92, 0x03, 0x1a, - 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x25, 0x0a, 0x1a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x5f, 0x52, 0x69, 0x70, 0x70, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, - 0x64, 0x54, 0x78, 0x10, 0x93, 0x03, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x33, 0x0a, 0x28, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x65, - 0x72, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x69, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0xf5, 0x03, 0x1a, 0x04, 0x98, 0xb5, 0x18, - 0x01, 0x12, 0x2f, 0x0a, 0x24, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x5f, 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x6e, 0x69, 0x74, 0x41, 0x63, 0x6b, 0x10, 0xf6, 0x03, 0x1a, 0x04, 0x98, 0xb5, - 0x18, 0x01, 0x12, 0x37, 0x0a, 0x2c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x10, 0xf7, 0x03, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x33, 0x0a, 0x28, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x65, 0x72, - 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x49, - 0x6e, 0x70, 0x75, 0x74, 0x41, 0x63, 0x6b, 0x10, 0xf8, 0x03, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, - 0x12, 0x40, 0x0a, 0x35, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, - 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x50, 0x65, 0x72, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0xf9, 0x03, 0x1a, 0x04, 0x98, 0xb5, - 0x18, 0x01, 0x12, 0x3c, 0x0a, 0x31, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x50, 0x65, 0x72, 0x6d, 0x75, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x6b, 0x10, 0xfa, 0x03, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, - 0x12, 0x38, 0x0a, 0x2d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, - 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x56, 0x69, 0x6e, 0x69, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x10, 0xfb, 0x03, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x34, 0x0a, 0x29, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, - 0x56, 0x69, 0x6e, 0x69, 0x41, 0x63, 0x6b, 0x10, 0xfc, 0x03, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, - 0x12, 0x3b, 0x0a, 0x30, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, - 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x41, 0x6c, 0x6c, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x10, 0xfd, 0x03, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x37, 0x0a, - 0x2c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f, 0x6e, - 0x65, 0x72, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, - 0x6c, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x53, 0x65, 0x74, 0x41, 0x63, 0x6b, 0x10, 0xfe, 0x03, - 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x38, 0x0a, 0x2d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0xff, 0x03, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, - 0x12, 0x34, 0x0a, 0x29, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, - 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x65, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x41, 0x63, 0x6b, 0x10, 0x80, 0x04, - 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x38, 0x0a, 0x2d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x6c, 0x4f, 0x75, 0x74, 0x53, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x81, 0x04, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, - 0x12, 0x34, 0x0a, 0x29, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, - 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x41, 0x6c, 0x6c, 0x4f, 0x75, 0x74, 0x53, 0x65, 0x74, 0x41, 0x63, 0x6b, 0x10, 0x82, 0x04, - 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x38, 0x0a, 0x2d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x83, 0x04, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, - 0x12, 0x34, 0x0a, 0x29, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, - 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x41, 0x63, 0x6b, 0x10, 0x84, 0x04, - 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x34, 0x0a, 0x29, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x10, 0x85, 0x04, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x30, 0x0a, 0x25, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x65, - 0x72, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6e, - 0x61, 0x6c, 0x41, 0x63, 0x6b, 0x10, 0x86, 0x04, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x36, - 0x0a, 0x2b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f, - 0x6e, 0x65, 0x72, 0x6f, 0x4b, 0x65, 0x79, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x6f, - 0x72, 0x74, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x92, 0x04, - 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x32, 0x0a, 0x27, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, 0x4b, 0x65, 0x79, 0x49, - 0x6d, 0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x69, 0x74, 0x41, 0x63, - 0x6b, 0x10, 0x93, 0x04, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x34, 0x0a, 0x29, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, - 0x4b, 0x65, 0x79, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x65, 0x70, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x94, 0x04, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, - 0x12, 0x30, 0x0a, 0x25, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, - 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, 0x4b, 0x65, 0x79, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x79, - 0x6e, 0x63, 0x53, 0x74, 0x65, 0x70, 0x41, 0x63, 0x6b, 0x10, 0x95, 0x04, 0x1a, 0x04, 0x98, 0xb5, - 0x18, 0x01, 0x12, 0x35, 0x0a, 0x2a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, 0x4b, 0x65, 0x79, 0x49, 0x6d, 0x61, 0x67, 0x65, - 0x53, 0x79, 0x6e, 0x63, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x10, 0x96, 0x04, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x31, 0x0a, 0x26, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, 0x4b, - 0x65, 0x79, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x46, 0x69, 0x6e, 0x61, 0x6c, - 0x41, 0x63, 0x6b, 0x10, 0x97, 0x04, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x27, 0x0a, 0x1c, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x65, - 0x72, 0x6f, 0x47, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x9c, 0x04, 0x1a, - 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x24, 0x0a, 0x19, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x10, 0x9d, 0x04, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x28, 0x0a, 0x1d, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x65, 0x72, - 0x6f, 0x47, 0x65, 0x74, 0x57, 0x61, 0x74, 0x63, 0x68, 0x4b, 0x65, 0x79, 0x10, 0x9e, 0x04, 0x1a, - 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x25, 0x0a, 0x1a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, 0x57, 0x61, 0x74, 0x63, 0x68, - 0x4b, 0x65, 0x79, 0x10, 0x9f, 0x04, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x2d, 0x0a, 0x22, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x44, 0x65, 0x62, 0x75, - 0x67, 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, 0x44, 0x69, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x10, 0xa2, 0x04, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x29, 0x0a, 0x1e, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x44, 0x65, 0x62, 0x75, 0x67, - 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, 0x44, 0x69, 0x61, 0x67, 0x41, 0x63, 0x6b, 0x10, 0xa3, 0x04, - 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x2c, 0x0a, 0x21, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, 0x47, 0x65, 0x74, 0x54, - 0x78, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0xa6, 0x04, 0x1a, 0x04, - 0x90, 0xb5, 0x18, 0x01, 0x12, 0x28, 0x0a, 0x1d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, 0x47, 0x65, 0x74, 0x54, 0x78, 0x4b, - 0x65, 0x79, 0x41, 0x63, 0x6b, 0x10, 0xa7, 0x04, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x34, - 0x0a, 0x29, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f, - 0x6e, 0x65, 0x72, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, - 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0xa8, 0x04, 0x1a, 0x04, - 0x90, 0xb5, 0x18, 0x01, 0x12, 0x30, 0x0a, 0x25, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x52, 0x65, - 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x63, 0x6b, 0x10, 0xa9, 0x04, - 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x33, 0x0a, 0x28, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, 0x4c, 0x69, 0x76, 0x65, - 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, 0x65, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x10, 0xaa, 0x04, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x2f, 0x0a, 0x24, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x65, 0x72, - 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x74, 0x65, 0x70, - 0x41, 0x63, 0x6b, 0x10, 0xab, 0x04, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x34, 0x0a, 0x29, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x65, - 0x72, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x46, 0x69, 0x6e, - 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0xac, 0x04, 0x1a, 0x04, 0x90, 0xb5, - 0x18, 0x01, 0x12, 0x30, 0x0a, 0x25, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x5f, 0x4d, 0x6f, 0x6e, 0x65, 0x72, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x52, 0x65, 0x66, 0x72, - 0x65, 0x73, 0x68, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x41, 0x63, 0x6b, 0x10, 0xad, 0x04, 0x1a, 0x04, - 0x98, 0xb5, 0x18, 0x01, 0x12, 0x26, 0x0a, 0x1b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x5f, 0x45, 0x6f, 0x73, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x4b, 0x65, 0x79, 0x10, 0xd8, 0x04, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x23, 0x0a, 0x18, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x45, 0x6f, 0x73, 0x50, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x10, 0xd9, 0x04, 0x1a, 0x04, 0x98, 0xb5, 0x18, - 0x01, 0x12, 0x20, 0x0a, 0x15, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x5f, 0x45, 0x6f, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x54, 0x78, 0x10, 0xda, 0x04, 0x1a, 0x04, 0x90, - 0xb5, 0x18, 0x01, 0x12, 0x29, 0x0a, 0x1e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x5f, 0x45, 0x6f, 0x73, 0x54, 0x78, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0xdb, 0x04, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x25, - 0x0a, 0x1a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x45, 0x6f, - 0x73, 0x54, 0x78, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x6b, 0x10, 0xdc, 0x04, 0x1a, - 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x22, 0x0a, 0x17, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x5f, 0x45, 0x6f, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x78, - 0x10, 0xdd, 0x04, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x28, 0x0a, 0x1d, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x42, 0x69, 0x6e, 0x61, 0x6e, 0x63, 0x65, - 0x47, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0xbc, 0x05, 0x1a, 0x04, 0x90, - 0xb5, 0x18, 0x01, 0x12, 0x25, 0x0a, 0x1a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x5f, 0x42, 0x69, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x10, 0xbd, 0x05, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x2a, 0x0a, 0x1f, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x42, 0x69, 0x6e, 0x61, 0x6e, 0x63, - 0x65, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x10, 0xbe, 0x05, - 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x27, 0x0a, 0x1c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x42, 0x69, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x10, 0xbf, 0x05, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, - 0x24, 0x0a, 0x19, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x42, - 0x69, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x54, 0x78, 0x10, 0xc0, 0x05, 0x1a, - 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x27, 0x0a, 0x1c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x5f, 0x42, 0x69, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x78, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0xc1, 0x05, 0x1a, 0x04, 0x98, 0xb5, 0x18, 0x01, 0x12, 0x29, - 0x0a, 0x1e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x42, 0x69, - 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4d, 0x73, 0x67, - 0x10, 0xc2, 0x05, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x26, 0x0a, 0x1b, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x42, 0x69, 0x6e, 0x61, 0x6e, 0x63, 0x65, - 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x10, 0xc3, 0x05, 0x1a, 0x04, 0x90, 0xb5, 0x18, - 0x01, 0x12, 0x27, 0x0a, 0x1c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x5f, 0x42, 0x69, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x73, - 0x67, 0x10, 0xc4, 0x05, 0x1a, 0x04, 0x90, 0xb5, 0x18, 0x01, 0x12, 0x26, 0x0a, 0x1b, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x42, 0x69, 0x6e, 0x61, 0x6e, 0x63, - 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x78, 0x10, 0xc5, 0x05, 0x1a, 0x04, 0x98, 0xb5, - 0x18, 0x01, 0x3a, 0x3c, 0x0a, 0x07, 0x77, 0x69, 0x72, 0x65, 0x5f, 0x69, 0x6e, 0x12, 0x21, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0xd2, 0x86, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x77, 0x69, 0x72, 0x65, 0x49, 0x6e, - 0x3a, 0x3e, 0x0a, 0x08, 0x77, 0x69, 0x72, 0x65, 0x5f, 0x6f, 0x75, 0x74, 0x12, 0x21, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0xd3, 0x86, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x77, 0x69, 0x72, 0x65, 0x4f, 0x75, 0x74, - 0x3a, 0x47, 0x0a, 0x0d, 0x77, 0x69, 0x72, 0x65, 0x5f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, - 0x6e, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd4, 0x86, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x77, 0x69, - 0x72, 0x65, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x3a, 0x49, 0x0a, 0x0e, 0x77, 0x69, 0x72, - 0x65, 0x5f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x6f, 0x75, 0x74, 0x12, 0x21, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd5, - 0x86, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x77, 0x69, 0x72, 0x65, 0x44, 0x65, 0x62, 0x75, - 0x67, 0x4f, 0x75, 0x74, 0x3a, 0x40, 0x0a, 0x09, 0x77, 0x69, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6e, - 0x79, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd6, 0x86, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x77, 0x69, - 0x72, 0x65, 0x54, 0x69, 0x6e, 0x79, 0x3a, 0x4c, 0x0a, 0x0f, 0x77, 0x69, 0x72, 0x65, 0x5f, 0x62, - 0x6f, 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd7, 0x86, 0x03, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x77, 0x69, 0x72, 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x6c, 0x6f, - 0x61, 0x64, 0x65, 0x72, 0x3a, 0x43, 0x0a, 0x0b, 0x77, 0x69, 0x72, 0x65, 0x5f, 0x6e, 0x6f, 0x5f, - 0x66, 0x73, 0x6d, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd8, 0x86, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, - 0x77, 0x69, 0x72, 0x65, 0x4e, 0x6f, 0x46, 0x73, 0x6d, 0x42, 0x6f, 0x0a, 0x23, 0x63, 0x6f, 0x6d, - 0x2e, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x6c, 0x61, 0x62, 0x73, 0x2e, 0x74, 0x72, 0x65, - 0x7a, 0x6f, 0x72, 0x2e, 0x6c, 0x69, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x42, 0x0d, 0x54, 0x72, 0x65, 0x7a, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5a, - 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x74, 0x68, 0x65, - 0x72, 0x65, 0x75, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x62, 0x77, 0x61, 0x6c, - 0x6c, 0x65, 0x74, 0x2f, 0x74, 0x72, 0x65, 0x7a, 0x6f, 0x72, -} +const file_messages_proto_rawDesc = "" + + "\n" + + "\x0emessages.proto\x12\x12hw.trezor.messages\x1a\roptions.proto*\xfe[\n" + + "\vMessageType\x12(\n" + + "\x16MessageType_Initialize\x10\x00\x1a\f\x90\xb5\x18\x01\xb0\xb5\x18\x01\x80\xa6\x1d\x01\x12\x1e\n" + + "\x10MessageType_Ping\x10\x01\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12%\n" + + "\x13MessageType_Success\x10\x02\x1a\f\x98\xb5\x18\x01\xa8\xb5\x18\x01\x80\xa6\x1d\x01\x12%\n" + + "\x13MessageType_Failure\x10\x03\x1a\f\x98\xb5\x18\x01\xa8\xb5\x18\x01\x80\xa6\x1d\x01\x12#\n" + + "\x15MessageType_ChangePin\x10\x04\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12$\n" + + "\x16MessageType_WipeDevice\x10\x05\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12$\n" + + "\x16MessageType_GetEntropy\x10\t\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12!\n" + + "\x13MessageType_Entropy\x10\n" + + "\x1a\b\x98\xb5\x18\x01\x80\xa6\x1d\x01\x12$\n" + + "\x16MessageType_LoadDevice\x10\r\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12%\n" + + "\x17MessageType_ResetDevice\x10\x0e\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12!\n" + + "\x13MessageType_SetBusy\x10\x10\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12\"\n" + + "\x14MessageType_Features\x10\x11\x1a\b\x98\xb5\x18\x01\x80\xa6\x1d\x01\x12*\n" + + "\x1cMessageType_PinMatrixRequest\x10\x12\x1a\b\x98\xb5\x18\x01\x80\xa6\x1d\x01\x12.\n" + + "\x18MessageType_PinMatrixAck\x10\x13\x1a\x10\x90\xb5\x18\x01\xb0\xb5\x18\x01\xc0\xb5\x18\x01\x80\xa6\x1d\x01\x12$\n" + + "\x12MessageType_Cancel\x10\x14\x1a\f\x90\xb5\x18\x01\xb0\xb5\x18\x01\x80\xa6\x1d\x01\x12$\n" + + "\x16MessageType_LockDevice\x10\x18\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12'\n" + + "\x19MessageType_ApplySettings\x10\x19\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12'\n" + + "\x19MessageType_ButtonRequest\x10\x1a\x1a\b\x98\xb5\x18\x01\x80\xa6\x1d\x01\x12+\n" + + "\x15MessageType_ButtonAck\x10\x1b\x1a\x10\x90\xb5\x18\x01\xb0\xb5\x18\x01\xc0\xb5\x18\x01\x80\xa6\x1d\x01\x12$\n" + + "\x16MessageType_ApplyFlags\x10\x1c\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12\"\n" + + "\x14MessageType_GetNonce\x10\x1f\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12\x1f\n" + + "\x11MessageType_Nonce\x10!\x1a\b\x98\xb5\x18\x01\x80\xa6\x1d\x01\x12&\n" + + "\x18MessageType_BackupDevice\x10\"\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12(\n" + + "\x1aMessageType_EntropyRequest\x10#\x1a\b\x98\xb5\x18\x01\x80\xa6\x1d\x01\x12$\n" + + "\x16MessageType_EntropyAck\x10$\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12,\n" + + "\x1dMessageType_EntropyCheckReady\x10\xe2\a\x1a\b\x98\xb5\x18\x01\x80\xa6\x1d\x01\x12/\n" + + " MessageType_EntropyCheckContinue\x10\xe3\a\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12+\n" + + "\x1dMessageType_PassphraseRequest\x10)\x1a\b\x98\xb5\x18\x01\x80\xa6\x1d\x01\x12/\n" + + "\x19MessageType_PassphraseAck\x10*\x1a\x10\x90\xb5\x18\x01\xb0\xb5\x18\x01\xc0\xb5\x18\x01\x80\xa6\x1d\x01\x12(\n" + + "\x1aMessageType_RecoveryDevice\x10-\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12%\n" + + "\x17MessageType_WordRequest\x10.\x1a\b\x98\xb5\x18\x01\x80\xa6\x1d\x01\x12!\n" + + "\x13MessageType_WordAck\x10/\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12%\n" + + "\x17MessageType_GetFeatures\x107\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12#\n" + + "\x15MessageType_SdProtect\x10O\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12(\n" + + "\x1aMessageType_ChangeWipeCode\x10R\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12$\n" + + "\x16MessageType_EndSession\x10S\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12)\n" + + "\x1bMessageType_DoPreauthorized\x10T\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12.\n" + + " MessageType_PreauthorizedRequest\x10U\x1a\b\x98\xb5\x18\x01\x80\xa6\x1d\x01\x12-\n" + + "\x1fMessageType_CancelAuthorization\x10V\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12,\n" + + "\x1eMessageType_RebootToBootloader\x10W\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12)\n" + + "\x1bMessageType_GetFirmwareHash\x10X\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12&\n" + + "\x18MessageType_FirmwareHash\x10Y\x1a\b\x98\xb5\x18\x01\x80\xa6\x1d\x01\x12$\n" + + "\x16MessageType_UnlockPath\x10]\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12-\n" + + "\x1fMessageType_UnlockedPathRequest\x10^\x1a\b\x98\xb5\x18\x01\x80\xa6\x1d\x01\x12,\n" + + "\x1eMessageType_ShowDeviceTutorial\x10_\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12*\n" + + "\x1cMessageType_UnlockBootloader\x10`\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12,\n" + + "\x1eMessageType_AuthenticateDevice\x10a\x1a\b\x98\xb5\x18\x01\x80\xa6\x1d\x01\x12+\n" + + "\x1dMessageType_AuthenticityProof\x10b\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12)\n" + + "\x1aMessageType_ChangeLanguage\x10\xde\a\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12+\n" + + "\x1cMessageType_DataChunkRequest\x10\xdf\a\x1a\b\x98\xb5\x18\x01\x80\xa6\x1d\x01\x12'\n" + + "\x18MessageType_DataChunkAck\x10\xe0\a\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12(\n" + + "\x19MessageType_SetBrightness\x10\xe1\a\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12#\n" + + "\x19MessageType_SetU2FCounter\x10?\x1a\x04\x90\xb5\x18\x01\x12'\n" + + "\x1dMessageType_GetNextU2FCounter\x10P\x1a\x04\x90\xb5\x18\x01\x12$\n" + + "\x1aMessageType_NextU2FCounter\x10Q\x1a\x04\x98\xb5\x18\x01\x125\n" + + "-MessageType_Deprecated_PassphraseStateRequest\x10M\x1a\x02\b\x01\x121\n" + + ")MessageType_Deprecated_PassphraseStateAck\x10N\x1a\x02\b\x01\x12+\n" + + "\x19MessageType_FirmwareErase\x10\x06\x1a\f\x90\xb5\x18\x01\xb8\xb5\x18\x01\x80\xa6\x1d\x01\x12,\n" + + "\x1aMessageType_FirmwareUpload\x10\a\x1a\f\x90\xb5\x18\x01\xb8\xb5\x18\x01\x80\xa6\x1d\x01\x12-\n" + + "\x1bMessageType_FirmwareRequest\x10\b\x1a\f\x98\xb5\x18\x01\xb8\xb5\x18\x01\x80\xa6\x1d\x01\x12(\n" + + "\x16MessageType_ProdTestT1\x10 \x1a\f\x90\xb5\x18\x01\xb8\xb5\x18\x01\x80\xa6\x1d\x01\x12$\n" + + "\x15MessageType_BleUnpair\x10\xc1>\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12&\n" + + "\x18MessageType_GetPublicKey\x10\v\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12#\n" + + "\x15MessageType_PublicKey\x10\f\x1a\b\x98\xb5\x18\x01\x80\xa6\x1d\x01\x12 \n" + + "\x12MessageType_SignTx\x10\x0f\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12#\n" + + "\x15MessageType_TxRequest\x10\x15\x1a\b\x98\xb5\x18\x01\x80\xa6\x1d\x01\x12\x1f\n" + + "\x11MessageType_TxAck\x10\x16\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12$\n" + + "\x16MessageType_GetAddress\x10\x1d\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12!\n" + + "\x13MessageType_Address\x10\x1e\x1a\b\x98\xb5\x18\x01\x80\xa6\x1d\x01\x12)\n" + + "\x1fMessageType_TxAckPaymentRequest\x10%\x1a\x04\x90\xb5\x18\x01\x12%\n" + + "\x17MessageType_SignMessage\x10&\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12'\n" + + "\x19MessageType_VerifyMessage\x10'\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12*\n" + + "\x1cMessageType_MessageSignature\x10(\x1a\b\x98\xb5\x18\x01\x80\xa6\x1d\x01\x12(\n" + + "\x1aMessageType_GetOwnershipId\x10+\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12%\n" + + "\x17MessageType_OwnershipId\x10,\x1a\b\x98\xb5\x18\x01\x80\xa6\x1d\x01\x12+\n" + + "\x1dMessageType_GetOwnershipProof\x101\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12(\n" + + "\x1aMessageType_OwnershipProof\x102\x1a\b\x98\xb5\x18\x01\x80\xa6\x1d\x01\x12+\n" + + "\x1dMessageType_AuthorizeCoinJoin\x103\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12(\n" + + "\x1aMessageType_CipherKeyValue\x10\x17\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12*\n" + + "\x1cMessageType_CipheredKeyValue\x100\x1a\b\x98\xb5\x18\x01\x80\xa6\x1d\x01\x12&\n" + + "\x18MessageType_SignIdentity\x105\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12(\n" + + "\x1aMessageType_SignedIdentity\x106\x1a\b\x98\xb5\x18\x01\x80\xa6\x1d\x01\x12+\n" + + "\x1dMessageType_GetECDHSessionKey\x10=\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12(\n" + + "\x1aMessageType_ECDHSessionKey\x10>\x1a\b\x98\xb5\x18\x01\x80\xa6\x1d\x01\x123\n" + + "\x1dMessageType_DebugLinkDecision\x10d\x1a\x10\xa0\xb5\x18\x01\xb0\xb5\x18\x01\xc0\xb5\x18\x01\x80\xa6\x1d\x01\x12/\n" + + "\x1dMessageType_DebugLinkGetState\x10e\x1a\f\xa0\xb5\x18\x01\xb0\xb5\x18\x01\x80\xa6\x1d\x01\x12(\n" + + "\x1aMessageType_DebugLinkState\x10f\x1a\b\xa8\xb5\x18\x01\x80\xa6\x1d\x01\x12'\n" + + "\x19MessageType_DebugLinkStop\x10g\x1a\b\xa0\xb5\x18\x01\x80\xa6\x1d\x01\x12&\n" + + "\x18MessageType_DebugLinkLog\x10h\x1a\b\xa8\xb5\x18\x01\x80\xa6\x1d\x01\x12-\n" + + "\x1fMessageType_DebugLinkMemoryRead\x10n\x1a\b\xa0\xb5\x18\x01\x80\xa6\x1d\x01\x12)\n" + + "\x1bMessageType_DebugLinkMemory\x10o\x1a\b\xa8\xb5\x18\x01\x80\xa6\x1d\x01\x12.\n" + + " MessageType_DebugLinkMemoryWrite\x10p\x1a\b\xa0\xb5\x18\x01\x80\xa6\x1d\x01\x12-\n" + + "\x1fMessageType_DebugLinkFlashErase\x10q\x1a\b\xa0\xb5\x18\x01\x80\xa6\x1d\x01\x12*\n" + + "\x1bMessageType_DebugLinkLayout\x10\xa9F\x1a\b\xa8\xb5\x18\x01\x80\xa6\x1d\x01\x120\n" + + "!MessageType_DebugLinkReseedRandom\x10\xaaF\x1a\b\xa0\xb5\x18\x01\x80\xa6\x1d\x01\x120\n" + + "!MessageType_DebugLinkRecordScreen\x10\xabF\x1a\b\xa0\xb5\x18\x01\x80\xa6\x1d\x01\x12/\n" + + " MessageType_DebugLinkEraseSdCard\x10\xadF\x1a\b\xa0\xb5\x18\x01\x80\xa6\x1d\x01\x12/\n" + + " MessageType_DebugLinkWatchLayout\x10\xaeF\x1a\b\xa0\xb5\x18\x01\x80\xa6\x1d\x01\x124\n" + + "%MessageType_DebugLinkResetDebugEvents\x10\xafF\x1a\b\xa0\xb5\x18\x01\x80\xa6\x1d\x01\x123\n" + + "$MessageType_DebugLinkOptigaSetSecMax\x10\xb0F\x1a\b\xa0\xb5\x18\x01\x80\xa6\x1d\x01\x12-\n" + + "\x1eMessageType_DebugLinkGetGcInfo\x10\xb1F\x1a\b\xa0\xb5\x18\x01\x80\xa6\x1d\x01\x12*\n" + + "\x1bMessageType_DebugLinkGcInfo\x10\xb2F\x1a\b\xa8\xb5\x18\x01\x80\xa6\x1d\x01\x122\n" + + "#MessageType_DebugLinkGetPairingInfo\x10\xb3F\x1a\b\xa0\xb5\x18\x01\x80\xa6\x1d\x01\x12/\n" + + " MessageType_DebugLinkPairingInfo\x10\xb4F\x1a\b\xa8\xb5\x18\x01\x80\xa6\x1d\x01\x12+\n" + + " MessageType_EthereumGetPublicKey\x10\xc2\x03\x1a\x04\x90\xb5\x18\x01\x12(\n" + + "\x1dMessageType_EthereumPublicKey\x10\xc3\x03\x1a\x04\x98\xb5\x18\x01\x12(\n" + + "\x1eMessageType_EthereumGetAddress\x108\x1a\x04\x90\xb5\x18\x01\x12%\n" + + "\x1bMessageType_EthereumAddress\x109\x1a\x04\x98\xb5\x18\x01\x12$\n" + + "\x1aMessageType_EthereumSignTx\x10:\x1a\x04\x90\xb5\x18\x01\x12,\n" + + "!MessageType_EthereumSignTxEIP1559\x10\xc4\x03\x1a\x04\x90\xb5\x18\x01\x12'\n" + + "\x1dMessageType_EthereumTxRequest\x10;\x1a\x04\x98\xb5\x18\x01\x12#\n" + + "\x19MessageType_EthereumTxAck\x10<\x1a\x04\x90\xb5\x18\x01\x12)\n" + + "\x1fMessageType_EthereumSignMessage\x10@\x1a\x04\x90\xb5\x18\x01\x12+\n" + + "!MessageType_EthereumVerifyMessage\x10A\x1a\x04\x90\xb5\x18\x01\x12.\n" + + "$MessageType_EthereumMessageSignature\x10B\x1a\x04\x98\xb5\x18\x01\x12,\n" + + "!MessageType_EthereumSignTypedData\x10\xd0\x03\x1a\x04\x90\xb5\x18\x01\x125\n" + + "*MessageType_EthereumTypedDataStructRequest\x10\xd1\x03\x1a\x04\x98\xb5\x18\x01\x121\n" + + "&MessageType_EthereumTypedDataStructAck\x10\xd2\x03\x1a\x04\x90\xb5\x18\x01\x124\n" + + ")MessageType_EthereumTypedDataValueRequest\x10\xd3\x03\x1a\x04\x98\xb5\x18\x01\x120\n" + + "%MessageType_EthereumTypedDataValueAck\x10\xd4\x03\x1a\x04\x90\xb5\x18\x01\x121\n" + + "&MessageType_EthereumTypedDataSignature\x10\xd5\x03\x1a\x04\x98\xb5\x18\x01\x12,\n" + + "!MessageType_EthereumSignTypedHash\x10\xd6\x03\x1a\x04\x90\xb5\x18\x01\x12#\n" + + "\x19MessageType_NEMGetAddress\x10C\x1a\x04\x90\xb5\x18\x01\x12 \n" + + "\x16MessageType_NEMAddress\x10D\x1a\x04\x98\xb5\x18\x01\x12\x1f\n" + + "\x15MessageType_NEMSignTx\x10E\x1a\x04\x90\xb5\x18\x01\x12!\n" + + "\x17MessageType_NEMSignedTx\x10F\x1a\x04\x98\xb5\x18\x01\x12'\n" + + "\x1dMessageType_NEMDecryptMessage\x10K\x1a\x04\x90\xb5\x18\x01\x12)\n" + + "\x1fMessageType_NEMDecryptedMessage\x10L\x1a\x04\x98\xb5\x18\x01\x12&\n" + + "\x1bMessageType_TezosGetAddress\x10\x96\x01\x1a\x04\x90\xb5\x18\x01\x12#\n" + + "\x18MessageType_TezosAddress\x10\x97\x01\x1a\x04\x98\xb5\x18\x01\x12\"\n" + + "\x17MessageType_TezosSignTx\x10\x98\x01\x1a\x04\x90\xb5\x18\x01\x12$\n" + + "\x19MessageType_TezosSignedTx\x10\x99\x01\x1a\x04\x98\xb5\x18\x01\x12(\n" + + "\x1dMessageType_TezosGetPublicKey\x10\x9a\x01\x1a\x04\x90\xb5\x18\x01\x12%\n" + + "\x1aMessageType_TezosPublicKey\x10\x9b\x01\x1a\x04\x98\xb5\x18\x01\x12$\n" + + "\x19MessageType_StellarSignTx\x10\xca\x01\x1a\x04\x90\xb5\x18\x01\x12)\n" + + "\x1eMessageType_StellarTxOpRequest\x10\xcb\x01\x1a\x04\x98\xb5\x18\x01\x12(\n" + + "\x1dMessageType_StellarGetAddress\x10\xcf\x01\x1a\x04\x90\xb5\x18\x01\x12%\n" + + "\x1aMessageType_StellarAddress\x10\xd0\x01\x1a\x04\x98\xb5\x18\x01\x12-\n" + + "\"MessageType_StellarCreateAccountOp\x10\xd2\x01\x1a\x04\x90\xb5\x18\x01\x12'\n" + + "\x1cMessageType_StellarPaymentOp\x10\xd3\x01\x1a\x04\x90\xb5\x18\x01\x128\n" + + "-MessageType_StellarPathPaymentStrictReceiveOp\x10\xd4\x01\x1a\x04\x90\xb5\x18\x01\x12/\n" + + "$MessageType_StellarManageSellOfferOp\x10\xd5\x01\x1a\x04\x90\xb5\x18\x01\x126\n" + + "+MessageType_StellarCreatePassiveSellOfferOp\x10\xd6\x01\x1a\x04\x90\xb5\x18\x01\x12*\n" + + "\x1fMessageType_StellarSetOptionsOp\x10\xd7\x01\x1a\x04\x90\xb5\x18\x01\x12+\n" + + " MessageType_StellarChangeTrustOp\x10\xd8\x01\x1a\x04\x90\xb5\x18\x01\x12*\n" + + "\x1fMessageType_StellarAllowTrustOp\x10\xd9\x01\x1a\x04\x90\xb5\x18\x01\x12,\n" + + "!MessageType_StellarAccountMergeOp\x10\xda\x01\x1a\x04\x90\xb5\x18\x01\x12*\n" + + "\x1fMessageType_StellarManageDataOp\x10\xdc\x01\x1a\x04\x90\xb5\x18\x01\x12,\n" + + "!MessageType_StellarBumpSequenceOp\x10\xdd\x01\x1a\x04\x90\xb5\x18\x01\x12.\n" + + "#MessageType_StellarManageBuyOfferOp\x10\xde\x01\x1a\x04\x90\xb5\x18\x01\x125\n" + + "*MessageType_StellarPathPaymentStrictSendOp\x10\xdf\x01\x1a\x04\x90\xb5\x18\x01\x125\n" + + "*MessageType_StellarClaimClaimableBalanceOp\x10\xe1\x01\x1a\x04\x90\xb5\x18\x01\x12&\n" + + "\x1bMessageType_StellarSignedTx\x10\xe6\x01\x1a\x04\x98\xb5\x18\x01\x12*\n" + + "\x1fMessageType_CardanoGetPublicKey\x10\xb1\x02\x1a\x04\x90\xb5\x18\x01\x12'\n" + + "\x1cMessageType_CardanoPublicKey\x10\xb2\x02\x1a\x04\x98\xb5\x18\x01\x12(\n" + + "\x1dMessageType_CardanoGetAddress\x10\xb3\x02\x1a\x04\x90\xb5\x18\x01\x12%\n" + + "\x1aMessageType_CardanoAddress\x10\xb4\x02\x1a\x04\x98\xb5\x18\x01\x12'\n" + + "\x1cMessageType_CardanoTxItemAck\x10\xb9\x02\x1a\x04\x98\xb5\x18\x01\x127\n" + + ",MessageType_CardanoTxAuxiliaryDataSupplement\x10\xba\x02\x1a\x04\x98\xb5\x18\x01\x12.\n" + + "#MessageType_CardanoTxWitnessRequest\x10\xbb\x02\x1a\x04\x90\xb5\x18\x01\x12/\n" + + "$MessageType_CardanoTxWitnessResponse\x10\xbc\x02\x1a\x04\x98\xb5\x18\x01\x12'\n" + + "\x1cMessageType_CardanoTxHostAck\x10\xbd\x02\x1a\x04\x90\xb5\x18\x01\x12(\n" + + "\x1dMessageType_CardanoTxBodyHash\x10\xbe\x02\x1a\x04\x98\xb5\x18\x01\x12,\n" + + "!MessageType_CardanoSignTxFinished\x10\xbf\x02\x1a\x04\x98\xb5\x18\x01\x12(\n" + + "\x1dMessageType_CardanoSignTxInit\x10\xc0\x02\x1a\x04\x90\xb5\x18\x01\x12%\n" + + "\x1aMessageType_CardanoTxInput\x10\xc1\x02\x1a\x04\x90\xb5\x18\x01\x12&\n" + + "\x1bMessageType_CardanoTxOutput\x10\xc2\x02\x1a\x04\x90\xb5\x18\x01\x12(\n" + + "\x1dMessageType_CardanoAssetGroup\x10\xc3\x02\x1a\x04\x90\xb5\x18\x01\x12#\n" + + "\x18MessageType_CardanoToken\x10\xc4\x02\x1a\x04\x90\xb5\x18\x01\x12+\n" + + " MessageType_CardanoTxCertificate\x10\xc5\x02\x1a\x04\x90\xb5\x18\x01\x12*\n" + + "\x1fMessageType_CardanoTxWithdrawal\x10\xc6\x02\x1a\x04\x90\xb5\x18\x01\x12-\n" + + "\"MessageType_CardanoTxAuxiliaryData\x10\xc7\x02\x1a\x04\x90\xb5\x18\x01\x12'\n" + + "\x1cMessageType_CardanoPoolOwner\x10\xc8\x02\x1a\x04\x90\xb5\x18\x01\x121\n" + + "&MessageType_CardanoPoolRelayParameters\x10\xc9\x02\x1a\x04\x90\xb5\x18\x01\x121\n" + + "&MessageType_CardanoGetNativeScriptHash\x10\xca\x02\x1a\x04\x90\xb5\x18\x01\x12.\n" + + "#MessageType_CardanoNativeScriptHash\x10\xcb\x02\x1a\x04\x98\xb5\x18\x01\x12$\n" + + "\x19MessageType_CardanoTxMint\x10\xcc\x02\x1a\x04\x90\xb5\x18\x01\x12/\n" + + "$MessageType_CardanoTxCollateralInput\x10\xcd\x02\x1a\x04\x90\xb5\x18\x01\x12.\n" + + "#MessageType_CardanoTxRequiredSigner\x10\xce\x02\x1a\x04\x90\xb5\x18\x01\x120\n" + + "%MessageType_CardanoTxInlineDatumChunk\x10\xcf\x02\x1a\x04\x90\xb5\x18\x01\x124\n" + + ")MessageType_CardanoTxReferenceScriptChunk\x10\xd0\x02\x1a\x04\x90\xb5\x18\x01\x12.\n" + + "#MessageType_CardanoTxReferenceInput\x10\xd1\x02\x1a\x04\x90\xb5\x18\x01\x12'\n" + + "\x1cMessageType_RippleGetAddress\x10\x90\x03\x1a\x04\x90\xb5\x18\x01\x12$\n" + + "\x19MessageType_RippleAddress\x10\x91\x03\x1a\x04\x98\xb5\x18\x01\x12#\n" + + "\x18MessageType_RippleSignTx\x10\x92\x03\x1a\x04\x90\xb5\x18\x01\x12%\n" + + "\x1aMessageType_RippleSignedTx\x10\x93\x03\x1a\x04\x90\xb5\x18\x01\x123\n" + + "(MessageType_MoneroTransactionInitRequest\x10\xf5\x03\x1a\x04\x98\xb5\x18\x01\x12/\n" + + "$MessageType_MoneroTransactionInitAck\x10\xf6\x03\x1a\x04\x98\xb5\x18\x01\x127\n" + + ",MessageType_MoneroTransactionSetInputRequest\x10\xf7\x03\x1a\x04\x98\xb5\x18\x01\x123\n" + + "(MessageType_MoneroTransactionSetInputAck\x10\xf8\x03\x1a\x04\x98\xb5\x18\x01\x128\n" + + "-MessageType_MoneroTransactionInputViniRequest\x10\xfb\x03\x1a\x04\x98\xb5\x18\x01\x124\n" + + ")MessageType_MoneroTransactionInputViniAck\x10\xfc\x03\x1a\x04\x98\xb5\x18\x01\x12;\n" + + "0MessageType_MoneroTransactionAllInputsSetRequest\x10\xfd\x03\x1a\x04\x98\xb5\x18\x01\x127\n" + + ",MessageType_MoneroTransactionAllInputsSetAck\x10\xfe\x03\x1a\x04\x98\xb5\x18\x01\x128\n" + + "-MessageType_MoneroTransactionSetOutputRequest\x10\xff\x03\x1a\x04\x98\xb5\x18\x01\x124\n" + + ")MessageType_MoneroTransactionSetOutputAck\x10\x80\x04\x1a\x04\x98\xb5\x18\x01\x128\n" + + "-MessageType_MoneroTransactionAllOutSetRequest\x10\x81\x04\x1a\x04\x98\xb5\x18\x01\x124\n" + + ")MessageType_MoneroTransactionAllOutSetAck\x10\x82\x04\x1a\x04\x98\xb5\x18\x01\x128\n" + + "-MessageType_MoneroTransactionSignInputRequest\x10\x83\x04\x1a\x04\x98\xb5\x18\x01\x124\n" + + ")MessageType_MoneroTransactionSignInputAck\x10\x84\x04\x1a\x04\x98\xb5\x18\x01\x124\n" + + ")MessageType_MoneroTransactionFinalRequest\x10\x85\x04\x1a\x04\x98\xb5\x18\x01\x120\n" + + "%MessageType_MoneroTransactionFinalAck\x10\x86\x04\x1a\x04\x98\xb5\x18\x01\x126\n" + + "+MessageType_MoneroKeyImageExportInitRequest\x10\x92\x04\x1a\x04\x98\xb5\x18\x01\x122\n" + + "'MessageType_MoneroKeyImageExportInitAck\x10\x93\x04\x1a\x04\x98\xb5\x18\x01\x124\n" + + ")MessageType_MoneroKeyImageSyncStepRequest\x10\x94\x04\x1a\x04\x98\xb5\x18\x01\x120\n" + + "%MessageType_MoneroKeyImageSyncStepAck\x10\x95\x04\x1a\x04\x98\xb5\x18\x01\x125\n" + + "*MessageType_MoneroKeyImageSyncFinalRequest\x10\x96\x04\x1a\x04\x98\xb5\x18\x01\x121\n" + + "&MessageType_MoneroKeyImageSyncFinalAck\x10\x97\x04\x1a\x04\x98\xb5\x18\x01\x12'\n" + + "\x1cMessageType_MoneroGetAddress\x10\x9c\x04\x1a\x04\x90\xb5\x18\x01\x12$\n" + + "\x19MessageType_MoneroAddress\x10\x9d\x04\x1a\x04\x98\xb5\x18\x01\x12(\n" + + "\x1dMessageType_MoneroGetWatchKey\x10\x9e\x04\x1a\x04\x90\xb5\x18\x01\x12%\n" + + "\x1aMessageType_MoneroWatchKey\x10\x9f\x04\x1a\x04\x98\xb5\x18\x01\x12-\n" + + "\"MessageType_DebugMoneroDiagRequest\x10\xa2\x04\x1a\x04\x90\xb5\x18\x01\x12)\n" + + "\x1eMessageType_DebugMoneroDiagAck\x10\xa3\x04\x1a\x04\x98\xb5\x18\x01\x12,\n" + + "!MessageType_MoneroGetTxKeyRequest\x10\xa6\x04\x1a\x04\x90\xb5\x18\x01\x12(\n" + + "\x1dMessageType_MoneroGetTxKeyAck\x10\xa7\x04\x1a\x04\x98\xb5\x18\x01\x124\n" + + ")MessageType_MoneroLiveRefreshStartRequest\x10\xa8\x04\x1a\x04\x90\xb5\x18\x01\x120\n" + + "%MessageType_MoneroLiveRefreshStartAck\x10\xa9\x04\x1a\x04\x98\xb5\x18\x01\x123\n" + + "(MessageType_MoneroLiveRefreshStepRequest\x10\xaa\x04\x1a\x04\x90\xb5\x18\x01\x12/\n" + + "$MessageType_MoneroLiveRefreshStepAck\x10\xab\x04\x1a\x04\x98\xb5\x18\x01\x124\n" + + ")MessageType_MoneroLiveRefreshFinalRequest\x10\xac\x04\x1a\x04\x90\xb5\x18\x01\x120\n" + + "%MessageType_MoneroLiveRefreshFinalAck\x10\xad\x04\x1a\x04\x98\xb5\x18\x01\x12&\n" + + "\x1bMessageType_EosGetPublicKey\x10\xd8\x04\x1a\x04\x90\xb5\x18\x01\x12#\n" + + "\x18MessageType_EosPublicKey\x10\xd9\x04\x1a\x04\x98\xb5\x18\x01\x12 \n" + + "\x15MessageType_EosSignTx\x10\xda\x04\x1a\x04\x90\xb5\x18\x01\x12)\n" + + "\x1eMessageType_EosTxActionRequest\x10\xdb\x04\x1a\x04\x98\xb5\x18\x01\x12%\n" + + "\x1aMessageType_EosTxActionAck\x10\xdc\x04\x1a\x04\x90\xb5\x18\x01\x12\"\n" + + "\x17MessageType_EosSignedTx\x10\xdd\x04\x1a\x04\x98\xb5\x18\x01\x126\n" + + "+MessageType_WebAuthnListResidentCredentials\x10\xa0\x06\x1a\x04\x90\xb5\x18\x01\x12*\n" + + "\x1fMessageType_WebAuthnCredentials\x10\xa1\x06\x1a\x04\x98\xb5\x18\x01\x124\n" + + ")MessageType_WebAuthnAddResidentCredential\x10\xa2\x06\x1a\x04\x90\xb5\x18\x01\x127\n" + + ",MessageType_WebAuthnRemoveResidentCredential\x10\xa3\x06\x1a\x04\x90\xb5\x18\x01\x12)\n" + + "\x1eMessageType_SolanaGetPublicKey\x10\x84\a\x1a\x04\x90\xb5\x18\x01\x12&\n" + + "\x1bMessageType_SolanaPublicKey\x10\x85\a\x1a\x04\x98\xb5\x18\x01\x12'\n" + + "\x1cMessageType_SolanaGetAddress\x10\x86\a\x1a\x04\x90\xb5\x18\x01\x12$\n" + + "\x19MessageType_SolanaAddress\x10\x87\a\x1a\x04\x98\xb5\x18\x01\x12#\n" + + "\x18MessageType_SolanaSignTx\x10\x88\a\x1a\x04\x90\xb5\x18\x01\x12(\n" + + "\x1dMessageType_SolanaTxSignature\x10\x89\a\x1a\x04\x98\xb5\x18\x01\x12.\n" + + "\x1fMessageType_ThpCreateNewSession\x10\xe8\a\x1a\b\x90\xb5\x18\x01\x80\xa6\x1d\x01\x12(\n" + + "\x1dMessageType_ThpPairingRequest\x10\xee\a\x1a\x04\x80\xa6\x1d\x01\x120\n" + + "%MessageType_ThpPairingRequestApproved\x10\xef\a\x1a\x04\x80\xa6\x1d\x01\x12&\n" + + "\x1bMessageType_ThpSelectMethod\x10\xf0\a\x1a\x04\x80\xa6\x1d\x01\x125\n" + + "*MessageType_ThpPairingPreparationsFinished\x10\xf1\a\x1a\x04\x80\xa6\x1d\x01\x12+\n" + + " MessageType_ThpCredentialRequest\x10\xf2\a\x1a\x04\x80\xa6\x1d\x01\x12,\n" + + "!MessageType_ThpCredentialResponse\x10\xf3\a\x1a\x04\x80\xa6\x1d\x01\x12$\n" + + "\x19MessageType_ThpEndRequest\x10\xf4\a\x1a\x04\x80\xa6\x1d\x01\x12%\n" + + "\x1aMessageType_ThpEndResponse\x10\xf5\a\x1a\x04\x80\xa6\x1d\x01\x12-\n" + + "\"MessageType_ThpCodeEntryCommitment\x10\xf8\a\x1a\x04\x80\xa6\x1d\x01\x12,\n" + + "!MessageType_ThpCodeEntryChallenge\x10\xf9\a\x1a\x04\x80\xa6\x1d\x01\x12.\n" + + "#MessageType_ThpCodeEntryCpaceTrezor\x10\xfa\a\x1a\x04\x80\xa6\x1d\x01\x12/\n" + + "$MessageType_ThpCodeEntryCpaceHostTag\x10\xfb\a\x1a\x04\x80\xa6\x1d\x01\x12)\n" + + "\x1eMessageType_ThpCodeEntrySecret\x10\xfc\a\x1a\x04\x80\xa6\x1d\x01\x12#\n" + + "\x18MessageType_ThpQrCodeTag\x10\x80\b\x1a\x04\x80\xa6\x1d\x01\x12&\n" + + "\x1bMessageType_ThpQrCodeSecret\x10\x81\b\x1a\x04\x80\xa6\x1d\x01\x12$\n" + + "\x19MessageType_ThpNfcTagHost\x10\x88\b\x1a\x04\x80\xa6\x1d\x01\x12&\n" + + "\x1bMessageType_ThpNfcTagTrezor\x10\x89\b\x1a\x04\x80\xa6\x1d\x01\x12%\n" + + "\x1aMessageType_NostrGetPubkey\x10\xd1\x0f\x1a\x04\x90\xb5\x18\x01\x12\"\n" + + "\x17MessageType_NostrPubkey\x10\xd2\x0f\x1a\x04\x98\xb5\x18\x01\x12%\n" + + "\x1aMessageType_NostrSignEvent\x10\xd3\x0f\x1a\x04\x90\xb5\x18\x01\x12*\n" + + "\x1fMessageType_NostrEventSignature\x10\xd4\x0f\x1a\x04\x98\xb5\x18\x01\x12)\n" + + "\x1eMessageType_BenchmarkListNames\x10\x8cG\x1a\x04\x80\xa6\x1d\x01\x12%\n" + + "\x1aMessageType_BenchmarkNames\x10\x8dG\x1a\x04\x80\xa6\x1d\x01\x12#\n" + + "\x18MessageType_BenchmarkRun\x10\x8eG\x1a\x04\x80\xa6\x1d\x01\x12&\n" + + "\x1bMessageType_BenchmarkResult\x10\x8fG\x1a\x04\x80\xa6\x1d\x01\x1a\x04\xc8\xf3\x18\x01\"\x04\bZ\x10\\\"\x04\bG\x10J\"\x04\br\x10z\"\x06\b\xdb\x01\x10\xdb\x01\"\x06\b\xe0\x01\x10\xe0\x01\"\x06\b\xac\x02\x10\xb0\x02\"\x06\b\xb5\x02\x10\xb8\x02\"\x06\b\xbc\x05\x10\xc5\x05\"\x06\b\xe9\a\x10\xed\a\"\x06\b\xf6\a\x10\xf7\a\"\x06\b\xfd\a\x10\xff\a\"\x06\b\x82\b\x10\x87\bBs\x80\xa6\x1d\x01\n" + + "#com.satoshilabs.trezor.lib.protobufB\rTrezorMessageZ9github.com/ethereum/go-ethereum/accounts/usbwallet/trezor" var ( file_messages_proto_rawDescOnce sync.Once - file_messages_proto_rawDescData = file_messages_proto_rawDesc + file_messages_proto_rawDescData []byte ) func file_messages_proto_rawDescGZIP() []byte { file_messages_proto_rawDescOnce.Do(func() { - file_messages_proto_rawDescData = protoimpl.X.CompressGZIP(file_messages_proto_rawDescData) + file_messages_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_messages_proto_rawDesc), len(file_messages_proto_rawDesc))) }) return file_messages_proto_rawDescData } var file_messages_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_messages_proto_goTypes = []any{ - (MessageType)(0), // 0: hw.trezor.messages.MessageType - (*descriptorpb.EnumValueOptions)(nil), // 1: google.protobuf.EnumValueOptions + (MessageType)(0), // 0: hw.trezor.messages.MessageType } var file_messages_proto_depIdxs = []int32{ - 1, // 0: hw.trezor.messages.wire_in:extendee -> google.protobuf.EnumValueOptions - 1, // 1: hw.trezor.messages.wire_out:extendee -> google.protobuf.EnumValueOptions - 1, // 2: hw.trezor.messages.wire_debug_in:extendee -> google.protobuf.EnumValueOptions - 1, // 3: hw.trezor.messages.wire_debug_out:extendee -> google.protobuf.EnumValueOptions - 1, // 4: hw.trezor.messages.wire_tiny:extendee -> google.protobuf.EnumValueOptions - 1, // 5: hw.trezor.messages.wire_bootloader:extendee -> google.protobuf.EnumValueOptions - 1, // 6: hw.trezor.messages.wire_no_fsm:extendee -> google.protobuf.EnumValueOptions - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 0, // [0:7] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } @@ -1344,23 +1194,22 @@ func file_messages_proto_init() { if File_messages_proto != nil { return } + file_options_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_messages_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_messages_proto_rawDesc), len(file_messages_proto_rawDesc)), NumEnums: 1, NumMessages: 0, - NumExtensions: 7, + NumExtensions: 0, NumServices: 0, }, GoTypes: file_messages_proto_goTypes, DependencyIndexes: file_messages_proto_depIdxs, EnumInfos: file_messages_proto_enumTypes, - ExtensionInfos: file_messages_proto_extTypes, }.Build() File_messages_proto = out.File - file_messages_proto_rawDesc = nil file_messages_proto_goTypes = nil file_messages_proto_depIdxs = nil } diff --git a/accounts/usbwallet/trezor/messages.proto b/accounts/usbwallet/trezor/messages.proto index c232bef60d1..27164058f3e 100644 --- a/accounts/usbwallet/trezor/messages.proto +++ b/accounts/usbwallet/trezor/messages.proto @@ -1,12 +1,12 @@ // This file originates from the SatoshiLabs Trezor `common` repository at: // https://github.com/trezor/trezor-common/blob/master/protob/messages.proto -// dated 28.05.2019, commit 893fd219d4a01bcffa0cd9cfa631856371ec5aa9. +// dated 30.06.2025, commit 421b45d4677f2499234692b0f54010bc45b3ae5f. syntax = "proto2"; package hw.trezor.messages; /** - * Messages for TREZOR communication + * Messages for Trezor communication */ option go_package = "github.com/ethereum/go-ethereum/accounts/usbwallet/trezor"; @@ -15,253 +15,348 @@ option go_package = "github.com/ethereum/go-ethereum/accounts/usbwallet/trezor" option java_package = "com.satoshilabs.trezor.lib.protobuf"; option java_outer_classname = "TrezorMessage"; +import "options.proto"; -import "google/protobuf/descriptor.proto"; +option (include_in_bitcoin_only) = true; /** - * Options for specifying message direction and type of wire (normal/debug) - */ -extend google.protobuf.EnumValueOptions { - optional bool wire_in = 50002; // message can be transmitted via wire from PC to TREZOR - optional bool wire_out = 50003; // message can be transmitted via wire from TREZOR to PC - optional bool wire_debug_in = 50004; // message can be transmitted via debug wire from PC to TREZOR - optional bool wire_debug_out = 50005; // message can be transmitted via debug wire from TREZOR to PC - optional bool wire_tiny = 50006; // message is handled by TREZOR when the USB stack is in tiny mode - optional bool wire_bootloader = 50007; // message is only handled by TREZOR Bootloader - optional bool wire_no_fsm = 50008; // message is not handled by TREZOR unless the USB stack is in tiny mode -} - -/** - * Mapping between TREZOR wire identifier (uint) and a protobuf message + * Mapping between Trezor wire identifier (uint) and a protobuf message */ enum MessageType { + option (has_bitcoin_only_values) = true; + + // Management + MessageType_Initialize = 0 [(bitcoin_only) = true, (wire_in) = true, (wire_tiny) = true]; + MessageType_Ping = 1 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_Success = 2 [(bitcoin_only) = true, (wire_out) = true, (wire_debug_out) = true]; + MessageType_Failure = 3 [(bitcoin_only) = true, (wire_out) = true, (wire_debug_out) = true]; + MessageType_ChangePin = 4 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_WipeDevice = 5 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_GetEntropy = 9 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_Entropy = 10 [(bitcoin_only) = true, (wire_out) = true]; + MessageType_LoadDevice = 13 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_ResetDevice = 14 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_SetBusy = 16 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_Features = 17 [(bitcoin_only) = true, (wire_out) = true]; + MessageType_PinMatrixRequest = 18 [(bitcoin_only) = true, (wire_out) = true]; + MessageType_PinMatrixAck = 19 [(bitcoin_only) = true, (wire_in) = true, (wire_tiny) = true, (wire_no_fsm) = true]; + MessageType_Cancel = 20 [(bitcoin_only) = true, (wire_in) = true, (wire_tiny) = true]; + MessageType_LockDevice = 24 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_ApplySettings = 25 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_ButtonRequest = 26 [(bitcoin_only) = true, (wire_out) = true]; + MessageType_ButtonAck = 27 [(bitcoin_only) = true, (wire_in) = true, (wire_tiny) = true, (wire_no_fsm) = true]; + MessageType_ApplyFlags = 28 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_GetNonce = 31 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_Nonce = 33 [(bitcoin_only) = true, (wire_out) = true]; + MessageType_BackupDevice = 34 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_EntropyRequest = 35 [(bitcoin_only) = true, (wire_out) = true]; + MessageType_EntropyAck = 36 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_EntropyCheckReady = 994 [(bitcoin_only) = true, (wire_out) = true]; + MessageType_EntropyCheckContinue = 995 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_PassphraseRequest = 41 [(bitcoin_only) = true, (wire_out) = true]; + MessageType_PassphraseAck = 42 [(bitcoin_only) = true, (wire_in) = true, (wire_tiny) = true, (wire_no_fsm) = true]; + MessageType_RecoveryDevice = 45 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_WordRequest = 46 [(bitcoin_only) = true, (wire_out) = true]; + MessageType_WordAck = 47 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_GetFeatures = 55 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_SdProtect = 79 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_ChangeWipeCode = 82 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_EndSession = 83 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_DoPreauthorized = 84 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_PreauthorizedRequest = 85 [(bitcoin_only) = true, (wire_out) = true]; + MessageType_CancelAuthorization = 86 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_RebootToBootloader = 87 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_GetFirmwareHash = 88 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_FirmwareHash = 89 [(bitcoin_only) = true, (wire_out) = true]; + reserved 90 to 92; + MessageType_UnlockPath = 93 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_UnlockedPathRequest = 94 [(bitcoin_only) = true, (wire_out) = true]; + MessageType_ShowDeviceTutorial = 95 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_UnlockBootloader = 96 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_AuthenticateDevice = 97 [(bitcoin_only) = true, (wire_out) = true]; + MessageType_AuthenticityProof = 98 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_ChangeLanguage = 990 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_DataChunkRequest = 991 [(bitcoin_only) = true, (wire_out) = true]; + MessageType_DataChunkAck = 992 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_SetBrightness = 993 [(bitcoin_only) = true, (wire_in) = true]; + + MessageType_SetU2FCounter = 63 [(wire_in) = true]; + MessageType_GetNextU2FCounter = 80 [(wire_in) = true]; + MessageType_NextU2FCounter = 81 [(wire_out) = true]; + + // Deprecated messages, kept for protobuf compatibility. + MessageType_Deprecated_PassphraseStateRequest = 77 [deprecated = true]; + MessageType_Deprecated_PassphraseStateAck = 78 [deprecated = true]; + + // Bootloader + MessageType_FirmwareErase = 6 [(bitcoin_only) = true, (wire_in) = true, (wire_bootloader) = true]; + MessageType_FirmwareUpload = 7 [(bitcoin_only) = true, (wire_in) = true, (wire_bootloader) = true]; + MessageType_FirmwareRequest = 8 [(bitcoin_only) = true, (wire_out) = true, (wire_bootloader) = true]; + MessageType_ProdTestT1 = 32 [(bitcoin_only) = true, (wire_in) = true, (wire_bootloader) = true]; + + // BLE + MessageType_BleUnpair = 8001 [(bitcoin_only) = true, (wire_in) = true]; + + // Bitcoin + MessageType_GetPublicKey = 11 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_PublicKey = 12 [(bitcoin_only) = true, (wire_out) = true]; + MessageType_SignTx = 15 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_TxRequest = 21 [(bitcoin_only) = true, (wire_out) = true]; + MessageType_TxAck = 22 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_GetAddress = 29 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_Address = 30 [(bitcoin_only) = true, (wire_out) = true]; + MessageType_TxAckPaymentRequest = 37 [(wire_in) = true]; + MessageType_SignMessage = 38 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_VerifyMessage = 39 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_MessageSignature = 40 [(bitcoin_only) = true, (wire_out) = true]; + MessageType_GetOwnershipId = 43 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_OwnershipId = 44 [(bitcoin_only) = true, (wire_out) = true]; + MessageType_GetOwnershipProof = 49 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_OwnershipProof = 50 [(bitcoin_only) = true, (wire_out) = true]; + MessageType_AuthorizeCoinJoin = 51 [(bitcoin_only) = true, (wire_in) = true]; - // Management - MessageType_Initialize = 0 [(wire_in) = true, (wire_tiny) = true]; - MessageType_Ping = 1 [(wire_in) = true]; - MessageType_Success = 2 [(wire_out) = true]; - MessageType_Failure = 3 [(wire_out) = true]; - MessageType_ChangePin = 4 [(wire_in) = true]; - MessageType_WipeDevice = 5 [(wire_in) = true]; - MessageType_GetEntropy = 9 [(wire_in) = true]; - MessageType_Entropy = 10 [(wire_out) = true]; - MessageType_LoadDevice = 13 [(wire_in) = true]; - MessageType_ResetDevice = 14 [(wire_in) = true]; - MessageType_Features = 17 [(wire_out) = true]; - MessageType_PinMatrixRequest = 18 [(wire_out) = true]; - MessageType_PinMatrixAck = 19 [(wire_in) = true, (wire_tiny) = true, (wire_no_fsm) = true]; - MessageType_Cancel = 20 [(wire_in) = true, (wire_tiny) = true]; - MessageType_ClearSession = 24 [(wire_in) = true]; - MessageType_ApplySettings = 25 [(wire_in) = true]; - MessageType_ButtonRequest = 26 [(wire_out) = true]; - MessageType_ButtonAck = 27 [(wire_in) = true, (wire_tiny) = true, (wire_no_fsm) = true]; - MessageType_ApplyFlags = 28 [(wire_in) = true]; - MessageType_BackupDevice = 34 [(wire_in) = true]; - MessageType_EntropyRequest = 35 [(wire_out) = true]; - MessageType_EntropyAck = 36 [(wire_in) = true]; - MessageType_PassphraseRequest = 41 [(wire_out) = true]; - MessageType_PassphraseAck = 42 [(wire_in) = true, (wire_tiny) = true, (wire_no_fsm) = true]; - MessageType_PassphraseStateRequest = 77 [(wire_out) = true]; - MessageType_PassphraseStateAck = 78 [(wire_in) = true, (wire_tiny) = true, (wire_no_fsm) = true]; - MessageType_RecoveryDevice = 45 [(wire_in) = true]; - MessageType_WordRequest = 46 [(wire_out) = true]; - MessageType_WordAck = 47 [(wire_in) = true]; - MessageType_GetFeatures = 55 [(wire_in) = true]; - MessageType_SetU2FCounter = 63 [(wire_in) = true]; + // Crypto + MessageType_CipherKeyValue = 23 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_CipheredKeyValue = 48 [(bitcoin_only) = true, (wire_out) = true]; + MessageType_SignIdentity = 53 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_SignedIdentity = 54 [(bitcoin_only) = true, (wire_out) = true]; + MessageType_GetECDHSessionKey = 61 [(bitcoin_only) = true, (wire_in) = true]; + MessageType_ECDHSessionKey = 62 [(bitcoin_only) = true, (wire_out) = true]; + // dropped: CosiCommit, CosiCommitment, CosiSign, CosiSignature + reserved 71 to 74; - // Bootloader - MessageType_FirmwareErase = 6 [(wire_in) = true, (wire_bootloader) = true]; - MessageType_FirmwareUpload = 7 [(wire_in) = true, (wire_bootloader) = true]; - MessageType_FirmwareRequest = 8 [(wire_out) = true, (wire_bootloader) = true]; - MessageType_SelfTest = 32 [(wire_in) = true, (wire_bootloader) = true]; + // Debug + MessageType_DebugLinkDecision = 100 [(bitcoin_only) = true, (wire_debug_in) = true, (wire_tiny) = true, (wire_no_fsm) = true]; + MessageType_DebugLinkGetState = 101 [(bitcoin_only) = true, (wire_debug_in) = true, (wire_tiny) = true]; + MessageType_DebugLinkState = 102 [(bitcoin_only) = true, (wire_debug_out) = true]; + MessageType_DebugLinkStop = 103 [(bitcoin_only) = true, (wire_debug_in) = true]; + MessageType_DebugLinkLog = 104 [(bitcoin_only) = true, (wire_debug_out) = true]; + MessageType_DebugLinkMemoryRead = 110 [(bitcoin_only) = true, (wire_debug_in) = true]; + MessageType_DebugLinkMemory = 111 [(bitcoin_only) = true, (wire_debug_out) = true]; + MessageType_DebugLinkMemoryWrite = 112 [(bitcoin_only) = true, (wire_debug_in) = true]; + MessageType_DebugLinkFlashErase = 113 [(bitcoin_only) = true, (wire_debug_in) = true]; + MessageType_DebugLinkLayout = 9001 [(bitcoin_only) = true, (wire_debug_out) = true]; + MessageType_DebugLinkReseedRandom = 9002 [(bitcoin_only) = true, (wire_debug_in) = true]; + MessageType_DebugLinkRecordScreen = 9003 [(bitcoin_only) = true, (wire_debug_in) = true]; + MessageType_DebugLinkEraseSdCard = 9005 [(bitcoin_only) = true, (wire_debug_in) = true]; + MessageType_DebugLinkWatchLayout = 9006 [(bitcoin_only) = true, (wire_debug_in) = true]; + MessageType_DebugLinkResetDebugEvents = 9007 [(bitcoin_only) = true, (wire_debug_in) = true]; + MessageType_DebugLinkOptigaSetSecMax = 9008 [(bitcoin_only) = true, (wire_debug_in) = true]; + MessageType_DebugLinkGetGcInfo = 9009 [(bitcoin_only) = true, (wire_debug_in) = true]; + MessageType_DebugLinkGcInfo = 9010 [(bitcoin_only) = true, (wire_debug_out) = true]; + MessageType_DebugLinkGetPairingInfo = 9011 [(bitcoin_only) = true, (wire_debug_in) = true]; + MessageType_DebugLinkPairingInfo = 9012 [(bitcoin_only) = true, (wire_debug_out) = true]; - // Bitcoin - MessageType_GetPublicKey = 11 [(wire_in) = true]; - MessageType_PublicKey = 12 [(wire_out) = true]; - MessageType_SignTx = 15 [(wire_in) = true]; - MessageType_TxRequest = 21 [(wire_out) = true]; - MessageType_TxAck = 22 [(wire_in) = true]; - MessageType_GetAddress = 29 [(wire_in) = true]; - MessageType_Address = 30 [(wire_out) = true]; - MessageType_SignMessage = 38 [(wire_in) = true]; - MessageType_VerifyMessage = 39 [(wire_in) = true]; - MessageType_MessageSignature = 40 [(wire_out) = true]; + // Ethereum + MessageType_EthereumGetPublicKey = 450 [(wire_in) = true]; + MessageType_EthereumPublicKey = 451 [(wire_out) = true]; + MessageType_EthereumGetAddress = 56 [(wire_in) = true]; + MessageType_EthereumAddress = 57 [(wire_out) = true]; + MessageType_EthereumSignTx = 58 [(wire_in) = true]; + MessageType_EthereumSignTxEIP1559 = 452 [(wire_in) = true]; + MessageType_EthereumTxRequest = 59 [(wire_out) = true]; + MessageType_EthereumTxAck = 60 [(wire_in) = true]; + MessageType_EthereumSignMessage = 64 [(wire_in) = true]; + MessageType_EthereumVerifyMessage = 65 [(wire_in) = true]; + MessageType_EthereumMessageSignature = 66 [(wire_out) = true]; + MessageType_EthereumSignTypedData = 464 [(wire_in) = true]; + MessageType_EthereumTypedDataStructRequest = 465 [(wire_out) = true]; + MessageType_EthereumTypedDataStructAck = 466 [(wire_in) = true]; + MessageType_EthereumTypedDataValueRequest = 467 [(wire_out) = true]; + MessageType_EthereumTypedDataValueAck = 468 [(wire_in) = true]; + MessageType_EthereumTypedDataSignature = 469 [(wire_out) = true]; + MessageType_EthereumSignTypedHash = 470 [(wire_in) = true]; - // Crypto - MessageType_CipherKeyValue = 23 [(wire_in) = true]; - MessageType_CipheredKeyValue = 48 [(wire_out) = true]; - MessageType_SignIdentity = 53 [(wire_in) = true]; - MessageType_SignedIdentity = 54 [(wire_out) = true]; - MessageType_GetECDHSessionKey = 61 [(wire_in) = true]; - MessageType_ECDHSessionKey = 62 [(wire_out) = true]; - MessageType_CosiCommit = 71 [(wire_in) = true]; - MessageType_CosiCommitment = 72 [(wire_out) = true]; - MessageType_CosiSign = 73 [(wire_in) = true]; - MessageType_CosiSignature = 74 [(wire_out) = true]; + // NEM + MessageType_NEMGetAddress = 67 [(wire_in) = true]; + MessageType_NEMAddress = 68 [(wire_out) = true]; + MessageType_NEMSignTx = 69 [(wire_in) = true]; + MessageType_NEMSignedTx = 70 [(wire_out) = true]; + MessageType_NEMDecryptMessage = 75 [(wire_in) = true]; + MessageType_NEMDecryptedMessage = 76 [(wire_out) = true]; - // Debug - MessageType_DebugLinkDecision = 100 [(wire_debug_in) = true, (wire_tiny) = true, (wire_no_fsm) = true]; - MessageType_DebugLinkGetState = 101 [(wire_debug_in) = true, (wire_tiny) = true]; - MessageType_DebugLinkState = 102 [(wire_debug_out) = true]; - MessageType_DebugLinkStop = 103 [(wire_debug_in) = true]; - MessageType_DebugLinkLog = 104 [(wire_debug_out) = true]; - MessageType_DebugLinkMemoryRead = 110 [(wire_debug_in) = true]; - MessageType_DebugLinkMemory = 111 [(wire_debug_out) = true]; - MessageType_DebugLinkMemoryWrite = 112 [(wire_debug_in) = true]; - MessageType_DebugLinkFlashErase = 113 [(wire_debug_in) = true]; + // Lisk + /* + MessageType_LiskGetAddress = 114 [(wire_in) = true]; + MessageType_LiskAddress = 115 [(wire_out) = true]; + MessageType_LiskSignTx = 116 [(wire_in) = true]; + MessageType_LiskSignedTx = 117 [(wire_out) = true]; + MessageType_LiskSignMessage = 118 [(wire_in) = true]; + MessageType_LiskMessageSignature = 119 [(wire_out) = true]; + MessageType_LiskVerifyMessage = 120 [(wire_in) = true]; + MessageType_LiskGetPublicKey = 121 [(wire_in) = true]; + MessageType_LiskPublicKey = 122 [(wire_out) = true]; + */ + reserved 114 to 122; - // Ethereum - MessageType_EthereumGetPublicKey = 450 [(wire_in) = true]; - MessageType_EthereumPublicKey = 451 [(wire_out) = true]; - MessageType_EthereumGetAddress = 56 [(wire_in) = true]; - MessageType_EthereumAddress = 57 [(wire_out) = true]; - MessageType_EthereumSignTx = 58 [(wire_in) = true]; - MessageType_EthereumTxRequest = 59 [(wire_out) = true]; - MessageType_EthereumTxAck = 60 [(wire_in) = true]; - MessageType_EthereumSignMessage = 64 [(wire_in) = true]; - MessageType_EthereumVerifyMessage = 65 [(wire_in) = true]; - MessageType_EthereumMessageSignature = 66 [(wire_out) = true]; + // Tezos + MessageType_TezosGetAddress = 150 [(wire_in) = true]; + MessageType_TezosAddress = 151 [(wire_out) = true]; + MessageType_TezosSignTx = 152 [(wire_in) = true]; + MessageType_TezosSignedTx = 153 [(wire_out) = true]; + MessageType_TezosGetPublicKey = 154 [(wire_in) = true]; + MessageType_TezosPublicKey = 155 [(wire_out) = true]; - // NEM - MessageType_NEMGetAddress = 67 [(wire_in) = true]; - MessageType_NEMAddress = 68 [(wire_out) = true]; - MessageType_NEMSignTx = 69 [(wire_in) = true]; - MessageType_NEMSignedTx = 70 [(wire_out) = true]; - MessageType_NEMDecryptMessage = 75 [(wire_in) = true]; - MessageType_NEMDecryptedMessage = 76 [(wire_out) = true]; + // Stellar + MessageType_StellarSignTx = 202 [(wire_in) = true]; + MessageType_StellarTxOpRequest = 203 [(wire_out) = true]; + MessageType_StellarGetAddress = 207 [(wire_in) = true]; + MessageType_StellarAddress = 208 [(wire_out) = true]; + MessageType_StellarCreateAccountOp = 210 [(wire_in) = true]; + MessageType_StellarPaymentOp = 211 [(wire_in) = true]; + MessageType_StellarPathPaymentStrictReceiveOp = 212 [(wire_in) = true]; + MessageType_StellarManageSellOfferOp = 213 [(wire_in) = true]; + MessageType_StellarCreatePassiveSellOfferOp = 214 [(wire_in) = true]; + MessageType_StellarSetOptionsOp = 215 [(wire_in) = true]; + MessageType_StellarChangeTrustOp = 216 [(wire_in) = true]; + MessageType_StellarAllowTrustOp = 217 [(wire_in) = true]; + MessageType_StellarAccountMergeOp = 218 [(wire_in) = true]; + reserved 219; // omitted: StellarInflationOp + MessageType_StellarManageDataOp = 220 [(wire_in) = true]; + MessageType_StellarBumpSequenceOp = 221 [(wire_in) = true]; + MessageType_StellarManageBuyOfferOp = 222 [(wire_in) = true]; + MessageType_StellarPathPaymentStrictSendOp = 223 [(wire_in) = true]; + reserved 224; // omitted: StellarCreateClaimableBalanceOp + MessageType_StellarClaimClaimableBalanceOp = 225 [(wire_in) = true]; + MessageType_StellarSignedTx = 230 [(wire_out) = true]; - // Lisk - MessageType_LiskGetAddress = 114 [(wire_in) = true]; - MessageType_LiskAddress = 115 [(wire_out) = true]; - MessageType_LiskSignTx = 116 [(wire_in) = true]; - MessageType_LiskSignedTx = 117 [(wire_out) = true]; - MessageType_LiskSignMessage = 118 [(wire_in) = true]; - MessageType_LiskMessageSignature = 119 [(wire_out) = true]; - MessageType_LiskVerifyMessage = 120 [(wire_in) = true]; - MessageType_LiskGetPublicKey = 121 [(wire_in) = true]; - MessageType_LiskPublicKey = 122 [(wire_out) = true]; + // Cardano + // dropped Sign/VerifyMessage ids 300-302 + // dropped TxRequest/TxAck ids 304 and 309 (shelley update) + // dropped SignTx/SignedTx/SignedTxChunk/SignedTxChunkAck ids 303, 310, 311 and 312 + reserved 300 to 304, 309 to 312; + MessageType_CardanoGetPublicKey = 305 [(wire_in) = true]; + MessageType_CardanoPublicKey = 306 [(wire_out) = true]; + MessageType_CardanoGetAddress = 307 [(wire_in) = true]; + MessageType_CardanoAddress = 308 [(wire_out) = true]; + MessageType_CardanoTxItemAck = 313 [(wire_out) = true]; + MessageType_CardanoTxAuxiliaryDataSupplement = 314 [(wire_out) = true]; + MessageType_CardanoTxWitnessRequest = 315 [(wire_in) = true]; + MessageType_CardanoTxWitnessResponse = 316 [(wire_out) = true]; + MessageType_CardanoTxHostAck = 317 [(wire_in) = true]; + MessageType_CardanoTxBodyHash = 318 [(wire_out) = true]; + MessageType_CardanoSignTxFinished = 319 [(wire_out) = true]; + MessageType_CardanoSignTxInit = 320 [(wire_in) = true]; + MessageType_CardanoTxInput = 321 [(wire_in) = true]; + MessageType_CardanoTxOutput = 322 [(wire_in) = true]; + MessageType_CardanoAssetGroup = 323 [(wire_in) = true]; + MessageType_CardanoToken = 324 [(wire_in) = true]; + MessageType_CardanoTxCertificate = 325 [(wire_in) = true]; + MessageType_CardanoTxWithdrawal = 326 [(wire_in) = true]; + MessageType_CardanoTxAuxiliaryData = 327 [(wire_in) = true]; + MessageType_CardanoPoolOwner = 328 [(wire_in) = true]; + MessageType_CardanoPoolRelayParameters = 329 [(wire_in) = true]; + MessageType_CardanoGetNativeScriptHash = 330 [(wire_in) = true]; + MessageType_CardanoNativeScriptHash = 331 [(wire_out) = true]; + MessageType_CardanoTxMint = 332 [(wire_in) = true]; + MessageType_CardanoTxCollateralInput = 333 [(wire_in) = true]; + MessageType_CardanoTxRequiredSigner = 334 [(wire_in) = true]; + MessageType_CardanoTxInlineDatumChunk = 335 [(wire_in) = true]; + MessageType_CardanoTxReferenceScriptChunk = 336 [(wire_in) = true]; + MessageType_CardanoTxReferenceInput = 337 [(wire_in) = true]; - // Tezos - MessageType_TezosGetAddress = 150 [(wire_in) = true]; - MessageType_TezosAddress = 151 [(wire_out) = true]; - MessageType_TezosSignTx = 152 [(wire_in) = true]; - MessageType_TezosSignedTx = 153 [(wire_out) = true]; - MessageType_TezosGetPublicKey = 154 [(wire_in) = true]; - MessageType_TezosPublicKey = 155 [(wire_out) = true]; + // Ripple + MessageType_RippleGetAddress = 400 [(wire_in) = true]; + MessageType_RippleAddress = 401 [(wire_out) = true]; + MessageType_RippleSignTx = 402 [(wire_in) = true]; + MessageType_RippleSignedTx = 403 [(wire_in) = true]; - // Stellar - MessageType_StellarSignTx = 202 [(wire_in) = true]; - MessageType_StellarTxOpRequest = 203 [(wire_out) = true]; - MessageType_StellarGetAddress = 207 [(wire_in) = true]; - MessageType_StellarAddress = 208 [(wire_out) = true]; - MessageType_StellarCreateAccountOp = 210 [(wire_in) = true]; - MessageType_StellarPaymentOp = 211 [(wire_in) = true]; - MessageType_StellarPathPaymentOp = 212 [(wire_in) = true]; - MessageType_StellarManageOfferOp = 213 [(wire_in) = true]; - MessageType_StellarCreatePassiveOfferOp = 214 [(wire_in) = true]; - MessageType_StellarSetOptionsOp = 215 [(wire_in) = true]; - MessageType_StellarChangeTrustOp = 216 [(wire_in) = true]; - MessageType_StellarAllowTrustOp = 217 [(wire_in) = true]; - MessageType_StellarAccountMergeOp = 218 [(wire_in) = true]; - // omitted: StellarInflationOp is not a supported operation, would be 219 - MessageType_StellarManageDataOp = 220 [(wire_in) = true]; - MessageType_StellarBumpSequenceOp = 221 [(wire_in) = true]; - MessageType_StellarSignedTx = 230 [(wire_out) = true]; + // Monero + MessageType_MoneroTransactionInitRequest = 501 [(wire_out) = true]; + MessageType_MoneroTransactionInitAck = 502 [(wire_out) = true]; + MessageType_MoneroTransactionSetInputRequest = 503 [(wire_out) = true]; + MessageType_MoneroTransactionSetInputAck = 504 [(wire_out) = true]; + MessageType_MoneroTransactionInputViniRequest = 507 [(wire_out) = true]; + MessageType_MoneroTransactionInputViniAck = 508 [(wire_out) = true]; + MessageType_MoneroTransactionAllInputsSetRequest = 509 [(wire_out) = true]; + MessageType_MoneroTransactionAllInputsSetAck = 510 [(wire_out) = true]; + MessageType_MoneroTransactionSetOutputRequest = 511 [(wire_out) = true]; + MessageType_MoneroTransactionSetOutputAck = 512 [(wire_out) = true]; + MessageType_MoneroTransactionAllOutSetRequest = 513 [(wire_out) = true]; + MessageType_MoneroTransactionAllOutSetAck = 514 [(wire_out) = true]; + MessageType_MoneroTransactionSignInputRequest = 515 [(wire_out) = true]; + MessageType_MoneroTransactionSignInputAck = 516 [(wire_out) = true]; + MessageType_MoneroTransactionFinalRequest = 517 [(wire_out) = true]; + MessageType_MoneroTransactionFinalAck = 518 [(wire_out) = true]; + MessageType_MoneroKeyImageExportInitRequest = 530 [(wire_out) = true]; + MessageType_MoneroKeyImageExportInitAck = 531 [(wire_out) = true]; + MessageType_MoneroKeyImageSyncStepRequest = 532 [(wire_out) = true]; + MessageType_MoneroKeyImageSyncStepAck = 533 [(wire_out) = true]; + MessageType_MoneroKeyImageSyncFinalRequest = 534 [(wire_out) = true]; + MessageType_MoneroKeyImageSyncFinalAck = 535 [(wire_out) = true]; + MessageType_MoneroGetAddress = 540 [(wire_in) = true]; + MessageType_MoneroAddress = 541 [(wire_out) = true]; + MessageType_MoneroGetWatchKey = 542 [(wire_in) = true]; + MessageType_MoneroWatchKey = 543 [(wire_out) = true]; + MessageType_DebugMoneroDiagRequest = 546 [(wire_in) = true]; + MessageType_DebugMoneroDiagAck = 547 [(wire_out) = true]; + MessageType_MoneroGetTxKeyRequest = 550 [(wire_in) = true]; + MessageType_MoneroGetTxKeyAck = 551 [(wire_out) = true]; + MessageType_MoneroLiveRefreshStartRequest = 552 [(wire_in) = true]; + MessageType_MoneroLiveRefreshStartAck = 553 [(wire_out) = true]; + MessageType_MoneroLiveRefreshStepRequest = 554 [(wire_in) = true]; + MessageType_MoneroLiveRefreshStepAck = 555 [(wire_out) = true]; + MessageType_MoneroLiveRefreshFinalRequest = 556 [(wire_in) = true]; + MessageType_MoneroLiveRefreshFinalAck = 557 [(wire_out) = true]; - // TRON - MessageType_TronGetAddress = 250 [(wire_in) = true]; - MessageType_TronAddress = 251 [(wire_out) = true]; - MessageType_TronSignTx = 252 [(wire_in) = true]; - MessageType_TronSignedTx = 253 [(wire_out) = true]; + // EOS + MessageType_EosGetPublicKey = 600 [(wire_in) = true]; + MessageType_EosPublicKey = 601 [(wire_out) = true]; + MessageType_EosSignTx = 602 [(wire_in) = true]; + MessageType_EosTxActionRequest = 603 [(wire_out) = true]; + MessageType_EosTxActionAck = 604 [(wire_in) = true]; + MessageType_EosSignedTx = 605 [(wire_out) = true]; - // Cardano - // dropped Sign/VerifyMessage ids 300-302 - MessageType_CardanoSignTx = 303 [(wire_in) = true]; - MessageType_CardanoTxRequest = 304 [(wire_out) = true]; - MessageType_CardanoGetPublicKey = 305 [(wire_in) = true]; - MessageType_CardanoPublicKey = 306 [(wire_out) = true]; - MessageType_CardanoGetAddress = 307 [(wire_in) = true]; - MessageType_CardanoAddress = 308 [(wire_out) = true]; - MessageType_CardanoTxAck = 309 [(wire_in) = true]; - MessageType_CardanoSignedTx = 310 [(wire_out) = true]; + // BNB Beacon Chain (deprecated) + reserved 700 to 709; - // Ontology - MessageType_OntologyGetAddress = 350 [(wire_in) = true]; - MessageType_OntologyAddress = 351 [(wire_out) = true]; - MessageType_OntologyGetPublicKey = 352 [(wire_in) = true]; - MessageType_OntologyPublicKey = 353 [(wire_out) = true]; - MessageType_OntologySignTransfer = 354 [(wire_in) = true]; - MessageType_OntologySignedTransfer = 355 [(wire_out) = true]; - MessageType_OntologySignWithdrawOng = 356 [(wire_in) = true]; - MessageType_OntologySignedWithdrawOng = 357 [(wire_out) = true]; - MessageType_OntologySignOntIdRegister = 358 [(wire_in) = true]; - MessageType_OntologySignedOntIdRegister = 359 [(wire_out) = true]; - MessageType_OntologySignOntIdAddAttributes = 360 [(wire_in) = true]; - MessageType_OntologySignedOntIdAddAttributes = 361 [(wire_out) = true]; + // WebAuthn + MessageType_WebAuthnListResidentCredentials = 800 [(wire_in) = true]; + MessageType_WebAuthnCredentials = 801 [(wire_out) = true]; + MessageType_WebAuthnAddResidentCredential = 802 [(wire_in) = true]; + MessageType_WebAuthnRemoveResidentCredential = 803 [(wire_in) = true]; - // Ripple - MessageType_RippleGetAddress = 400 [(wire_in) = true]; - MessageType_RippleAddress = 401 [(wire_out) = true]; - MessageType_RippleSignTx = 402 [(wire_in) = true]; - MessageType_RippleSignedTx = 403 [(wire_in) = true]; + // Solana + MessageType_SolanaGetPublicKey = 900 [(wire_in) = true]; + MessageType_SolanaPublicKey = 901 [(wire_out) = true]; + MessageType_SolanaGetAddress = 902 [(wire_in) = true]; + MessageType_SolanaAddress = 903 [(wire_out) = true]; + MessageType_SolanaSignTx = 904 [(wire_in) = true]; + MessageType_SolanaTxSignature = 905 [(wire_out) = true]; - // Monero - MessageType_MoneroTransactionInitRequest = 501 [(wire_out) = true]; - MessageType_MoneroTransactionInitAck = 502 [(wire_out) = true]; - MessageType_MoneroTransactionSetInputRequest = 503 [(wire_out) = true]; - MessageType_MoneroTransactionSetInputAck = 504 [(wire_out) = true]; - MessageType_MoneroTransactionInputsPermutationRequest = 505 [(wire_out) = true]; - MessageType_MoneroTransactionInputsPermutationAck = 506 [(wire_out) = true]; - MessageType_MoneroTransactionInputViniRequest = 507 [(wire_out) = true]; - MessageType_MoneroTransactionInputViniAck = 508 [(wire_out) = true]; - MessageType_MoneroTransactionAllInputsSetRequest = 509 [(wire_out) = true]; - MessageType_MoneroTransactionAllInputsSetAck = 510 [(wire_out) = true]; - MessageType_MoneroTransactionSetOutputRequest = 511 [(wire_out) = true]; - MessageType_MoneroTransactionSetOutputAck = 512 [(wire_out) = true]; - MessageType_MoneroTransactionAllOutSetRequest = 513 [(wire_out) = true]; - MessageType_MoneroTransactionAllOutSetAck = 514 [(wire_out) = true]; - MessageType_MoneroTransactionSignInputRequest = 515 [(wire_out) = true]; - MessageType_MoneroTransactionSignInputAck = 516 [(wire_out) = true]; - MessageType_MoneroTransactionFinalRequest = 517 [(wire_out) = true]; - MessageType_MoneroTransactionFinalAck = 518 [(wire_out) = true]; - MessageType_MoneroKeyImageExportInitRequest = 530 [(wire_out) = true]; - MessageType_MoneroKeyImageExportInitAck = 531 [(wire_out) = true]; - MessageType_MoneroKeyImageSyncStepRequest = 532 [(wire_out) = true]; - MessageType_MoneroKeyImageSyncStepAck = 533 [(wire_out) = true]; - MessageType_MoneroKeyImageSyncFinalRequest = 534 [(wire_out) = true]; - MessageType_MoneroKeyImageSyncFinalAck = 535 [(wire_out) = true]; - MessageType_MoneroGetAddress = 540 [(wire_in) = true]; - MessageType_MoneroAddress = 541 [(wire_out) = true]; - MessageType_MoneroGetWatchKey = 542 [(wire_in) = true]; - MessageType_MoneroWatchKey = 543 [(wire_out) = true]; - MessageType_DebugMoneroDiagRequest = 546 [(wire_in) = true]; - MessageType_DebugMoneroDiagAck = 547 [(wire_out) = true]; - MessageType_MoneroGetTxKeyRequest = 550 [(wire_in) = true]; - MessageType_MoneroGetTxKeyAck = 551 [(wire_out) = true]; - MessageType_MoneroLiveRefreshStartRequest = 552 [(wire_in) = true]; - MessageType_MoneroLiveRefreshStartAck = 553 [(wire_out) = true]; - MessageType_MoneroLiveRefreshStepRequest = 554 [(wire_in) = true]; - MessageType_MoneroLiveRefreshStepAck = 555 [(wire_out) = true]; - MessageType_MoneroLiveRefreshFinalRequest = 556 [(wire_in) = true]; - MessageType_MoneroLiveRefreshFinalAck = 557 [(wire_out) = true]; + // THP + MessageType_ThpCreateNewSession = 1000 [(bitcoin_only) = true, (wire_in) = true]; + reserved 1001 to 1005; // never appeared in a release, reserved for future use + MessageType_ThpPairingRequest = 1006 [(bitcoin_only) = true]; + MessageType_ThpPairingRequestApproved = 1007 [(bitcoin_only) = true]; + MessageType_ThpSelectMethod = 1008 [(bitcoin_only) = true]; + MessageType_ThpPairingPreparationsFinished = 1009 [(bitcoin_only) = true]; + MessageType_ThpCredentialRequest = 1010 [(bitcoin_only) = true]; + MessageType_ThpCredentialResponse = 1011 [(bitcoin_only) = true]; + MessageType_ThpEndRequest = 1012 [(bitcoin_only) = true]; + MessageType_ThpEndResponse = 1013 [(bitcoin_only) = true]; + reserved 1014 to 1015; + MessageType_ThpCodeEntryCommitment = 1016 [(bitcoin_only) = true]; + MessageType_ThpCodeEntryChallenge = 1017 [(bitcoin_only) = true]; + MessageType_ThpCodeEntryCpaceTrezor = 1018 [(bitcoin_only) = true]; + MessageType_ThpCodeEntryCpaceHostTag = 1019 [(bitcoin_only) = true]; + MessageType_ThpCodeEntrySecret = 1020 [(bitcoin_only) = true]; + reserved 1021 to 1023; + MessageType_ThpQrCodeTag = 1024 [(bitcoin_only) = true]; + MessageType_ThpQrCodeSecret = 1025 [(bitcoin_only) = true]; + reserved 1026 to 1031; + MessageType_ThpNfcTagHost = 1032 [(bitcoin_only) = true]; + MessageType_ThpNfcTagTrezor = 1033 [(bitcoin_only) = true]; - // EOS - MessageType_EosGetPublicKey = 600 [(wire_in) = true]; - MessageType_EosPublicKey = 601 [(wire_out) = true]; - MessageType_EosSignTx = 602 [(wire_in) = true]; - MessageType_EosTxActionRequest = 603 [(wire_out) = true]; - MessageType_EosTxActionAck = 604 [(wire_in) = true]; - MessageType_EosSignedTx = 605 [(wire_out) = true]; + // Nostr + MessageType_NostrGetPubkey = 2001 [(wire_in) = true]; + MessageType_NostrPubkey = 2002 [(wire_out) = true]; + MessageType_NostrSignEvent = 2003 [(wire_in) = true]; + MessageType_NostrEventSignature = 2004 [(wire_out) = true]; - // Binance - MessageType_BinanceGetAddress = 700 [(wire_in) = true]; - MessageType_BinanceAddress = 701 [(wire_out) = true]; - MessageType_BinanceGetPublicKey = 702 [(wire_in) = true]; - MessageType_BinancePublicKey = 703 [(wire_out) = true]; - MessageType_BinanceSignTx = 704 [(wire_in) = true]; - MessageType_BinanceTxRequest = 705 [(wire_out) = true]; - MessageType_BinanceTransferMsg = 706 [(wire_in) = true]; - MessageType_BinanceOrderMsg = 707 [(wire_in) = true]; - MessageType_BinanceCancelMsg = 708 [(wire_in) = true]; - MessageType_BinanceSignedTx = 709 [(wire_out) = true]; -} + // Benchmark + MessageType_BenchmarkListNames = 9100 [(bitcoin_only) = true]; + MessageType_BenchmarkNames = 9101 [(bitcoin_only) = true]; + MessageType_BenchmarkRun = 9102 [(bitcoin_only) = true]; + MessageType_BenchmarkResult = 9103 [(bitcoin_only) = true]; +} \ No newline at end of file diff --git a/accounts/usbwallet/trezor/options.pb.go b/accounts/usbwallet/trezor/options.pb.go new file mode 100644 index 00000000000..a3b33679bdc --- /dev/null +++ b/accounts/usbwallet/trezor/options.pb.go @@ -0,0 +1,264 @@ +// This file originates from the SatoshiLabs Trezor `common` repository at: +// https://github.com/trezor/trezor-common/blob/master/protob/options.proto +// dated 30.06.2025, commit 421b45d4677f2499234692b0f54010bc45b3ae5f. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v4.25.3 +// source: options.proto + +package trezor + +import ( + reflect "reflect" + unsafe "unsafe" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var file_options_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.EnumValueOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 50002, + Name: "hw.trezor.messages.wire_in", + Tag: "varint,50002,opt,name=wire_in", + Filename: "options.proto", + }, + { + ExtendedType: (*descriptorpb.EnumValueOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 50003, + Name: "hw.trezor.messages.wire_out", + Tag: "varint,50003,opt,name=wire_out", + Filename: "options.proto", + }, + { + ExtendedType: (*descriptorpb.EnumValueOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 50004, + Name: "hw.trezor.messages.wire_debug_in", + Tag: "varint,50004,opt,name=wire_debug_in", + Filename: "options.proto", + }, + { + ExtendedType: (*descriptorpb.EnumValueOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 50005, + Name: "hw.trezor.messages.wire_debug_out", + Tag: "varint,50005,opt,name=wire_debug_out", + Filename: "options.proto", + }, + { + ExtendedType: (*descriptorpb.EnumValueOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 50006, + Name: "hw.trezor.messages.wire_tiny", + Tag: "varint,50006,opt,name=wire_tiny", + Filename: "options.proto", + }, + { + ExtendedType: (*descriptorpb.EnumValueOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 50007, + Name: "hw.trezor.messages.wire_bootloader", + Tag: "varint,50007,opt,name=wire_bootloader", + Filename: "options.proto", + }, + { + ExtendedType: (*descriptorpb.EnumValueOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 50008, + Name: "hw.trezor.messages.wire_no_fsm", + Tag: "varint,50008,opt,name=wire_no_fsm", + Filename: "options.proto", + }, + { + ExtendedType: (*descriptorpb.EnumValueOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 60000, + Name: "hw.trezor.messages.bitcoin_only", + Tag: "varint,60000,opt,name=bitcoin_only", + Filename: "options.proto", + }, + { + ExtendedType: (*descriptorpb.EnumOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 51001, + Name: "hw.trezor.messages.has_bitcoin_only_values", + Tag: "varint,51001,opt,name=has_bitcoin_only_values", + Filename: "options.proto", + }, + { + ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 52001, + Name: "hw.trezor.messages.experimental_message", + Tag: "varint,52001,opt,name=experimental_message", + Filename: "options.proto", + }, + { + ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtensionType: (*uint32)(nil), + Field: 52002, + Name: "hw.trezor.messages.wire_type", + Tag: "varint,52002,opt,name=wire_type", + Filename: "options.proto", + }, + { + ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 52003, + Name: "hw.trezor.messages.internal_only", + Tag: "varint,52003,opt,name=internal_only", + Filename: "options.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 53001, + Name: "hw.trezor.messages.experimental_field", + Tag: "varint,53001,opt,name=experimental_field", + Filename: "options.proto", + }, + { + ExtendedType: (*descriptorpb.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 60000, + Name: "hw.trezor.messages.include_in_bitcoin_only", + Tag: "varint,60000,opt,name=include_in_bitcoin_only", + Filename: "options.proto", + }, +} + +// Extension fields to descriptorpb.EnumValueOptions. +var ( + // optional bool wire_in = 50002; + E_WireIn = &file_options_proto_extTypes[0] // message can be transmitted via wire from PC to Trezor + // optional bool wire_out = 50003; + E_WireOut = &file_options_proto_extTypes[1] // message can be transmitted via wire from Trezor to PC + // optional bool wire_debug_in = 50004; + E_WireDebugIn = &file_options_proto_extTypes[2] // message can be transmitted via debug wire from PC to Trezor + // optional bool wire_debug_out = 50005; + E_WireDebugOut = &file_options_proto_extTypes[3] // message can be transmitted via debug wire from Trezor to PC + // optional bool wire_tiny = 50006; + E_WireTiny = &file_options_proto_extTypes[4] // message is handled by Trezor when the USB stack is in tiny mode + // optional bool wire_bootloader = 50007; + E_WireBootloader = &file_options_proto_extTypes[5] // message is only handled by Trezor Bootloader + // optional bool wire_no_fsm = 50008; + E_WireNoFsm = &file_options_proto_extTypes[6] // message is not handled by Trezor unless the USB stack is in tiny mode + // optional bool bitcoin_only = 60000; + E_BitcoinOnly = &file_options_proto_extTypes[7] // enum value is available on BITCOIN_ONLY build +) + +// Extension fields to descriptorpb.EnumOptions. +var ( + // optional bool has_bitcoin_only_values = 51001; + E_HasBitcoinOnlyValues = &file_options_proto_extTypes[8] // indicate that some values should be excluded on BITCOIN_ONLY builds +) + +// Extension fields to descriptorpb.MessageOptions. +var ( + // optional bool experimental_message = 52001; + E_ExperimentalMessage = &file_options_proto_extTypes[9] // indicate that a message is intended for development and beta testing only and its definition may change at any time + // optional uint32 wire_type = 52002; + E_WireType = &file_options_proto_extTypes[10] // override wire type specified in the MessageType enum + // optional bool internal_only = 52003; + E_InternalOnly = &file_options_proto_extTypes[11] // indicate that a message is intended for internal use only and should not be transmitted via the wire +) + +// Extension fields to descriptorpb.FieldOptions. +var ( + // optional bool experimental_field = 53001; + E_ExperimentalField = &file_options_proto_extTypes[12] // indicate that a field is intended for development and beta testing only +) + +// Extension fields to descriptorpb.FileOptions. +var ( + // optional bool include_in_bitcoin_only = 60000; + E_IncludeInBitcoinOnly = &file_options_proto_extTypes[13] // definitions are available on BITCOIN_ONLY build +) + +var File_options_proto protoreflect.FileDescriptor + +const file_options_proto_rawDesc = "" + + "\n" + + "\roptions.proto\x12\x12hw.trezor.messages\x1a google/protobuf/descriptor.proto:<\n" + + "\awire_in\x12!.google.protobuf.EnumValueOptions\x18҆\x03 \x01(\bR\x06wireIn:>\n" + + "\bwire_out\x12!.google.protobuf.EnumValueOptions\x18ӆ\x03 \x01(\bR\awireOut:G\n" + + "\rwire_debug_in\x12!.google.protobuf.EnumValueOptions\x18Ԇ\x03 \x01(\bR\vwireDebugIn:I\n" + + "\x0ewire_debug_out\x12!.google.protobuf.EnumValueOptions\x18Ն\x03 \x01(\bR\fwireDebugOut:@\n" + + "\twire_tiny\x12!.google.protobuf.EnumValueOptions\x18ֆ\x03 \x01(\bR\bwireTiny:L\n" + + "\x0fwire_bootloader\x12!.google.protobuf.EnumValueOptions\x18׆\x03 \x01(\bR\x0ewireBootloader:C\n" + + "\vwire_no_fsm\x12!.google.protobuf.EnumValueOptions\x18؆\x03 \x01(\bR\twireNoFsm:F\n" + + "\fbitcoin_only\x12!.google.protobuf.EnumValueOptions\x18\xe0\xd4\x03 \x01(\bR\vbitcoinOnly:U\n" + + "\x17has_bitcoin_only_values\x12\x1c.google.protobuf.EnumOptions\x18\xb9\x8e\x03 \x01(\bR\x14hasBitcoinOnlyValues:T\n" + + "\x14experimental_message\x12\x1f.google.protobuf.MessageOptions\x18\xa1\x96\x03 \x01(\bR\x13experimentalMessage:>\n" + + "\twire_type\x12\x1f.google.protobuf.MessageOptions\x18\xa2\x96\x03 \x01(\rR\bwireType:F\n" + + "\rinternal_only\x12\x1f.google.protobuf.MessageOptions\x18\xa3\x96\x03 \x01(\bR\finternalOnly:N\n" + + "\x12experimental_field\x12\x1d.google.protobuf.FieldOptions\x18\x89\x9e\x03 \x01(\bR\x11experimentalField:U\n" + + "\x17include_in_bitcoin_only\x12\x1c.google.protobuf.FileOptions\x18\xe0\xd4\x03 \x01(\bR\x14includeInBitcoinOnlyBo\n" + + "#com.satoshilabs.trezor.lib.protobufB\rTrezorOptionsZ9github.com/ethereum/go-ethereum/accounts/usbwallet/trezor" + +var file_options_proto_goTypes = []any{ + (*descriptorpb.EnumValueOptions)(nil), // 0: google.protobuf.EnumValueOptions + (*descriptorpb.EnumOptions)(nil), // 1: google.protobuf.EnumOptions + (*descriptorpb.MessageOptions)(nil), // 2: google.protobuf.MessageOptions + (*descriptorpb.FieldOptions)(nil), // 3: google.protobuf.FieldOptions + (*descriptorpb.FileOptions)(nil), // 4: google.protobuf.FileOptions +} +var file_options_proto_depIdxs = []int32{ + 0, // 0: hw.trezor.messages.wire_in:extendee -> google.protobuf.EnumValueOptions + 0, // 1: hw.trezor.messages.wire_out:extendee -> google.protobuf.EnumValueOptions + 0, // 2: hw.trezor.messages.wire_debug_in:extendee -> google.protobuf.EnumValueOptions + 0, // 3: hw.trezor.messages.wire_debug_out:extendee -> google.protobuf.EnumValueOptions + 0, // 4: hw.trezor.messages.wire_tiny:extendee -> google.protobuf.EnumValueOptions + 0, // 5: hw.trezor.messages.wire_bootloader:extendee -> google.protobuf.EnumValueOptions + 0, // 6: hw.trezor.messages.wire_no_fsm:extendee -> google.protobuf.EnumValueOptions + 0, // 7: hw.trezor.messages.bitcoin_only:extendee -> google.protobuf.EnumValueOptions + 1, // 8: hw.trezor.messages.has_bitcoin_only_values:extendee -> google.protobuf.EnumOptions + 2, // 9: hw.trezor.messages.experimental_message:extendee -> google.protobuf.MessageOptions + 2, // 10: hw.trezor.messages.wire_type:extendee -> google.protobuf.MessageOptions + 2, // 11: hw.trezor.messages.internal_only:extendee -> google.protobuf.MessageOptions + 3, // 12: hw.trezor.messages.experimental_field:extendee -> google.protobuf.FieldOptions + 4, // 13: hw.trezor.messages.include_in_bitcoin_only:extendee -> google.protobuf.FileOptions + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 0, // [0:14] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_options_proto_init() } +func file_options_proto_init() { + if File_options_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_options_proto_rawDesc), len(file_options_proto_rawDesc)), + NumEnums: 0, + NumMessages: 0, + NumExtensions: 14, + NumServices: 0, + }, + GoTypes: file_options_proto_goTypes, + DependencyIndexes: file_options_proto_depIdxs, + ExtensionInfos: file_options_proto_extTypes, + }.Build() + File_options_proto = out.File + file_options_proto_goTypes = nil + file_options_proto_depIdxs = nil +} diff --git a/accounts/usbwallet/trezor/options.proto b/accounts/usbwallet/trezor/options.proto new file mode 100644 index 00000000000..b3950be358c --- /dev/null +++ b/accounts/usbwallet/trezor/options.proto @@ -0,0 +1,72 @@ +// This file originates from the SatoshiLabs Trezor `common` repository at: +// https://github.com/trezor/trezor-common/blob/master/protob/options.proto +// dated 30.06.2025, commit 421b45d4677f2499234692b0f54010bc45b3ae5f. + +syntax = "proto2"; +package hw.trezor.messages; + +option go_package = "github.com/ethereum/go-ethereum/accounts/usbwallet/trezor"; + +// Sugar for easier handling in Java +option java_package = "com.satoshilabs.trezor.lib.protobuf"; +option java_outer_classname = "TrezorOptions"; + +import "google/protobuf/descriptor.proto"; + +/************************* WARNING *********************** +Due to the way extensions are accessed in pb2py, there needs to be a globally unique +name-ID mapping for extensions. That means that two different extensions, e.g. for +EnumValueOptions and FieldOptions, MUST NOT have the same ID. + +Using the same ID indicates the same purpose (protobuf does not allow multiple +extensions with the same name), such as EnumValueOptions.bitcoin_only and +FileOptions.include_in_bitcoin_only. pb2py can then find the extension under +either name. + +The convention to achieve this is as follows: + - extensions specific to a type have the same prefix: + * 50xxx for EnumValueOptions + * 51xxx for EnumOptions + * 52xxx for MessageOptions + * 53xxx for FieldOptions + - extensions that might be used across types have the same "global" prefix 60xxx +*/ + +/** + * Options for specifying message direction and type of wire (normal/debug) + */ +extend google.protobuf.EnumValueOptions { + optional bool wire_in = 50002; // message can be transmitted via wire from PC to Trezor + optional bool wire_out = 50003; // message can be transmitted via wire from Trezor to PC + optional bool wire_debug_in = 50004; // message can be transmitted via debug wire from PC to Trezor + optional bool wire_debug_out = 50005; // message can be transmitted via debug wire from Trezor to PC + optional bool wire_tiny = 50006; // message is handled by Trezor when the USB stack is in tiny mode + optional bool wire_bootloader = 50007; // message is only handled by Trezor Bootloader + optional bool wire_no_fsm = 50008; // message is not handled by Trezor unless the USB stack is in tiny mode + + optional bool bitcoin_only = 60000; // enum value is available on BITCOIN_ONLY build + // (messages not marked bitcoin_only will be EXCLUDED) +} + +/** Options for tagging enum types */ +extend google.protobuf.EnumOptions { + optional bool has_bitcoin_only_values = 51001; // indicate that some values should be excluded on BITCOIN_ONLY builds +} + +/** Options for tagging message types */ +extend google.protobuf.MessageOptions { + optional bool experimental_message = 52001; // indicate that a message is intended for development and beta testing only and its definition may change at any time + optional uint32 wire_type = 52002; // override wire type specified in the MessageType enum + optional bool internal_only = 52003; // indicate that a message is intended for internal use only and should not be transmitted via the wire +} + +/** Options for tagging field types */ +extend google.protobuf.FieldOptions { + optional bool experimental_field = 53001; // indicate that a field is intended for development and beta testing only +} + +/** Options for tagging files with protobuf definitions */ +extend google.protobuf.FileOptions { + optional bool include_in_bitcoin_only = 60000; // definitions are available on BITCOIN_ONLY build + // intentionally identical to `bitcoin_only` from enum +} \ No newline at end of file diff --git a/accounts/usbwallet/trezor/trezor.go b/accounts/usbwallet/trezor/trezor.go index 93aee3c2899..f3c3651e083 100644 --- a/accounts/usbwallet/trezor/trezor.go +++ b/accounts/usbwallet/trezor/trezor.go @@ -42,7 +42,7 @@ // - Grab the latest Go plugin `go get -u google.golang.org/protobuf/cmd/protoc-gen-go` // - Vendor in the latest Go plugin `govendor fetch google.golang.org/protobuf/...` -//go:generate protoc -I/usr/local/include:. --go_out=paths=source_relative:. messages.proto messages-common.proto messages-management.proto messages-ethereum.proto +//go:generate protoc -I/usr/local/include:. --go_out=paths=source_relative:. options.proto messages.proto messages-common.proto messages-management.proto messages-ethereum.proto messages-ethereum-eip712.proto // Package trezor contains the wire protocol. package trezor diff --git a/accounts/usbwallet/wallet.go b/accounts/usbwallet/wallet.go index 0fd0415a9ef..a342f0b0fef 100644 --- a/accounts/usbwallet/wallet.go +++ b/accounts/usbwallet/wallet.go @@ -19,6 +19,7 @@ package usbwallet import ( "context" + "encoding/json" "fmt" "io" "math/big" @@ -31,7 +32,8 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" - "github.com/karalabe/hid" + "github.com/ethereum/go-ethereum/signer/core/apitypes" + "github.com/karalabe/usb" ) // Maximum time between wallet health checks to detect USB unplugs. @@ -68,7 +70,17 @@ type driver interface { // or deny the transaction. SignTx(path accounts.DerivationPath, tx *types.Transaction, chainID *big.Int) (common.Address, *types.Transaction, error) - SignTypedMessage(path accounts.DerivationPath, messageHash []byte, domainHash []byte) ([]byte, error) + // SignText sends a message to sign to the USB device and waits for the user to confirm + // or deny the signature. + SignText(path accounts.DerivationPath, text []byte) ([]byte, error) + + // SignTypedHash sends a typed message to sign to the USB device and waits for the user to confirm + // or deny the signature. + SignTypedHash(path accounts.DerivationPath, messageHash []byte, domainHash []byte) ([]byte, error) + + // SignedTypedData sends a typed data struct to sign to the USB device and waits for the user to confirm + // or deny the signature. + SignedTypedData(path accounts.DerivationPath, data apitypes.TypedData) ([]byte, error) } // wallet represents the common functionality shared by all USB hardware @@ -79,8 +91,8 @@ type wallet struct { driver driver // Hardware implementation of the low level device operations url *accounts.URL // Textual URL uniquely identifying this wallet - info hid.DeviceInfo // Known USB device infos about the wallet - device hid.Device // USB device advertising itself as a hardware wallet + info usb.DeviceInfo // Known USB device infos about the wallet + device usb.Device // USB device advertising itself as a hardware wallet accounts []accounts.Account // List of derive accounts pinned on the hardware wallet paths map[common.Address]accounts.DerivationPath // Known derivation paths for signing operations @@ -530,45 +542,29 @@ func (w *wallet) signHash(account accounts.Account, hash []byte) ([]byte, error) // SignData signs keccak256(data). The mimetype parameter describes the type of data being signed func (w *wallet) SignData(account accounts.Account, mimeType string, data []byte) ([]byte, error) { - // Unless we are doing 712 signing, simply dispatch to signHash - if !(mimeType == accounts.MimetypeTypedData && len(data) == 66 && data[0] == 0x19 && data[1] == 0x01) { - return w.signHash(account, crypto.Keccak256(data)) + path, done, err := w.lockAndDerivePath(account) + if err != nil { + return nil, err } + defer done() - // dispatch to 712 signing if the mimetype is TypedData and the format matches - w.stateLock.RLock() // Comms have own mutex, this is for the state fields - defer w.stateLock.RUnlock() - - // If the wallet is closed, abort - if w.device == nil { - return nil, accounts.ErrWalletClosed - } - // Make sure the requested account is contained within - path, ok := w.paths[account.Address] - if !ok { - return nil, accounts.ErrUnknownAccount + if mimeType == accounts.MimetypeTypedData { + // If the data is exactly 66 bytes and starts with the 0x19 0x01 prefix, treat + // it as the raw EIP-712 hash pair (domain and message) to sign. + if len(data) == 66 && data[0] == 0x19 && data[1] == 0x01 { + return w.driver.SignTypedHash(path, data[2:34], data[34:66]) + } + // Otherwise attempt to parse the data as a JSON encoded EIP-712 struct + // and sign it as such. + var typedData apitypes.TypedData + if err := json.Unmarshal(data, &typedData); err != nil { + return nil, fmt.Errorf("invalid typed data: %w", err) + } + return w.driver.SignedTypedData(path, typedData) } - // All infos gathered and metadata checks out, request signing - <-w.commsLock - defer func() { w.commsLock <- struct{}{} }() - - // Ensure the device isn't screwed with while user confirmation is pending - // TODO(karalabe): remove if hotplug lands on Windows - w.hub.commsLock.Lock() - w.hub.commsPend++ - w.hub.commsLock.Unlock() - defer func() { - w.hub.commsLock.Lock() - w.hub.commsPend-- - w.hub.commsLock.Unlock() - }() - // Sign the transaction - signature, err := w.driver.SignTypedMessage(path, data[2:34], data[34:66]) - if err != nil { - return nil, err - } - return signature, nil + // If we're not doing 712 signing, simply dispatch to signHash + return w.signHash(account, crypto.Keccak256(data)) } // SignDataWithPassphrase implements accounts.Wallet, attempting to sign the given @@ -578,8 +574,21 @@ func (w *wallet) SignDataWithPassphrase(account accounts.Account, passphrase, mi return w.SignData(account, mimeType, data) } +// SignText implements accounts.Wallet, signing the text as an EIP-712 personal +// message. func (w *wallet) SignText(account accounts.Account, text []byte) ([]byte, error) { - return w.signHash(account, accounts.TextHash(text)) + path, done, err := w.lockAndDerivePath(account) + if err != nil { + return nil, err + } + defer done() + + // Sign the transaction + signature, err := w.driver.SignText(path, text) + if err != nil { + return nil, err + } + return signature, nil } // SignTx implements accounts.Wallet. It sends the transaction over to the Ledger @@ -590,21 +599,52 @@ func (w *wallet) SignText(account accounts.Account, text []byte) ([]byte, error) // too old to sign EIP-155 transactions, but such is requested nonetheless, an error // will be returned opposed to silently signing in Homestead mode. func (w *wallet) SignTx(account accounts.Account, tx *types.Transaction, chainID *big.Int) (*types.Transaction, error) { + path, done, err := w.lockAndDerivePath(account) + if err != nil { + return nil, err + } + defer done() + + // Sign the transaction and verify the sender to avoid hardware fault surprises + sender, signed, err := w.driver.SignTx(path, tx, chainID) + if err != nil { + return nil, err + } + if sender != account.Address { + return nil, fmt.Errorf("signer mismatch: expected %s, got %s", account.Address.Hex(), sender.Hex()) + } + return signed, nil +} + +// SignTextWithPassphrase implements accounts.Wallet, signing the text as an EIP-712 +// personal message. +func (w *wallet) SignTextWithPassphrase(account accounts.Account, passphrase string, text []byte) ([]byte, error) { + return w.SignText(account, text) +} + +// SignTxWithPassphrase implements accounts.Wallet, attempting to sign the given +// transaction with the given account using passphrase as extra authentication. +// Since USB wallets don't rely on passphrases, these are silently ignored. +func (w *wallet) SignTxWithPassphrase(account accounts.Account, passphrase string, tx *types.Transaction, chainID *big.Int) (*types.Transaction, error) { + return w.SignTx(account, tx, chainID) +} + +func (w *wallet) lockAndDerivePath(account accounts.Account) (accounts.DerivationPath, func(), error) { w.stateLock.RLock() // Comms have own mutex, this is for the state fields - defer w.stateLock.RUnlock() // If the wallet is closed, abort if w.device == nil { - return nil, accounts.ErrWalletClosed + w.stateLock.RUnlock() + return nil, nil, accounts.ErrWalletClosed } // Make sure the requested account is contained within path, ok := w.paths[account.Address] if !ok { - return nil, accounts.ErrUnknownAccount + w.stateLock.RUnlock() + return nil, nil, accounts.ErrUnknownAccount } // All infos gathered and metadata checks out, request signing <-w.commsLock - defer func() { w.commsLock <- struct{}{} }() // Ensure the device isn't screwed with while user confirmation is pending // TODO(karalabe): remove if hotplug lands on Windows @@ -612,32 +652,14 @@ func (w *wallet) SignTx(account accounts.Account, tx *types.Transaction, chainID w.hub.commsPend++ w.hub.commsLock.Unlock() - defer func() { + done := func() { + w.stateLock.RUnlock() + w.commsLock <- struct{}{} + w.hub.commsLock.Lock() w.hub.commsPend-- w.hub.commsLock.Unlock() - }() - // Sign the transaction and verify the sender to avoid hardware fault surprises - sender, signed, err := w.driver.SignTx(path, tx, chainID) - if err != nil { - return nil, err - } - if sender != account.Address { - return nil, fmt.Errorf("signer mismatch: expected %s, got %s", account.Address.Hex(), sender.Hex()) } - return signed, nil -} - -// SignTextWithPassphrase implements accounts.Wallet, however signing arbitrary -// data is not supported for Ledger wallets, so this method will always return -// an error. -func (w *wallet) SignTextWithPassphrase(account accounts.Account, passphrase string, text []byte) ([]byte, error) { - return w.SignText(account, accounts.TextHash(text)) -} -// SignTxWithPassphrase implements accounts.Wallet, attempting to sign the given -// transaction with the given account using passphrase as extra authentication. -// Since USB wallets don't rely on passphrases, these are silently ignored. -func (w *wallet) SignTxWithPassphrase(account accounts.Account, passphrase string, tx *types.Transaction, chainID *big.Int) (*types.Transaction, error) { - return w.SignTx(account, tx, chainID) + return path, done, nil } diff --git a/go.mod b/go.mod index 03cdf3bb2da..b004eccd790 100644 --- a/go.mod +++ b/go.mod @@ -45,7 +45,7 @@ require ( github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c github.com/jackpal/go-nat-pmp v1.0.2 github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267 - github.com/karalabe/hid v1.0.1-0.20240306101548-573246063e52 + github.com/karalabe/usb v0.0.3-0.20231219215548-8627268f6b0a github.com/kylelemons/godebug v1.1.0 github.com/mattn/go-colorable v0.1.13 github.com/mattn/go-isatty v0.0.20 @@ -56,6 +56,7 @@ require ( github.com/protolambda/bls12-381-util v0.1.0 github.com/protolambda/zrnt v0.34.1 github.com/protolambda/ztyp v0.2.2 + github.com/reserve-protocol/trezor v0.0.0-20190523030725-9e38328dde28 github.com/rs/cors v1.7.0 github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible github.com/status-im/keycard-go v0.2.0 @@ -126,6 +127,7 @@ require ( github.com/mitchellh/mapstructure v1.4.1 // indirect github.com/mitchellh/pointerstructure v1.2.0 // indirect github.com/naoina/go-stringutil v0.1.0 // indirect + github.com/nsf/termbox-go v0.0.0-20190325093121-288510b9734e // indirect github.com/opentracing/opentracing-go v1.1.0 // indirect github.com/pion/dtls/v2 v2.2.7 // indirect github.com/pion/logging v0.2.2 // indirect diff --git a/go.sum b/go.sum index 764cfdb668c..ce48fe74233 100644 --- a/go.sum +++ b/go.sum @@ -215,8 +215,8 @@ github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9Y github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/karalabe/hid v1.0.1-0.20240306101548-573246063e52 h1:msKODTL1m0wigztaqILOtla9HeW1ciscYG4xjLtvk5I= -github.com/karalabe/hid v1.0.1-0.20240306101548-573246063e52/go.mod h1:qk1sX/IBgppQNcGCRoj90u6EGC056EBoIc1oEjCWla8= +github.com/karalabe/usb v0.0.3-0.20231219215548-8627268f6b0a h1:BGJeMa7efLsbPri2WJxtFOcjDPyjCdNlZWERE11GJAE= +github.com/karalabe/usb v0.0.3-0.20231219215548-8627268f6b0a/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/kilic/bls12-381 v0.1.0 h1:encrdjqKMEvabVQ7qYOKu1OvhqpK4s47wDYtNiPtlp4= github.com/kilic/bls12-381 v0.1.0/go.mod h1:vDTTHJONJ6G+P2R74EhnyotQDTliQDnFEwhdmfzw1ig= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -256,6 +256,7 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= @@ -271,6 +272,8 @@ github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hz github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= +github.com/nsf/termbox-go v0.0.0-20190325093121-288510b9734e h1:Vbib8wJAaMEF9jusI/kMSYMr/LtRzM7+F9MJgt/nH8k= +github.com/nsf/termbox-go v0.0.0-20190325093121-288510b9734e/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= @@ -324,6 +327,8 @@ github.com/protolambda/ztyp v0.2.2 h1:rVcL3vBu9W/aV646zF6caLS/dyn9BN8NYiuJzicLNy github.com/protolambda/ztyp v0.2.2/go.mod h1:9bYgKGqg3wJqT9ac1gI2hnVb0STQq7p/1lapqrqY1dU= github.com/prysmaticlabs/gohashtree v0.0.4-beta h1:H/EbCuXPeTV3lpKeXGPpEV9gsUpkqOOVnWapUyeWro4= github.com/prysmaticlabs/gohashtree v0.0.4-beta/go.mod h1:BFdtALS+Ffhg3lGQIHv9HDWuHS8cTvHZzrHWxwOtGOs= +github.com/reserve-protocol/trezor v0.0.0-20190523030725-9e38328dde28 h1:0XRrYV4bb+Y09cLQKsVE5gQ3HRebPXxY89zx+ZV2Fo0= +github.com/reserve-protocol/trezor v0.0.0-20190523030725-9e38328dde28/go.mod h1:Twg3zlQzleALAU+gR5xSK112gdh9YLcQ6owamVh0lbY= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=