From f6bb3c21f3b2562c6773a54f09df4f8f467ae6e3 Mon Sep 17 00:00:00 2001 From: Jean Do Date: Tue, 10 Dec 2024 18:51:34 -0400 Subject: [PATCH 1/2] loaded descriptors no longer forced to "xpub" version --- src/krux/wallet.py | 24 ++++++++++++------------ tests/test_wallet.py | 14 ++++++++++---- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/krux/wallet.py b/src/krux/wallet.py index 42447901..33f46027 100644 --- a/src/krux/wallet.py +++ b/src/krux/wallet.py @@ -119,26 +119,28 @@ def load(self, wallet_data, qr_format, allow_assumption=None): """Loads the wallet from the given data""" descriptor, label = parse_wallet(wallet_data, allow_assumption) + # convert descriptor keys to 'xpub' on same network -- for comparison only + descriptor_xpubs = [] + for key in descriptor.keys: + network, _ = version_to_network_versiontype(key.key.version) + descriptor_xpubs.append(key.key.to_base58(version=NETWORKS[network]['xpub'])) + if self.key: if self.is_multisig(): if not descriptor.is_basic_multisig: raise ValueError("not multisig") - if self.key.xpub() not in [ - key.key.to_base58() for key in descriptor.keys - ]: + if self.key.xpub() not in descriptor_xpubs: raise ValueError("xpub not a multisig cosigner") elif self.is_miniscript(): if descriptor.miniscript is None or descriptor.is_basic_multisig: raise ValueError("not miniscript") - if self.key.xpub() not in [ - key.key.to_base58() for key in descriptor.keys - ]: + if self.key.xpub() not in descriptor_xpubs: raise ValueError("xpub not a miniscript cosigner") else: if not descriptor.key: if len(descriptor.keys) > 1: raise ValueError("not single-sig") - if self.key.xpub() != descriptor.key.key.to_base58(): + if self.key.xpub() != descriptor_xpubs[0]: raise ValueError("xpub does not match") self.wallet_data = wallet_data @@ -246,11 +248,9 @@ def parse_key_value_file(wallet_data): kv = key_vals[i] kv_prefix = kv[:4].lower() if kv_prefix[1:] == "pub" and kv_prefix[0] in ["x", "z", "t", "v"]: - xpub = Key.from_string(kv) - network, _ = version_to_network_versiontype(xpub.key.version) - xpub_as_xpub = xpub.key.to_base58(version=NETWORKS[network]["xpub"]) + xpub = Key.from_string(kv).key.to_base58() fingerprint = key_vals[i - 1] - keys.append((xpub_as_xpub, fingerprint)) + keys.append((xpub, fingerprint)) if len(keys) != n: raise ValueError("expected %d keys, found %d" % (n, len(keys))) @@ -347,7 +347,7 @@ def parse_wallet(wallet_data, allow_assumption=None): if pubkey.is_extended: network, versiontype = version_to_network_versiontype(pubkey.key.version) - xpub = pubkey.key.to_base58(version=NETWORKS[network]["xpub"]) + xpub = pubkey.key.to_base58() fmt = None if pubkey.origin is None: diff --git a/tests/test_wallet.py b/tests/test_wallet.py index c5b0c135..074b3779 100644 --- a/tests/test_wallet.py +++ b/tests/test_wallet.py @@ -37,10 +37,12 @@ def tdata(mocker): KRUX_NESTEDSW1_DESCRIPTOR = "sh(wpkh([55f8fc5d/49h/0h/1h]xpub6Ca1JGnSFNZ7jjwturEn944t8B9kBgiTKtmr3maTbryEyDyYY9xycVSQaFxeUPjbHyX7MUvLUbdoDVK7XZ7Fib9We4BQRRk8bZjW2UPRjHV))" KRUX_NESTEDSW1_XPUB = "[55f8fc5d/49h/0h/1h]xpub6Ca1JGnSFNZ7jjwturEn944t8B9kBgiTKtmr3maTbryEyDyYY9xycVSQaFxeUPjbHyX7MUvLUbdoDVK7XZ7Fib9We4BQRRk8bZjW2UPRjHV" KRUX_NESTEDSW1_YPUB = "[55f8fc5d/49h/0h/1h]ypub6XQGbwTMQ46bb391kD2QM9APJ9JC8JhxF1J4qAULysM82Knmnp8YEZ6YbTvEUJPWhcdv6xWtwFzM6mvgFFXGWpq7WPsq1LZcsHo9R97uuE4" + KRUX_NESTEDSW1_YPUB_DESCRIPTOR = "sh(wpkh(" + KRUX_NESTEDSW1_YPUB + "))" KRUX_NATIVESW1_DESCRIPTOR = "wpkh([55f8fc5d/84h/0h/1h]xpub6DPMTPxGMqdu43FvwYdC6eHCPJWckCkx1rLJ1HEG7259GyWQD5P17WB2oowP9SpQdC8ogrmXfwfoazvf6Te8svtxWh4UTwTqyRdG5G54FxW)" KRUX_NATIVESW1_XPUB = "[55f8fc5d/84h/0h/1h]xpub6DPMTPxGMqdu43FvwYdC6eHCPJWckCkx1rLJ1HEG7259GyWQD5P17WB2oowP9SpQdC8ogrmXfwfoazvf6Te8svtxWh4UTwTqyRdG5G54FxW" KRUX_NATIVESW1_ZPUB = "[55f8fc5d/84h/0h/1h]zpub6s3t4jJ6fCirkdeAcGCSWpUCjEoWdSjwr5Nja522s2puPB8riPi8MdVJrDrZ9G8FSUNRBoxebGNuMa9nXrUAUQGAFNTKdm6pWskYrMahu1i" + KRUX_NATIVESW1_ZPUB_DESCRIPTOR = "wpkh(" + KRUX_NATIVESW1_ZPUB + ")" KRUX_TAPROOT1_DESCRIPTOR = "tr([55f8fc5d/86h/0h/1h]xpub6CNGwJbVG9sQsJjtwLiemRFAfvDafL8zRthnHWNQbRz1PwAm28T1v5hLmJhFft71oEDCbA3xHemnScW5VWheP1BxXNVnoYboyw6t4wuKu5q)" KRUX_TAPROOT1_XPUB = "[55f8fc5d/86h/0h/1h]xpub6CNGwJbVG9sQsJjtwLiemRFAfvDafL8zRthnHWNQbRz1PwAm28T1v5hLmJhFft71oEDCbA3xHemnScW5VWheP1BxXNVnoYboyw6t4wuKu5q" @@ -51,13 +53,13 @@ def tdata(mocker): SPECTER_MULTISIG_DESCRIPTOR = "wsh(sortedmulti(2,[55f8fc5d/48h/0h/0h/2h]xpub6EKmKYGYc1WY6t9d3d9SksR8keSaPZbFa6tqsGiH4xVxx8d2YyxSX7WG6yXEX3CmG54dPCxaapDw1XsjwCmfoqP7tbsAeqMVfKvqSAu4ndy/0/*,[3e15470d/48h/0h/0h/2h]xpub6F2P6Pz5KLPgCc6pTBd2xxCunaSYWc8CdkL28W5z15pJrN3aCYY7mCUAkCMtqrgT2wdhAGgRnJxAkCCUpGKoXKxQ57yffEGmPwtYA3DEXwu/0/*,[d3a80c8b/48h/0h/0h/2h]xpub6FKYY6y3oVi7ihSCszFKRSeZj5SzrfSsUFXhKqjMV4iigrLhxwMX3mrjioNyLTZ5iD3u4wU9S3tyzpJGxhd5geaXoQ68jGz2M6dfh2zJrUv/0/*))" SPECTER_MULTISIG_WALLET_DATA = '{"label": "Specter Multisig Wallet", "blockheight": 0, "descriptor": "wsh(sortedmulti(2,[55f8fc5d/48h/0h/0h/2h]xpub6EKmKYGYc1WY6t9d3d9SksR8keSaPZbFa6tqsGiH4xVxx8d2YyxSX7WG6yXEX3CmG54dPCxaapDw1XsjwCmfoqP7tbsAeqMVfKvqSAu4ndy/0/*,[3e15470d/48h/0h/0h/2h]xpub6F2P6Pz5KLPgCc6pTBd2xxCunaSYWc8CdkL28W5z15pJrN3aCYY7mCUAkCMtqrgT2wdhAGgRnJxAkCCUpGKoXKxQ57yffEGmPwtYA3DEXwu/0/*,[d3a80c8b/48h/0h/0h/2h]xpub6FKYY6y3oVi7ihSCszFKRSeZj5SzrfSsUFXhKqjMV4iigrLhxwMX3mrjioNyLTZ5iD3u4wU9S3tyzpJGxhd5geaXoQ68jGz2M6dfh2zJrUv/0/*))#3nfc6jdy", "devices": [{"type": "other", "label": "Key1"}, {"type": "other", "label": "Key2"}, {"type": "other", "label": "Key3"}]}' - BLUEWALLET_SINGLESIG_DESCRIPTOR = "wpkh(xpub6DPMTPxGMqdtzMwpqT1dDQaVdyaEppEm2qYSaJ7ANsuES7HkNzrXJst1Ed8D7NAnijUdgSDUFgph1oj5LKKAD5gyxWNhNP2AuDqaKYqzphA)" + BLUEWALLET_SINGLESIG_DESCRIPTOR = "wpkh(zpub6s3t4jJ6fCirgxL4WAasdamVyus8i4Dks4at95tw8tezYJvCtKBeZ1CHH33P7BUdY1iFBPQbB1XnnNxCmi9BoZ4BhBmYYCf9Sfxs6jY8Ycw)" BLUEWALLET_SINGLESIG_WALLET_DATA = "zpub6s3t4jJ6fCirgxL4WAasdamVyus8i4Dks4at95tw8tezYJvCtKBeZ1CHH33P7BUdY1iFBPQbB1XnnNxCmi9BoZ4BhBmYYCf9Sfxs6jY8Ycw" BLUEWALLET_LEGACY_DESCRIPTOR = "pkh(xpub6C1dUaopHgps26SpkdwL28cS5WFH7Xyaut4HLKZq8Jgiisp5VZK8o1HJLoDRiQyAbdMpBJSpgc8eToiJay4XAnSSvxDVvMuMTnBoTAR26Gb)" BLUEWALLET_LEGACY_WALLET_DATA = "xpub6C1dUaopHgps26SpkdwL28cS5WFH7Xyaut4HLKZq8Jgiisp5VZK8o1HJLoDRiQyAbdMpBJSpgc8eToiJay4XAnSSvxDVvMuMTnBoTAR26Gb" - BLUEWALLET_NESTEDSW_DESCRIPTOR = "sh(wpkh(xpub6Ca1JGnSFNZ7g8zXNjwY1Li1GKEJPQnbq8Lcev7qoXj33PzMkwWnRKjwqSPo1ArJ2KY3GYAcYhJvcZTwvb99yWuQ5eH4rPEd5mvazBhKiTn))" + BLUEWALLET_NESTEDSW_DESCRIPTOR = "sh(wpkh(ypub6XQGbwTMQ46bXSBeD6jADRoWSHNkL2n6kErqSK1jBY6v6Vob1bgM3PQ5reMP15WDRxer21mB1MfUVr5WeHZAmkazwyyVSJ47MVzENnCyRcP))" BLUEWALLET_NESTEDSW_WALLET_DATA = "ypub6XQGbwTMQ46bXSBeD6jADRoWSHNkL2n6kErqSK1jBY6v6Vob1bgM3PQ5reMP15WDRxer21mB1MfUVr5WeHZAmkazwyyVSJ47MVzENnCyRcP" BLUEWALLET_MULTISIG_DESCRIPTOR = "wsh(sortedmulti(2,[55f8fc5d/48h/0h/0h/2h]xpub6EKmKYGYc1WY6t9d3d9SksR8keSaPZbFa6tqsGiH4xVxx8d2YyxSX7WG6yXEX3CmG54dPCxaapDw1XsjwCmfoqP7tbsAeqMVfKvqSAu4ndy,[3e15470d/48h/0h/0h/2h]xpub6F2P6Pz5KLPgCc6pTBd2xxCunaSYWc8CdkL28W5z15pJrN3aCYY7mCUAkCMtqrgT2wdhAGgRnJxAkCCUpGKoXKxQ57yffEGmPwtYA3DEXwu,[d3a80c8b/48h/0h/0h/2h]xpub6FKYY6y3oVi7ihSCszFKRSeZj5SzrfSsUFXhKqjMV4iigrLhxwMX3mrjioNyLTZ5iD3u4wU9S3tyzpJGxhd5geaXoQ68jGz2M6dfh2zJrUv))" @@ -173,9 +175,11 @@ def tdata(mocker): "KRUX_NESTEDSW1_DESCRIPTOR", "KRUX_NESTEDSW1_XPUB", "KRUX_NESTEDSW1_YPUB", + "KRUX_NESTEDSW1_YPUB_DESCRIPTOR", "KRUX_NATIVESW1_DESCRIPTOR", "KRUX_NATIVESW1_XPUB", "KRUX_NATIVESW1_ZPUB", + "KRUX_NATIVESW1_ZPUB_DESCRIPTOR", "KRUX_TAPROOT1_DESCRIPTOR", "KRUX_TAPROOT1_XPUB", "SPECTER_SINGLESIG_DESCRIPTOR", @@ -221,9 +225,11 @@ def tdata(mocker): KRUX_NESTEDSW1_DESCRIPTOR, KRUX_NESTEDSW1_XPUB, KRUX_NESTEDSW1_YPUB, + KRUX_NESTEDSW1_YPUB_DESCRIPTOR, KRUX_NATIVESW1_DESCRIPTOR, KRUX_NATIVESW1_XPUB, KRUX_NATIVESW1_ZPUB, + KRUX_NATIVESW1_ZPUB_DESCRIPTOR, KRUX_TAPROOT1_DESCRIPTOR, KRUX_TAPROOT1_XPUB, SPECTER_SINGLESIG_DESCRIPTOR, @@ -615,7 +621,7 @@ def test_parse_wallet(mocker, m5stickv, tdata): ), ( tdata.KRUX_NESTEDSW1_YPUB, - tdata.KRUX_NESTEDSW1_DESCRIPTOR, + tdata.KRUX_NESTEDSW1_YPUB_DESCRIPTOR, None, ), ( @@ -625,7 +631,7 @@ def test_parse_wallet(mocker, m5stickv, tdata): ), ( tdata.KRUX_NATIVESW1_ZPUB, - tdata.KRUX_NATIVESW1_DESCRIPTOR, + tdata.KRUX_NATIVESW1_ZPUB_DESCRIPTOR, None, ), ( From 5e28ddacddcd430f45b295205c395f67f9dc48d1 Mon Sep 17 00:00:00 2001 From: Jean Do Date: Tue, 10 Dec 2024 19:17:22 -0400 Subject: [PATCH 2/2] black and i18n-adds for "Miniscript", "Policy Type" --- i18n/translations/de-DE.json | 3 ++- i18n/translations/es-MX.json | 3 ++- i18n/translations/fr-FR.json | 3 ++- i18n/translations/ja-JP.json | 3 ++- i18n/translations/ko-KR.json | 3 ++- i18n/translations/nl-NL.json | 3 ++- i18n/translations/pt-BR.json | 3 ++- i18n/translations/ru-RU.json | 3 ++- i18n/translations/tr-TR.json | 3 ++- i18n/translations/vi-VN.json | 3 ++- i18n/translations/zh-CN.json | 3 ++- src/krux/translations/__init__.py | 3 ++- src/krux/translations/de.py | 3 ++- src/krux/translations/es.py | 3 ++- src/krux/translations/fr.py | 3 ++- src/krux/translations/ja.py | 3 ++- src/krux/translations/ko.py | 3 ++- src/krux/translations/nl.py | 3 ++- src/krux/translations/pt.py | 3 ++- src/krux/translations/ru.py | 3 ++- src/krux/translations/tr.py | 3 ++- src/krux/translations/vi.py | 3 ++- src/krux/translations/zh.py | 3 ++- src/krux/wallet.py | 4 +++- 24 files changed, 49 insertions(+), 24 deletions(-) diff --git a/i18n/translations/de-DE.json b/i18n/translations/de-DE.json index 45c2e289..0bc561b3 100644 --- a/i18n/translations/de-DE.json +++ b/i18n/translations/de-DE.json @@ -153,13 +153,13 @@ "Location": "Speicherort", "Message": "Nachricht", "Message:": "Nachricht:", + "Miniscript": "Miniscript", "Missing signature file": "Fehlende Signaturdatei", "Mnemonic": "Mnemonic", "Mnemonic ID": "Mnemonische ID", "Mnemonic and passphrase will be kept.": "Mnemotechnik und Passphrase werden beibehalten.", "Mnemonic was not encrypted": "Mnemonic wurde nicht verschlüsselt", "Modified:": "Geändert:", - "Multisig": "Multisig", "Native Segwit - 84 would be assumed": "Native Segwit - 84 würde angenommen", "Network": "Netzwerk", "New Mnemonic": "Neue Mnemonic", @@ -185,6 +185,7 @@ "Plaintext QR": "Klartext-QR", "Please load a wallet output descriptor": "Bitte lade einen Wallet Ausgabedeskriptor", "Plunge Rate": "Tauchrate", + "Policy Type": "Richtlinientyp:", "Poor entropy": "Schlechte Entropie", "Poor entropy detected!": "Schlechte Entropie erkannt!", "Print Test QR": "Drucke Test-QR", diff --git a/i18n/translations/es-MX.json b/i18n/translations/es-MX.json index 0380d8c1..14ce6c0e 100644 --- a/i18n/translations/es-MX.json +++ b/i18n/translations/es-MX.json @@ -153,13 +153,13 @@ "Location": "Ubicación", "Message": "Mensaje", "Message:": "Mensaje:", + "Miniscript": "Miniscript", "Missing signature file": "Falta archivo de firma", "Mnemonic": "Mnemónico", "Mnemonic ID": "Identificación del Mnemónico", "Mnemonic and passphrase will be kept.": "Mnemónico y passphrase se mantendrán.", "Mnemonic was not encrypted": "Mnemónico no fue descifrado", "Modified:": "Modificado:", - "Multisig": "Multisig", "Native Segwit - 84 would be assumed": "Segwit nativo - 84 se supondría", "Network": "Red", "New Mnemonic": "Nuevo Mnemónico", @@ -185,6 +185,7 @@ "Plaintext QR": "QR de Texto", "Please load a wallet output descriptor": "Carga un descriptor de cartera", "Plunge Rate": "Tasa de Caída", + "Policy Type": "Tipo de póliza", "Poor entropy": "Baja entropía", "Poor entropy detected!": "Mala entropía detectada!", "Print Test QR": "Prueba de Impresión QR", diff --git a/i18n/translations/fr-FR.json b/i18n/translations/fr-FR.json index 23a77c2b..0c1e23f0 100644 --- a/i18n/translations/fr-FR.json +++ b/i18n/translations/fr-FR.json @@ -153,13 +153,13 @@ "Location": "Emplacement", "Message": "Message", "Message:": "Message :", + "Miniscript": "Miniscript", "Missing signature file": "Fichier de signature manquant", "Mnemonic": "Mnémonique", "Mnemonic ID": "ID Mnémonique", "Mnemonic and passphrase will be kept.": "Mnémonique et phrase secrète seront conservés.", "Mnemonic was not encrypted": "Mnémonique n'était pas chiffré", "Modified:": "Modifié :", - "Multisig": "Multi\nsignature", "Native Segwit - 84 would be assumed": "Native Segwit - 84 serait supposé", "Network": "Réseau", "New Mnemonic": "Nouveau Mnémonique", @@ -185,6 +185,7 @@ "Plaintext QR": "QR en Texte Brut", "Please load a wallet output descriptor": "Veuillez charger un descripteur de sortie de portefeuille", "Plunge Rate": "Taux de plongée", + "Policy Type": "Type de politique", "Poor entropy": "Entropie faible", "Poor entropy detected!": "Entropie faible détectée !", "Print Test QR": "Impression Test QR", diff --git a/i18n/translations/ja-JP.json b/i18n/translations/ja-JP.json index 68833735..54f5831f 100644 --- a/i18n/translations/ja-JP.json +++ b/i18n/translations/ja-JP.json @@ -153,13 +153,13 @@ "Location": "場所", "Message": "メッセージ", "Message:": "メッセージ:", + "Miniscript": "ミニスクリプト", "Missing signature file": "署名ファイルが欠落しています", "Mnemonic": "Mnemonic", "Mnemonic ID": "Mnemonic ID", "Mnemonic and passphrase will be kept.": "Mnemonicとパスフレーズは保持されます.", "Mnemonic was not encrypted": "Mnemonicは暗号化されていませんでした", "Modified:": "修正されました:", - "Multisig": "マルチシグ", "Native Segwit - 84 would be assumed": "ネイティブSegwit - 84が仮定されます", "Network": "ネットワーク", "New Mnemonic": "新しい Mnemonic", @@ -185,6 +185,7 @@ "Plaintext QR": "プレーンテキストQR", "Please load a wallet output descriptor": "ウォレットの出力記述子をロードしてください", "Plunge Rate": "沈下率", + "Policy Type": "証券の種類", "Poor entropy": "低品質なエントロピー", "Poor entropy detected!": "低品質なエントロピーが検出されました!", "Print Test QR": "テストQRを印刷", diff --git a/i18n/translations/ko-KR.json b/i18n/translations/ko-KR.json index ac6e4f10..f2b9a4b1 100644 --- a/i18n/translations/ko-KR.json +++ b/i18n/translations/ko-KR.json @@ -153,13 +153,13 @@ "Location": "기본 저장소", "Message": "메시지", "Message:": "메시지:", + "Miniscript": "미니스크립트", "Missing signature file": "서명 파일이 누락되었습니다", "Mnemonic": "니모닉", "Mnemonic ID": "니모닉 ID", "Mnemonic and passphrase will be kept.": "니모닉과 암호는 유지됩니다.", "Mnemonic was not encrypted": "니모닉이 암호화되지 않았습니다", "Modified:": "수정되었습니다:", - "Multisig": "멀티시그", "Native Segwit - 84 would be assumed": "네이티브 세그윗 - BIP84를 적용합니다", "Network": "네트워크", "New Mnemonic": "새로운 니모닉", @@ -185,6 +185,7 @@ "Plaintext QR": "일반텍스트 QR", "Please load a wallet output descriptor": "지갑 출력 디스크립터를 불러오십시오", "Plunge Rate": "침수율", + "Policy Type": "정책 유형", "Poor entropy": "엔트로피가 부족합니다", "Poor entropy detected!": "엔트로피가 부족합니다!", "Print Test QR": "QR 테스트 인쇄", diff --git a/i18n/translations/nl-NL.json b/i18n/translations/nl-NL.json index a97ffeab..35f84de8 100644 --- a/i18n/translations/nl-NL.json +++ b/i18n/translations/nl-NL.json @@ -153,13 +153,13 @@ "Location": "Opslaglocatie", "Message": "Bericht", "Message:": "Bericht:", + "Miniscript": "Miniscript", "Missing signature file": "Handtekening bestand mist", "Mnemonic": "Geheugensteun", "Mnemonic ID": "Geheugensteun ID", "Mnemonic and passphrase will be kept.": "Geheugensteun en wachtwoord worden bewaard.", "Mnemonic was not encrypted": "Geheugensteun is niet versleuteld", "Modified:": "Aangepast:", - "Multisig": "Multisig", "Native Segwit - 84 would be assumed": "Native Segwit - 84 zal worden gebruikt", "Network": "Netwerk", "New Mnemonic": "Geheugensteun aanmaken", @@ -185,6 +185,7 @@ "Plaintext QR": "Platte tekst QR", "Please load a wallet output descriptor": "Laadt een portemonnee descriptor in", "Plunge Rate": "Duik tarief", + "Policy Type": "Type beleid", "Poor entropy": "Slechte entropie", "Poor entropy detected!": "Lage entropie gedetecteerd!", "Print Test QR": "Test QR afdrukken", diff --git a/i18n/translations/pt-BR.json b/i18n/translations/pt-BR.json index cfb13ba9..4515319b 100644 --- a/i18n/translations/pt-BR.json +++ b/i18n/translations/pt-BR.json @@ -153,13 +153,13 @@ "Location": "Local", "Message": "Mensagem", "Message:": "Mensagem:", + "Miniscript": "Miniscript", "Missing signature file": "Arquivo de assinatura faltando", "Mnemonic": "Mnemônico", "Mnemonic ID": "ID do mnemônico", "Mnemonic and passphrase will be kept.": "Mnemônico e senha serão mantidos.", "Mnemonic was not encrypted": "Mnemônico não foi criptografado", "Modified:": "Modificado:", - "Multisig": "Multisig", "Native Segwit - 84 would be assumed": "Segwit nativo - 84 seria assumido", "Network": "Rede", "New Mnemonic": "Novo Mnemônico", @@ -185,6 +185,7 @@ "Plaintext QR": "QR em Texto", "Please load a wallet output descriptor": "Carregue um descritor da carteira", "Plunge Rate": "Taxa de Mergulho", + "Policy Type": "Tipo de Apólice", "Poor entropy": "Entropia fraca", "Poor entropy detected!": "Baixa entropia detectada!", "Print Test QR": "Imprimir QR de teste", diff --git a/i18n/translations/ru-RU.json b/i18n/translations/ru-RU.json index 2d0d76f6..ab75a839 100644 --- a/i18n/translations/ru-RU.json +++ b/i18n/translations/ru-RU.json @@ -153,13 +153,13 @@ "Location": "Расположение", "Message": "Сообщение", "Message:": "Сообщение:", + "Miniscript": "Минискрипт", "Missing signature file": "Отсутствует файл подписи", "Mnemonic": "Мнемоника", "Mnemonic ID": "ID Мнемоники", "Mnemonic and passphrase will be kept.": "Мнемоника и парольная фраза будут сохранены.", "Mnemonic was not encrypted": "Мнемоника не была зашифрована", "Modified:": "Изменено:", - "Multisig": "Мультиподпись", "Native Segwit - 84 would be assumed": "Native Segwit - 84 будет принято", "Network": "Сеть", "New Mnemonic": "Новая Мнемоника", @@ -185,6 +185,7 @@ "Plaintext QR": "QR Открытым Текстом", "Please load a wallet output descriptor": "Пожалуйста загрузите выходной дескриптор кошелька", "Plunge Rate": "Скорость Погружения", + "Policy Type": "Тип политики", "Poor entropy": "Плохая энтропия", "Poor entropy detected!": "Обнаружена плохая энтропия!", "Print Test QR": "Напечатать Тестовый QR", diff --git a/i18n/translations/tr-TR.json b/i18n/translations/tr-TR.json index d59d2242..4df9318c 100644 --- a/i18n/translations/tr-TR.json +++ b/i18n/translations/tr-TR.json @@ -153,13 +153,13 @@ "Location": "Konum", "Message": "Mesaj", "Message:": "Mesaj:", + "Miniscript": "Mini senaryo", "Missing signature file": "İmza dosyası eksik", "Mnemonic": "Mnemonic", "Mnemonic ID": "Mnemonic ID", "Mnemonic and passphrase will be kept.": "Mnemonik ve parola tutulacaktır.", "Mnemonic was not encrypted": "Mnemonic şifrelenmedi", "Modified:": "Değiştirildi:", - "Multisig": "Çoklu imza", "Native Segwit - 84 would be assumed": "Yerel Segwit - 84 varsayılacaktır", "Network": "Ağ", "New Mnemonic": "Yeni Mnemonic", @@ -185,6 +185,7 @@ "Plaintext QR": "Düz Metin QR'ı", "Please load a wallet output descriptor": "Lütfen bir cüzdan çıktı tanımlayıcısı yükleyin", "Plunge Rate": "Dalış Hızı", + "Policy Type": "Politika türü", "Poor entropy": "Düşük entropi", "Poor entropy detected!": "Düşük entropi tespit edildi!", "Print Test QR": "Test QR'ını Yazdır", diff --git a/i18n/translations/vi-VN.json b/i18n/translations/vi-VN.json index 14b760db..6533fff3 100644 --- a/i18n/translations/vi-VN.json +++ b/i18n/translations/vi-VN.json @@ -153,13 +153,13 @@ "Location": "Vị trí lưu", "Message": "Tin nhắn", "Message:": "Tin nhắn:", + "Miniscript": "Chi tiết nhỏ", "Missing signature file": "Thiếu tập tin chữ ký", "Mnemonic": "Mã mnemonic", "Mnemonic ID": "Mnemonic ID ", "Mnemonic and passphrase will be kept.": "Từ gợi nhớ và cụm mật khẩu sẽ được lưu giữ.", "Mnemonic was not encrypted": "Mnemonic không được mã hóa", "Modified:": "Đã sửa đổi:", - "Multisig": "Đa chữ kí", "Native Segwit - 84 would be assumed": "Native Segwit - 84 sẽ được giả định", "Network": "Mạng lưới", "New Mnemonic": "Mnemonic mới", @@ -185,6 +185,7 @@ "Plaintext QR": "QR dạng văn bản", "Please load a wallet output descriptor": "Vui lòng tải bộ mô tả đầu ra ví", "Plunge Rate": "Tỷ lệ sụt giảm", + "Policy Type": "Loại Chính sách", "Poor entropy": "Entropy kém", "Poor entropy detected!": "Phát hiện entropy yếu!", "Print Test QR": "In kiểm tra QR", diff --git a/i18n/translations/zh-CN.json b/i18n/translations/zh-CN.json index e80c2e32..140d49fe 100644 --- a/i18n/translations/zh-CN.json +++ b/i18n/translations/zh-CN.json @@ -153,13 +153,13 @@ "Location": "位置", "Message": "消息", "Message:": "消息:", + "Miniscript": "Miniscript", "Missing signature file": "缺少签名文件", "Mnemonic": "助记词", "Mnemonic ID": "助记词 ID", "Mnemonic and passphrase will be kept.": "助记词和密码将被保留。", "Mnemonic was not encrypted": "助记词未加密", "Modified:": "修改时间:", - "Multisig": "多签", "Native Segwit - 84 would be assumed": "假定为原生 Segwit - 84", "Network": "网络", "New Mnemonic": "新助记词", @@ -185,6 +185,7 @@ "Plaintext QR": "明文二维码", "Please load a wallet output descriptor": "请加载钱包输出描述符", "Plunge Rate": "下刀速度", + "Policy Type": "政策类型", "Poor entropy": "熵值低", "Poor entropy detected!": "检测到低熵!", "Print Test QR": "打印测试二维码", diff --git a/src/krux/translations/__init__.py b/src/krux/translations/__init__.py index d430f4d2..49e62c89 100644 --- a/src/krux/translations/__init__.py +++ b/src/krux/translations/__init__.py @@ -187,13 +187,13 @@ 2817059741, 2030045667, 762611188, + 235032255, 3928301843, 1948316555, 2123991188, 1443208255, 1746030071, 1237332019, - 1845376098, 4265479636, 2939797024, 73574491, @@ -219,6 +219,7 @@ 1703779997, 3561756278, 784609464, + 473757803, 3761518438, 3639136476, 3037062877, diff --git a/src/krux/translations/de.py b/src/krux/translations/de.py index c5ccbe62..c7d7ffa8 100644 --- a/src/krux/translations/de.py +++ b/src/krux/translations/de.py @@ -175,13 +175,13 @@ "Speicherort", "Nachricht", "Nachricht:", + "Miniscript", "Fehlende Signaturdatei", "Mnemonic", "Mnemonische ID", "Mnemotechnik und Passphrase werden beibehalten.", "Mnemonic wurde nicht verschlüsselt", "Geändert:", - "Multisig", "Native Segwit - 84 würde angenommen", "Netzwerk", "Neue Mnemonic", @@ -207,6 +207,7 @@ "Klartext-QR", "Bitte lade einen Wallet Ausgabedeskriptor", "Tauchrate", + "Richtlinientyp:", "Schlechte Entropie", "Schlechte Entropie erkannt!", "Drucke Test-QR", diff --git a/src/krux/translations/es.py b/src/krux/translations/es.py index 7df8539a..b06bfb59 100644 --- a/src/krux/translations/es.py +++ b/src/krux/translations/es.py @@ -175,13 +175,13 @@ "Ubicación", "Mensaje", "Mensaje:", + "Miniscript", "Falta archivo de firma", "Mnemónico", "Identificación del Mnemónico", "Mnemónico y passphrase se mantendrán.", "Mnemónico no fue descifrado", "Modificado:", - "Multisig", "Segwit nativo - 84 se supondría", "Red", "Nuevo Mnemónico", @@ -207,6 +207,7 @@ "QR de Texto", "Carga un descriptor de cartera", "Tasa de Caída", + "Tipo de póliza", "Baja entropía", "Mala entropía detectada!", "Prueba de Impresión QR", diff --git a/src/krux/translations/fr.py b/src/krux/translations/fr.py index daef5f8c..42ad7c7a 100644 --- a/src/krux/translations/fr.py +++ b/src/krux/translations/fr.py @@ -175,13 +175,13 @@ "Emplacement", "Message", "Message\u2009:", + "Miniscript", "Fichier de signature manquant", "Mnémonique", "ID Mnémonique", "Mnémonique et phrase secrète seront conservés.", "Mnémonique n'était pas chiffré", "Modifié\u2009:", - "Multi\nsignature", "Native Segwit - 84 serait supposé", "Réseau", "Nouveau Mnémonique", @@ -207,6 +207,7 @@ "QR en Texte Brut", "Veuillez charger un descripteur de sortie de portefeuille", "Taux de plongée", + "Type de politique", "Entropie faible", "Entropie faible détectée\u2009!", "Impression Test QR", diff --git a/src/krux/translations/ja.py b/src/krux/translations/ja.py index ac54e030..a7a15030 100644 --- a/src/krux/translations/ja.py +++ b/src/krux/translations/ja.py @@ -175,13 +175,13 @@ "場所", "メッセージ", "メッセージ:", + "ミニスクリプト", "署名ファイルが欠落しています", "Mnemonic", "Mnemonic ID", "Mnemonicとパスフレーズは保持されます.", "Mnemonicは暗号化されていませんでした", "修正されました:", - "マルチシグ", "ネイティブSegwit - 84が仮定されます", "ネットワーク", "新しい Mnemonic", @@ -207,6 +207,7 @@ "プレーンテキストQR", "ウォレットの出力記述子をロードしてください", "沈下率", + "証券の種類", "低品質なエントロピー", "低品質なエントロピーが検出されました!", "テストQRを印刷", diff --git a/src/krux/translations/ko.py b/src/krux/translations/ko.py index f726f355..fc1fa040 100644 --- a/src/krux/translations/ko.py +++ b/src/krux/translations/ko.py @@ -175,13 +175,13 @@ "기본 저장소", "메시지", "메시지:", + "미니스크립트", "서명 파일이 누락되었습니다", "니모닉", "니모닉 ID", "니모닉과 암호는 유지됩니다.", "니모닉이 암호화되지 않았습니다", "수정되었습니다:", - "멀티시그", "네이티브 세그윗 - BIP84를 적용합니다", "네트워크", "새로운 니모닉", @@ -207,6 +207,7 @@ "일반텍스트 QR", "지갑 출력 디스크립터를 불러오십시오", "침수율", + "정책 유형", "엔트로피가 부족합니다", "엔트로피가 부족합니다!", "QR 테스트 인쇄", diff --git a/src/krux/translations/nl.py b/src/krux/translations/nl.py index b9eeacbc..3d62e0e7 100644 --- a/src/krux/translations/nl.py +++ b/src/krux/translations/nl.py @@ -175,13 +175,13 @@ "Opslaglocatie", "Bericht", "Bericht:", + "Miniscript", "Handtekening bestand mist", "Geheugensteun", "Geheugensteun ID", "Geheugensteun en wachtwoord worden bewaard.", "Geheugensteun is niet versleuteld", "Aangepast:", - "Multisig", "Native Segwit - 84 zal worden gebruikt", "Netwerk", "Geheugensteun aanmaken", @@ -207,6 +207,7 @@ "Platte tekst QR", "Laadt een portemonnee descriptor in", "Duik tarief", + "Type beleid", "Slechte entropie", "Lage entropie gedetecteerd!", "Test QR afdrukken", diff --git a/src/krux/translations/pt.py b/src/krux/translations/pt.py index c65c6153..18dfa3e1 100644 --- a/src/krux/translations/pt.py +++ b/src/krux/translations/pt.py @@ -175,13 +175,13 @@ "Local", "Mensagem", "Mensagem:", + "Miniscript", "Arquivo de assinatura faltando", "Mnemônico", "ID do mnemônico", "Mnemônico e senha serão mantidos.", "Mnemônico não foi criptografado", "Modificado:", - "Multisig", "Segwit nativo - 84 seria assumido", "Rede", "Novo Mnemônico", @@ -207,6 +207,7 @@ "QR em Texto", "Carregue um descritor da carteira", "Taxa de Mergulho", + "Tipo de Apólice", "Entropia fraca", "Baixa entropia detectada!", "Imprimir QR de teste", diff --git a/src/krux/translations/ru.py b/src/krux/translations/ru.py index 09cfb065..1bdff14f 100644 --- a/src/krux/translations/ru.py +++ b/src/krux/translations/ru.py @@ -175,13 +175,13 @@ "Расположение", "Сообщение", "Сообщение:", + "Минискрипт", "Отсутствует файл подписи", "Мнемоника", "ID Мнемоники", "Мнемоника и парольная фраза будут сохранены.", "Мнемоника не была зашифрована", "Изменено:", - "Мультиподпись", "Native Segwit - 84 будет принято", "Сеть", "Новая Мнемоника", @@ -207,6 +207,7 @@ "QR Открытым Текстом", "Пожалуйста загрузите выходной дескриптор кошелька", "Скорость Погружения", + "Тип политики", "Плохая энтропия", "Обнаружена плохая энтропия!", "Напечатать Тестовый QR", diff --git a/src/krux/translations/tr.py b/src/krux/translations/tr.py index d8a5cd5f..80d141f1 100644 --- a/src/krux/translations/tr.py +++ b/src/krux/translations/tr.py @@ -175,13 +175,13 @@ "Konum", "Mesaj", "Mesaj:", + "Mini senaryo", "İmza dosyası eksik", "Mnemonic", "Mnemonic ID", "Mnemonik ve parola tutulacaktır.", "Mnemonic şifrelenmedi", "Değiştirildi:", - "Çoklu imza", "Yerel Segwit - 84 varsayılacaktır", "Ağ", "Yeni Mnemonic", @@ -207,6 +207,7 @@ "Düz Metin QR'ı", "Lütfen bir cüzdan çıktı tanımlayıcısı yükleyin", "Dalış Hızı", + "Politika türü", "Düşük entropi", "Düşük entropi tespit edildi!", "Test QR'ını Yazdır", diff --git a/src/krux/translations/vi.py b/src/krux/translations/vi.py index 402d60b4..79878a54 100644 --- a/src/krux/translations/vi.py +++ b/src/krux/translations/vi.py @@ -175,13 +175,13 @@ "Vị trí lưu", "Tin nhắn", "Tin nhắn:", + "Chi tiết nhỏ", "Thiếu tập tin chữ ký", "Mã mnemonic", "Mnemonic ID ", "Từ gợi nhớ và cụm mật khẩu sẽ được lưu giữ.", "Mnemonic không được mã hóa", "Đã sửa đổi:", - "Đa chữ kí", "Native Segwit - 84 sẽ được giả định", "Mạng lưới", "Mnemonic mới", @@ -207,6 +207,7 @@ "QR dạng văn bản", "Vui lòng tải bộ mô tả đầu ra ví", "Tỷ lệ sụt giảm", + "Loại Chính sách", "Entropy kém", "Phát hiện entropy yếu!", "In kiểm tra QR", diff --git a/src/krux/translations/zh.py b/src/krux/translations/zh.py index 02e818c6..81f82891 100644 --- a/src/krux/translations/zh.py +++ b/src/krux/translations/zh.py @@ -175,13 +175,13 @@ "位置", "消息", "消息:", + "Miniscript", "缺少签名文件", "助记词", "助记词 ID", "助记词和密码将被保留。", "助记词未加密", "修改时间:", - "多签", "假定为原生 Segwit - 84", "网络", "新助记词", @@ -207,6 +207,7 @@ "明文二维码", "请加载钱包输出描述符", "下刀速度", + "政策类型", "熵值低", "检测到低熵!", "打印测试二维码", diff --git a/src/krux/wallet.py b/src/krux/wallet.py index 33f46027..f6ccd6ed 100644 --- a/src/krux/wallet.py +++ b/src/krux/wallet.py @@ -123,7 +123,9 @@ def load(self, wallet_data, qr_format, allow_assumption=None): descriptor_xpubs = [] for key in descriptor.keys: network, _ = version_to_network_versiontype(key.key.version) - descriptor_xpubs.append(key.key.to_base58(version=NETWORKS[network]['xpub'])) + descriptor_xpubs.append( + key.key.to_base58(version=NETWORKS[network]["xpub"]) + ) if self.key: if self.is_multisig():