From fb8e2fe7ebbe57e8cc3bc3c75d31c5522dff8068 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Tue, 11 Mar 2014 14:11:45 +0100 Subject: [PATCH] change decrypt syntax --- lib/commands.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/commands.py b/lib/commands.py index af2c59f1b..bb2b7c223 100644 --- a/lib/commands.py +++ b/lib/commands.py @@ -97,8 +97,8 @@ register_command('validateaddress', 1, 1, False, False, False, 'Check that register_command('verifymessage', 3,-1, False, False, False, 'Verifies a signature', verifymessage_syntax) register_command('encrypt', 2,-1, False, False, False, 'encrypt a message with pubkey','encrypt ') -register_command('decrypt', 2,-1, False, False, False, 'decrypt a message with privkey','decrypt ') -register_command('daemon', 1, 1, True, False, False, 'start/stop daemon') +register_command('decrypt', 2,-1, False, True, True, 'decrypt a message encrypted with pubkey','decrypt ') +register_command('daemon', 1, 1, True, False, False, '') register_command('getproof', 1, 1, True, False, False, 'get merkle proof', 'getproof
') register_command('getutxoaddress', 2, 2, True, False, False, 'get the address of an unspent transaction output','getutxoaddress ') @@ -401,10 +401,8 @@ class Commands: return bitcoin.encrypt_message(message, pubkey) - def decrypt(self, secret, message): - ec = regenerate_key(secret) - decrypted = ec.decrypt_message(message) - return decrypted[0] + def decrypt(self, pubkey, message): + return self.wallet.decrypt_message(pubkey, message, self.password)