JeremyRand
7 years ago
No known key found for this signature in database
GPG Key ID: B3F2D165786D6570
2 changed files with
3 additions and
1 deletions
-
lib/constants.py
-
lib/keystore.py
|
|
@ -63,6 +63,7 @@ class BitcoinMainnet: |
|
|
|
'p2wpkh': 0x04b24746, # zpub |
|
|
|
'p2wsh': 0x02aa7ed3, # Zpub |
|
|
|
} |
|
|
|
BIP44_COIN_TYPE = 0 |
|
|
|
|
|
|
|
|
|
|
|
class BitcoinTestnet: |
|
|
@ -91,6 +92,7 @@ class BitcoinTestnet: |
|
|
|
'p2wpkh': 0x045f1cf6, # vpub |
|
|
|
'p2wsh': 0x02575483, # Vpub |
|
|
|
} |
|
|
|
BIP44_COIN_TYPE = 1 |
|
|
|
|
|
|
|
|
|
|
|
class BitcoinRegtest(BitcoinTestnet): |
|
|
|
|
|
@ -716,7 +716,7 @@ is_bip32_key = lambda x: is_xprv(x) or is_xpub(x) |
|
|
|
|
|
|
|
|
|
|
|
def bip44_derivation(account_id, bip43_purpose=44): |
|
|
|
coin = 1 if constants.net.TESTNET else 0 |
|
|
|
coin = constants.net.BIP44_COIN_TYPE |
|
|
|
return "m/%d'/%d'/%d'" % (bip43_purpose, coin, int(account_id)) |
|
|
|
|
|
|
|
def from_seed(seed, passphrase, is_p2sh): |
|
|
|