diff --git a/plugins/CryptMessage/CryptMessagePlugin.py b/plugins/CryptMessage/CryptMessagePlugin.py index 7198ed08..462d183c 100644 --- a/plugins/CryptMessage/CryptMessagePlugin.py +++ b/plugins/CryptMessage/CryptMessagePlugin.py @@ -124,6 +124,15 @@ class UiWebsocketPlugin(object): def actionEcdsaVerify(self, to, data, address, signature): self.response(to, CryptBitcoin.verify(data, address, signature)) + # Gets the publickey of a given privatekey + def actionPrivToPub(self, to, privatekey): + self.response(to, btctools.privtopub(privatekey)) + + # Gets the address of a given publickey + def actionPubToAddr(self, to, publickey): + address = btctools.pubtoaddr(btctools.decode_pubkey(publickey)) + self.response(to, address) + @PluginManager.registerTo("User") class UserPlugin(object):