How to use the protobuf.BytesType function in protobuf

To help you get started, we’ve selected a few protobuf examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github trezor / trezor-firmware / core / src / trezor / messages / WebAuthnCredential.py View on Github external
def get_fields(cls) -> Dict:
        return {
            1: ('index', p.UVarintType, 0),
            2: ('id', p.BytesType, 0),
            3: ('rp_id', p.UnicodeType, 0),
            4: ('rp_name', p.UnicodeType, 0),
            5: ('user_id', p.BytesType, 0),
            6: ('user_name', p.UnicodeType, 0),
            7: ('user_display_name', p.UnicodeType, 0),
            8: ('creation_time', p.UVarintType, 0),
            9: ('hmac_secret', p.BoolType, 0),
            10: ('use_sign_count', p.BoolType, 0),
        }
github trezor / trezor-firmware / core / src / trezor / messages / MoneroLiveRefreshStepRequest.py View on Github external
def get_fields(cls) -> Dict:
        return {
            1: ('out_key', p.BytesType, 0),
            2: ('recv_deriv', p.BytesType, 0),
            3: ('real_out_idx', p.UVarintType, 0),
            4: ('sub_addr_major', p.UVarintType, 0),
            5: ('sub_addr_minor', p.UVarintType, 0),
        }
github trezor / trezor-core / src / trezor / messages / CipheredKeyValue.py View on Github external
def get_fields(cls):
        return {
            1: ('value', p.BytesType, 0),
        }
github trezor / trezor-firmware / src / trezor / messages / CardanoTxAck.py View on Github external
def get_fields(cls):
        return {
            1: ('transaction', p.BytesType, 0),
        }
github trezor / trezor-firmware / core / src / trezor / messages / NEMCosignatoryModification.py View on Github external
def get_fields(cls) -> Dict:
        return {
            1: ('type', p.EnumType("NEMModificationType", (1, 2)), 0),
            2: ('public_key', p.BytesType, 0),
        }
github trezor / trezor-firmware / core / src / trezor / messages / NEMImportanceTransfer.py View on Github external
def get_fields(cls) -> Dict:
        return {
            1: ('mode', p.EnumType("NEMImportanceTransferMode", (1, 2)), 0),
            2: ('public_key', p.BytesType, 0),
        }
github trezor / trezor-firmware / src / trezor / messages / LiskVerifyMessage.py View on Github external
def get_fields(cls):
        return {
            1: ('public_key', p.BytesType, 0),
            2: ('signature', p.BytesType, 0),
            3: ('message', p.BytesType, 0),
        }
github trezor / trezor-firmware / src / trezor / messages / MoneroTransactionInitAck.py View on Github external
def get_fields(cls):
        return {
            1: ('hmacs', p.BytesType, p.FLAG_REPEATED),
            2: ('rsig_data', MoneroTransactionRsigData, 0),
        }
github trezor / trezor-firmware / src / trezor / messages / MoneroExportedKeyImage.py View on Github external
def get_fields(cls):
        return {
            1: ('iv', p.BytesType, 0),
            3: ('blob', p.BytesType, 0),
        }
github trezor / trezor-firmware / core / src / trezor / messages / EthereumSignTx.py View on Github external
def get_fields(cls) -> Dict:
        return {
            1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
            2: ('nonce', p.BytesType, 0),
            3: ('gas_price', p.BytesType, 0),
            4: ('gas_limit', p.BytesType, 0),
            11: ('to', p.UnicodeType, 0),
            6: ('value', p.BytesType, 0),
            7: ('data_initial_chunk', p.BytesType, 0),
            8: ('data_length', p.UVarintType, 0),
            9: ('chain_id', p.UVarintType, 0),
            10: ('tx_type', p.UVarintType, 0),
        }