Verify signatures using CLI

This commit is contained in:
shortcutme 2017-10-28 02:39:49 +02:00
parent 9034449e96
commit 2e74b73ba0
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
2 changed files with 10 additions and 0 deletions

View File

@ -165,6 +165,12 @@ class Config(object):
action.add_argument('message', help='Message to sign')
action.add_argument('privatekey', help='Private key')
# Crypt Verify
action = self.subparsers.add_parser("cryptVerify", help='Verify message using Bitcoin public address')
action.add_argument('message', help='Message to verify')
action.add_argument('sign', help='Signiture for message')
action.add_argument('address', help='Signer\'s address')
action = self.subparsers.add_parser("getConfig", help='Return json-encoded info')
# Config parameters

View File

@ -416,6 +416,10 @@ class Actions(object):
from Crypt import CryptBitcoin
print CryptBitcoin.sign(message, privatekey)
def cryptVerify(self, message, sign, address):
from Crypt import CryptBitcoin
print CryptBitcoin.verify(message, address, sign)
# Peer
def peerPing(self, peer_ip, peer_port=None):
if not peer_port: