diff --git a/README.rst b/README.rst index 0b47a0a2..a0bfcd15 100644 --- a/README.rst +++ b/README.rst @@ -16,14 +16,14 @@ PyWallet \ -**Simple BIP32 (HD) wallet creation for: BTC, BTG, BCH, ETH, LTC, DASH, DOGE** +**Simple BIP32 (HD) wallet creation for: MXT, BTC, BTG, BCH, ETH, LTC, DASH, DOGE** BIP32 (or HD for "hierarchical deterministic") wallets allow you to create child wallets which can only generate public keys and don't expose a private key to an insecure server. This library simplify the process of creating new wallets for the -BTC, BTG, BCH, ETH, LTC, DASH and DOGE cryptocurrencies. +MXT, BTC, BTG, BCH, ETH, LTC, DASH and DOGE cryptocurrencies. Most of the code here is forked from: diff --git a/pywallet/_version.py b/pywallet/_version.py index 3dc1f76b..485f44ac 100644 --- a/pywallet/_version.py +++ b/pywallet/_version.py @@ -1 +1 @@ -__version__ = "0.1.0" +__version__ = "0.1.1" diff --git a/pywallet/network.py b/pywallet/network.py index e8a9c4ca..e81f767a 100644 --- a/pywallet/network.py +++ b/pywallet/network.py @@ -45,6 +45,28 @@ class DashTestNet(object): EXT_SECRET_KEY = 0x04358394 # Used to serialize private BIP32 addresses BIP32_PATH = "m/44'/1'/0'/" +class MarteXMainNet(object): + """MarteX MainNet version bytes.""" + NAME = "MarteX Main Net" + COIN = "MXT" + SCRIPT_ADDRESS = 0x05 # int(0x05) = 05 + PUBKEY_ADDRESS = 0x32 # int(0x32) = 50 # Used to create payment addresses + SECRET_KEY = 0xB2 # int(0xB2) = 178 # Used for WIF format + EXT_PUBLIC_KEY = 0X0488B21E # Used to serialize public BIP32 addresses + EXT_SECRET_KEY = 0X0488ADE4 # Used to serialize private BIP32 addresses + BIP32_PATH = "m/44'/180'/0'/" + +class MarteXTestNet(object): + """MarteX TestNet version bytes.""" + NAME = "MarteX Test Net" + COIN = "MXT" + SCRIPT_ADDRESS = 0xC4 # int(0xC4) = 196 + PUBKEY_ADDRESS = 0x6C # int(0x6F) = 111 # Used to create payment addresses + SECRET_KEY = 0x144 # int(0x144) = 324 # Used for WIF format + EXT_PUBLIC_KEY = 0x043587CF # Used to serialize public BIP32 addresses + EXT_SECRET_KEY = 0x04358394 # Used to serialize private BIP32 addresses + BIP32_PATH = "m/44'/1'/0'/" + class OmniMainNet(object): """Bitcoin MainNet version bytes. From https://github.com/OmniLayer/omnicore/blob/develop/src/chainparams.cpp diff --git a/pywallet/utils/bip32.py b/pywallet/utils/bip32.py index df32596d..281ffdb1 100644 --- a/pywallet/utils/bip32.py +++ b/pywallet/utils/bip32.py @@ -659,6 +659,10 @@ def get_network(self, network): response = DashMainNet elif network == 'dash_testnet' or network == 'DASHTEST': response = DashTestNet + elif network == "martex" or network == "MXT": + response = MarteXMainNet + elif network == 'martex_testnet' or network == 'MXTTEST': + response = MarteXTestNet elif network == 'omni' or network == 'OMNI': response = OmniMainNet elif network == 'omni_testnet' or network == 'OMNI_TESTNET': diff --git a/pywallet/wallet.py b/pywallet/wallet.py index b456325c..8695d3c8 100644 --- a/pywallet/wallet.py +++ b/pywallet/wallet.py @@ -83,6 +83,10 @@ def get_network(network='btctest'): return DashMainNet elif network == "dash_testnet" or network == 'dashtest': return DashTestNet + elif network == "martex" or network == "mxt": + return MarteXMainNet + elif network == "martex_testnet" or network == 'martextest': + return MarteXTestNet elif network == 'omni': return OmniMainNet elif network == 'omni_testnet': diff --git a/setup.py b/setup.py index 5edb2c03..5f60a664 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ def load_version(): setup( name='pywallet', version=version, - description="Simple BIP32 (HD) wallet creation for BTC, BTG, BCH, LTC, DASH, USDT, QTUM and DOGE", + description="Simple BIP32 (HD) wallet creation for MXT, BTC, BTG, BCH, LTC, DASH, USDT, QTUM and DOGE", long_description=long_description, url='https://github.com/ranaroussi/pywallet', author='Ran Aroussi', @@ -47,7 +47,7 @@ def load_version(): "Programming Language :: Python :: 3.6", ], platforms = ['any'], - keywords='bitcoin, wallet, litecoin, hd-wallet, dogecoin, dashcoin, python', + keywords='martexcoin, bitcoin, wallet, litecoin, hd-wallet, dogecoin, dashcoin, python', packages = find_packages(exclude=['contrib', 'docs', 'tests', 'demo', 'demos', 'examples']), package_data={'': ['AUTHORS', 'LICENSE']}, install_requires=[