commit 87e4131623a42b55a3fe960913745bd3362aa63c
parent ac7bff3aa0b0ac8913b83cef03db48e9c44f941b
Author: thomasv <thomasv@gitorious>
Date: Wed, 22 Feb 2012 15:40:27 +0100
Merge branch 'master' of git://gitorious.org/electrum/electrum
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/client/wdaemon.py b/client/wdaemon.py
@@ -61,6 +61,10 @@ def get_num(pw):
if pw != password: return False
return len(wallet.addresses)
+def get_mpk(pw):
+ if pw != password: return False
+ return wallet.master_public_key.encode('hex')
+
if __name__ == '__main__':
@@ -73,6 +77,8 @@ if __name__ == '__main__':
try:
if cmd == 'getnum':
out = server.getnum(password)
+ elif cmd == 'getkey':
+ out = server.getkey(password)
elif cmd == 'getnewaddress':
out = server.getnewaddress(password)
elif cmd == 'stop':
@@ -94,6 +100,7 @@ if __name__ == '__main__':
server = SimpleJSONRPCServer(( host, port))
server.register_function(get_new_address, 'getnewaddress')
server.register_function(get_num, 'getnum')
+ server.register_function(get_mpk, 'getkey')
server.register_function(do_stop, 'stop')
server.serve_forever()