|
|
@@ -12,6 +12,9 @@
|
|
|
help: help notes functions for MMGen suite commands
|
|
|
"""
|
|
|
|
|
|
+# To permit concatenation of blocks of help text in any order, each block (if not empty)
|
|
|
+# should start with two newlines and end with one newline.
|
|
|
+
|
|
|
class help_notes:
|
|
|
|
|
|
def __init__(self, proto, cfg):
|
|
|
@@ -91,11 +94,10 @@ class help_notes:
|
|
|
def password_formats(self):
|
|
|
from ..passwdlist import PasswordList
|
|
|
pwi_fs = '{:8} {:1} {:26} {:<7} {:<7} {}'
|
|
|
- return '\n '.join(
|
|
|
+ return '\n\n ' + '\n '.join(
|
|
|
[pwi_fs.format('Code', '', 'Description', 'Min Len', 'Max Len', 'Default Len')] +
|
|
|
[pwi_fs.format(k, '-', v.desc, v.min_len, v.max_len, v.dfl_len)
|
|
|
- for k, v in PasswordList.pw_info.items()]
|
|
|
- )
|
|
|
+ for k, v in PasswordList.pw_info.items()])
|
|
|
|
|
|
def dfl_mmtype(self):
|
|
|
from ..addr import MMGenAddrType
|
|
|
@@ -104,19 +106,21 @@ class help_notes:
|
|
|
def address_types(self):
|
|
|
from ..addr import MMGenAddrType
|
|
|
return """
|
|
|
+
|
|
|
ADDRESS TYPES:
|
|
|
|
|
|
Code Type Description
|
|
|
---- ---- -----------
|
|
|
""" + format('\n '.join(['‘{}’ {:<12} - {}'.format(k, v.name, v.desc)
|
|
|
- for k, v in MMGenAddrType.mmtypes.items()]))
|
|
|
+ for k, v in MMGenAddrType.mmtypes.items()])) + '\n'
|
|
|
|
|
|
def fmt_codes(self):
|
|
|
from ..wallet import format_fmt_codes
|
|
|
return """
|
|
|
+
|
|
|
FMT CODES:
|
|
|
|
|
|
- """ + '\n '.join(format_fmt_codes().splitlines())
|
|
|
+ """ + '\n '.join(format_fmt_codes().splitlines()) + '\n'
|
|
|
|
|
|
def coin_id(self):
|
|
|
return self.proto.coin_id
|
|
|
@@ -148,6 +152,7 @@ FMT CODES:
|
|
|
|
|
|
def gas_limit(self, target):
|
|
|
return """
|
|
|
+
|
|
|
GAS LIMIT
|
|
|
|
|
|
This option specifies the maximum gas allowance for an Ethereum transaction.
|
|
|
@@ -158,8 +163,7 @@ Parameter must be an integer or one of the special values ‘fallback’ (for a
|
|
|
locally computed sane default) or ‘auto’ (for gas estimate via an RPC call,
|
|
|
in the case of a token transaction, or locally computed default, in the case
|
|
|
of a standard transaction). The default is ‘auto’.
|
|
|
-
|
|
|
- """ if target == 'swaptx' or self.proto.base_coin == 'ETH' else ''
|
|
|
+""" if target == 'swaptx' or self.proto.base_coin == 'ETH' else ''
|
|
|
|
|
|
def fee(self, all_coins=False):
|
|
|
|
|
|
@@ -168,6 +172,7 @@ of a standard transaction). The default is ‘auto’.
|
|
|
|
|
|
from ..tx import BaseTX
|
|
|
text = """
|
|
|
+
|
|
|
FEE SPECIFICATION
|
|
|
|
|
|
Transaction fees, both on the command line and at the interactive prompt, may
|
|
|
@@ -187,24 +192,26 @@ as {r}, using an integer followed by {l}, for{s}{u}""".format(
|
|
|
r = BaseTX(cfg=self.cfg, proto=eth_proto).rel_fee_desc,
|
|
|
l = self.fee_spec_letters(use_quotes=True, proto=eth_proto),
|
|
|
u = self.fee_spec_names(proto=eth_proto, linebreak='\n'))
|
|
|
- + ' (for Ethereum)\n\n')
|
|
|
+ + ' (for Ethereum)\n')
|
|
|
else:
|
|
|
- return text + '.\n\n'
|
|
|
+ return text + '.\n'
|
|
|
|
|
|
def passwd(self):
|
|
|
return """
|
|
|
+
|
|
|
PASSPHRASE NOTE:
|
|
|
|
|
|
For passphrases all combinations of whitespace are equal, and leading and
|
|
|
trailing space are ignored. This permits reading passphrase or brainwallet
|
|
|
data from a multi-line file with free spacing and indentation.
|
|
|
-""".strip()
|
|
|
+"""
|
|
|
|
|
|
def brainwallet(self):
|
|
|
return """
|
|
|
+
|
|
|
BRAINWALLET NOTE:
|
|
|
|
|
|
To thwart dictionary attacks, it’s recommended to use a strong hash preset
|
|
|
with brainwallets. For a brainwallet passphrase to generate the correct
|
|
|
seed, the same seed length and hash preset parameters must always be used.
|
|
|
-""".strip()
|
|
|
+"""
|