From aa0f671724037ac8f88d2b656f3994320ddc3f37 Mon Sep 17 00:00:00 2001 From: Daniel Krol Date: Thu, 27 Jan 2022 21:32:48 -0500 Subject: [PATCH] wallet.proto start --- v2/proto/wallet.proto | 139 ++++ v2/python/wallet_pb2.py | 1244 +++++++++++++++++++++++++++++++++++ v2/python/wallet_wrapper.py | 25 + 3 files changed, 1408 insertions(+) create mode 100644 v2/proto/wallet.proto create mode 100644 v2/python/wallet_pb2.py create mode 100644 v2/python/wallet_wrapper.py diff --git a/v2/proto/wallet.proto b/v2/proto/wallet.proto new file mode 100644 index 0000000..54e1e3d --- /dev/null +++ b/v2/proto/wallet.proto @@ -0,0 +1,139 @@ +syntax = "proto3"; + +package pb; + +// TODO - timestamps need not be uint64 right? + +message Wallet { + repeated Account accounts = 1; + string name = 2; + TimestampedPreferences preferences = 3; + uint32 version = 4; + + /* + Python had these but probably unrelated + + self.storage = storage or WalletStorage() + self.encryption_password = None + self.id = self.get_id() + */ +} + +message Account { + message AddressGenerator { + message Chain { // TODO - good name? + uint32 gap = 1; // uint64? not sure how big this might get + uint32 maximum_uses_per_address = 2 [json_name="maximum_uses_per_address"]; + } + Chain change = 1; + string name = 2; + Chain receiving = 3; + } + + AddressGenerator address_generator = 1 [json_name="address_generator"]; + map certificates = 2; + bool encrypted = 3; + string ledger = 4; + uint32 modified_on = 5 [json_name="modified_on"]; + string name = 6; + string private_key = 7 [json_name="private_key"]; + string public_key = 8 [json_name="public_key"]; + string seed = 9; +} + +message TimestampedPreferences { + EnableSync enable_sync = 1 [json_name="enable-sync"]; + Preferences local = 2; + Preferences shared = 3; + + message EnableSync { + uint32 ts = 1; + bool value = 2; + } + message Preferences { + message Preferences_ { + string type = 1; // TODO 'object' -- anything else? + Preferences__ value = 2; + string version = 3; // TODO why is this a string but not CurrencyAmount.amount? + } + uint32 ts = 1; + Preferences_ value = 2; + } + message Preferences__ { + message Collection { + string id = 1; + repeated string items = 2; + string name = 3; + string type = 4; // TODO - always playlist? + uint32 updatedAt = 5; + } + message BuiltInCollections { + Collection favorites = 1; + Collection watchlater = 2; + } + message Following { + bool notificationsDisabled = 1; + string uri = 2; + } + message Settings { // TODO check relevant code for more values + bool automatic_dark_mode_enabled = 1 [json_name="automatic_dark_mode_enabled"]; + bool autoplay = 2; + bool autoplay_next = 3 [json_name="autoplay_next"]; + message Time { + string formattedTime = 1; + string hour = 2; // TODO - can this safely be a number instead? convert it during de/serialization? + string min = 3; + } + message TimeRange { + Time from = 1; + Time to = 2; + } + TimeRange dark_mode_times = 4 [json_name="dark_mode_times"]; + bool floating_player = 5 [json_name="floating_player"]; + bool hide_balance = 6 [json_name="hide_balance"]; + bool hide_reposts = 7 [json_name="hide_reposts"]; + bool hide_splash_animation = 8 [json_name="hide_splash_animation"]; + bool instant_purchase_enabled = 9 [json_name="instant_purchase_enabled"]; + message CurrencyAmount { + double amount = 1; // TODO decimal type via string? is this safe? + string currency = 2; + } + CurrencyAmount instant_purchase_max = 10 [json_name="instant_purchase_max"]; + + // TODO - I'm guessing this is a string, but the example value was + // `null`. What do we do about this? Can the sdk treat omission as + // `null`, or should we put this into the json translation wrapper? + string language = 11; + + // TODO - this struct is represented as [string, uint32] in the wallet + // files. We cannot represent this in protobuf. We will need an extra + // step before/after json de/serialization: + // + // {domain: "sdk.lbry.tech", port: 50001} <-> ["sdk.lbry.tech", 50001] + message DomainPortPair { + string domain = 1; // TODO - better name? + uint32 port = 2; + } + repeated DomainPortPair lbryum_servers = 12 [json_name="lbryum_servers"]; + + bool share_usage_data = 13 [json_name="share_usage_data"]; + bool show_mature = 14 [json_name="show_mature"]; + string theme = 15; + } + + // TODO - In the example wallet, this is a string under the local + // preferences but a number under shared preferences. Which should we go + // with? Probably string, in case we get decimal version numbers. + uint32 app_welcome_version = 1 [json_name="app_welcome_version"]; + repeated string blocked = 2; + BuiltInCollections builtinCollections = 3; + repeated string coin_swap_codes = 4 [json_name="coin_swap_codes"]; // TODO - check the type + map editedCollections = 5; + repeated Following following = 6; + Settings settings = 7; + bool sharing_3P = 8 [json_name="sharing_3P"]; + repeated string subscriptions = 9; + repeated string tags = 10; + map unpublishedCollections = 11; + } +} diff --git a/v2/python/wallet_pb2.py b/v2/python/wallet_pb2.py new file mode 100644 index 0000000..04fc790 --- /dev/null +++ b/v2/python/wallet_pb2.py @@ -0,0 +1,1244 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: wallet.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='wallet.proto', + package='pb', + syntax='proto3', + serialized_options=None, + serialized_pb=_b('\n\x0cwallet.proto\x12\x02pb\"w\n\x06Wallet\x12\x1d\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32\x0b.pb.Account\x12\x0c\n\x04name\x18\x02 \x01(\t\x12/\n\x0bpreferences\x18\x03 \x01(\x0b\x32\x1a.pb.TimestampedPreferences\x12\x0f\n\x07version\x18\x04 \x01(\r\"\xc2\x04\n\x07\x41\x63\x63ount\x12J\n\x11\x61\x64\x64ress_generator\x18\x01 \x01(\x0b\x32\x1c.pb.Account.AddressGeneratorR\x11\x61\x64\x64ress_generator\x12\x33\n\x0c\x63\x65rtificates\x18\x02 \x03(\x0b\x32\x1d.pb.Account.CertificatesEntry\x12\x11\n\tencrypted\x18\x03 \x01(\x08\x12\x0e\n\x06ledger\x18\x04 \x01(\t\x12 \n\x0bmodified_on\x18\x05 \x01(\rR\x0bmodified_on\x12\x0c\n\x04name\x18\x06 \x01(\t\x12 \n\x0bprivate_key\x18\x07 \x01(\tR\x0bprivate_key\x12\x1e\n\npublic_key\x18\x08 \x01(\tR\npublic_key\x12\x0c\n\x04seed\x18\t \x01(\t\x1a\xdd\x01\n\x10\x41\x64\x64ressGenerator\x12\x32\n\x06\x63hange\x18\x01 \x01(\x0b\x32\".pb.Account.AddressGenerator.Chain\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x35\n\treceiving\x18\x03 \x01(\x0b\x32\".pb.Account.AddressGenerator.Chain\x1aP\n\x05\x43hain\x12\x0b\n\x03gap\x18\x01 \x01(\r\x12:\n\x18maximum_uses_per_address\x18\x02 \x01(\rR\x18maximum_uses_per_address\x1a\x33\n\x11\x43\x65rtificatesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9f\x15\n\x16TimestampedPreferences\x12G\n\x0b\x65nable_sync\x18\x01 \x01(\x0b\x32%.pb.TimestampedPreferences.EnableSyncR\x0b\x65nable-sync\x12\x35\n\x05local\x18\x02 \x01(\x0b\x32&.pb.TimestampedPreferences.Preferences\x12\x36\n\x06shared\x18\x03 \x01(\x0b\x32&.pb.TimestampedPreferences.Preferences\x1a\'\n\nEnableSync\x12\n\n\x02ts\x18\x01 \x01(\r\x12\r\n\x05value\x18\x02 \x01(\x08\x1a\xc5\x01\n\x0bPreferences\x12\n\n\x02ts\x18\x01 \x01(\r\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.pb.TimestampedPreferences.Preferences.Preferences_\x1a\x66\n\x0cPreferences_\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x37\n\x05value\x18\x02 \x01(\x0b\x32(.pb.TimestampedPreferences.Preferences__\x12\x0f\n\x07version\x18\x03 \x01(\t\x1a\xdb\x11\n\rPreferences__\x12\x30\n\x13\x61pp_welcome_version\x18\x01 \x01(\rR\x13\x61pp_welcome_version\x12\x0f\n\x07\x62locked\x18\x02 \x03(\t\x12W\n\x12\x62uiltinCollections\x18\x03 \x01(\x0b\x32;.pb.TimestampedPreferences.Preferences__.BuiltInCollections\x12(\n\x0f\x63oin_swap_codes\x18\x04 \x03(\tR\x0f\x63oin_swap_codes\x12Z\n\x11\x65\x64itedCollections\x18\x05 \x03(\x0b\x32?.pb.TimestampedPreferences.Preferences__.EditedCollectionsEntry\x12\x45\n\tfollowing\x18\x06 \x03(\x0b\x32\x32.pb.TimestampedPreferences.Preferences__.Following\x12\x43\n\x08settings\x18\x07 \x01(\x0b\x32\x31.pb.TimestampedPreferences.Preferences__.Settings\x12\x1e\n\nsharing_3P\x18\x08 \x01(\x08R\nsharing_3P\x12\x15\n\rsubscriptions\x18\t \x03(\t\x12\x0c\n\x04tags\x18\n \x03(\t\x12\x64\n\x16unpublishedCollections\x18\x0b \x03(\x0b\x32\x44.pb.TimestampedPreferences.Preferences__.UnpublishedCollectionsEntry\x1aV\n\nCollection\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05items\x18\x02 \x03(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x0c\n\x04type\x18\x04 \x01(\t\x12\x11\n\tupdatedAt\x18\x05 \x01(\r\x1a\xa5\x01\n\x12\x42uiltInCollections\x12\x46\n\tfavorites\x18\x01 \x01(\x0b\x32\x33.pb.TimestampedPreferences.Preferences__.Collection\x12G\n\nwatchlater\x18\x02 \x01(\x0b\x32\x33.pb.TimestampedPreferences.Preferences__.Collection\x1a\x37\n\tFollowing\x12\x1d\n\x15notificationsDisabled\x18\x01 \x01(\x08\x12\x0b\n\x03uri\x18\x02 \x01(\t\x1a\xd4\x08\n\x08Settings\x12@\n\x1b\x61utomatic_dark_mode_enabled\x18\x01 \x01(\x08R\x1b\x61utomatic_dark_mode_enabled\x12\x10\n\x08\x61utoplay\x18\x02 \x01(\x08\x12$\n\rautoplay_next\x18\x03 \x01(\x08R\rautoplay_next\x12\x65\n\x0f\x64\x61rk_mode_times\x18\x04 \x01(\x0b\x32;.pb.TimestampedPreferences.Preferences__.Settings.TimeRangeR\x0f\x64\x61rk_mode_times\x12(\n\x0f\x66loating_player\x18\x05 \x01(\x08R\x0f\x66loating_player\x12\"\n\x0chide_balance\x18\x06 \x01(\x08R\x0chide_balance\x12\"\n\x0chide_reposts\x18\x07 \x01(\x08R\x0chide_reposts\x12\x34\n\x15hide_splash_animation\x18\x08 \x01(\x08R\x15hide_splash_animation\x12:\n\x18instant_purchase_enabled\x18\t \x01(\x08R\x18instant_purchase_enabled\x12t\n\x14instant_purchase_max\x18\n \x01(\x0b\x32@.pb.TimestampedPreferences.Preferences__.Settings.CurrencyAmountR\x14instant_purchase_max\x12\x10\n\x08language\x18\x0b \x01(\t\x12h\n\x0elbryum_servers\x18\x0c \x03(\x0b\x32@.pb.TimestampedPreferences.Preferences__.Settings.DomainPortPairR\x0elbryum_servers\x12*\n\x10share_usage_data\x18\r \x01(\x08R\x10share_usage_data\x12 \n\x0bshow_mature\x18\x0e \x01(\x08R\x0bshow_mature\x12\r\n\x05theme\x18\x0f \x01(\t\x1a\x38\n\x04Time\x12\x15\n\rformattedTime\x18\x01 \x01(\t\x12\x0c\n\x04hour\x18\x02 \x01(\t\x12\x0b\n\x03min\x18\x03 \x01(\t\x1a\x95\x01\n\tTimeRange\x12\x44\n\x04\x66rom\x18\x01 \x01(\x0b\x32\x36.pb.TimestampedPreferences.Preferences__.Settings.Time\x12\x42\n\x02to\x18\x02 \x01(\x0b\x32\x36.pb.TimestampedPreferences.Preferences__.Settings.Time\x1a\x32\n\x0e\x43urrencyAmount\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x01\x12\x10\n\x08\x63urrency\x18\x02 \x01(\t\x1a.\n\x0e\x44omainPortPair\x12\x0e\n\x06\x64omain\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\r\x1am\n\x16\x45\x64itedCollectionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.pb.TimestampedPreferences.Preferences__.Collection:\x02\x38\x01\x1ar\n\x1bUnpublishedCollectionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.pb.TimestampedPreferences.Preferences__.Collection:\x02\x38\x01\x62\x06proto3') +) + + + + +_WALLET = _descriptor.Descriptor( + name='Wallet', + full_name='pb.Wallet', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='accounts', full_name='pb.Wallet.accounts', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='name', full_name='pb.Wallet.name', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='preferences', full_name='pb.Wallet.preferences', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='version', full_name='pb.Wallet.version', index=3, + number=4, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=20, + serialized_end=139, +) + + +_ACCOUNT_ADDRESSGENERATOR_CHAIN = _descriptor.Descriptor( + name='Chain', + full_name='pb.Account.AddressGenerator.Chain', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='gap', full_name='pb.Account.AddressGenerator.Chain.gap', index=0, + number=1, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='maximum_uses_per_address', full_name='pb.Account.AddressGenerator.Chain.maximum_uses_per_address', index=1, + number=2, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='maximum_uses_per_address', file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=587, + serialized_end=667, +) + +_ACCOUNT_ADDRESSGENERATOR = _descriptor.Descriptor( + name='AddressGenerator', + full_name='pb.Account.AddressGenerator', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='change', full_name='pb.Account.AddressGenerator.change', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='name', full_name='pb.Account.AddressGenerator.name', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='receiving', full_name='pb.Account.AddressGenerator.receiving', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[_ACCOUNT_ADDRESSGENERATOR_CHAIN, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=446, + serialized_end=667, +) + +_ACCOUNT_CERTIFICATESENTRY = _descriptor.Descriptor( + name='CertificatesEntry', + full_name='pb.Account.CertificatesEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='pb.Account.CertificatesEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='value', full_name='pb.Account.CertificatesEntry.value', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=_b('8\001'), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=669, + serialized_end=720, +) + +_ACCOUNT = _descriptor.Descriptor( + name='Account', + full_name='pb.Account', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='address_generator', full_name='pb.Account.address_generator', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='address_generator', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='certificates', full_name='pb.Account.certificates', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='encrypted', full_name='pb.Account.encrypted', index=2, + number=3, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='ledger', full_name='pb.Account.ledger', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='modified_on', full_name='pb.Account.modified_on', index=4, + number=5, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='modified_on', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='name', full_name='pb.Account.name', index=5, + number=6, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='private_key', full_name='pb.Account.private_key', index=6, + number=7, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='private_key', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='public_key', full_name='pb.Account.public_key', index=7, + number=8, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='public_key', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='seed', full_name='pb.Account.seed', index=8, + number=9, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[_ACCOUNT_ADDRESSGENERATOR, _ACCOUNT_CERTIFICATESENTRY, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=142, + serialized_end=720, +) + + +_TIMESTAMPEDPREFERENCES_ENABLESYNC = _descriptor.Descriptor( + name='EnableSync', + full_name='pb.TimestampedPreferences.EnableSync', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='ts', full_name='pb.TimestampedPreferences.EnableSync.ts', index=0, + number=1, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='value', full_name='pb.TimestampedPreferences.EnableSync.value', index=1, + number=2, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=933, + serialized_end=972, +) + +_TIMESTAMPEDPREFERENCES_PREFERENCES_PREFERENCES_ = _descriptor.Descriptor( + name='Preferences_', + full_name='pb.TimestampedPreferences.Preferences.Preferences_', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='type', full_name='pb.TimestampedPreferences.Preferences.Preferences_.type', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='value', full_name='pb.TimestampedPreferences.Preferences.Preferences_.value', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='version', full_name='pb.TimestampedPreferences.Preferences.Preferences_.version', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1070, + serialized_end=1172, +) + +_TIMESTAMPEDPREFERENCES_PREFERENCES = _descriptor.Descriptor( + name='Preferences', + full_name='pb.TimestampedPreferences.Preferences', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='ts', full_name='pb.TimestampedPreferences.Preferences.ts', index=0, + number=1, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='value', full_name='pb.TimestampedPreferences.Preferences.value', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[_TIMESTAMPEDPREFERENCES_PREFERENCES_PREFERENCES_, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=975, + serialized_end=1172, +) + +_TIMESTAMPEDPREFERENCES_PREFERENCES___COLLECTION = _descriptor.Descriptor( + name='Collection', + full_name='pb.TimestampedPreferences.Preferences__.Collection', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='id', full_name='pb.TimestampedPreferences.Preferences__.Collection.id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='items', full_name='pb.TimestampedPreferences.Preferences__.Collection.items', index=1, + number=2, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='name', full_name='pb.TimestampedPreferences.Preferences__.Collection.name', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='type', full_name='pb.TimestampedPreferences.Preferences__.Collection.type', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='updatedAt', full_name='pb.TimestampedPreferences.Preferences__.Collection.updatedAt', index=4, + number=5, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1793, + serialized_end=1879, +) + +_TIMESTAMPEDPREFERENCES_PREFERENCES___BUILTINCOLLECTIONS = _descriptor.Descriptor( + name='BuiltInCollections', + full_name='pb.TimestampedPreferences.Preferences__.BuiltInCollections', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='favorites', full_name='pb.TimestampedPreferences.Preferences__.BuiltInCollections.favorites', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='watchlater', full_name='pb.TimestampedPreferences.Preferences__.BuiltInCollections.watchlater', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1882, + serialized_end=2047, +) + +_TIMESTAMPEDPREFERENCES_PREFERENCES___FOLLOWING = _descriptor.Descriptor( + name='Following', + full_name='pb.TimestampedPreferences.Preferences__.Following', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='notificationsDisabled', full_name='pb.TimestampedPreferences.Preferences__.Following.notificationsDisabled', index=0, + number=1, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='uri', full_name='pb.TimestampedPreferences.Preferences__.Following.uri', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2049, + serialized_end=2104, +) + +_TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS_TIME = _descriptor.Descriptor( + name='Time', + full_name='pb.TimestampedPreferences.Preferences__.Settings.Time', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='formattedTime', full_name='pb.TimestampedPreferences.Preferences__.Settings.Time.formattedTime', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='hour', full_name='pb.TimestampedPreferences.Preferences__.Settings.Time.hour', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='min', full_name='pb.TimestampedPreferences.Preferences__.Settings.Time.min', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2907, + serialized_end=2963, +) + +_TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS_TIMERANGE = _descriptor.Descriptor( + name='TimeRange', + full_name='pb.TimestampedPreferences.Preferences__.Settings.TimeRange', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='from', full_name='pb.TimestampedPreferences.Preferences__.Settings.TimeRange.from', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='to', full_name='pb.TimestampedPreferences.Preferences__.Settings.TimeRange.to', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2966, + serialized_end=3115, +) + +_TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS_CURRENCYAMOUNT = _descriptor.Descriptor( + name='CurrencyAmount', + full_name='pb.TimestampedPreferences.Preferences__.Settings.CurrencyAmount', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='amount', full_name='pb.TimestampedPreferences.Preferences__.Settings.CurrencyAmount.amount', index=0, + number=1, type=1, cpp_type=5, label=1, + has_default_value=False, default_value=float(0), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='currency', full_name='pb.TimestampedPreferences.Preferences__.Settings.CurrencyAmount.currency', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3117, + serialized_end=3167, +) + +_TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS_DOMAINPORTPAIR = _descriptor.Descriptor( + name='DomainPortPair', + full_name='pb.TimestampedPreferences.Preferences__.Settings.DomainPortPair', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='domain', full_name='pb.TimestampedPreferences.Preferences__.Settings.DomainPortPair.domain', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='port', full_name='pb.TimestampedPreferences.Preferences__.Settings.DomainPortPair.port', index=1, + number=2, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3169, + serialized_end=3215, +) + +_TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS = _descriptor.Descriptor( + name='Settings', + full_name='pb.TimestampedPreferences.Preferences__.Settings', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='automatic_dark_mode_enabled', full_name='pb.TimestampedPreferences.Preferences__.Settings.automatic_dark_mode_enabled', index=0, + number=1, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='automatic_dark_mode_enabled', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='autoplay', full_name='pb.TimestampedPreferences.Preferences__.Settings.autoplay', index=1, + number=2, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='autoplay_next', full_name='pb.TimestampedPreferences.Preferences__.Settings.autoplay_next', index=2, + number=3, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='autoplay_next', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='dark_mode_times', full_name='pb.TimestampedPreferences.Preferences__.Settings.dark_mode_times', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='dark_mode_times', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='floating_player', full_name='pb.TimestampedPreferences.Preferences__.Settings.floating_player', index=4, + number=5, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='floating_player', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='hide_balance', full_name='pb.TimestampedPreferences.Preferences__.Settings.hide_balance', index=5, + number=6, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='hide_balance', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='hide_reposts', full_name='pb.TimestampedPreferences.Preferences__.Settings.hide_reposts', index=6, + number=7, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='hide_reposts', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='hide_splash_animation', full_name='pb.TimestampedPreferences.Preferences__.Settings.hide_splash_animation', index=7, + number=8, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='hide_splash_animation', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='instant_purchase_enabled', full_name='pb.TimestampedPreferences.Preferences__.Settings.instant_purchase_enabled', index=8, + number=9, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='instant_purchase_enabled', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='instant_purchase_max', full_name='pb.TimestampedPreferences.Preferences__.Settings.instant_purchase_max', index=9, + number=10, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='instant_purchase_max', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='language', full_name='pb.TimestampedPreferences.Preferences__.Settings.language', index=10, + number=11, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='lbryum_servers', full_name='pb.TimestampedPreferences.Preferences__.Settings.lbryum_servers', index=11, + number=12, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='lbryum_servers', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='share_usage_data', full_name='pb.TimestampedPreferences.Preferences__.Settings.share_usage_data', index=12, + number=13, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='share_usage_data', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='show_mature', full_name='pb.TimestampedPreferences.Preferences__.Settings.show_mature', index=13, + number=14, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='show_mature', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='theme', full_name='pb.TimestampedPreferences.Preferences__.Settings.theme', index=14, + number=15, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[_TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS_TIME, _TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS_TIMERANGE, _TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS_CURRENCYAMOUNT, _TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS_DOMAINPORTPAIR, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2107, + serialized_end=3215, +) + +_TIMESTAMPEDPREFERENCES_PREFERENCES___EDITEDCOLLECTIONSENTRY = _descriptor.Descriptor( + name='EditedCollectionsEntry', + full_name='pb.TimestampedPreferences.Preferences__.EditedCollectionsEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='pb.TimestampedPreferences.Preferences__.EditedCollectionsEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='value', full_name='pb.TimestampedPreferences.Preferences__.EditedCollectionsEntry.value', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=_b('8\001'), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3217, + serialized_end=3326, +) + +_TIMESTAMPEDPREFERENCES_PREFERENCES___UNPUBLISHEDCOLLECTIONSENTRY = _descriptor.Descriptor( + name='UnpublishedCollectionsEntry', + full_name='pb.TimestampedPreferences.Preferences__.UnpublishedCollectionsEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='pb.TimestampedPreferences.Preferences__.UnpublishedCollectionsEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='value', full_name='pb.TimestampedPreferences.Preferences__.UnpublishedCollectionsEntry.value', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=_b('8\001'), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3328, + serialized_end=3442, +) + +_TIMESTAMPEDPREFERENCES_PREFERENCES__ = _descriptor.Descriptor( + name='Preferences__', + full_name='pb.TimestampedPreferences.Preferences__', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='app_welcome_version', full_name='pb.TimestampedPreferences.Preferences__.app_welcome_version', index=0, + number=1, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='app_welcome_version', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='blocked', full_name='pb.TimestampedPreferences.Preferences__.blocked', index=1, + number=2, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='builtinCollections', full_name='pb.TimestampedPreferences.Preferences__.builtinCollections', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='coin_swap_codes', full_name='pb.TimestampedPreferences.Preferences__.coin_swap_codes', index=3, + number=4, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='coin_swap_codes', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='editedCollections', full_name='pb.TimestampedPreferences.Preferences__.editedCollections', index=4, + number=5, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='following', full_name='pb.TimestampedPreferences.Preferences__.following', index=5, + number=6, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='settings', full_name='pb.TimestampedPreferences.Preferences__.settings', index=6, + number=7, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='sharing_3P', full_name='pb.TimestampedPreferences.Preferences__.sharing_3P', index=7, + number=8, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='sharing_3P', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='subscriptions', full_name='pb.TimestampedPreferences.Preferences__.subscriptions', index=8, + number=9, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='tags', full_name='pb.TimestampedPreferences.Preferences__.tags', index=9, + number=10, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='unpublishedCollections', full_name='pb.TimestampedPreferences.Preferences__.unpublishedCollections', index=10, + number=11, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[_TIMESTAMPEDPREFERENCES_PREFERENCES___COLLECTION, _TIMESTAMPEDPREFERENCES_PREFERENCES___BUILTINCOLLECTIONS, _TIMESTAMPEDPREFERENCES_PREFERENCES___FOLLOWING, _TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS, _TIMESTAMPEDPREFERENCES_PREFERENCES___EDITEDCOLLECTIONSENTRY, _TIMESTAMPEDPREFERENCES_PREFERENCES___UNPUBLISHEDCOLLECTIONSENTRY, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1175, + serialized_end=3442, +) + +_TIMESTAMPEDPREFERENCES = _descriptor.Descriptor( + name='TimestampedPreferences', + full_name='pb.TimestampedPreferences', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='enable_sync', full_name='pb.TimestampedPreferences.enable_sync', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, json_name='enable-sync', file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='local', full_name='pb.TimestampedPreferences.local', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='shared', full_name='pb.TimestampedPreferences.shared', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[_TIMESTAMPEDPREFERENCES_ENABLESYNC, _TIMESTAMPEDPREFERENCES_PREFERENCES, _TIMESTAMPEDPREFERENCES_PREFERENCES__, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=723, + serialized_end=3442, +) + +_WALLET.fields_by_name['accounts'].message_type = _ACCOUNT +_WALLET.fields_by_name['preferences'].message_type = _TIMESTAMPEDPREFERENCES +_ACCOUNT_ADDRESSGENERATOR_CHAIN.containing_type = _ACCOUNT_ADDRESSGENERATOR +_ACCOUNT_ADDRESSGENERATOR.fields_by_name['change'].message_type = _ACCOUNT_ADDRESSGENERATOR_CHAIN +_ACCOUNT_ADDRESSGENERATOR.fields_by_name['receiving'].message_type = _ACCOUNT_ADDRESSGENERATOR_CHAIN +_ACCOUNT_ADDRESSGENERATOR.containing_type = _ACCOUNT +_ACCOUNT_CERTIFICATESENTRY.containing_type = _ACCOUNT +_ACCOUNT.fields_by_name['address_generator'].message_type = _ACCOUNT_ADDRESSGENERATOR +_ACCOUNT.fields_by_name['certificates'].message_type = _ACCOUNT_CERTIFICATESENTRY +_TIMESTAMPEDPREFERENCES_ENABLESYNC.containing_type = _TIMESTAMPEDPREFERENCES +_TIMESTAMPEDPREFERENCES_PREFERENCES_PREFERENCES_.fields_by_name['value'].message_type = _TIMESTAMPEDPREFERENCES_PREFERENCES__ +_TIMESTAMPEDPREFERENCES_PREFERENCES_PREFERENCES_.containing_type = _TIMESTAMPEDPREFERENCES_PREFERENCES +_TIMESTAMPEDPREFERENCES_PREFERENCES.fields_by_name['value'].message_type = _TIMESTAMPEDPREFERENCES_PREFERENCES_PREFERENCES_ +_TIMESTAMPEDPREFERENCES_PREFERENCES.containing_type = _TIMESTAMPEDPREFERENCES +_TIMESTAMPEDPREFERENCES_PREFERENCES___COLLECTION.containing_type = _TIMESTAMPEDPREFERENCES_PREFERENCES__ +_TIMESTAMPEDPREFERENCES_PREFERENCES___BUILTINCOLLECTIONS.fields_by_name['favorites'].message_type = _TIMESTAMPEDPREFERENCES_PREFERENCES___COLLECTION +_TIMESTAMPEDPREFERENCES_PREFERENCES___BUILTINCOLLECTIONS.fields_by_name['watchlater'].message_type = _TIMESTAMPEDPREFERENCES_PREFERENCES___COLLECTION +_TIMESTAMPEDPREFERENCES_PREFERENCES___BUILTINCOLLECTIONS.containing_type = _TIMESTAMPEDPREFERENCES_PREFERENCES__ +_TIMESTAMPEDPREFERENCES_PREFERENCES___FOLLOWING.containing_type = _TIMESTAMPEDPREFERENCES_PREFERENCES__ +_TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS_TIME.containing_type = _TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS +_TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS_TIMERANGE.fields_by_name['from'].message_type = _TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS_TIME +_TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS_TIMERANGE.fields_by_name['to'].message_type = _TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS_TIME +_TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS_TIMERANGE.containing_type = _TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS +_TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS_CURRENCYAMOUNT.containing_type = _TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS +_TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS_DOMAINPORTPAIR.containing_type = _TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS +_TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS.fields_by_name['dark_mode_times'].message_type = _TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS_TIMERANGE +_TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS.fields_by_name['instant_purchase_max'].message_type = _TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS_CURRENCYAMOUNT +_TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS.fields_by_name['lbryum_servers'].message_type = _TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS_DOMAINPORTPAIR +_TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS.containing_type = _TIMESTAMPEDPREFERENCES_PREFERENCES__ +_TIMESTAMPEDPREFERENCES_PREFERENCES___EDITEDCOLLECTIONSENTRY.fields_by_name['value'].message_type = _TIMESTAMPEDPREFERENCES_PREFERENCES___COLLECTION +_TIMESTAMPEDPREFERENCES_PREFERENCES___EDITEDCOLLECTIONSENTRY.containing_type = _TIMESTAMPEDPREFERENCES_PREFERENCES__ +_TIMESTAMPEDPREFERENCES_PREFERENCES___UNPUBLISHEDCOLLECTIONSENTRY.fields_by_name['value'].message_type = _TIMESTAMPEDPREFERENCES_PREFERENCES___COLLECTION +_TIMESTAMPEDPREFERENCES_PREFERENCES___UNPUBLISHEDCOLLECTIONSENTRY.containing_type = _TIMESTAMPEDPREFERENCES_PREFERENCES__ +_TIMESTAMPEDPREFERENCES_PREFERENCES__.fields_by_name['builtinCollections'].message_type = _TIMESTAMPEDPREFERENCES_PREFERENCES___BUILTINCOLLECTIONS +_TIMESTAMPEDPREFERENCES_PREFERENCES__.fields_by_name['editedCollections'].message_type = _TIMESTAMPEDPREFERENCES_PREFERENCES___EDITEDCOLLECTIONSENTRY +_TIMESTAMPEDPREFERENCES_PREFERENCES__.fields_by_name['following'].message_type = _TIMESTAMPEDPREFERENCES_PREFERENCES___FOLLOWING +_TIMESTAMPEDPREFERENCES_PREFERENCES__.fields_by_name['settings'].message_type = _TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS +_TIMESTAMPEDPREFERENCES_PREFERENCES__.fields_by_name['unpublishedCollections'].message_type = _TIMESTAMPEDPREFERENCES_PREFERENCES___UNPUBLISHEDCOLLECTIONSENTRY +_TIMESTAMPEDPREFERENCES_PREFERENCES__.containing_type = _TIMESTAMPEDPREFERENCES +_TIMESTAMPEDPREFERENCES.fields_by_name['enable_sync'].message_type = _TIMESTAMPEDPREFERENCES_ENABLESYNC +_TIMESTAMPEDPREFERENCES.fields_by_name['local'].message_type = _TIMESTAMPEDPREFERENCES_PREFERENCES +_TIMESTAMPEDPREFERENCES.fields_by_name['shared'].message_type = _TIMESTAMPEDPREFERENCES_PREFERENCES +DESCRIPTOR.message_types_by_name['Wallet'] = _WALLET +DESCRIPTOR.message_types_by_name['Account'] = _ACCOUNT +DESCRIPTOR.message_types_by_name['TimestampedPreferences'] = _TIMESTAMPEDPREFERENCES +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +Wallet = _reflection.GeneratedProtocolMessageType('Wallet', (_message.Message,), dict( + DESCRIPTOR = _WALLET, + __module__ = 'wallet_pb2' + # @@protoc_insertion_point(class_scope:pb.Wallet) + )) +_sym_db.RegisterMessage(Wallet) + +Account = _reflection.GeneratedProtocolMessageType('Account', (_message.Message,), dict( + + AddressGenerator = _reflection.GeneratedProtocolMessageType('AddressGenerator', (_message.Message,), dict( + + Chain = _reflection.GeneratedProtocolMessageType('Chain', (_message.Message,), dict( + DESCRIPTOR = _ACCOUNT_ADDRESSGENERATOR_CHAIN, + __module__ = 'wallet_pb2' + # @@protoc_insertion_point(class_scope:pb.Account.AddressGenerator.Chain) + )) + , + DESCRIPTOR = _ACCOUNT_ADDRESSGENERATOR, + __module__ = 'wallet_pb2' + # @@protoc_insertion_point(class_scope:pb.Account.AddressGenerator) + )) + , + + CertificatesEntry = _reflection.GeneratedProtocolMessageType('CertificatesEntry', (_message.Message,), dict( + DESCRIPTOR = _ACCOUNT_CERTIFICATESENTRY, + __module__ = 'wallet_pb2' + # @@protoc_insertion_point(class_scope:pb.Account.CertificatesEntry) + )) + , + DESCRIPTOR = _ACCOUNT, + __module__ = 'wallet_pb2' + # @@protoc_insertion_point(class_scope:pb.Account) + )) +_sym_db.RegisterMessage(Account) +_sym_db.RegisterMessage(Account.AddressGenerator) +_sym_db.RegisterMessage(Account.AddressGenerator.Chain) +_sym_db.RegisterMessage(Account.CertificatesEntry) + +TimestampedPreferences = _reflection.GeneratedProtocolMessageType('TimestampedPreferences', (_message.Message,), dict( + + EnableSync = _reflection.GeneratedProtocolMessageType('EnableSync', (_message.Message,), dict( + DESCRIPTOR = _TIMESTAMPEDPREFERENCES_ENABLESYNC, + __module__ = 'wallet_pb2' + # @@protoc_insertion_point(class_scope:pb.TimestampedPreferences.EnableSync) + )) + , + + Preferences = _reflection.GeneratedProtocolMessageType('Preferences', (_message.Message,), dict( + + Preferences_ = _reflection.GeneratedProtocolMessageType('Preferences_', (_message.Message,), dict( + DESCRIPTOR = _TIMESTAMPEDPREFERENCES_PREFERENCES_PREFERENCES_, + __module__ = 'wallet_pb2' + # @@protoc_insertion_point(class_scope:pb.TimestampedPreferences.Preferences.Preferences_) + )) + , + DESCRIPTOR = _TIMESTAMPEDPREFERENCES_PREFERENCES, + __module__ = 'wallet_pb2' + # @@protoc_insertion_point(class_scope:pb.TimestampedPreferences.Preferences) + )) + , + + Preferences__ = _reflection.GeneratedProtocolMessageType('Preferences__', (_message.Message,), dict( + + Collection = _reflection.GeneratedProtocolMessageType('Collection', (_message.Message,), dict( + DESCRIPTOR = _TIMESTAMPEDPREFERENCES_PREFERENCES___COLLECTION, + __module__ = 'wallet_pb2' + # @@protoc_insertion_point(class_scope:pb.TimestampedPreferences.Preferences__.Collection) + )) + , + + BuiltInCollections = _reflection.GeneratedProtocolMessageType('BuiltInCollections', (_message.Message,), dict( + DESCRIPTOR = _TIMESTAMPEDPREFERENCES_PREFERENCES___BUILTINCOLLECTIONS, + __module__ = 'wallet_pb2' + # @@protoc_insertion_point(class_scope:pb.TimestampedPreferences.Preferences__.BuiltInCollections) + )) + , + + Following = _reflection.GeneratedProtocolMessageType('Following', (_message.Message,), dict( + DESCRIPTOR = _TIMESTAMPEDPREFERENCES_PREFERENCES___FOLLOWING, + __module__ = 'wallet_pb2' + # @@protoc_insertion_point(class_scope:pb.TimestampedPreferences.Preferences__.Following) + )) + , + + Settings = _reflection.GeneratedProtocolMessageType('Settings', (_message.Message,), dict( + + Time = _reflection.GeneratedProtocolMessageType('Time', (_message.Message,), dict( + DESCRIPTOR = _TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS_TIME, + __module__ = 'wallet_pb2' + # @@protoc_insertion_point(class_scope:pb.TimestampedPreferences.Preferences__.Settings.Time) + )) + , + + TimeRange = _reflection.GeneratedProtocolMessageType('TimeRange', (_message.Message,), dict( + DESCRIPTOR = _TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS_TIMERANGE, + __module__ = 'wallet_pb2' + # @@protoc_insertion_point(class_scope:pb.TimestampedPreferences.Preferences__.Settings.TimeRange) + )) + , + + CurrencyAmount = _reflection.GeneratedProtocolMessageType('CurrencyAmount', (_message.Message,), dict( + DESCRIPTOR = _TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS_CURRENCYAMOUNT, + __module__ = 'wallet_pb2' + # @@protoc_insertion_point(class_scope:pb.TimestampedPreferences.Preferences__.Settings.CurrencyAmount) + )) + , + + DomainPortPair = _reflection.GeneratedProtocolMessageType('DomainPortPair', (_message.Message,), dict( + DESCRIPTOR = _TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS_DOMAINPORTPAIR, + __module__ = 'wallet_pb2' + # @@protoc_insertion_point(class_scope:pb.TimestampedPreferences.Preferences__.Settings.DomainPortPair) + )) + , + DESCRIPTOR = _TIMESTAMPEDPREFERENCES_PREFERENCES___SETTINGS, + __module__ = 'wallet_pb2' + # @@protoc_insertion_point(class_scope:pb.TimestampedPreferences.Preferences__.Settings) + )) + , + + EditedCollectionsEntry = _reflection.GeneratedProtocolMessageType('EditedCollectionsEntry', (_message.Message,), dict( + DESCRIPTOR = _TIMESTAMPEDPREFERENCES_PREFERENCES___EDITEDCOLLECTIONSENTRY, + __module__ = 'wallet_pb2' + # @@protoc_insertion_point(class_scope:pb.TimestampedPreferences.Preferences__.EditedCollectionsEntry) + )) + , + + UnpublishedCollectionsEntry = _reflection.GeneratedProtocolMessageType('UnpublishedCollectionsEntry', (_message.Message,), dict( + DESCRIPTOR = _TIMESTAMPEDPREFERENCES_PREFERENCES___UNPUBLISHEDCOLLECTIONSENTRY, + __module__ = 'wallet_pb2' + # @@protoc_insertion_point(class_scope:pb.TimestampedPreferences.Preferences__.UnpublishedCollectionsEntry) + )) + , + DESCRIPTOR = _TIMESTAMPEDPREFERENCES_PREFERENCES__, + __module__ = 'wallet_pb2' + # @@protoc_insertion_point(class_scope:pb.TimestampedPreferences.Preferences__) + )) + , + DESCRIPTOR = _TIMESTAMPEDPREFERENCES, + __module__ = 'wallet_pb2' + # @@protoc_insertion_point(class_scope:pb.TimestampedPreferences) + )) +_sym_db.RegisterMessage(TimestampedPreferences) +_sym_db.RegisterMessage(TimestampedPreferences.EnableSync) +_sym_db.RegisterMessage(TimestampedPreferences.Preferences) +_sym_db.RegisterMessage(TimestampedPreferences.Preferences.Preferences_) +_sym_db.RegisterMessage(TimestampedPreferences.Preferences__) +_sym_db.RegisterMessage(TimestampedPreferences.Preferences__.Collection) +_sym_db.RegisterMessage(TimestampedPreferences.Preferences__.BuiltInCollections) +_sym_db.RegisterMessage(TimestampedPreferences.Preferences__.Following) +_sym_db.RegisterMessage(TimestampedPreferences.Preferences__.Settings) +_sym_db.RegisterMessage(TimestampedPreferences.Preferences__.Settings.Time) +_sym_db.RegisterMessage(TimestampedPreferences.Preferences__.Settings.TimeRange) +_sym_db.RegisterMessage(TimestampedPreferences.Preferences__.Settings.CurrencyAmount) +_sym_db.RegisterMessage(TimestampedPreferences.Preferences__.Settings.DomainPortPair) +_sym_db.RegisterMessage(TimestampedPreferences.Preferences__.EditedCollectionsEntry) +_sym_db.RegisterMessage(TimestampedPreferences.Preferences__.UnpublishedCollectionsEntry) + + +_ACCOUNT_CERTIFICATESENTRY._options = None +_TIMESTAMPEDPREFERENCES_PREFERENCES___EDITEDCOLLECTIONSENTRY._options = None +_TIMESTAMPEDPREFERENCES_PREFERENCES___UNPUBLISHEDCOLLECTIONSENTRY._options = None +# @@protoc_insertion_point(module_scope) diff --git a/v2/python/wallet_wrapper.py b/v2/python/wallet_wrapper.py new file mode 100644 index 0000000..20abd76 --- /dev/null +++ b/v2/python/wallet_wrapper.py @@ -0,0 +1,25 @@ +from google.protobuf.json_format import MessageToDict, ParseDict + +import json + +import wallet_pb2 + +def from_json(wallet_json, wallet_pb): + wallet_dict = json.loads(wallet_json) + settings = wallet_dict['preferences']['shared']['value']['value']['settings'] + settings['lbryum_servers'] = [ + {'domain': domain, 'port': port} + for [domain, port] + in settings['lbryum_servers'] + ] + return ParseDict(wallet_dict, wallet_pb) + +def to_json(wallet_pb, including_default_value_fields): + wallet_dict = MessageToDict(wallet_pb, including_default_value_fields=including_default_value_fields) + settings = wallet_dict['preferences']['shared']['value']['value']['settings'] + settings['lbryum_servers'] = [ + [domain_port_pair['domain'], domain_port_pair['port']] + for domain_port_pair + in settings['lbryum_servers'] + ] + return json.dumps(wallet_dict)