Add privToPub and pubToAddr commands
This commit is contained in:
parent
f318f76994
commit
4eaeade618
1 changed files with 9 additions and 0 deletions
|
@ -124,6 +124,15 @@ class UiWebsocketPlugin(object):
|
||||||
def actionEcdsaVerify(self, to, data, address, signature):
|
def actionEcdsaVerify(self, to, data, address, signature):
|
||||||
self.response(to, CryptBitcoin.verify(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")
|
@PluginManager.registerTo("User")
|
||||||
class UserPlugin(object):
|
class UserPlugin(object):
|
||||||
|
|
Loading…
Reference in a new issue