diff --git a/silkaj/crypto_tools.py b/silkaj/crypto_tools.py index ae28606ed56dce45d404b94cab428a4d4423ab57..637d2c36a3f2192c631693d4144a3ec7b77d3e92 100644 --- a/silkaj/crypto_tools.py +++ b/silkaj/crypto_tools.py @@ -22,7 +22,7 @@ from silkaj.constants import PUBKEY_PATTERN PUBKEY_DELIMITED_PATTERN = "^{0}$".format(PUBKEY_PATTERN) CHECKSUM_PATTERN = "[1-9A-HJ-NP-Za-km-z]{3}" -PUBKEY_CHECKSUM_PATTERN = "^{0}!{1}$".format(PUBKEY_PATTERN, CHECKSUM_PATTERN) +PUBKEY_CHECKSUM_PATTERN = "^{0}:{1}$".format(PUBKEY_PATTERN, CHECKSUM_PATTERN) def check_public_key(pubkey, display_error): @@ -34,7 +34,7 @@ def check_public_key(pubkey, display_error): if re.search(re.compile(PUBKEY_DELIMITED_PATTERN), pubkey): return pubkey elif re.search(re.compile(PUBKEY_CHECKSUM_PATTERN), pubkey): - pubkey, checksum = pubkey.split("!") + pubkey, checksum = pubkey.split(":") pubkey_byte = b58_decode(pubkey) checksum_calculed = b58_encode( hash.sha256( @@ -44,7 +44,7 @@ def check_public_key(pubkey, display_error): if checksum_calculed == checksum: return pubkey else: - print("Error: bad checksum for following public key:") + print("Error: Wrong checksum for following public key:") return False elif display_error: diff --git a/silkaj/tx.py b/silkaj/tx.py index 5aa890927608a14fa8d977cad3e6779c36bd8f44..c0e6e74268c8908af7d4143845aeb79f29403049 100644 --- a/silkaj/tx.py +++ b/silkaj/tx.py @@ -76,7 +76,7 @@ from duniterpy.documents.transaction import OutputSource, Unlock, SIGParameter "-r", multiple=True, required=True, - help="Pubkey(s)’ recipients + optional checksum:\n-r <pubkey>[!checksum]\n\ + help="Pubkey(s)’ recipients + optional checksum:\n-r <pubkey>[:checksum]\n\ Sending to many recipients is possible:\n\ * With one amount, all will receive the amount\n\ * With many amounts (one per recipient)", @@ -84,7 +84,7 @@ Sending to many recipients is possible:\n\ @option("--comment", "-c", default="", help="Comment") @option( "--outputBackChange", - help="Pubkey recipient to send the rest of the transaction: <pubkey[!checksum]>", + help="Pubkey recipient to send the rest of the transaction: <pubkey[:checksum]>", ) @option("--yes", "-y", is_flag=True, help="Assume yes. Do not prompt confirmation") @coroutine