How to use the protobuf.UnicodeType 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 / src / trezor / messages / StellarManageDataOp.py View on Github external
def get_fields(cls):
        return {
            1: ('source_account', p.UnicodeType, 0),
            2: ('key', p.UnicodeType, 0),
            3: ('value', p.BytesType, 0),
        }
github trezor / trezor-firmware / core / src / trezor / messages / LiskDelegateType.py View on Github external
def get_fields(cls) -> Dict:
        return {
            1: ('username', p.UnicodeType, 0),
        }
github trezor / trezor-firmware / src / trezor / messages / SignIdentity.py View on Github external
def get_fields(cls):
        return {
            1: ('identity', IdentityType, 0),
            2: ('challenge_hidden', p.BytesType, 0),
            3: ('challenge_visual', p.UnicodeType, 0),
            4: ('ecdsa_curve_name', p.UnicodeType, 0),
        }
github trezor / trezor-firmware / src / trezor / messages / OntologyOntIdAttribute.py View on Github external
def get_fields(cls):
        return {
            1: ('key', p.UnicodeType, 0),
            2: ('type', p.UnicodeType, 0),
            3: ('value', p.UnicodeType, 0),
        }
github trezor / trezor-firmware / core / src / trezor / messages / EthereumMessageSignature.py View on Github external
def get_fields(cls) -> Dict:
        return {
            2: ('signature', p.BytesType, 0),
            3: ('address', p.UnicodeType, 0),
        }
github trezor / trezor-firmware / src / trezor / messages / OntologyWithdrawOng.py View on Github external
def get_fields(cls):
        return {
            1: ('amount', p.UVarintType, 0),
            2: ('from_address', p.UnicodeType, 0),
            3: ('to_address', p.UnicodeType, 0),
        }
github trezor / trezor-firmware / core / src / trezor / messages / OntologyOntIdRegister.py View on Github external
def get_fields(cls) -> Dict:
        return {
            1: ('ont_id', p.UnicodeType, 0),
            2: ('public_key', p.BytesType, 0),
        }
github trezor / trezor-firmware / src / trezor / messages / RippleAddress.py View on Github external
def get_fields(cls):
        return {
            1: ('address', p.UnicodeType, 0),
        }
github trezor / trezor-firmware / core / src / trezor / messages / NEMMosaicDefinition.py View on Github external
def get_fields(cls) -> Dict:
        return {
            1: ('name', p.UnicodeType, 0),
            2: ('ticker', p.UnicodeType, 0),
            3: ('namespace', p.UnicodeType, 0),
            4: ('mosaic', p.UnicodeType, 0),
            5: ('divisibility', p.UVarintType, 0),
            6: ('levy', p.EnumType("NEMMosaicLevy", (1, 2)), 0),
            7: ('fee', p.UVarintType, 0),
            8: ('levy_address', p.UnicodeType, 0),
            9: ('levy_namespace', p.UnicodeType, 0),
            10: ('levy_mosaic', p.UnicodeType, 0),
            11: ('supply', p.UVarintType, 0),
            12: ('mutable_supply', p.BoolType, 0),
            13: ('transferable', p.BoolType, 0),
            14: ('description', p.UnicodeType, 0),
            15: ('networks', p.UVarintType, p.FLAG_REPEATED),
        }
github trezor / trezor-firmware / core / src / trezor / messages / GetAddress.py View on Github external
def get_fields(cls) -> Dict:
        return {
            1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
            2: ('coin_name', p.UnicodeType, 0),  # default=Bitcoin
            3: ('show_display', p.BoolType, 0),
            4: ('multisig', MultisigRedeemScriptType, 0),
            5: ('script_type', p.EnumType("InputScriptType", (0, 1, 2, 3, 4)), 0),  # default=SPENDADDRESS
        }