How to use the protobuf.FLAG_REPEATED 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 / RippleSignTx.py View on Github external
def get_fields(cls) -> Dict:
        return {
            1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
            2: ('fee', p.UVarintType, 0),
            3: ('flags', p.UVarintType, 0),
            4: ('sequence', p.UVarintType, 0),
            5: ('last_ledger_sequence', p.UVarintType, 0),
            6: ('payment', RipplePayment, 0),
        }
github trezor / trezor-firmware / src / trezor / messages / StellarPathPaymentOp.py View on Github external
def get_fields(cls):
        return {
            1: ('source_account', p.UnicodeType, 0),
            2: ('send_asset', StellarAssetType, 0),
            3: ('send_max', p.SVarintType, 0),
            4: ('destination_account', p.UnicodeType, 0),
            5: ('destination_asset', StellarAssetType, 0),
            6: ('destination_amount', p.SVarintType, 0),
            7: ('paths', StellarAssetType, p.FLAG_REPEATED),
        }
github trezor / trezor-firmware / src / trezor / messages / OntologySignOntIdAddAttributes.py View on Github external
def get_fields(cls):
        return {
            1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
            2: ('transaction', OntologyTransaction, 0),
            3: ('ont_id_add_attributes', OntologyOntIdAddAttributes, 0),
        }
github trezor / trezor-firmware / src / trezor / messages / TransactionType.py View on Github external
def get_fields(cls):
        return {
            1: ('version', p.UVarintType, 0),
            2: ('inputs', TxInputType, p.FLAG_REPEATED),
            3: ('bin_outputs', TxOutputBinType, p.FLAG_REPEATED),
            4: ('lock_time', p.UVarintType, 0),
            5: ('outputs', TxOutputType, p.FLAG_REPEATED),
            6: ('inputs_cnt', p.UVarintType, 0),
            7: ('outputs_cnt', p.UVarintType, 0),
            8: ('extra_data', p.BytesType, 0),
            9: ('extra_data_len', p.UVarintType, 0),
            10: ('expiry', p.UVarintType, 0),
            11: ('overwintered', p.BoolType, 0),
            12: ('version_group_id', p.UVarintType, 0),
            13: ('timestamp', p.UVarintType, 0),
            14: ('branch_id', p.UVarintType, 0),
        }
github trezor / trezor-firmware / src / trezor / messages / NEMTransactionCommon.py View on Github external
def get_fields(cls):
        return {
            1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
            2: ('network', p.UVarintType, 0),
            3: ('timestamp', p.UVarintType, 0),
            4: ('fee', p.UVarintType, 0),
            5: ('deadline', p.UVarintType, 0),
            6: ('signer', p.BytesType, 0),
        }
github trezor / trezor-firmware / core / src / trezor / messages / LiskMultisignatureType.py View on Github external
def get_fields(cls) -> Dict:
        return {
            1: ('min', p.UVarintType, 0),
            2: ('life_time', p.UVarintType, 0),
            3: ('keys_group', p.UnicodeType, p.FLAG_REPEATED),
        }
github trezor / trezor-firmware / core / src / trezor / messages / Features.py View on Github external
15: ('imported', p.BoolType, 0),
            16: ('pin_cached', p.BoolType, 0),
            17: ('passphrase_cached', p.BoolType, 0),
            18: ('firmware_present', p.BoolType, 0),
            19: ('needs_backup', p.BoolType, 0),
            20: ('flags', p.UVarintType, 0),
            21: ('model', p.UnicodeType, 0),
            22: ('fw_major', p.UVarintType, 0),
            23: ('fw_minor', p.UVarintType, 0),
            24: ('fw_patch', p.UVarintType, 0),
            25: ('fw_vendor', p.UnicodeType, 0),
            26: ('fw_vendor_keys', p.BytesType, 0),
            27: ('unfinished_backup', p.BoolType, 0),
            28: ('no_backup', p.BoolType, 0),
            29: ('recovery_mode', p.BoolType, 0),
            30: ('capabilities', p.EnumType("Capability", (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)), p.FLAG_REPEATED),
            31: ('backup_type', p.EnumType("BackupType", (0, 1, 2)), 0),
            32: ('sd_card_present', p.BoolType, 0),
            33: ('sd_protection', p.BoolType, 0),
            34: ('wipe_code_protection', p.BoolType, 0),
        }
github trezor / trezor-firmware / core / src / trezor / messages / TransactionType.py View on Github external
def get_fields(cls) -> Dict:
        return {
            1: ('version', p.UVarintType, 0),
            2: ('inputs', TxInputType, p.FLAG_REPEATED),
            3: ('bin_outputs', TxOutputBinType, p.FLAG_REPEATED),
            4: ('lock_time', p.UVarintType, 0),
            5: ('outputs', TxOutputType, p.FLAG_REPEATED),
            6: ('inputs_cnt', p.UVarintType, 0),
            7: ('outputs_cnt', p.UVarintType, 0),
            8: ('extra_data', p.BytesType, 0),
            9: ('extra_data_len', p.UVarintType, 0),
            10: ('expiry', p.UVarintType, 0),
            11: ('overwintered', p.BoolType, 0),
            12: ('version_group_id', p.UVarintType, 0),
            13: ('timestamp', p.UVarintType, 0),
            14: ('branch_id', p.UVarintType, 0),
        }
github trezor / trezor-firmware / src / trezor / messages / StellarSignTx.py View on Github external
def get_fields(cls):
        return {
            2: ('address_n', p.UVarintType, p.FLAG_REPEATED),
            3: ('network_passphrase', p.UnicodeType, 0),
            4: ('source_account', p.UnicodeType, 0),
            5: ('fee', p.UVarintType, 0),
            6: ('sequence_number', p.UVarintType, 0),
            8: ('timebounds_start', p.UVarintType, 0),
            9: ('timebounds_end', p.UVarintType, 0),
            10: ('memo_type', p.UVarintType, 0),
            11: ('memo_text', p.UnicodeType, 0),
            12: ('memo_id', p.UVarintType, 0),
            13: ('memo_hash', p.BytesType, 0),
            14: ('num_operations', p.UVarintType, 0),
        }
github trezor / trezor-firmware / src / trezor / messages / MoneroKeyImageExportInitRequest.py View on Github external
def get_fields(cls):
        return {
            1: ('num', p.UVarintType, 0),
            2: ('hash', p.BytesType, 0),
            3: ('address_n', p.UVarintType, p.FLAG_REPEATED),
            4: ('network_type', p.UVarintType, 0),
            5: ('subs', MoneroSubAddressIndicesList, p.FLAG_REPEATED),
        }