diff --git a/pywallet/network.py b/pywallet/network.py index 14fbe2c..e8a9c4c 100644 --- a/pywallet/network.py +++ b/pywallet/network.py @@ -45,6 +45,31 @@ class DashTestNet(object): 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 + """ + NAME = "Omni Main Net" + COIN = "USDT" + SCRIPT_ADDRESS = 0x00 # int(0x00) = 0 + PUBKEY_ADDRESS = 0x05 # int(0x05) = 5 # Used to create payment addresses + SECRET_KEY = 0x80 # int(0x80) = 128 # 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'/0'/0'/" + +class OmniTestNet(object): + """Bitcoin MainNet version bytes. + From https://github.com/OmniLayer/omnicore/blob/develop/src/chainparams.cpp + """ + NAME = "Omni Test Net" + COIN = "USDT" + SCRIPT_ADDRESS = 0x6f # int(0x6f) = 111 + PUBKEY_ADDRESS = 0xc4 # int(0xc4) = 196 # Used to create payment addresses + SECRET_KEY = 0xef # int(0xef) = 239 # 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'/0'/0'/" class BitcoinMainNet(object): """Bitcoin MainNet version bytes. @@ -59,6 +84,18 @@ class BitcoinMainNet(object): EXT_SECRET_KEY = 0x0488ADE4 # Used to serialize private BIP32 addresses BIP32_PATH = "m/44'/0'/0'/" +class FeathercoinMainNet(object): + """Feathercoin MainNet version bytes. + From https://github.com/FeatherCoin/Feathercoin/blob/master-0.13/src/chainparams.cpp + """ + NAME = "Feathercoin Main Net" + COIN = "FTC" + SCRIPT_ADDRESS = 0x05 # int(0x05) = 5 + PUBKEY_ADDRESS = 0x0E # int(0x0E) = 14 # Used to create payment addresses + SECRET_KEY = 0x8E # int(0x8E) = 142 # Used for WIF format + EXT_PUBLIC_KEY = 0x0488BC26 # Used to serialize public BIP32 addresses + EXT_SECRET_KEY = 0x0488DAEE # Used to serialize private BIP32 addresses + BIP32_PATH = "m/44'/4'/0'/" class BitcoinTestNet(object): """Bitcoin TestNet version bytes. diff --git a/pywallet/utils/bip32.py b/pywallet/utils/bip32.py index 85bd671..df32596 100644 --- a/pywallet/utils/bip32.py +++ b/pywallet/utils/bip32.py @@ -659,6 +659,12 @@ def get_network(self, network): response = DashMainNet elif network == 'dash_testnet' or network == 'DASHTEST': response = DashTestNet + elif network == 'omni' or network == 'OMNI': + response = OmniMainNet + elif network == 'omni_testnet' or network == 'OMNI_TESTNET': + response = OmniTestNet + elif network == 'feathercoin' or network == 'FTC': + response = FeathercoinMainNet elif network == "qtum" or network == "QTUM": response = QtumMainNet elif network == 'qtum_testnet' or network == 'QTUMTEST': diff --git a/pywallet/wallet.py b/pywallet/wallet.py index cbd2799..d816879 100644 --- a/pywallet/wallet.py +++ b/pywallet/wallet.py @@ -79,10 +79,16 @@ def get_network(network='btctest'): return BitcoinCashMainNet elif network == "bitcoin_gold" or network == "btg": return BitcoinGoldMainNet - elif network == "dash" or network == "dash": + elif network == "dash": return DashMainNet elif network == "dash_testnet" or network == 'dashtest': return DashTestNet + elif network == 'omni': + return OmniMainNet + elif network == 'omni_testnet': + return OmniTestNet + elif network == "feathercoin" or network == 'ftc': + return FeathercoinMainNet elif network == "qtum": return QtumMainNet elif network == "qtum_testnet" or network == "qtumtest": diff --git a/setup.py b/setup.py index e6e5594..b91d9e7 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 and DOGE", + description="Simple BIP32 (HD) wallet creation for BTC, BTG, BCH, LTC, DASH, USDT, QTUM and DOGE", long_description=long_description, url='https://github.com/ranaroussi/pywallet', author='Ran Aroussi',