Support for Nunchuk animated multisig wallet descriptors

This commit is contained in:
kdmukai
2022-03-27 18:01:16 -05:00
parent 8529a7fbfe
commit 39aa8afd13
3 changed files with 8 additions and 2 deletions
+4
View File
@@ -143,6 +143,10 @@ class URDecoder:
def expected_part_count(self):
return self.fountain_decoder.expected_part_count()
@property
def total_segments(self):
return self.expected_part_count()
def received_part_indexes(self):
return self.fountain_decoder.received_part_indexes
+3 -2
View File
@@ -278,7 +278,8 @@ class DecodeQR:
if self.qr_type in [QRType.BYTES__UR]:
cbor = self.decoder.result_message().cbor
raw = Bytes.from_cbor(cbor).data
check = 'multisig setup file' in raw.decode("utf-8").lower()
data = raw.decode("utf-8").lower()
check = 'policy:' in data and "format:" in data and "derivation:" in data
return check
@@ -572,7 +573,7 @@ class DecodeQR:
descriptor += ',[' + x['xfp'] + derivation + "]" + x['key'] + "/{0,1}/*"
descriptor += script_close
return descriptor
class BaseQrDecoder:
+1
View File
@@ -79,6 +79,7 @@ class ScanView(View):
if not descriptor.is_basic_multisig:
# TODO: Handle single-sig descriptors?
print(f"Received single sig descriptor: {descriptor}")
return Destination(NotYetImplementedView)
self.controller.multisig_wallet_descriptor = descriptor