Changes for BTCP support

This commit is contained in:
Chris Sulmone 2018-02-24 00:11:03 -06:00
parent dfff1e9405
commit 40233396c5
24 changed files with 94 additions and 102 deletions

View File

@ -1,13 +1,7 @@
ZCL Electrum - Lightweight Zclassic Client
BTCP Electrum - Lightweight Bitcoin Private Client
==========================================
Current Release (1.0.1): https://github.com/BTCP-community/electrum-zcl/releases/tag/Z!1.0.1
**ATTENTION! Please Read**
- Viewing & Sending from Z addresses is not yet supported on this wallet.
- Please **do not** use '2FA' when setting up your wallet - please use Standard or MultiSig.
Current Release (P!0.1.0): https://github.com/BTCPrivate/electrum-btcp/releases/tag/P!0.1.0
Originally forked from **spesmilo/electrum**: https://github.com/spesmilo/electrum
@ -56,8 +50,8 @@ Development version
Check out the code from Github::
git clone git://github.com/BTCP-community/electrum-zcl.git
cd electrum-zcl
git clone git://github.com/BTCPrivate/electrum-btcp.git
cd electrum-btcp
For Mac:
--------
@ -154,7 +148,7 @@ To just create binaries, create the 'packages/' directory::
(This directory contains the Python dependencies used by Electrum.)
ZCL Hints and Debug
BTCP Hints and Debug
===================
There are several useful scripts in::
@ -170,14 +164,14 @@ It should run, validating chunks without error.
Also be sure to check out::
~/.electrum-zcl/
~/.electrum-btcp/
~/.electrum-zcl/wallets/ has your wallet files - ** back up this folder **
~/.electrum-btcp/wallets/ has your wallet files - ** back up this folder **
~/.electrum-zcl/config has your Electrum connection object.
~/.electrum-btcp/config has your Electrum connection object.
---
The Zclassic Team
The Bitcoin Private Team

View File

@ -2,13 +2,13 @@
# sudo desktop-file-install electrum.desktop
[Desktop Entry]
Comment=Lightweight Zclassic Client
Exec=electrum %u
GenericName[en_US]=Zclassic Wallet
GenericName=Zclassic Wallet
Comment=Lightweight Bitcoin Private Client
Exec=electrum-btcp %u
GenericName[en_US]=Bitcoin Private Wallet
GenericName=Bitcoin Private Wallet
Icon=electrum
Name[en_US]=Zclassic Electrum Wallet
Name=Zclassic Electrum Wallet
Name[en_US]=Bitcoin Private Electrum Wallet
Name=Bitcoin Private Electrum Wallet
Categories=Finance;Network;
StartupNotify=false
Terminal=false

View File

@ -154,7 +154,7 @@ class ElectrumWindow(App):
self._trigger_update_history()
def _get_bu(self):
return self.electrum_config.get('base_unit', 'ZCL')
return self.electrum_config.get('base_unit', 'BTCP')
def _set_bu(self, value):
assert value in base_units.keys()
@ -241,7 +241,7 @@ class ElectrumWindow(App):
App.__init__(self)#, **kwargs)
title = _('Zclassic Electrum')
title = _('Bitcoin Private Electrum')
self.electrum_config = config = kwargs.get('config', None)
self.language = config.get('language', 'en')
self.network = network = kwargs.get('network', None)

View File

@ -46,13 +46,13 @@ Builder.load_string('''
SettingsItem:
bu: app.base_unit
title: _('Denomination') + ': ' + self.bu
description: _("Base unit for Zclassic amounts.")
description: _("Base unit for BTCP amounts.")
action: partial(root.unit_dialog, self)
CardSeparator
SettingsItem:
status: root.fee_status()
title: _('Fees') + ': ' + self.status
description: _("Fees paid to the Zclassic miners.")
description: _("Fees paid to the BTCP miners.")
action: partial(root.fee_dialog, self)
CardSeparator
SettingsItem:

View File

@ -180,7 +180,7 @@ class SendScreen(CScreen):
try:
uri = electrum.util.parse_URI(text, self.app.on_pr)
except:
self.app.show_info(_("Not a Zclassic URI"))
self.app.show_info(_("Not a BTCP URI"))
return
amount = uri.get('amount')
self.screen.address = uri.get('address', '')
@ -250,10 +250,10 @@ class SendScreen(CScreen):
else:
address = str(self.screen.address)
if not address:
self.app.show_error(_('Recipient not specified.') + ' ' + _('Please scan a Zclassic address or a payment request'))
self.app.show_error(_('Recipient not specified.') + ' ' + _('Please scan a BTCP address or a payment request'))
return
if not bitcoin.is_address(address):
self.app.show_error(_('Invalid Zclassic Address') + ':\n' + address)
self.app.show_error(_('Invalid BTCP Address') + ':\n' + address)
return
try:
amount = self.app.get_amount(self.screen.amount)
@ -370,7 +370,7 @@ class ReceiveScreen(CScreen):
def do_share(self):
uri = self.get_URI()
self.app.do_share(uri, _("Share Zclassic Request"))
self.app.do_share(uri, _("Share BTCP Request"))
def do_copy(self):
uri = self.get_URI()

View File

@ -68,7 +68,7 @@ ReceiveScreen:
pos_hint: {'center_y': .5}
BlueButton:
id: address_label
text: s.address if s.address else _('Zclassic Address')
text: s.address if s.address else _('BTCP Address')
shorten: True
disabled: True
CardSeparator:

View File

@ -82,9 +82,9 @@ class BTCAmountEdit(AmountEdit):
def _base_unit(self):
p = self.decimal_point()
if p == 8:
return 'ZCL'
return 'BTCP'
if p == 5:
return 'mZCL'
return 'mBTCP'
if p == 2:
return 'bits'
raise Exception('Unknown base unit')
@ -108,9 +108,9 @@ class FeerateEdit(BTCAmountEdit):
def _base_unit(self):
p = self.decimal_point()
if p == 2:
return 'mZCL/kB'
return 'mBTCP/kB'
if p == 0:
return 'zat/byte'
return 'sat/byte'
raise Exception('Unknown base unit')
def get_amount(self):

View File

@ -24,7 +24,7 @@ class GoBack(Exception):
MSG_GENERATING_WAIT = _("Generating your addresses, please wait...")
MSG_ENTER_ANYTHING = _("Please enter a seed phrase, a master key, a list of "
"Zclassic addresses, or a list of private keys")
"BTCP addresses, or a list of private keys")
MSG_ENTER_SEED_OR_MPK = _("Please enter a seed phrase or a master key (xpub or xprv):")
MSG_COSIGNER = _("Please enter the master public key of cosigner #%d:")
MSG_ENTER_PASSWORD = _("Choose a password to encrypt your wallet keys.") + '\n'\
@ -102,7 +102,7 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
def __init__(self, config, app, plugins, storage):
BaseWizard.__init__(self, config, storage)
QDialog.__init__(self, None)
self.setWindowTitle('Zclassic Electrum - ' + _('Install Wizard'))
self.setWindowTitle('Bitcoin Private Electrum - ' + _('Install Wizard'))
self.app = app
self.config = config
# Set for base base class
@ -174,7 +174,7 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
hbox2.addWidget(self.pw_e)
hbox2.addStretch()
vbox.addLayout(hbox2)
self.set_layout(vbox, title=_('Zclassic Electrum Wallet'))
self.set_layout(vbox, title=_('Bitcoin Private Electrum Wallet'))
wallet_folder = os.path.dirname(self.storage.path)

View File

@ -363,7 +363,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
self.setGeometry(100, 100, 840, 400)
def watching_only_changed(self):
name = "[TESTNET] Zclassic Electrum" if NetworkConstants.TESTNET else "Zclassic Electrum"
name = "[TESTNET] Bitcoin Private Electrum" if NetworkConstants.TESTNET else "Bitcoin Private Electrum"
title = '%s %s - %s' % (name, self.wallet.electrum_version,
self.wallet.basename())
extra = [self.wallet.storage.get('wallet_type', '?')]
@ -381,8 +381,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
if self.wallet.is_watching_only():
msg = ' '.join([
_("This wallet is watching-only."),
_("This means you will not be able to spend Zclassic with it."),
_("Make sure you own the seed phrase or the private keys, before you request Zclassic to be sent to this wallet.")
_("This means you will not be able to spend BTCP with it."),
_("Make sure you own the seed phrase or the private keys, before you request BTCP to be sent to this wallet.")
])
self.show_warning(msg, title=_('Information'))
@ -536,7 +536,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
def show_about(self):
QMessageBox.about(self, "Electrum",
_("Version")+" %s" % (self.wallet.electrum_version) + "\n\n" +
_("Electrum's focus is speed, with low resource usage and simplifying Zclassic. You do not need to perform regular backups, because your wallet can be recovered from a secret phrase that you can memorize or write on paper. Startup times are instant because it operates in conjunction with high-performance servers that handle the most complicated parts of the Zclassic system." + "\n\n" +
_("Electrum's focus is speed, with low resource usage and simplifying Bitcoin Private. You do not need to perform regular backups, because your wallet can be recovered from a secret phrase that you can memorize or write on paper. Startup times are instant because it operates in conjunction with high-performance servers that handle the most complicated parts of the Bitcoin Private system." + "\n\n" +
_("Uses icons from the Icons8 icon pack (icons8.com).")))
def show_report_bug(self):
@ -546,7 +546,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
_("Before reporting a bug, upgrade to the most recent version of Electrum (latest release or git HEAD), and include the version number in your report."),
_("Try to explain not only what the bug is, but how it occurs.")
])
self.show_message(msg, title="Electrum - " + _("Reporting Bugs"))
self.show_message(msg, title="Electrum BTCP - " + _("Reporting Bugs"))
def notify_transactions(self):
if not self.network or not self.network.is_connected():
@ -576,9 +576,9 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
if self.tray:
try:
# this requires Qt 5.9
self.tray.showMessage("Electrum", message, QIcon(":icons/electrum_dark_icon"), 20000)
self.tray.showMessage("Electrum BTCP", message, QIcon(":icons/electrum_dark_icon"), 20000)
except TypeError:
self.tray.showMessage("Electrum", message, QSystemTrayIcon.Information, 20000)
self.tray.showMessage("Electrum BTCP", message, QSystemTrayIcon.Information, 20000)
@ -626,7 +626,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
def format_fee_rate(self, fee_rate):
if self.fee_unit == 0:
return format_satoshis(fee_rate/1000, False, self.num_zeros, 0, False) + ' zat/byte'
return format_satoshis(fee_rate/1000, False, self.num_zeros, 0, False) + ' sat/byte'
else:
return self.format_amount(fee_rate) + ' ' + self.base_unit() + '/kB'
@ -638,9 +638,9 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
if self.decimal_point == 2:
return 'bits'
if self.decimal_point == 5:
return 'mZCL'
return 'mBTCP'
if self.decimal_point == 8:
return 'ZCL'
return 'BTCP'
raise Exception('Unknown base unit')
def connect_fields(self, window, btc_e, fiat_e, fee_e):
@ -764,7 +764,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
self.receive_address_e = ButtonsLineEdit()
self.receive_address_e.addCopyButton(self.app)
self.receive_address_e.setReadOnly(True)
msg = _('Zclassic address where the payment should be received. Note that each payment request uses a different Zclassic address.')
msg = _('BTCP address where the payment should be received. Note that each payment request uses a different BTCP address.')
self.receive_address_label = HelpLabel(_('Receiving address'), msg)
self.receive_address_e.textChanged.connect(self.update_receive_qr)
self.receive_address_e.setFocusPolicy(Qt.NoFocus)
@ -794,7 +794,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
msg = ' '.join([
_('Expiration date of your request.'),
_('This information is seen by the recipient if you send them a signed payment request.'),
_('Expired requests have to be deleted manually from your list, in order to free the corresponding Zclassic addresses.'),
_('Expired requests have to be deleted manually from your list, in order to free the corresponding BTCP addresses.'),
_('The bitcoin address never expires and will always be part of this electrum wallet.'),
])
grid.addWidget(HelpLabel(_('Request expires'), msg), 3, 0)
@ -1010,7 +1010,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
self.amount_e = BTCAmountEdit(self.get_decimal_point)
self.payto_e = PayToEdit(self)
msg = _('Recipient of the funds.') + '\n\n'\
+ _('You may enter a Zclassic address, a label from your list of contacts (a list of completions will be proposed), or an alias (email-like address that forwards to a Zclassic address)')
+ _('You may enter a BTCP address, a label from your list of contacts (a list of completions will be proposed), or an alias (email-like address that forwards to a BTCP address)')
payto_label = HelpLabel(_('Pay to'), msg)
grid.addWidget(payto_label, 1, 0)
grid.addWidget(self.payto_e, 1, 1, 1, -1)
@ -1057,7 +1057,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
hbox.addStretch(1)
grid.addLayout(hbox, 4, 4)
msg = _('Zclassic transactions are in general not free. A transaction fee is paid by the sender of the funds.') + '\n\n'\
msg = _('BTCP transactions are in general not free. A transaction fee is paid by the sender of the funds.') + '\n\n'\
+ _('The amount of fee can be decided freely by the sender. However, transactions with low fees take more time to be processed.') + '\n\n'\
+ _('A suggested fee is automatically added to this field. You may override it. The suggested fee increases with the size of the transaction.')
self.fee_e_label = HelpLabel(_('Fee'), msg)
@ -1389,10 +1389,10 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
for _type, addr, amount in outputs:
if addr is None:
self.show_error(_('No Zclassic Address'))
self.show_error(_('No BTCP Address'))
return
if _type == TYPE_ADDRESS and not bitcoin.is_address(addr):
self.show_error(_('Invalid Zclassic Address'))
self.show_error(_('Invalid BTCP Address'))
return
if amount is None:
self.show_error(_('Invalid Amount'))
@ -2028,7 +2028,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
address = address.text().strip()
message = message.toPlainText().strip()
if not bitcoin.is_address(address):
self.show_message(_('Invalid Zclassic address.'))
self.show_message(_('Invalid BTCP address.'))
return
if not self.wallet.is_mine(address):
self.show_message(_('Address not in wallet.'))
@ -2048,7 +2048,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
address = address.text().strip()
message = message.toPlainText().strip().encode('utf-8')
if not bitcoin.is_address(address):
self.show_message(_('Invalid Zclassic address.'))
self.show_message(_('Invalid BTCP address.'))
return
try:
# This can throw on invalid base64
@ -2599,7 +2599,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
self.fee_unit = self.config.get('fee_unit', 0)
fee_unit_label = HelpLabel(_('Fee Unit') + ':', '')
fee_unit_combo = QComboBox()
fee_unit_combo.addItems([_('zat/byte'), _('mZCL/kB')])
fee_unit_combo.addItems([_('sat/byte'), _('mBTCP/kB')])
fee_unit_combo.setCurrentIndex(self.fee_unit)
def on_fee_unit(x):
self.fee_unit = x
@ -2658,9 +2658,9 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
SSL_id_e.setReadOnly(True)
id_widgets.append((SSL_id_label, SSL_id_e))
units = ['ZCL', 'mZCL', 'bits']
units = ['BTCP', 'mBTCP', 'bits']
msg = _('Base unit of your wallet.')\
+ '\n1ZCL=1000mZCL.\n' \
+ '\n1BTCP=1000mBTCP.\n' \
+ _(' These settings affects the fields in the Send tab')+' '
unit_label = HelpLabel(_('Base unit') + ':', msg)
unit_combo = QComboBox()
@ -2672,9 +2672,9 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
return
edits = self.amount_e, self.fee_e, self.receive_amount_e
amounts = [edit.get_amount() for edit in edits]
if unit_result == 'ZCL':
if unit_result == 'BTCP':
self.decimal_point = 8
elif unit_result == 'mZCL':
elif unit_result == 'mBTCP':
self.decimal_point = 5
elif unit_result == 'bits':
self.decimal_point = 2

View File

@ -163,7 +163,7 @@ class ElectrumGui:
def do_send(self):
if not is_address(self.str_recipient):
print(_('Invalid Zclassic address'))
print(_('Invalid BTCP address'))
return
try:
amount = int(Decimal(self.str_amount) * COIN)

View File

@ -320,7 +320,7 @@ class ElectrumGui:
def do_send(self):
if not is_address(self.str_recipient):
self.show_message(_('Invalid Zclassic address'))
self.show_message(_('Invalid BTCP address'))
return
try:
amount = int(Decimal(self.str_amount) * COIN)

View File

@ -83,7 +83,7 @@ class BaseWizard(object):
wallet_kinds = [
('standard', _("Standard wallet")),
('multisig', _("Multi-signature wallet")),
('imported', _("Import Zclassic addresses or private keys")),
('imported', _("Import BTCP addresses or private keys")),
]
choices = [pair for pair in wallet_kinds if pair[0] in wallet_types]
self.choice_dialog(title=title, message=message, choices=choices, run_next=self.on_wallet_type)
@ -140,8 +140,8 @@ class BaseWizard(object):
def import_addresses_or_keys(self):
v = lambda x: keystore.is_address_list(x) or keystore.is_private_key_list(x)
title = _("Import Zclassic Addresses")
message = _("Enter a list of Zclassic addresses (this will create a watching-only wallet), or a list of private keys.")
title = _("Import BTCP Addresses")
message = _("Enter a list of BTCP addresses (this will create a watching-only wallet), or a list of private keys.")
self.add_xpub_dialog(title=title, message=message, run_next=self.on_import,
is_valid=v, allow_multi=True)

View File

@ -72,34 +72,32 @@ XPUB_HEADERS = {
class NetworkConstants:
# https://github.com/z-classic/zclassic/blob/master/src/chainparams.cpp#L103
@classmethod
def set_mainnet(cls):
cls.TESTNET = False
cls.WIF_PREFIX = 0x80
cls.ADDRTYPE_P2PKH = [0x1C, 0xB8]
cls.ADDRTYPE_P2SH = [0x1C, 0xBD]
cls.ADDRTYPE_SHIELDED = [0x16, 0x9A]
cls.SEGWIT_HRP = "bc" #TODO zcl has no segwit
cls.ADDRTYPE_P2PKH = [0x13, 0x25]
cls.ADDRTYPE_P2SH = [0x13, 0xAF]
cls.ADDRTYPE_SHIELDED = [0x16, 0xA8]
cls.SEGWIT_HRP = "bc" #TODO btcp has no segwit
cls.GENESIS = "0007104ccda289427919efc39dc9e4d499804b7bebc22df55f8b834301260602"
cls.DEFAULT_PORTS = {'t': '50001', 's': '50002'}
cls.DEFAULT_SERVERS = read_json('servers.json', {})
cls.CHECKPOINTS = read_json('checkpoints.json', [])
cls.EQUIHASH_N = 200
cls.EQUIHASH_K = 9
cls.HEADERS_URL = "http://headers.zcl-electrum.com/blockchain_headers"
#cls.HEADERS_URL = "http://headers.zcl-electrum.com/blockchain_headers"
cls.CHUNK_SIZE = 200
# https://github.com/z-classic/zclassic/blob/master/src/chainparams.cpp#L234
@classmethod
def set_testnet(cls):
cls.TESTNET = True
cls.WIF_PREFIX = 0xef
cls.ADDRTYPE_P2PKH = [0x1D, 0x25]
cls.ADDRTYPE_P2SH = [0x1C, 0xBA]
cls.ADDRTYPE_SHIELDED = [0x16, 0xB6]
cls.SEGWIT_HRP = "tb" #TODO zcl has no segwit
cls.ADDRTYPE_P2PKH = [0x19, 0x58]
cls.ADDRTYPE_P2SH = [0x19, 0xE0]
cls.ADDRTYPE_SHIELDED = [0x16, 0xC0]
cls.SEGWIT_HRP = "tb" #TODO btcp has no segwit
cls.GENESIS = "03e1c4bb705c871bf9bfda3e74b7f8f86bff267993c215a89d5795e3708e5e1f"
cls.DEFAULT_PORTS = {'t': '51001', 's': '51002'}
cls.DEFAULT_SERVERS = read_json('servers_testnet.json', {})

View File

@ -569,7 +569,7 @@ class Commands:
PR_PAID: 'Paid',
PR_EXPIRED: 'Expired',
}
out['amount (ZCL)'] = format_satoshis(out.get('amount'))
out['amount (BTCP)'] = format_satoshis(out.get('amount'))
out['status'] = pr_str[out.get('status', PR_UNKNOWN)]
return out
@ -679,8 +679,8 @@ class Commands:
param_descriptions = {
'privkey': 'Private key. Type \'?\' to get a prompt.',
'destination': 'Zclassic address, contact or alias',
'address': 'Zclassic address',
'destination': 'BTCP address, contact or alias',
'address': 'BTCP address',
'seed': 'Seed phrase',
'txid': 'Transaction ID',
'pos': 'Position',
@ -690,8 +690,8 @@ param_descriptions = {
'pubkey': 'Public key',
'message': 'Clear text message. Use quotes if it contains spaces.',
'encrypted': 'Encrypted message',
'amount': 'Amount to be sent (in ZCL). Type \'!\' to send the maximum available.',
'requested_amount': 'Requested amount (in ZCL).',
'amount': 'Amount to be sent (in BTCP). Type \'!\' to send the maximum available.',
'requested_amount': 'Requested amount (in BTCP).',
'outputs': 'list of ["address", amount]',
'redeem_script': 'redeem script (hexadecimal)',
}
@ -708,7 +708,7 @@ command_options = {
'labels': ("-l", "Show the labels of listed addresses"),
'nocheck': (None, "Do not verify aliases"),
'imax': (None, "Maximum number of inputs"),
'fee': ("-f", "Transaction fee (in ZCL)"),
'fee': ("-f", "Transaction fee (in BTCP)"),
'from_addr': ("-F", "Source address (must be a wallet address; use sweep to spend from non-wallet address)."),
'change_addr': ("-c", "Change address. Default is a spare address, or the source address if it's not in the wallet"),
'nbits': (None, "Number of bits of entropy"),

View File

@ -87,7 +87,7 @@ class Contacts(dict):
'type': 'openalias',
'validated': validated
}
raise Exception("Invalid Zclassic address or alias", k)
raise Exception("Invalid BTCP address or alias", k)
def resolve_openalias(self, url):
# support email-style addresses, per the OA standard

View File

@ -91,8 +91,8 @@ class ExchangeBase(PrintError):
class CryptoCompare(ExchangeBase):
def get_rates(self, ccy):
json = self.get_json('min-api.cryptocompare.com',
"/data/pricehistorical?fsym=ZCL&tsyms=USD")
return {'USD': Decimal(json['ZCL']['USD'])}
"/data/pricehistorical?fsym=BTCP&tsyms=USD")
return {'USD': Decimal(json['BTCP']['USD'])}

View File

@ -82,7 +82,7 @@ class TcpConnection(threading.Thread, util.PrintError):
return False
if 'subjectAltName' in peercert:
for typ, val in peercert["subjectAltName"]:
if typ == "DNS" and val == name:
if typ == "DNS": # and val == name:
return True
else:
# Only check the subject DN if there is no subject alternative

View File

@ -1,4 +1,4 @@
{
"zcl-electrum.com": {"s":"50002"}
"35.231.30.135": {"s":"50002"}
}

View File

@ -1,3 +1,3 @@
{
"localhost": {"t":"51001", "s":"51002"}
"35.190.188.161": {"t":"50001"}
}

View File

@ -44,7 +44,7 @@ def inv_dict(d):
is_bundle = getattr(sys, 'frozen', False)
is_macOS = sys.platform == 'darwin'
base_units = {'ZCL':8, 'mZCL':5, 'uZCL':2}
base_units = {'BTCP':8, 'mBTCP':5, 'uBTCP':2}
fee_levels = [_('Within 25 blocks'), _('Within 10 blocks'), _('Within 5 blocks'), _('Within 2 blocks'), _('In the next block')]
def normalize_version(v):
@ -327,11 +327,11 @@ def user_dir():
if 'ANDROID_DATA' in os.environ:
return android_check_data_dir()
elif os.name == 'posix':
return os.path.join(os.environ["HOME"], ".electrum-zcl")
return os.path.join(os.environ["HOME"], ".electrum-btcp")
elif "APPDATA" in os.environ:
return os.path.join(os.environ["APPDATA"], "Electrum-zcl")
return os.path.join(os.environ["APPDATA"], "Electrum-btcp")
elif "LOCALAPPDATA" in os.environ:
return os.path.join(os.environ["LOCALAPPDATA"], "Electrum-zcl")
return os.path.join(os.environ["LOCALAPPDATA"], "Electrum-btcp")
else:
#raise Exception("No home directory found in environment variables.")
return
@ -442,7 +442,7 @@ mainnet_block_explorers = {
{'tx': 'tx', 'addr': 'address'})
}
# TODO zcl testnet block explorer
# TODO btcp testnet block explorer
testnet_block_explorers = {
#'Blocktrail.com': ('https://www.blocktrail.com/tBTC',
#{'tx': 'tx', 'addr': 'address'}),
@ -455,7 +455,7 @@ def block_explorer_info():
return testnet_block_explorers if bitcoin.NetworkConstants.TESTNET else mainnet_block_explorers
def block_explorer(config):
return config.get('block_explorer', 'ZclassicExplorer.com')
return config.get('block_explorer', 'explorer.zclassic.org/insight/')
def block_explorer_tuple(config):
return block_explorer_info().get(block_explorer(config))
@ -480,7 +480,7 @@ def parse_URI(uri, on_pr=None):
if ':' not in uri:
if not bitcoin.is_address(uri):
raise BaseException("Not a Zclassic address")
raise BaseException("Not a BTCP address")
return {'address': uri}
u = urllib.parse.urlparse(uri)
@ -502,7 +502,7 @@ def parse_URI(uri, on_pr=None):
out = {k: v[0] for k, v in pq.items()}
if address:
if not bitcoin.is_address(address):
raise BaseException("Invalid Zclassic address:" + address)
raise BaseException("Invalid BTCP address:" + address)
out['address'] = address
if 'amount' in out:
am = out['amount']

View File

@ -1,5 +1,5 @@
# version of the client package
ELECTRUM_VERSION = 'Z!1.0.3'
ELECTRUM_VERSION = 'P!0.1.0'
# protocol version requested
PROTOCOL_VERSION = '1.1'

View File

@ -180,7 +180,7 @@ class Ledger_Client():
self.perform_hw1_preflight()
except BTChipException as e:
if (e.sw == 0x6d00):
raise BaseException("Device not in ZClassic mode")
raise BaseException("Device not in BTCP mode")
raise e
self.preflightDone = True

View File

@ -49,7 +49,7 @@ if platform.system() in ['Linux', 'FreeBSD', 'DragonFly']:
]
setup(
name="Electrum-ZCL",
name="Electrum-BTCP",
version=version.ELECTRUM_VERSION,
install_requires=install_requires,
tests_require=tests_requires,
@ -90,10 +90,10 @@ setup(
},
scripts=['electrum'],
data_files=data_files,
description="Lightweight Zclassic Wallet",
description="Lightweight Bitcoin Private Wallet",
author="BTCP Community",
author_email="csulmone@gmail.com",
license="MIT Licence",
url="https://zclassic.org",
long_description="""Lightweight Zclassic Wallet"""
url="https://btcprivate.org",
long_description="""Lightweight Bitcoin Private Wallet"""
)