added _xprv_versions_from_network
@@ -117,6 +117,7 @@ _P2WPKH_PUB_PREFIXES = [NETWORKS[net]['slip32_p2wpkh_pub'] for net in NETWORKS]
def _xpub_versions_from_network(network: str) -> List[bytes]:
+ network = network.lower()
result = [
NETWORKS[network]['bip32_pub'],
NETWORKS[network]['slip32_p2wsh_p2sh_pub'],
@@ -127,6 +128,18 @@ def _xpub_versions_from_network(network: str) -> List[bytes]:
return result
+def _xprv_versions_from_network(network: str) -> List[bytes]:
+ network = network.lower()
+ result = [
+ NETWORKS[network]['bip32_prv'],
+ NETWORKS[network]['slip32_p2wsh_p2sh_prv'],
+ NETWORKS[network]['slip32_p2wpkh_p2sh_prv'],
+ NETWORKS[network]['slip32_p2wpkh_prv'],
+ NETWORKS[network]['slip32_p2wsh_prv'],
+ ]
+ return result
+
+
# the following provides false match for regtest
# not a problem as long as it is used for WIF/Base58Address/BIP32xkey
# where the two networks share same prefixes.
