How to use the protobuf.SVarintType 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 / StellarCreateAccountOp.py View on Github external
def get_fields(cls) -> Dict:
        return {
            1: ('source_account', p.UnicodeType, 0),
            2: ('new_account', p.UnicodeType, 0),
            3: ('starting_balance', p.SVarintType, 0),
        }
github trezor / trezor-firmware / core / src / trezor / messages / StellarPaymentOp.py View on Github external
def get_fields(cls) -> Dict:
        return {
            1: ('source_account', p.UnicodeType, 0),
            2: ('destination_account', p.UnicodeType, 0),
            3: ('asset', StellarAssetType, 0),
            4: ('amount', p.SVarintType, 0),
        }
github trezor / trezor-firmware / core / src / trezor / messages / BinanceOrderMsg.py View on Github external
def get_fields(cls) -> Dict:
        return {
            1: ('id', p.UnicodeType, 0),
            2: ('ordertype', p.EnumType("BinanceOrderType", (0, 1, 2, 3)), 0),
            3: ('price', p.SVarintType, 0),
            4: ('quantity', p.SVarintType, 0),
            5: ('sender', p.UnicodeType, 0),
            6: ('side', p.EnumType("BinanceOrderSide", (0, 1, 2)), 0),
            7: ('symbol', p.UnicodeType, 0),
            8: ('timeinforce', p.EnumType("BinanceTimeInForce", (0, 1, 2, 3)), 0),
        }
github trezor / trezor-firmware / src / trezor / messages / NEMAggregateModification.py View on Github external
def get_fields(cls):
        return {
            1: ('modifications', NEMCosignatoryModification, p.FLAG_REPEATED),
            2: ('relative_change', p.SVarintType, 0),
        }
github trezor / trezor-firmware / core / src / trezor / messages / StellarPathPaymentOp.py View on Github external
def get_fields(cls) -> Dict:
        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 / StellarCreatePassiveOfferOp.py View on Github external
def get_fields(cls):
        return {
            1: ('source_account', p.UnicodeType, 0),
            2: ('selling_asset', StellarAssetType, 0),
            3: ('buying_asset', StellarAssetType, 0),
            4: ('amount', p.SVarintType, 0),
            5: ('price_n', p.UVarintType, 0),
            6: ('price_d', p.UVarintType, 0),
        }
github trezor / trezor-firmware / core / src / trezor / messages / NEMAggregateModification.py View on Github external
def get_fields(cls) -> Dict:
        return {
            1: ('modifications', NEMCosignatoryModification, p.FLAG_REPEATED),
            2: ('relative_change', p.SVarintType, 0),
        }
github trezor / trezor-firmware / src / trezor / messages / StellarCreateAccountOp.py View on Github external
def get_fields(cls):
        return {
            1: ('source_account', p.UnicodeType, 0),
            2: ('new_account', p.UnicodeType, 0),
            3: ('starting_balance', p.SVarintType, 0),
        }
github trezor / trezor-firmware / core / src / trezor / messages / BinanceSignTx.py View on Github external
def get_fields(cls) -> Dict:
        return {
            1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
            2: ('msg_count', p.UVarintType, 0),
            3: ('account_number', p.SVarintType, 0),
            4: ('chain_id', p.UnicodeType, 0),
            5: ('memo', p.UnicodeType, 0),
            6: ('sequence', p.SVarintType, 0),
            7: ('source', p.SVarintType, 0),
        }
github trezor / trezor-firmware / core / src / trezor / messages / StellarManageOfferOp.py View on Github external
def get_fields(cls) -> Dict:
        return {
            1: ('source_account', p.UnicodeType, 0),
            2: ('selling_asset', StellarAssetType, 0),
            3: ('buying_asset', StellarAssetType, 0),
            4: ('amount', p.SVarintType, 0),
            5: ('price_n', p.UVarintType, 0),
            6: ('price_d', p.UVarintType, 0),
            7: ('offer_id', p.UVarintType, 0),
        }