Merge lp:~codeforger/bitcoin-app/wallet_migration into lp:~dreamsorcerer/bitcoin-app/python

Proposed by Michael Rochester on 2015-09-19
Status: Merged
Merged at revision: 170
Proposed branch: lp:~codeforger/bitcoin-app/wallet_migration
Merge into: lp:~dreamsorcerer/bitcoin-app/python
Diff against target: 1424 lines (+1392/-0)
3 files modified
addressbook.py (+20/-0)
java_files.py (+102/-0)
java_wallet.py (+1270/-0)
To merge this branch: bzr merge lp:~codeforger/bitcoin-app/wallet_migration
Reviewer Review Type Date Requested Status
Sam Bull 2015-09-19 Pending
Review via email: mp+271736@code.launchpad.net

Description of the change

Added support for importing all old bitcoinj bitcoin addresses into the new pycoin BIP32 format.

Added support and integrated loading the old address book format and all labelled addresses.

Added support to remove the old data files to save space on the device.

To post a comment you must log in.
Michael Rochester (codeforger) wrote :

Reading the first commit message will let you know how to install the required extra dependencies this merge brings in.

162. By Michael Rochester on 2015-10-08

more python function names

163. By Michael Rochester on 2015-11-13

Fixed:
    Testnet code now targets correct testnet file location.

164. By Michael Rochester on 2015-11-13

Added:
 get_earliest_creation_timestamp(test_net=False):

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addressbook.py'
2--- addressbook.py 2015-05-23 18:22:40 +0000
3+++ addressbook.py 2015-11-13 14:15:17 +0000
4@@ -13,10 +13,13 @@
5 """
6
7 import json
8+import sys
9
10 from PyQt5.QtCore import (QAbstractListModel, QModelIndex,
11 pyqtSignal, pyqtSlot, pyqtProperty)
12
13+import java_files
14+
15 class Addressbook(QAbstractListModel):
16 filename = "addressbook"
17
18@@ -28,6 +31,23 @@
19 self._labels = self.persistence.get_global("labels")
20 self._labels = {} if self._labels is None else json.loads(self._labels)
21
22+ # Check for existence of legacy data and import.
23+ test_net = True if "--dev" in sys.argv else False
24+
25+ if java_files.address_book_exists(test_net):
26+ labeled, address_book = java_files.import_address_book(test_net)
27+ for address, label in labeled:
28+ self.set_address_label(address, label)
29+
30+ for address in address_book:
31+ if self.can_add_to_addressbook(label):
32+ self.add_to_addressbook(address)
33+
34+ # Perhaps consider a less destructive way of achieving the following
35+ #java_files.remove_address_book()
36+
37+ self.save()
38+
39 def save(self):
40 self.persistence.set_global("addressbook", json.dumps(self._addresses))
41 self.persistence.set_global("labels", json.dumps(self._labels))
42
43=== added file 'java_files.py'
44--- java_files.py 1970-01-01 00:00:00 +0000
45+++ java_files.py 2015-11-13 14:15:17 +0000
46@@ -0,0 +1,102 @@
47+"""
48+java_files creates a convenient way of accessing the data files for the old
49+Java driven wallet format.
50+
51+All functions can be passed test_net=True to make them target the file for the
52+old development branch, and return BIP32Nodes suitable for Test Net use.
53+"""
54+import sys, os
55+import hmac, hashlib
56+
57+import java_wallet
58+
59+from pycoin.key import BIP32Node, Key
60+from pycoin import encoding
61+
62+def find_file(extension, test_net=False):
63+ """
64+ Internal function to find the path to the file with the requested extension.
65+ Valid extensions are blockchain, addesses, and wallet.
66+ """
67+ prefix = "~/.local/share/org.sambull.bitcoin-app/ubc."
68+ if test_net:
69+ prefix = "~/.local/share/org.sambull.dev-bitcoin-app/ubc.testnet"
70+
71+ path = os.path.expanduser(prefix + extension)
72+
73+ if os.path.isfile(path):
74+ return path
75+ else:
76+ return None
77+
78+def open_wallet(path):
79+ """ Internal function to wrap the protobuf object loader """
80+ wallet = java_wallet.Wallet()
81+ with open(path, 'rb') as wallet_file:
82+ wallet.ParseFromString(wallet_file.read())
83+ return wallet
84+
85+def wallet_exists(test_net=False):
86+ """ Test if a wallet file exists at the expected location. """
87+ return not find_file("wallet", test_net) == None
88+
89+def import_wallet(test_net=False):
90+ """ Import the old wallets and convert them into pycoin.BIP32Nodes. """
91+ keys = []
92+ path = find_file("wallet", test_net)
93+ if path:
94+ wallet = open_wallet(path)
95+ for key in wallet.key:
96+ secret = encoding.from_bytes_32(key.secret_bytes)
97+
98+ chaincode = hmac.HMAC(key=b"Bitcoin seed", msg=key.secret_bytes,
99+ digestmod=hashlib.sha512).digest()[32:]
100+
101+ net_code = "XTN" if test_net else "BTC"
102+
103+ keys.append(BIP32Node.BIP32Node(net_code, chaincode,
104+ secret_exponent=secret))
105+ return keys
106+
107+def get_earliest_creation_timestamp(test_net=False):
108+ """ Return the creation timestamp of the oldest key in the Java wallet. """
109+ path = find_file("wallet", test_net)
110+ if path:
111+ wallet = open_wallet(path)
112+ return min([key.creation_timestamp for key in wallet.key])
113+ return 0
114+
115+def chain_exists(test_net=False):
116+ """ Test if a blockchain exists at the expected location. """
117+ return not find_file("blockchain", test_net) == None
118+
119+def remove_chain(test_net=False):
120+ """ Remove the old blockchain to save memory. """
121+ chain_path = find_file("blockchain", test_net)
122+ os.remove(chain_path)
123+
124+def address_book_exists(test_net=False):
125+ """ Test if an address book exists at the expected location. """
126+ return not find_file("addesses", test_net) == None
127+
128+def import_address_book(test_net=False):
129+ """ Return the old address book and labels for convenient loading. """
130+ addressbook = []
131+ in_address_book = []
132+ path = find_file("addesses", test_net)
133+ if path:
134+ with open(path) as book_file:
135+ while True:
136+ line = book_file.readline().strip()
137+ if not line:
138+ return addressbook, in_address_book
139+ if line == "true":
140+ line = book_file.readline().strip()
141+ in_address_book.append(line)
142+ line2 = book_file.readline().strip()
143+ addressbook.append((line, line2))
144+
145+def remove_address_book(test_net=False):
146+ """ Remove the old address book to save memory. """
147+ addresses_path = find_file("addesses", test_net)
148+ os.remove(addresses_path)
149\ No newline at end of file
150
151=== added file 'java_wallet.py'
152--- java_wallet.py 1970-01-01 00:00:00 +0000
153+++ java_wallet.py 2015-11-13 14:15:17 +0000
154@@ -0,0 +1,1270 @@
155+# Generated by the protocol buffer compiler. DO NOT EDIT!
156+# source: wallet.proto
157+
158+import sys
159+_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
160+from google.protobuf import descriptor as _descriptor
161+from google.protobuf import message as _message
162+from google.protobuf import reflection as _reflection
163+from google.protobuf import symbol_database as _symbol_database
164+from google.protobuf import descriptor_pb2
165+# @@protoc_insertion_point(imports)
166+
167+_sym_db = _symbol_database.Default()
168+
169+
170+
171+
172+DESCRIPTOR = _descriptor.FileDescriptor(
173+ name='wallet.proto',
174+ package='wallet',
175+ serialized_pb=_b('\n\x0cwallet.proto\x12\x06wallet\"A\n\x0bPeerAddress\x12\x12\n\nip_address\x18\x01 \x02(\x0c\x12\x0c\n\x04port\x18\x02 \x02(\r\x12\x10\n\x08services\x18\x03 \x02(\x04\"M\n\rEncryptedData\x12\x1d\n\x15initialisation_vector\x18\x01 \x02(\x0c\x12\x1d\n\x15\x65ncrypted_private_key\x18\x02 \x02(\x0c\"y\n\x10\x44\x65terministicKey\x12\x12\n\nchain_code\x18\x01 \x02(\x0c\x12\x0c\n\x04path\x18\x02 \x03(\r\x12\x16\n\x0eissued_subkeys\x18\x03 \x01(\r\x12\x16\n\x0elookahead_size\x18\x04 \x01(\r\x12\x13\n\x0bisFollowing\x18\x05 \x01(\x08\"\x9a\x03\n\x03Key\x12\x1e\n\x04type\x18\x01 \x02(\x0e\x32\x10.wallet.Key.Type\x12\x14\n\x0csecret_bytes\x18\x02 \x01(\x0c\x12-\n\x0e\x65ncrypted_data\x18\x06 \x01(\x0b\x32\x15.wallet.EncryptedData\x12\x12\n\npublic_key\x18\x03 \x01(\x0c\x12\r\n\x05label\x18\x04 \x01(\t\x12\x1a\n\x12\x63reation_timestamp\x18\x05 \x01(\x03\x12\x33\n\x11\x64\x65terministic_key\x18\x07 \x01(\x0b\x32\x18.wallet.DeterministicKey\x12\x1a\n\x12\x64\x65terministic_seed\x18\x08 \x01(\x0c\x12;\n\x1c\x65ncrypted_deterministic_seed\x18\t \x01(\x0b\x32\x15.wallet.EncryptedData\"a\n\x04Type\x12\x0c\n\x08ORIGINAL\x10\x01\x12\x18\n\x14\x45NCRYPTED_SCRYPT_AES\x10\x02\x12\x1a\n\x16\x44\x45TERMINISTIC_MNEMONIC\x10\x03\x12\x15\n\x11\x44\x45TERMINISTIC_KEY\x10\x04\"5\n\x06Script\x12\x0f\n\x07program\x18\x01 \x02(\x0c\x12\x1a\n\x12\x63reation_timestamp\x18\x02 \x02(\x03\"\x92\x01\n\x10TransactionInput\x12\"\n\x1atransaction_out_point_hash\x18\x01 \x02(\x0c\x12#\n\x1btransaction_out_point_index\x18\x02 \x02(\r\x12\x14\n\x0cscript_bytes\x18\x03 \x02(\x0c\x12\x10\n\x08sequence\x18\x04 \x01(\r\x12\r\n\x05value\x18\x05 \x01(\x03\"\x7f\n\x11TransactionOutput\x12\r\n\x05value\x18\x01 \x02(\x03\x12\x14\n\x0cscript_bytes\x18\x02 \x02(\x0c\x12!\n\x19spent_by_transaction_hash\x18\x03 \x01(\x0c\x12\"\n\x1aspent_by_transaction_index\x18\x04 \x01(\x05\"\x89\x03\n\x15TransactionConfidence\x12\x30\n\x04type\x18\x01 \x01(\x0e\x32\".wallet.TransactionConfidence.Type\x12\x1a\n\x12\x61ppeared_at_height\x18\x02 \x01(\x05\x12\x1e\n\x16overriding_transaction\x18\x03 \x01(\x0c\x12\r\n\x05\x64\x65pth\x18\x04 \x01(\x05\x12)\n\x0c\x62roadcast_by\x18\x06 \x03(\x0b\x32\x13.wallet.PeerAddress\x12\x34\n\x06source\x18\x07 \x01(\x0e\x32$.wallet.TransactionConfidence.Source\"O\n\x04Type\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0c\n\x08\x42UILDING\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x15\n\x11NOT_IN_BEST_CHAIN\x10\x03\x12\x08\n\x04\x44\x45\x41\x44\x10\x04\"A\n\x06Source\x12\x12\n\x0eSOURCE_UNKNOWN\x10\x00\x12\x12\n\x0eSOURCE_NETWORK\x10\x01\x12\x0f\n\x0bSOURCE_SELF\x10\x02\"\xb4\x05\n\x0bTransaction\x12\x0f\n\x07version\x18\x01 \x02(\x05\x12\x0c\n\x04hash\x18\x02 \x02(\x0c\x12&\n\x04pool\x18\x03 \x01(\x0e\x32\x18.wallet.Transaction.Pool\x12\x11\n\tlock_time\x18\x04 \x01(\r\x12\x12\n\nupdated_at\x18\x05 \x01(\x03\x12\x33\n\x11transaction_input\x18\x06 \x03(\x0b\x32\x18.wallet.TransactionInput\x12\x35\n\x12transaction_output\x18\x07 \x03(\x0b\x32\x19.wallet.TransactionOutput\x12\x12\n\nblock_hash\x18\x08 \x03(\x0c\x12 \n\x18\x62lock_relativity_offsets\x18\x0b \x03(\x05\x12\x31\n\nconfidence\x18\t \x01(\x0b\x32\x1d.wallet.TransactionConfidence\x12\x35\n\x07purpose\x18\n \x01(\x0e\x32\x1b.wallet.Transaction.Purpose:\x07UNKNOWN\x12+\n\rexchange_rate\x18\x0c \x01(\x0b\x32\x14.wallet.ExchangeRate\x12\x0c\n\x04memo\x18\r \x01(\t\"Y\n\x04Pool\x12\x0b\n\x07UNSPENT\x10\x04\x12\t\n\x05SPENT\x10\x05\x12\x0c\n\x08INACTIVE\x10\x02\x12\x08\n\x04\x44\x45\x41\x44\x10\n\x12\x0b\n\x07PENDING\x10\x10\x12\x14\n\x10PENDING_INACTIVE\x10\x12\"\x94\x01\n\x07Purpose\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x10\n\x0cUSER_PAYMENT\x10\x01\x12\x10\n\x0cKEY_ROTATION\x10\x02\x12\x1c\n\x18\x41SSURANCE_CONTRACT_CLAIM\x10\x03\x12\x1d\n\x19\x41SSURANCE_CONTRACT_PLEDGE\x10\x04\x12\x1b\n\x17\x41SSURANCE_CONTRACT_STUB\x10\x05\"N\n\x10ScryptParameters\x12\x0c\n\x04salt\x18\x01 \x02(\x0c\x12\x10\n\x01n\x18\x02 \x01(\x03:\x05\x31\x36\x33\x38\x34\x12\x0c\n\x01r\x18\x03 \x01(\x05:\x01\x38\x12\x0c\n\x01p\x18\x04 \x01(\x05:\x01\x31\"8\n\tExtension\x12\n\n\x02id\x18\x01 \x02(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x02(\x0c\x12\x11\n\tmandatory\x18\x03 \x02(\x08\" \n\x03Tag\x12\x0b\n\x03tag\x18\x01 \x02(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x02(\x0c\"5\n\x11TransactionSigner\x12\x12\n\nclass_name\x18\x01 \x02(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\"\x89\x05\n\x06Wallet\x12\x1a\n\x12network_identifier\x18\x01 \x02(\t\x12\x1c\n\x14last_seen_block_hash\x18\x02 \x01(\x0c\x12\x1e\n\x16last_seen_block_height\x18\x0c \x01(\r\x12!\n\x19last_seen_block_time_secs\x18\x0e \x01(\x03\x12\x18\n\x03key\x18\x03 \x03(\x0b\x32\x0b.wallet.Key\x12(\n\x0btransaction\x18\x04 \x03(\x0b\x32\x13.wallet.Transaction\x12&\n\x0ewatched_script\x18\x0f \x03(\x0b\x32\x0e.wallet.Script\x12\x43\n\x0f\x65ncryption_type\x18\x05 \x01(\x0e\x32\x1d.wallet.Wallet.EncryptionType:\x0bUNENCRYPTED\x12\x37\n\x15\x65ncryption_parameters\x18\x06 \x01(\x0b\x32\x18.wallet.ScryptParameters\x12\x12\n\x07version\x18\x07 \x01(\x05:\x01\x31\x12$\n\textension\x18\n \x03(\x0b\x32\x11.wallet.Extension\x12\x13\n\x0b\x64\x65scription\x18\x0b \x01(\t\x12\x19\n\x11key_rotation_time\x18\r \x01(\x04\x12\x19\n\x04tags\x18\x10 \x03(\x0b\x32\x0b.wallet.Tag\x12\x36\n\x13transaction_signers\x18\x11 \x03(\x0b\x32\x19.wallet.TransactionSigner\x12\x1e\n\x13sigsRequiredToSpend\x18\x12 \x01(\r:\x01\x31\";\n\x0e\x45ncryptionType\x12\x0f\n\x0bUNENCRYPTED\x10\x01\x12\x18\n\x14\x45NCRYPTED_SCRYPT_AES\x10\x02\"R\n\x0c\x45xchangeRate\x12\x12\n\ncoin_value\x18\x01 \x02(\x03\x12\x12\n\nfiat_value\x18\x02 \x02(\x03\x12\x1a\n\x12\x66iat_currency_code\x18\x03 \x02(\tB\x1d\n\x13org.bitcoinj.walletB\x06Protos')
176+)
177+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
178+
179+
180+
181+_KEY_TYPE = _descriptor.EnumDescriptor(
182+ name='Type',
183+ full_name='wallet.Key.Type',
184+ filename=None,
185+ file=DESCRIPTOR,
186+ values=[
187+ _descriptor.EnumValueDescriptor(
188+ name='ORIGINAL', index=0, number=1,
189+ options=None,
190+ type=None),
191+ _descriptor.EnumValueDescriptor(
192+ name='ENCRYPTED_SCRYPT_AES', index=1, number=2,
193+ options=None,
194+ type=None),
195+ _descriptor.EnumValueDescriptor(
196+ name='DETERMINISTIC_MNEMONIC', index=2, number=3,
197+ options=None,
198+ type=None),
199+ _descriptor.EnumValueDescriptor(
200+ name='DETERMINISTIC_KEY', index=3, number=4,
201+ options=None,
202+ type=None),
203+ ],
204+ containing_type=None,
205+ options=None,
206+ serialized_start=607,
207+ serialized_end=704,
208+)
209+_sym_db.RegisterEnumDescriptor(_KEY_TYPE)
210+
211+_TRANSACTIONCONFIDENCE_TYPE = _descriptor.EnumDescriptor(
212+ name='Type',
213+ full_name='wallet.TransactionConfidence.Type',
214+ filename=None,
215+ file=DESCRIPTOR,
216+ values=[
217+ _descriptor.EnumValueDescriptor(
218+ name='UNKNOWN', index=0, number=0,
219+ options=None,
220+ type=None),
221+ _descriptor.EnumValueDescriptor(
222+ name='BUILDING', index=1, number=1,
223+ options=None,
224+ type=None),
225+ _descriptor.EnumValueDescriptor(
226+ name='PENDING', index=2, number=2,
227+ options=None,
228+ type=None),
229+ _descriptor.EnumValueDescriptor(
230+ name='NOT_IN_BEST_CHAIN', index=3, number=3,
231+ options=None,
232+ type=None),
233+ _descriptor.EnumValueDescriptor(
234+ name='DEAD', index=4, number=4,
235+ options=None,
236+ type=None),
237+ ],
238+ containing_type=None,
239+ options=None,
240+ serialized_start=1287,
241+ serialized_end=1366,
242+)
243+_sym_db.RegisterEnumDescriptor(_TRANSACTIONCONFIDENCE_TYPE)
244+
245+_TRANSACTIONCONFIDENCE_SOURCE = _descriptor.EnumDescriptor(
246+ name='Source',
247+ full_name='wallet.TransactionConfidence.Source',
248+ filename=None,
249+ file=DESCRIPTOR,
250+ values=[
251+ _descriptor.EnumValueDescriptor(
252+ name='SOURCE_UNKNOWN', index=0, number=0,
253+ options=None,
254+ type=None),
255+ _descriptor.EnumValueDescriptor(
256+ name='SOURCE_NETWORK', index=1, number=1,
257+ options=None,
258+ type=None),
259+ _descriptor.EnumValueDescriptor(
260+ name='SOURCE_SELF', index=2, number=2,
261+ options=None,
262+ type=None),
263+ ],
264+ containing_type=None,
265+ options=None,
266+ serialized_start=1368,
267+ serialized_end=1433,
268+)
269+_sym_db.RegisterEnumDescriptor(_TRANSACTIONCONFIDENCE_SOURCE)
270+
271+_TRANSACTION_POOL = _descriptor.EnumDescriptor(
272+ name='Pool',
273+ full_name='wallet.Transaction.Pool',
274+ filename=None,
275+ file=DESCRIPTOR,
276+ values=[
277+ _descriptor.EnumValueDescriptor(
278+ name='UNSPENT', index=0, number=4,
279+ options=None,
280+ type=None),
281+ _descriptor.EnumValueDescriptor(
282+ name='SPENT', index=1, number=5,
283+ options=None,
284+ type=None),
285+ _descriptor.EnumValueDescriptor(
286+ name='INACTIVE', index=2, number=2,
287+ options=None,
288+ type=None),
289+ _descriptor.EnumValueDescriptor(
290+ name='DEAD', index=3, number=10,
291+ options=None,
292+ type=None),
293+ _descriptor.EnumValueDescriptor(
294+ name='PENDING', index=4, number=16,
295+ options=None,
296+ type=None),
297+ _descriptor.EnumValueDescriptor(
298+ name='PENDING_INACTIVE', index=5, number=18,
299+ options=None,
300+ type=None),
301+ ],
302+ containing_type=None,
303+ options=None,
304+ serialized_start=1888,
305+ serialized_end=1977,
306+)
307+_sym_db.RegisterEnumDescriptor(_TRANSACTION_POOL)
308+
309+_TRANSACTION_PURPOSE = _descriptor.EnumDescriptor(
310+ name='Purpose',
311+ full_name='wallet.Transaction.Purpose',
312+ filename=None,
313+ file=DESCRIPTOR,
314+ values=[
315+ _descriptor.EnumValueDescriptor(
316+ name='UNKNOWN', index=0, number=0,
317+ options=None,
318+ type=None),
319+ _descriptor.EnumValueDescriptor(
320+ name='USER_PAYMENT', index=1, number=1,
321+ options=None,
322+ type=None),
323+ _descriptor.EnumValueDescriptor(
324+ name='KEY_ROTATION', index=2, number=2,
325+ options=None,
326+ type=None),
327+ _descriptor.EnumValueDescriptor(
328+ name='ASSURANCE_CONTRACT_CLAIM', index=3, number=3,
329+ options=None,
330+ type=None),
331+ _descriptor.EnumValueDescriptor(
332+ name='ASSURANCE_CONTRACT_PLEDGE', index=4, number=4,
333+ options=None,
334+ type=None),
335+ _descriptor.EnumValueDescriptor(
336+ name='ASSURANCE_CONTRACT_STUB', index=5, number=5,
337+ options=None,
338+ type=None),
339+ ],
340+ containing_type=None,
341+ options=None,
342+ serialized_start=1980,
343+ serialized_end=2128,
344+)
345+_sym_db.RegisterEnumDescriptor(_TRANSACTION_PURPOSE)
346+
347+_WALLET_ENCRYPTIONTYPE = _descriptor.EnumDescriptor(
348+ name='EncryptionType',
349+ full_name='wallet.Wallet.EncryptionType',
350+ filename=None,
351+ file=DESCRIPTOR,
352+ values=[
353+ _descriptor.EnumValueDescriptor(
354+ name='UNENCRYPTED', index=0, number=1,
355+ options=None,
356+ type=None),
357+ _descriptor.EnumValueDescriptor(
358+ name='ENCRYPTED_SCRYPT_AES', index=1, number=2,
359+ options=None,
360+ type=None),
361+ ],
362+ containing_type=None,
363+ options=None,
364+ serialized_start=2948,
365+ serialized_end=3007,
366+)
367+_sym_db.RegisterEnumDescriptor(_WALLET_ENCRYPTIONTYPE)
368+
369+
370+_PEERADDRESS = _descriptor.Descriptor(
371+ name='PeerAddress',
372+ full_name='wallet.PeerAddress',
373+ filename=None,
374+ file=DESCRIPTOR,
375+ containing_type=None,
376+ fields=[
377+ _descriptor.FieldDescriptor(
378+ name='ip_address', full_name='wallet.PeerAddress.ip_address', index=0,
379+ number=1, type=12, cpp_type=9, label=2,
380+ has_default_value=False, default_value=_b(""),
381+ message_type=None, enum_type=None, containing_type=None,
382+ is_extension=False, extension_scope=None,
383+ options=None),
384+ _descriptor.FieldDescriptor(
385+ name='port', full_name='wallet.PeerAddress.port', index=1,
386+ number=2, type=13, cpp_type=3, label=2,
387+ has_default_value=False, default_value=0,
388+ message_type=None, enum_type=None, containing_type=None,
389+ is_extension=False, extension_scope=None,
390+ options=None),
391+ _descriptor.FieldDescriptor(
392+ name='services', full_name='wallet.PeerAddress.services', index=2,
393+ number=3, type=4, cpp_type=4, label=2,
394+ has_default_value=False, default_value=0,
395+ message_type=None, enum_type=None, containing_type=None,
396+ is_extension=False, extension_scope=None,
397+ options=None),
398+ ],
399+ extensions=[
400+ ],
401+ nested_types=[],
402+ enum_types=[
403+ ],
404+ options=None,
405+ is_extendable=False,
406+ extension_ranges=[],
407+ oneofs=[
408+ ],
409+ serialized_start=24,
410+ serialized_end=89,
411+)
412+
413+
414+_ENCRYPTEDDATA = _descriptor.Descriptor(
415+ name='EncryptedData',
416+ full_name='wallet.EncryptedData',
417+ filename=None,
418+ file=DESCRIPTOR,
419+ containing_type=None,
420+ fields=[
421+ _descriptor.FieldDescriptor(
422+ name='initialisation_vector', full_name='wallet.EncryptedData.initialisation_vector', index=0,
423+ number=1, type=12, cpp_type=9, label=2,
424+ has_default_value=False, default_value=_b(""),
425+ message_type=None, enum_type=None, containing_type=None,
426+ is_extension=False, extension_scope=None,
427+ options=None),
428+ _descriptor.FieldDescriptor(
429+ name='encrypted_private_key', full_name='wallet.EncryptedData.encrypted_private_key', index=1,
430+ number=2, type=12, cpp_type=9, label=2,
431+ has_default_value=False, default_value=_b(""),
432+ message_type=None, enum_type=None, containing_type=None,
433+ is_extension=False, extension_scope=None,
434+ options=None),
435+ ],
436+ extensions=[
437+ ],
438+ nested_types=[],
439+ enum_types=[
440+ ],
441+ options=None,
442+ is_extendable=False,
443+ extension_ranges=[],
444+ oneofs=[
445+ ],
446+ serialized_start=91,
447+ serialized_end=168,
448+)
449+
450+
451+_DETERMINISTICKEY = _descriptor.Descriptor(
452+ name='DeterministicKey',
453+ full_name='wallet.DeterministicKey',
454+ filename=None,
455+ file=DESCRIPTOR,
456+ containing_type=None,
457+ fields=[
458+ _descriptor.FieldDescriptor(
459+ name='chain_code', full_name='wallet.DeterministicKey.chain_code', index=0,
460+ number=1, type=12, cpp_type=9, label=2,
461+ has_default_value=False, default_value=_b(""),
462+ message_type=None, enum_type=None, containing_type=None,
463+ is_extension=False, extension_scope=None,
464+ options=None),
465+ _descriptor.FieldDescriptor(
466+ name='path', full_name='wallet.DeterministicKey.path', index=1,
467+ number=2, type=13, cpp_type=3, label=3,
468+ has_default_value=False, default_value=[],
469+ message_type=None, enum_type=None, containing_type=None,
470+ is_extension=False, extension_scope=None,
471+ options=None),
472+ _descriptor.FieldDescriptor(
473+ name='issued_subkeys', full_name='wallet.DeterministicKey.issued_subkeys', index=2,
474+ number=3, type=13, cpp_type=3, label=1,
475+ has_default_value=False, default_value=0,
476+ message_type=None, enum_type=None, containing_type=None,
477+ is_extension=False, extension_scope=None,
478+ options=None),
479+ _descriptor.FieldDescriptor(
480+ name='lookahead_size', full_name='wallet.DeterministicKey.lookahead_size', index=3,
481+ number=4, type=13, cpp_type=3, label=1,
482+ has_default_value=False, default_value=0,
483+ message_type=None, enum_type=None, containing_type=None,
484+ is_extension=False, extension_scope=None,
485+ options=None),
486+ _descriptor.FieldDescriptor(
487+ name='isFollowing', full_name='wallet.DeterministicKey.isFollowing', index=4,
488+ number=5, type=8, cpp_type=7, label=1,
489+ has_default_value=False, default_value=False,
490+ message_type=None, enum_type=None, containing_type=None,
491+ is_extension=False, extension_scope=None,
492+ options=None),
493+ ],
494+ extensions=[
495+ ],
496+ nested_types=[],
497+ enum_types=[
498+ ],
499+ options=None,
500+ is_extendable=False,
501+ extension_ranges=[],
502+ oneofs=[
503+ ],
504+ serialized_start=170,
505+ serialized_end=291,
506+)
507+
508+
509+_KEY = _descriptor.Descriptor(
510+ name='Key',
511+ full_name='wallet.Key',
512+ filename=None,
513+ file=DESCRIPTOR,
514+ containing_type=None,
515+ fields=[
516+ _descriptor.FieldDescriptor(
517+ name='type', full_name='wallet.Key.type', index=0,
518+ number=1, type=14, cpp_type=8, label=2,
519+ has_default_value=False, default_value=1,
520+ message_type=None, enum_type=None, containing_type=None,
521+ is_extension=False, extension_scope=None,
522+ options=None),
523+ _descriptor.FieldDescriptor(
524+ name='secret_bytes', full_name='wallet.Key.secret_bytes', index=1,
525+ number=2, type=12, cpp_type=9, label=1,
526+ has_default_value=False, default_value=_b(""),
527+ message_type=None, enum_type=None, containing_type=None,
528+ is_extension=False, extension_scope=None,
529+ options=None),
530+ _descriptor.FieldDescriptor(
531+ name='encrypted_data', full_name='wallet.Key.encrypted_data', index=2,
532+ number=6, type=11, cpp_type=10, label=1,
533+ has_default_value=False, default_value=None,
534+ message_type=None, enum_type=None, containing_type=None,
535+ is_extension=False, extension_scope=None,
536+ options=None),
537+ _descriptor.FieldDescriptor(
538+ name='public_key', full_name='wallet.Key.public_key', index=3,
539+ number=3, type=12, cpp_type=9, label=1,
540+ has_default_value=False, default_value=_b(""),
541+ message_type=None, enum_type=None, containing_type=None,
542+ is_extension=False, extension_scope=None,
543+ options=None),
544+ _descriptor.FieldDescriptor(
545+ name='label', full_name='wallet.Key.label', index=4,
546+ number=4, type=9, cpp_type=9, label=1,
547+ has_default_value=False, default_value=_b("").decode('utf-8'),
548+ message_type=None, enum_type=None, containing_type=None,
549+ is_extension=False, extension_scope=None,
550+ options=None),
551+ _descriptor.FieldDescriptor(
552+ name='creation_timestamp', full_name='wallet.Key.creation_timestamp', index=5,
553+ number=5, type=3, cpp_type=2, label=1,
554+ has_default_value=False, default_value=0,
555+ message_type=None, enum_type=None, containing_type=None,
556+ is_extension=False, extension_scope=None,
557+ options=None),
558+ _descriptor.FieldDescriptor(
559+ name='deterministic_key', full_name='wallet.Key.deterministic_key', index=6,
560+ number=7, type=11, cpp_type=10, label=1,
561+ has_default_value=False, default_value=None,
562+ message_type=None, enum_type=None, containing_type=None,
563+ is_extension=False, extension_scope=None,
564+ options=None),
565+ _descriptor.FieldDescriptor(
566+ name='deterministic_seed', full_name='wallet.Key.deterministic_seed', index=7,
567+ number=8, type=12, cpp_type=9, label=1,
568+ has_default_value=False, default_value=_b(""),
569+ message_type=None, enum_type=None, containing_type=None,
570+ is_extension=False, extension_scope=None,
571+ options=None),
572+ _descriptor.FieldDescriptor(
573+ name='encrypted_deterministic_seed', full_name='wallet.Key.encrypted_deterministic_seed', index=8,
574+ number=9, type=11, cpp_type=10, label=1,
575+ has_default_value=False, default_value=None,
576+ message_type=None, enum_type=None, containing_type=None,
577+ is_extension=False, extension_scope=None,
578+ options=None),
579+ ],
580+ extensions=[
581+ ],
582+ nested_types=[],
583+ enum_types=[
584+ _KEY_TYPE,
585+ ],
586+ options=None,
587+ is_extendable=False,
588+ extension_ranges=[],
589+ oneofs=[
590+ ],
591+ serialized_start=294,
592+ serialized_end=704,
593+)
594+
595+
596+_SCRIPT = _descriptor.Descriptor(
597+ name='Script',
598+ full_name='wallet.Script',
599+ filename=None,
600+ file=DESCRIPTOR,
601+ containing_type=None,
602+ fields=[
603+ _descriptor.FieldDescriptor(
604+ name='program', full_name='wallet.Script.program', index=0,
605+ number=1, type=12, cpp_type=9, label=2,
606+ has_default_value=False, default_value=_b(""),
607+ message_type=None, enum_type=None, containing_type=None,
608+ is_extension=False, extension_scope=None,
609+ options=None),
610+ _descriptor.FieldDescriptor(
611+ name='creation_timestamp', full_name='wallet.Script.creation_timestamp', index=1,
612+ number=2, type=3, cpp_type=2, label=2,
613+ has_default_value=False, default_value=0,
614+ message_type=None, enum_type=None, containing_type=None,
615+ is_extension=False, extension_scope=None,
616+ options=None),
617+ ],
618+ extensions=[
619+ ],
620+ nested_types=[],
621+ enum_types=[
622+ ],
623+ options=None,
624+ is_extendable=False,
625+ extension_ranges=[],
626+ oneofs=[
627+ ],
628+ serialized_start=706,
629+ serialized_end=759,
630+)
631+
632+
633+_TRANSACTIONINPUT = _descriptor.Descriptor(
634+ name='TransactionInput',
635+ full_name='wallet.TransactionInput',
636+ filename=None,
637+ file=DESCRIPTOR,
638+ containing_type=None,
639+ fields=[
640+ _descriptor.FieldDescriptor(
641+ name='transaction_out_point_hash', full_name='wallet.TransactionInput.transaction_out_point_hash', index=0,
642+ number=1, type=12, cpp_type=9, label=2,
643+ has_default_value=False, default_value=_b(""),
644+ message_type=None, enum_type=None, containing_type=None,
645+ is_extension=False, extension_scope=None,
646+ options=None),
647+ _descriptor.FieldDescriptor(
648+ name='transaction_out_point_index', full_name='wallet.TransactionInput.transaction_out_point_index', index=1,
649+ number=2, type=13, cpp_type=3, label=2,
650+ has_default_value=False, default_value=0,
651+ message_type=None, enum_type=None, containing_type=None,
652+ is_extension=False, extension_scope=None,
653+ options=None),
654+ _descriptor.FieldDescriptor(
655+ name='script_bytes', full_name='wallet.TransactionInput.script_bytes', index=2,
656+ number=3, type=12, cpp_type=9, label=2,
657+ has_default_value=False, default_value=_b(""),
658+ message_type=None, enum_type=None, containing_type=None,
659+ is_extension=False, extension_scope=None,
660+ options=None),
661+ _descriptor.FieldDescriptor(
662+ name='sequence', full_name='wallet.TransactionInput.sequence', index=3,
663+ number=4, type=13, cpp_type=3, label=1,
664+ has_default_value=False, default_value=0,
665+ message_type=None, enum_type=None, containing_type=None,
666+ is_extension=False, extension_scope=None,
667+ options=None),
668+ _descriptor.FieldDescriptor(
669+ name='value', full_name='wallet.TransactionInput.value', index=4,
670+ number=5, type=3, cpp_type=2, label=1,
671+ has_default_value=False, default_value=0,
672+ message_type=None, enum_type=None, containing_type=None,
673+ is_extension=False, extension_scope=None,
674+ options=None),
675+ ],
676+ extensions=[
677+ ],
678+ nested_types=[],
679+ enum_types=[
680+ ],
681+ options=None,
682+ is_extendable=False,
683+ extension_ranges=[],
684+ oneofs=[
685+ ],
686+ serialized_start=762,
687+ serialized_end=908,
688+)
689+
690+
691+_TRANSACTIONOUTPUT = _descriptor.Descriptor(
692+ name='TransactionOutput',
693+ full_name='wallet.TransactionOutput',
694+ filename=None,
695+ file=DESCRIPTOR,
696+ containing_type=None,
697+ fields=[
698+ _descriptor.FieldDescriptor(
699+ name='value', full_name='wallet.TransactionOutput.value', index=0,
700+ number=1, type=3, cpp_type=2, label=2,
701+ has_default_value=False, default_value=0,
702+ message_type=None, enum_type=None, containing_type=None,
703+ is_extension=False, extension_scope=None,
704+ options=None),
705+ _descriptor.FieldDescriptor(
706+ name='script_bytes', full_name='wallet.TransactionOutput.script_bytes', index=1,
707+ number=2, type=12, cpp_type=9, label=2,
708+ has_default_value=False, default_value=_b(""),
709+ message_type=None, enum_type=None, containing_type=None,
710+ is_extension=False, extension_scope=None,
711+ options=None),
712+ _descriptor.FieldDescriptor(
713+ name='spent_by_transaction_hash', full_name='wallet.TransactionOutput.spent_by_transaction_hash', index=2,
714+ number=3, type=12, cpp_type=9, label=1,
715+ has_default_value=False, default_value=_b(""),
716+ message_type=None, enum_type=None, containing_type=None,
717+ is_extension=False, extension_scope=None,
718+ options=None),
719+ _descriptor.FieldDescriptor(
720+ name='spent_by_transaction_index', full_name='wallet.TransactionOutput.spent_by_transaction_index', index=3,
721+ number=4, type=5, cpp_type=1, label=1,
722+ has_default_value=False, default_value=0,
723+ message_type=None, enum_type=None, containing_type=None,
724+ is_extension=False, extension_scope=None,
725+ options=None),
726+ ],
727+ extensions=[
728+ ],
729+ nested_types=[],
730+ enum_types=[
731+ ],
732+ options=None,
733+ is_extendable=False,
734+ extension_ranges=[],
735+ oneofs=[
736+ ],
737+ serialized_start=910,
738+ serialized_end=1037,
739+)
740+
741+
742+_TRANSACTIONCONFIDENCE = _descriptor.Descriptor(
743+ name='TransactionConfidence',
744+ full_name='wallet.TransactionConfidence',
745+ filename=None,
746+ file=DESCRIPTOR,
747+ containing_type=None,
748+ fields=[
749+ _descriptor.FieldDescriptor(
750+ name='type', full_name='wallet.TransactionConfidence.type', index=0,
751+ number=1, type=14, cpp_type=8, label=1,
752+ has_default_value=False, default_value=0,
753+ message_type=None, enum_type=None, containing_type=None,
754+ is_extension=False, extension_scope=None,
755+ options=None),
756+ _descriptor.FieldDescriptor(
757+ name='appeared_at_height', full_name='wallet.TransactionConfidence.appeared_at_height', index=1,
758+ number=2, type=5, cpp_type=1, label=1,
759+ has_default_value=False, default_value=0,
760+ message_type=None, enum_type=None, containing_type=None,
761+ is_extension=False, extension_scope=None,
762+ options=None),
763+ _descriptor.FieldDescriptor(
764+ name='overriding_transaction', full_name='wallet.TransactionConfidence.overriding_transaction', index=2,
765+ number=3, type=12, cpp_type=9, label=1,
766+ has_default_value=False, default_value=_b(""),
767+ message_type=None, enum_type=None, containing_type=None,
768+ is_extension=False, extension_scope=None,
769+ options=None),
770+ _descriptor.FieldDescriptor(
771+ name='depth', full_name='wallet.TransactionConfidence.depth', index=3,
772+ number=4, type=5, cpp_type=1, label=1,
773+ has_default_value=False, default_value=0,
774+ message_type=None, enum_type=None, containing_type=None,
775+ is_extension=False, extension_scope=None,
776+ options=None),
777+ _descriptor.FieldDescriptor(
778+ name='broadcast_by', full_name='wallet.TransactionConfidence.broadcast_by', index=4,
779+ number=6, type=11, cpp_type=10, label=3,
780+ has_default_value=False, default_value=[],
781+ message_type=None, enum_type=None, containing_type=None,
782+ is_extension=False, extension_scope=None,
783+ options=None),
784+ _descriptor.FieldDescriptor(
785+ name='source', full_name='wallet.TransactionConfidence.source', index=5,
786+ number=7, type=14, cpp_type=8, label=1,
787+ has_default_value=False, default_value=0,
788+ message_type=None, enum_type=None, containing_type=None,
789+ is_extension=False, extension_scope=None,
790+ options=None),
791+ ],
792+ extensions=[
793+ ],
794+ nested_types=[],
795+ enum_types=[
796+ _TRANSACTIONCONFIDENCE_TYPE,
797+ _TRANSACTIONCONFIDENCE_SOURCE,
798+ ],
799+ options=None,
800+ is_extendable=False,
801+ extension_ranges=[],
802+ oneofs=[
803+ ],
804+ serialized_start=1040,
805+ serialized_end=1433,
806+)
807+
808+
809+_TRANSACTION = _descriptor.Descriptor(
810+ name='Transaction',
811+ full_name='wallet.Transaction',
812+ filename=None,
813+ file=DESCRIPTOR,
814+ containing_type=None,
815+ fields=[
816+ _descriptor.FieldDescriptor(
817+ name='version', full_name='wallet.Transaction.version', index=0,
818+ number=1, type=5, cpp_type=1, label=2,
819+ has_default_value=False, default_value=0,
820+ message_type=None, enum_type=None, containing_type=None,
821+ is_extension=False, extension_scope=None,
822+ options=None),
823+ _descriptor.FieldDescriptor(
824+ name='hash', full_name='wallet.Transaction.hash', index=1,
825+ number=2, type=12, cpp_type=9, label=2,
826+ has_default_value=False, default_value=_b(""),
827+ message_type=None, enum_type=None, containing_type=None,
828+ is_extension=False, extension_scope=None,
829+ options=None),
830+ _descriptor.FieldDescriptor(
831+ name='pool', full_name='wallet.Transaction.pool', index=2,
832+ number=3, type=14, cpp_type=8, label=1,
833+ has_default_value=False, default_value=4,
834+ message_type=None, enum_type=None, containing_type=None,
835+ is_extension=False, extension_scope=None,
836+ options=None),
837+ _descriptor.FieldDescriptor(
838+ name='lock_time', full_name='wallet.Transaction.lock_time', index=3,
839+ number=4, type=13, cpp_type=3, label=1,
840+ has_default_value=False, default_value=0,
841+ message_type=None, enum_type=None, containing_type=None,
842+ is_extension=False, extension_scope=None,
843+ options=None),
844+ _descriptor.FieldDescriptor(
845+ name='updated_at', full_name='wallet.Transaction.updated_at', index=4,
846+ number=5, type=3, cpp_type=2, label=1,
847+ has_default_value=False, default_value=0,
848+ message_type=None, enum_type=None, containing_type=None,
849+ is_extension=False, extension_scope=None,
850+ options=None),
851+ _descriptor.FieldDescriptor(
852+ name='transaction_input', full_name='wallet.Transaction.transaction_input', index=5,
853+ number=6, type=11, cpp_type=10, label=3,
854+ has_default_value=False, default_value=[],
855+ message_type=None, enum_type=None, containing_type=None,
856+ is_extension=False, extension_scope=None,
857+ options=None),
858+ _descriptor.FieldDescriptor(
859+ name='transaction_output', full_name='wallet.Transaction.transaction_output', index=6,
860+ number=7, type=11, cpp_type=10, label=3,
861+ has_default_value=False, default_value=[],
862+ message_type=None, enum_type=None, containing_type=None,
863+ is_extension=False, extension_scope=None,
864+ options=None),
865+ _descriptor.FieldDescriptor(
866+ name='block_hash', full_name='wallet.Transaction.block_hash', index=7,
867+ number=8, type=12, cpp_type=9, label=3,
868+ has_default_value=False, default_value=[],
869+ message_type=None, enum_type=None, containing_type=None,
870+ is_extension=False, extension_scope=None,
871+ options=None),
872+ _descriptor.FieldDescriptor(
873+ name='block_relativity_offsets', full_name='wallet.Transaction.block_relativity_offsets', index=8,
874+ number=11, type=5, cpp_type=1, label=3,
875+ has_default_value=False, default_value=[],
876+ message_type=None, enum_type=None, containing_type=None,
877+ is_extension=False, extension_scope=None,
878+ options=None),
879+ _descriptor.FieldDescriptor(
880+ name='confidence', full_name='wallet.Transaction.confidence', index=9,
881+ number=9, type=11, cpp_type=10, label=1,
882+ has_default_value=False, default_value=None,
883+ message_type=None, enum_type=None, containing_type=None,
884+ is_extension=False, extension_scope=None,
885+ options=None),
886+ _descriptor.FieldDescriptor(
887+ name='purpose', full_name='wallet.Transaction.purpose', index=10,
888+ number=10, type=14, cpp_type=8, label=1,
889+ has_default_value=True, default_value=0,
890+ message_type=None, enum_type=None, containing_type=None,
891+ is_extension=False, extension_scope=None,
892+ options=None),
893+ _descriptor.FieldDescriptor(
894+ name='exchange_rate', full_name='wallet.Transaction.exchange_rate', index=11,
895+ number=12, type=11, cpp_type=10, label=1,
896+ has_default_value=False, default_value=None,
897+ message_type=None, enum_type=None, containing_type=None,
898+ is_extension=False, extension_scope=None,
899+ options=None),
900+ _descriptor.FieldDescriptor(
901+ name='memo', full_name='wallet.Transaction.memo', index=12,
902+ number=13, type=9, cpp_type=9, label=1,
903+ has_default_value=False, default_value=_b("").decode('utf-8'),
904+ message_type=None, enum_type=None, containing_type=None,
905+ is_extension=False, extension_scope=None,
906+ options=None),
907+ ],
908+ extensions=[
909+ ],
910+ nested_types=[],
911+ enum_types=[
912+ _TRANSACTION_POOL,
913+ _TRANSACTION_PURPOSE,
914+ ],
915+ options=None,
916+ is_extendable=False,
917+ extension_ranges=[],
918+ oneofs=[
919+ ],
920+ serialized_start=1436,
921+ serialized_end=2128,
922+)
923+
924+
925+_SCRYPTPARAMETERS = _descriptor.Descriptor(
926+ name='ScryptParameters',
927+ full_name='wallet.ScryptParameters',
928+ filename=None,
929+ file=DESCRIPTOR,
930+ containing_type=None,
931+ fields=[
932+ _descriptor.FieldDescriptor(
933+ name='salt', full_name='wallet.ScryptParameters.salt', index=0,
934+ number=1, type=12, cpp_type=9, label=2,
935+ has_default_value=False, default_value=_b(""),
936+ message_type=None, enum_type=None, containing_type=None,
937+ is_extension=False, extension_scope=None,
938+ options=None),
939+ _descriptor.FieldDescriptor(
940+ name='n', full_name='wallet.ScryptParameters.n', index=1,
941+ number=2, type=3, cpp_type=2, label=1,
942+ has_default_value=True, default_value=16384,
943+ message_type=None, enum_type=None, containing_type=None,
944+ is_extension=False, extension_scope=None,
945+ options=None),
946+ _descriptor.FieldDescriptor(
947+ name='r', full_name='wallet.ScryptParameters.r', index=2,
948+ number=3, type=5, cpp_type=1, label=1,
949+ has_default_value=True, default_value=8,
950+ message_type=None, enum_type=None, containing_type=None,
951+ is_extension=False, extension_scope=None,
952+ options=None),
953+ _descriptor.FieldDescriptor(
954+ name='p', full_name='wallet.ScryptParameters.p', index=3,
955+ number=4, type=5, cpp_type=1, label=1,
956+ has_default_value=True, default_value=1,
957+ message_type=None, enum_type=None, containing_type=None,
958+ is_extension=False, extension_scope=None,
959+ options=None),
960+ ],
961+ extensions=[
962+ ],
963+ nested_types=[],
964+ enum_types=[
965+ ],
966+ options=None,
967+ is_extendable=False,
968+ extension_ranges=[],
969+ oneofs=[
970+ ],
971+ serialized_start=2130,
972+ serialized_end=2208,
973+)
974+
975+
976+_EXTENSION = _descriptor.Descriptor(
977+ name='Extension',
978+ full_name='wallet.Extension',
979+ filename=None,
980+ file=DESCRIPTOR,
981+ containing_type=None,
982+ fields=[
983+ _descriptor.FieldDescriptor(
984+ name='id', full_name='wallet.Extension.id', index=0,
985+ number=1, type=9, cpp_type=9, label=2,
986+ has_default_value=False, default_value=_b("").decode('utf-8'),
987+ message_type=None, enum_type=None, containing_type=None,
988+ is_extension=False, extension_scope=None,
989+ options=None),
990+ _descriptor.FieldDescriptor(
991+ name='data', full_name='wallet.Extension.data', index=1,
992+ number=2, type=12, cpp_type=9, label=2,
993+ has_default_value=False, default_value=_b(""),
994+ message_type=None, enum_type=None, containing_type=None,
995+ is_extension=False, extension_scope=None,
996+ options=None),
997+ _descriptor.FieldDescriptor(
998+ name='mandatory', full_name='wallet.Extension.mandatory', index=2,
999+ number=3, type=8, cpp_type=7, label=2,
1000+ has_default_value=False, default_value=False,
1001+ message_type=None, enum_type=None, containing_type=None,
1002+ is_extension=False, extension_scope=None,
1003+ options=None),
1004+ ],
1005+ extensions=[
1006+ ],
1007+ nested_types=[],
1008+ enum_types=[
1009+ ],
1010+ options=None,
1011+ is_extendable=False,
1012+ extension_ranges=[],
1013+ oneofs=[
1014+ ],
1015+ serialized_start=2210,
1016+ serialized_end=2266,
1017+)
1018+
1019+
1020+_TAG = _descriptor.Descriptor(
1021+ name='Tag',
1022+ full_name='wallet.Tag',
1023+ filename=None,
1024+ file=DESCRIPTOR,
1025+ containing_type=None,
1026+ fields=[
1027+ _descriptor.FieldDescriptor(
1028+ name='tag', full_name='wallet.Tag.tag', index=0,
1029+ number=1, type=9, cpp_type=9, label=2,
1030+ has_default_value=False, default_value=_b("").decode('utf-8'),
1031+ message_type=None, enum_type=None, containing_type=None,
1032+ is_extension=False, extension_scope=None,
1033+ options=None),
1034+ _descriptor.FieldDescriptor(
1035+ name='data', full_name='wallet.Tag.data', index=1,
1036+ number=2, type=12, cpp_type=9, label=2,
1037+ has_default_value=False, default_value=_b(""),
1038+ message_type=None, enum_type=None, containing_type=None,
1039+ is_extension=False, extension_scope=None,
1040+ options=None),
1041+ ],
1042+ extensions=[
1043+ ],
1044+ nested_types=[],
1045+ enum_types=[
1046+ ],
1047+ options=None,
1048+ is_extendable=False,
1049+ extension_ranges=[],
1050+ oneofs=[
1051+ ],
1052+ serialized_start=2268,
1053+ serialized_end=2300,
1054+)
1055+
1056+
1057+_TRANSACTIONSIGNER = _descriptor.Descriptor(
1058+ name='TransactionSigner',
1059+ full_name='wallet.TransactionSigner',
1060+ filename=None,
1061+ file=DESCRIPTOR,
1062+ containing_type=None,
1063+ fields=[
1064+ _descriptor.FieldDescriptor(
1065+ name='class_name', full_name='wallet.TransactionSigner.class_name', index=0,
1066+ number=1, type=9, cpp_type=9, label=2,
1067+ has_default_value=False, default_value=_b("").decode('utf-8'),
1068+ message_type=None, enum_type=None, containing_type=None,
1069+ is_extension=False, extension_scope=None,
1070+ options=None),
1071+ _descriptor.FieldDescriptor(
1072+ name='data', full_name='wallet.TransactionSigner.data', index=1,
1073+ number=2, type=12, cpp_type=9, label=1,
1074+ has_default_value=False, default_value=_b(""),
1075+ message_type=None, enum_type=None, containing_type=None,
1076+ is_extension=False, extension_scope=None,
1077+ options=None),
1078+ ],
1079+ extensions=[
1080+ ],
1081+ nested_types=[],
1082+ enum_types=[
1083+ ],
1084+ options=None,
1085+ is_extendable=False,
1086+ extension_ranges=[],
1087+ oneofs=[
1088+ ],
1089+ serialized_start=2302,
1090+ serialized_end=2355,
1091+)
1092+
1093+
1094+_WALLET = _descriptor.Descriptor(
1095+ name='Wallet',
1096+ full_name='wallet.Wallet',
1097+ filename=None,
1098+ file=DESCRIPTOR,
1099+ containing_type=None,
1100+ fields=[
1101+ _descriptor.FieldDescriptor(
1102+ name='network_identifier', full_name='wallet.Wallet.network_identifier', index=0,
1103+ number=1, type=9, cpp_type=9, label=2,
1104+ has_default_value=False, default_value=_b("").decode('utf-8'),
1105+ message_type=None, enum_type=None, containing_type=None,
1106+ is_extension=False, extension_scope=None,
1107+ options=None),
1108+ _descriptor.FieldDescriptor(
1109+ name='last_seen_block_hash', full_name='wallet.Wallet.last_seen_block_hash', index=1,
1110+ number=2, type=12, cpp_type=9, label=1,
1111+ has_default_value=False, default_value=_b(""),
1112+ message_type=None, enum_type=None, containing_type=None,
1113+ is_extension=False, extension_scope=None,
1114+ options=None),
1115+ _descriptor.FieldDescriptor(
1116+ name='last_seen_block_height', full_name='wallet.Wallet.last_seen_block_height', index=2,
1117+ number=12, type=13, cpp_type=3, label=1,
1118+ has_default_value=False, default_value=0,
1119+ message_type=None, enum_type=None, containing_type=None,
1120+ is_extension=False, extension_scope=None,
1121+ options=None),
1122+ _descriptor.FieldDescriptor(
1123+ name='last_seen_block_time_secs', full_name='wallet.Wallet.last_seen_block_time_secs', index=3,
1124+ number=14, type=3, cpp_type=2, label=1,
1125+ has_default_value=False, default_value=0,
1126+ message_type=None, enum_type=None, containing_type=None,
1127+ is_extension=False, extension_scope=None,
1128+ options=None),
1129+ _descriptor.FieldDescriptor(
1130+ name='key', full_name='wallet.Wallet.key', index=4,
1131+ number=3, type=11, cpp_type=10, label=3,
1132+ has_default_value=False, default_value=[],
1133+ message_type=None, enum_type=None, containing_type=None,
1134+ is_extension=False, extension_scope=None,
1135+ options=None),
1136+ _descriptor.FieldDescriptor(
1137+ name='transaction', full_name='wallet.Wallet.transaction', index=5,
1138+ number=4, type=11, cpp_type=10, label=3,
1139+ has_default_value=False, default_value=[],
1140+ message_type=None, enum_type=None, containing_type=None,
1141+ is_extension=False, extension_scope=None,
1142+ options=None),
1143+ _descriptor.FieldDescriptor(
1144+ name='watched_script', full_name='wallet.Wallet.watched_script', index=6,
1145+ number=15, type=11, cpp_type=10, label=3,
1146+ has_default_value=False, default_value=[],
1147+ message_type=None, enum_type=None, containing_type=None,
1148+ is_extension=False, extension_scope=None,
1149+ options=None),
1150+ _descriptor.FieldDescriptor(
1151+ name='encryption_type', full_name='wallet.Wallet.encryption_type', index=7,
1152+ number=5, type=14, cpp_type=8, label=1,
1153+ has_default_value=True, default_value=1,
1154+ message_type=None, enum_type=None, containing_type=None,
1155+ is_extension=False, extension_scope=None,
1156+ options=None),
1157+ _descriptor.FieldDescriptor(
1158+ name='encryption_parameters', full_name='wallet.Wallet.encryption_parameters', index=8,
1159+ number=6, type=11, cpp_type=10, label=1,
1160+ has_default_value=False, default_value=None,
1161+ message_type=None, enum_type=None, containing_type=None,
1162+ is_extension=False, extension_scope=None,
1163+ options=None),
1164+ _descriptor.FieldDescriptor(
1165+ name='version', full_name='wallet.Wallet.version', index=9,
1166+ number=7, type=5, cpp_type=1, label=1,
1167+ has_default_value=True, default_value=1,
1168+ message_type=None, enum_type=None, containing_type=None,
1169+ is_extension=False, extension_scope=None,
1170+ options=None),
1171+ _descriptor.FieldDescriptor(
1172+ name='extension', full_name='wallet.Wallet.extension', index=10,
1173+ number=10, type=11, cpp_type=10, label=3,
1174+ has_default_value=False, default_value=[],
1175+ message_type=None, enum_type=None, containing_type=None,
1176+ is_extension=False, extension_scope=None,
1177+ options=None),
1178+ _descriptor.FieldDescriptor(
1179+ name='description', full_name='wallet.Wallet.description', index=11,
1180+ number=11, type=9, cpp_type=9, label=1,
1181+ has_default_value=False, default_value=_b("").decode('utf-8'),
1182+ message_type=None, enum_type=None, containing_type=None,
1183+ is_extension=False, extension_scope=None,
1184+ options=None),
1185+ _descriptor.FieldDescriptor(
1186+ name='key_rotation_time', full_name='wallet.Wallet.key_rotation_time', index=12,
1187+ number=13, type=4, cpp_type=4, label=1,
1188+ has_default_value=False, default_value=0,
1189+ message_type=None, enum_type=None, containing_type=None,
1190+ is_extension=False, extension_scope=None,
1191+ options=None),
1192+ _descriptor.FieldDescriptor(
1193+ name='tags', full_name='wallet.Wallet.tags', index=13,
1194+ number=16, type=11, cpp_type=10, label=3,
1195+ has_default_value=False, default_value=[],
1196+ message_type=None, enum_type=None, containing_type=None,
1197+ is_extension=False, extension_scope=None,
1198+ options=None),
1199+ _descriptor.FieldDescriptor(
1200+ name='transaction_signers', full_name='wallet.Wallet.transaction_signers', index=14,
1201+ number=17, type=11, cpp_type=10, label=3,
1202+ has_default_value=False, default_value=[],
1203+ message_type=None, enum_type=None, containing_type=None,
1204+ is_extension=False, extension_scope=None,
1205+ options=None),
1206+ _descriptor.FieldDescriptor(
1207+ name='sigsRequiredToSpend', full_name='wallet.Wallet.sigsRequiredToSpend', index=15,
1208+ number=18, type=13, cpp_type=3, label=1,
1209+ has_default_value=True, default_value=1,
1210+ message_type=None, enum_type=None, containing_type=None,
1211+ is_extension=False, extension_scope=None,
1212+ options=None),
1213+ ],
1214+ extensions=[
1215+ ],
1216+ nested_types=[],
1217+ enum_types=[
1218+ _WALLET_ENCRYPTIONTYPE,
1219+ ],
1220+ options=None,
1221+ is_extendable=False,
1222+ extension_ranges=[],
1223+ oneofs=[
1224+ ],
1225+ serialized_start=2358,
1226+ serialized_end=3007,
1227+)
1228+
1229+
1230+_EXCHANGERATE = _descriptor.Descriptor(
1231+ name='ExchangeRate',
1232+ full_name='wallet.ExchangeRate',
1233+ filename=None,
1234+ file=DESCRIPTOR,
1235+ containing_type=None,
1236+ fields=[
1237+ _descriptor.FieldDescriptor(
1238+ name='coin_value', full_name='wallet.ExchangeRate.coin_value', index=0,
1239+ number=1, type=3, cpp_type=2, label=2,
1240+ has_default_value=False, default_value=0,
1241+ message_type=None, enum_type=None, containing_type=None,
1242+ is_extension=False, extension_scope=None,
1243+ options=None),
1244+ _descriptor.FieldDescriptor(
1245+ name='fiat_value', full_name='wallet.ExchangeRate.fiat_value', index=1,
1246+ number=2, type=3, cpp_type=2, label=2,
1247+ has_default_value=False, default_value=0,
1248+ message_type=None, enum_type=None, containing_type=None,
1249+ is_extension=False, extension_scope=None,
1250+ options=None),
1251+ _descriptor.FieldDescriptor(
1252+ name='fiat_currency_code', full_name='wallet.ExchangeRate.fiat_currency_code', index=2,
1253+ number=3, type=9, cpp_type=9, label=2,
1254+ has_default_value=False, default_value=_b("").decode('utf-8'),
1255+ message_type=None, enum_type=None, containing_type=None,
1256+ is_extension=False, extension_scope=None,
1257+ options=None),
1258+ ],
1259+ extensions=[
1260+ ],
1261+ nested_types=[],
1262+ enum_types=[
1263+ ],
1264+ options=None,
1265+ is_extendable=False,
1266+ extension_ranges=[],
1267+ oneofs=[
1268+ ],
1269+ serialized_start=3009,
1270+ serialized_end=3091,
1271+)
1272+
1273+_KEY.fields_by_name['type'].enum_type = _KEY_TYPE
1274+_KEY.fields_by_name['encrypted_data'].message_type = _ENCRYPTEDDATA
1275+_KEY.fields_by_name['deterministic_key'].message_type = _DETERMINISTICKEY
1276+_KEY.fields_by_name['encrypted_deterministic_seed'].message_type = _ENCRYPTEDDATA
1277+_KEY_TYPE.containing_type = _KEY
1278+_TRANSACTIONCONFIDENCE.fields_by_name['type'].enum_type = _TRANSACTIONCONFIDENCE_TYPE
1279+_TRANSACTIONCONFIDENCE.fields_by_name['broadcast_by'].message_type = _PEERADDRESS
1280+_TRANSACTIONCONFIDENCE.fields_by_name['source'].enum_type = _TRANSACTIONCONFIDENCE_SOURCE
1281+_TRANSACTIONCONFIDENCE_TYPE.containing_type = _TRANSACTIONCONFIDENCE
1282+_TRANSACTIONCONFIDENCE_SOURCE.containing_type = _TRANSACTIONCONFIDENCE
1283+_TRANSACTION.fields_by_name['pool'].enum_type = _TRANSACTION_POOL
1284+_TRANSACTION.fields_by_name['transaction_input'].message_type = _TRANSACTIONINPUT
1285+_TRANSACTION.fields_by_name['transaction_output'].message_type = _TRANSACTIONOUTPUT
1286+_TRANSACTION.fields_by_name['confidence'].message_type = _TRANSACTIONCONFIDENCE
1287+_TRANSACTION.fields_by_name['purpose'].enum_type = _TRANSACTION_PURPOSE
1288+_TRANSACTION.fields_by_name['exchange_rate'].message_type = _EXCHANGERATE
1289+_TRANSACTION_POOL.containing_type = _TRANSACTION
1290+_TRANSACTION_PURPOSE.containing_type = _TRANSACTION
1291+_WALLET.fields_by_name['key'].message_type = _KEY
1292+_WALLET.fields_by_name['transaction'].message_type = _TRANSACTION
1293+_WALLET.fields_by_name['watched_script'].message_type = _SCRIPT
1294+_WALLET.fields_by_name['encryption_type'].enum_type = _WALLET_ENCRYPTIONTYPE
1295+_WALLET.fields_by_name['encryption_parameters'].message_type = _SCRYPTPARAMETERS
1296+_WALLET.fields_by_name['extension'].message_type = _EXTENSION
1297+_WALLET.fields_by_name['tags'].message_type = _TAG
1298+_WALLET.fields_by_name['transaction_signers'].message_type = _TRANSACTIONSIGNER
1299+_WALLET_ENCRYPTIONTYPE.containing_type = _WALLET
1300+DESCRIPTOR.message_types_by_name['PeerAddress'] = _PEERADDRESS
1301+DESCRIPTOR.message_types_by_name['EncryptedData'] = _ENCRYPTEDDATA
1302+DESCRIPTOR.message_types_by_name['DeterministicKey'] = _DETERMINISTICKEY
1303+DESCRIPTOR.message_types_by_name['Key'] = _KEY
1304+DESCRIPTOR.message_types_by_name['Script'] = _SCRIPT
1305+DESCRIPTOR.message_types_by_name['TransactionInput'] = _TRANSACTIONINPUT
1306+DESCRIPTOR.message_types_by_name['TransactionOutput'] = _TRANSACTIONOUTPUT
1307+DESCRIPTOR.message_types_by_name['TransactionConfidence'] = _TRANSACTIONCONFIDENCE
1308+DESCRIPTOR.message_types_by_name['Transaction'] = _TRANSACTION
1309+DESCRIPTOR.message_types_by_name['ScryptParameters'] = _SCRYPTPARAMETERS
1310+DESCRIPTOR.message_types_by_name['Extension'] = _EXTENSION
1311+DESCRIPTOR.message_types_by_name['Tag'] = _TAG
1312+DESCRIPTOR.message_types_by_name['TransactionSigner'] = _TRANSACTIONSIGNER
1313+DESCRIPTOR.message_types_by_name['Wallet'] = _WALLET
1314+DESCRIPTOR.message_types_by_name['ExchangeRate'] = _EXCHANGERATE
1315+
1316+PeerAddress = _reflection.GeneratedProtocolMessageType('PeerAddress', (_message.Message,), dict(
1317+ DESCRIPTOR = _PEERADDRESS,
1318+ __module__ = 'wallet_pb2'
1319+ # @@protoc_insertion_point(class_scope:wallet.PeerAddress)
1320+ ))
1321+_sym_db.RegisterMessage(PeerAddress)
1322+
1323+EncryptedData = _reflection.GeneratedProtocolMessageType('EncryptedData', (_message.Message,), dict(
1324+ DESCRIPTOR = _ENCRYPTEDDATA,
1325+ __module__ = 'wallet_pb2'
1326+ # @@protoc_insertion_point(class_scope:wallet.EncryptedData)
1327+ ))
1328+_sym_db.RegisterMessage(EncryptedData)
1329+
1330+DeterministicKey = _reflection.GeneratedProtocolMessageType('DeterministicKey', (_message.Message,), dict(
1331+ DESCRIPTOR = _DETERMINISTICKEY,
1332+ __module__ = 'wallet_pb2'
1333+ # @@protoc_insertion_point(class_scope:wallet.DeterministicKey)
1334+ ))
1335+_sym_db.RegisterMessage(DeterministicKey)
1336+
1337+Key = _reflection.GeneratedProtocolMessageType('Key', (_message.Message,), dict(
1338+ DESCRIPTOR = _KEY,
1339+ __module__ = 'wallet_pb2'
1340+ # @@protoc_insertion_point(class_scope:wallet.Key)
1341+ ))
1342+_sym_db.RegisterMessage(Key)
1343+
1344+Script = _reflection.GeneratedProtocolMessageType('Script', (_message.Message,), dict(
1345+ DESCRIPTOR = _SCRIPT,
1346+ __module__ = 'wallet_pb2'
1347+ # @@protoc_insertion_point(class_scope:wallet.Script)
1348+ ))
1349+_sym_db.RegisterMessage(Script)
1350+
1351+TransactionInput = _reflection.GeneratedProtocolMessageType('TransactionInput', (_message.Message,), dict(
1352+ DESCRIPTOR = _TRANSACTIONINPUT,
1353+ __module__ = 'wallet_pb2'
1354+ # @@protoc_insertion_point(class_scope:wallet.TransactionInput)
1355+ ))
1356+_sym_db.RegisterMessage(TransactionInput)
1357+
1358+TransactionOutput = _reflection.GeneratedProtocolMessageType('TransactionOutput', (_message.Message,), dict(
1359+ DESCRIPTOR = _TRANSACTIONOUTPUT,
1360+ __module__ = 'wallet_pb2'
1361+ # @@protoc_insertion_point(class_scope:wallet.TransactionOutput)
1362+ ))
1363+_sym_db.RegisterMessage(TransactionOutput)
1364+
1365+TransactionConfidence = _reflection.GeneratedProtocolMessageType('TransactionConfidence', (_message.Message,), dict(
1366+ DESCRIPTOR = _TRANSACTIONCONFIDENCE,
1367+ __module__ = 'wallet_pb2'
1368+ # @@protoc_insertion_point(class_scope:wallet.TransactionConfidence)
1369+ ))
1370+_sym_db.RegisterMessage(TransactionConfidence)
1371+
1372+Transaction = _reflection.GeneratedProtocolMessageType('Transaction', (_message.Message,), dict(
1373+ DESCRIPTOR = _TRANSACTION,
1374+ __module__ = 'wallet_pb2'
1375+ # @@protoc_insertion_point(class_scope:wallet.Transaction)
1376+ ))
1377+_sym_db.RegisterMessage(Transaction)
1378+
1379+ScryptParameters = _reflection.GeneratedProtocolMessageType('ScryptParameters', (_message.Message,), dict(
1380+ DESCRIPTOR = _SCRYPTPARAMETERS,
1381+ __module__ = 'wallet_pb2'
1382+ # @@protoc_insertion_point(class_scope:wallet.ScryptParameters)
1383+ ))
1384+_sym_db.RegisterMessage(ScryptParameters)
1385+
1386+Extension = _reflection.GeneratedProtocolMessageType('Extension', (_message.Message,), dict(
1387+ DESCRIPTOR = _EXTENSION,
1388+ __module__ = 'wallet_pb2'
1389+ # @@protoc_insertion_point(class_scope:wallet.Extension)
1390+ ))
1391+_sym_db.RegisterMessage(Extension)
1392+
1393+Tag = _reflection.GeneratedProtocolMessageType('Tag', (_message.Message,), dict(
1394+ DESCRIPTOR = _TAG,
1395+ __module__ = 'wallet_pb2'
1396+ # @@protoc_insertion_point(class_scope:wallet.Tag)
1397+ ))
1398+_sym_db.RegisterMessage(Tag)
1399+
1400+TransactionSigner = _reflection.GeneratedProtocolMessageType('TransactionSigner', (_message.Message,), dict(
1401+ DESCRIPTOR = _TRANSACTIONSIGNER,
1402+ __module__ = 'wallet_pb2'
1403+ # @@protoc_insertion_point(class_scope:wallet.TransactionSigner)
1404+ ))
1405+_sym_db.RegisterMessage(TransactionSigner)
1406+
1407+Wallet = _reflection.GeneratedProtocolMessageType('Wallet', (_message.Message,), dict(
1408+ DESCRIPTOR = _WALLET,
1409+ __module__ = 'wallet_pb2'
1410+ # @@protoc_insertion_point(class_scope:wallet.Wallet)
1411+ ))
1412+_sym_db.RegisterMessage(Wallet)
1413+
1414+ExchangeRate = _reflection.GeneratedProtocolMessageType('ExchangeRate', (_message.Message,), dict(
1415+ DESCRIPTOR = _EXCHANGERATE,
1416+ __module__ = 'wallet_pb2'
1417+ # @@protoc_insertion_point(class_scope:wallet.ExchangeRate)
1418+ ))
1419+_sym_db.RegisterMessage(ExchangeRate)
1420+
1421+
1422+DESCRIPTOR.has_options = True
1423+DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\023org.bitcoinj.walletB\006Protos'))
1424+# @@protoc_insertion_point(module_scope)

Subscribers

People subscribed via source and target branches

to all changes: