@@ -281,20 +281,20 @@ def test_short_4_letter_mnemonic_qr():
281
281
assert d .get_seed_phrase () == ["height" , "demise" , "useless" , "trap" , "grow" , "lion" , "found" , "off" , "key" , "clown" , "transfer" , "enroll" ]
282
282
283
283
284
- # Test data for bitcoin address decoding
285
- legacy_address1 = "1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY"
286
- legacy_address2 = "16ftSEQ4ctQFDtVZiUBusQUjRrGhM3JYwe"
287
- test_legacy_address = "mkpZhYtJu2r87Js3pDiWJDmPte2NRZ8bJV"
284
+ # Test data for bitcoin address decoding. All generated from test key: ["abandon"] * 11 + ["about"]
285
+ legacy_address_mainnet = "1LqBGSKuX5yYUonjxT5qGfpUsXKYYWeabA"
286
+ legacy_address_testnet = "mkpZhYtJu2r87Js3pDiWJDmPte2NRZ8bJV"
288
287
289
- main_nested_segwit_address = "3Nu78Cqcf6hsD4sUBAN9nP13tYiHU9QPFX "
290
- test_nested_segwit_address = "2N6JbrvPMMwbBhu2KxqXyyHUQz3XKspvyfm "
288
+ nested_segwit_address_mainnet = "37VucYSaXLCAsxYyAPfbSi9eh4iEcbShgf "
289
+ nested_segwit_address_testnet = "2Mww8dCYPUpKHofjgcXcBCEGmniw9CoaiD2 "
291
290
292
- main_native_segwit_address = "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"
293
- test_native_segwit_address = "tb1qkurj377gtlmu0j5flcykcsh2xagexh9h3jk06a"
291
+ native_segwit_address_mainnet = "bc1qcr8te4kr609gcawutmrza0j4xv80jy8z306fyu"
292
+ native_segwit_address_testnet = "tb1q6rz28mcfaxtmd6v789l9rrlrusdprr9pqcpvkl"
293
+ native_segwit_address_regtest = "bcrt1q6rz28mcfaxtmd6v789l9rrlrusdprr9pz3cppk"
294
294
295
- main_taproot_address = "bc1p5cyxnuxmeuwuvkwfem96lqzszd02n6xdcjrs20cac6yqjjwudpxqkedrcr"
296
- test_taproot_address = "tb1p8wpt9v4frpf3tkn0srd97pksgsxc5hs52lafxwru9kgeephvs7rqlqt9zj"
297
- regtest_taproot_address = "bcrt1p8wpt9v4frpf3tkn0srd97pksgsxc5hs52lafxwru9kgeephvs7rqjeprhg"
295
+ taproot_address_mainnet = "bc1p5cyxnuxmeuwuvkwfem96lqzszd02n6xdcjrs20cac6yqjjwudpxqkedrcr"
296
+ taproot_address_testnet = "tb1p8wpt9v4frpf3tkn0srd97pksgsxc5hs52lafxwru9kgeephvs7rqlqt9zj"
297
+ taproot_address_regtest = "bcrt1p8wpt9v4frpf3tkn0srd97pksgsxc5hs52lafxwru9kgeephvs7rqjeprhg"
298
298
299
299
300
300
@@ -310,16 +310,16 @@ def decode(address, expected_script_type, expected_network=SettingsConstants.MAI
310
310
assert d .get_address () == address
311
311
assert d .get_address_type () == (expected_script_type , expected_network )
312
312
313
- decode (legacy_address1 , SettingsConstants .LEGACY_P2PKH )
314
- decode (legacy_address2 , SettingsConstants .LEGACY_P2PKH )
315
- decode (test_legacy_address , SettingsConstants .LEGACY_P2PKH , SettingsConstants . TESTNET )
316
- decode (main_nested_segwit_address , SettingsConstants .NESTED_SEGWIT )
317
- decode (test_nested_segwit_address , SettingsConstants .NESTED_SEGWIT , SettingsConstants . TESTNET )
318
- decode (main_native_segwit_address , SettingsConstants .NATIVE_SEGWIT )
319
- decode (test_native_segwit_address , SettingsConstants .NATIVE_SEGWIT , SettingsConstants .TESTNET )
320
- decode (main_taproot_address , SettingsConstants .TAPROOT )
321
- decode (test_taproot_address , SettingsConstants .TAPROOT , SettingsConstants .TESTNET )
322
- decode (regtest_taproot_address , SettingsConstants .TAPROOT , SettingsConstants .REGTEST )
313
+ decode (legacy_address_mainnet , SettingsConstants .LEGACY_P2PKH )
314
+ decode (legacy_address_testnet , SettingsConstants .LEGACY_P2PKH , SettingsConstants . TESTNET )
315
+ decode (nested_segwit_address_mainnet , SettingsConstants .NESTED_SEGWIT )
316
+ decode (nested_segwit_address_testnet , SettingsConstants .NESTED_SEGWIT , SettingsConstants . TESTNET )
317
+ decode (native_segwit_address_mainnet , SettingsConstants .NATIVE_SEGWIT )
318
+ decode (native_segwit_address_testnet , SettingsConstants .NATIVE_SEGWIT , SettingsConstants . TESTNET )
319
+ decode (native_segwit_address_regtest , SettingsConstants .NATIVE_SEGWIT , SettingsConstants .REGTEST )
320
+ decode (taproot_address_mainnet , SettingsConstants .TAPROOT )
321
+ decode (taproot_address_testnet , SettingsConstants .TAPROOT , SettingsConstants .TESTNET )
322
+ decode (taproot_address_regtest , SettingsConstants .TAPROOT , SettingsConstants .REGTEST )
323
323
324
324
325
325
@@ -384,18 +384,18 @@ def decode(address, expected_script_type, is_case_sensitive, expected_network=Se
384
384
assert d .get_address () == addr_variation
385
385
386
386
# Case sensitive address types
387
- decode (legacy_address1 , SettingsConstants .LEGACY_P2PKH , is_case_sensitive = True )
388
- decode (legacy_address2 , SettingsConstants .LEGACY_P2PKH , is_case_sensitive = True )
389
- decode (test_legacy_address , SettingsConstants .LEGACY_P2PKH , is_case_sensitive = True , expected_network = SettingsConstants .TESTNET )
390
- decode (main_nested_segwit_address , SettingsConstants .NESTED_SEGWIT , is_case_sensitive = True )
391
- decode (test_nested_segwit_address , SettingsConstants .NESTED_SEGWIT , is_case_sensitive = True , expected_network = SettingsConstants .TESTNET )
387
+ decode (legacy_address_mainnet , SettingsConstants .LEGACY_P2PKH , is_case_sensitive = True )
388
+ decode (legacy_address_testnet , SettingsConstants .LEGACY_P2PKH , is_case_sensitive = True , expected_network = SettingsConstants .TESTNET )
389
+ decode (nested_segwit_address_mainnet , SettingsConstants .NESTED_SEGWIT , is_case_sensitive = True )
390
+ decode (nested_segwit_address_testnet , SettingsConstants .NESTED_SEGWIT , is_case_sensitive = True , expected_network = SettingsConstants .TESTNET )
392
391
393
392
# Case insensitive address types
394
- decode (main_native_segwit_address , SettingsConstants .NATIVE_SEGWIT , is_case_sensitive = False )
395
- decode (test_native_segwit_address , SettingsConstants .NATIVE_SEGWIT , is_case_sensitive = False , expected_network = SettingsConstants .TESTNET )
396
- decode (main_taproot_address , SettingsConstants .TAPROOT , is_case_sensitive = False )
397
- decode (test_taproot_address , SettingsConstants .TAPROOT , is_case_sensitive = False , expected_network = SettingsConstants .TESTNET )
398
- decode (regtest_taproot_address , SettingsConstants .TAPROOT , is_case_sensitive = False , expected_network = SettingsConstants .REGTEST )
393
+ decode (native_segwit_address_mainnet , SettingsConstants .NATIVE_SEGWIT , is_case_sensitive = False )
394
+ decode (native_segwit_address_testnet , SettingsConstants .NATIVE_SEGWIT , is_case_sensitive = False , expected_network = SettingsConstants .TESTNET )
395
+ decode (native_segwit_address_regtest , SettingsConstants .NATIVE_SEGWIT , is_case_sensitive = False , expected_network = SettingsConstants .REGTEST )
396
+ decode (taproot_address_mainnet , SettingsConstants .TAPROOT , is_case_sensitive = False )
397
+ decode (taproot_address_testnet , SettingsConstants .TAPROOT , is_case_sensitive = False , expected_network = SettingsConstants .TESTNET )
398
+ decode (taproot_address_regtest , SettingsConstants .TAPROOT , is_case_sensitive = False , expected_network = SettingsConstants .REGTEST )
399
399
400
400
401
401
0 commit comments