|
8 | 8 | ) |
9 | 9 | from hdwallet.seeds.bip39 import BIP39Seed |
10 | 10 | from hdwallet.cryptocurrencies import Bitcoin as Cryptocurrency |
11 | | -from hdwallet.derivations import BIP44Derivation |
| 11 | +from hdwallet.derivations import ( |
| 12 | + BIP44Derivation, CHANGES |
| 13 | +) |
12 | 14 | from hdwallet.hds import BIP44HD |
13 | 15 |
|
14 | 16 |
|
|
37 | 39 |
|
38 | 40 | # Initialize BIP44 HD |
39 | 41 | bip44_hd: BIP44HD = BIP44HD( |
40 | | - ecc=Cryptocurrency.ECC, coin_type=Cryptocurrency.COIN_TYPE, account=0, change="external-chain", address=0 |
| 42 | + ecc=Cryptocurrency.ECC, |
| 43 | + wif_prefix=Cryptocurrency.NETWORKS.MAINNET.WIF_PREFIX, |
| 44 | + coin_type=Cryptocurrency.COIN_TYPE, |
| 45 | + account=0, |
| 46 | + change=CHANGES.EXTERNAL_CHAIN, |
| 47 | + address=0 |
41 | 48 | ) |
42 | 49 | # Update BIP44 HD root keys from seed |
43 | 50 | bip44_hd.from_seed( |
|
57 | 64 | coin_type=Cryptocurrency.COIN_TYPE |
58 | 65 | ) |
59 | 66 | bip44_derivation.from_account(account=0) |
60 | | -bip44_derivation.from_change(change="internal-chain") |
| 67 | +bip44_derivation.from_change(change=CHANGES.INTERNAL_CHAIN) |
61 | 68 | bip44_derivation.from_address(address=0) |
62 | 69 |
|
63 | 70 | # Update current BIP44 HD derivation |
|
67 | 74 | # Or update current BIP44 HD derivation by changing indexes |
68 | 75 | # bip44_hd.from_coin_type(coin_type=Cryptocurrency.COIN_TYPE) |
69 | 76 | # bip44_hd.from_account(account=0) |
70 | | -# bip44_hd.from_change(change="internal-chain") |
| 77 | +# bip44_hd.from_change(change=CHANGES.INTERNAL_CHAIN) |
71 | 78 | # bip44_hd.from_address(address=0) |
72 | 79 |
|
73 | 80 | # Dump derived keys |
|
0 commit comments