research-lab/source-code/MiniNero/MyMoneroImport.py

20 lines
574 B
Python
Raw Normal View History

2016-02-05 20:20:44 +00:00
#use at your own risk
#Note, this is not quite working apparently,
#apparently the viewkeys from the main client and mymonero
#although, if they were derived consistently
#(which seems reasonable) then it should work
import MiniNero
import mnemonic
def importMM(wordlist):
print("for testing purposes only!")
sk = MiniNero.recoverSK(wordlist)
print("vk", vk)
print("pvk", MiniNero.publicFromSecret(vk))
key = mnemonic.mn_encode(sk)
cks = MiniNero.electrumChecksum(key)
print(key + " "+cks)
seed = raw_input("12 words?")
print(importMM(seed))