Beispiel #1
0
def create_mpk():
    seed = Btclib.random_electrum_seed()
    mpk = Btclib.subkey_for_path(Btclib.bip32_master_key(seed), "1/1.pub")
    keysign = Btclib.bip32_extract_key(Btclib.subkey_for_path(Btclib.bip32_master_key(seed), "3/3/3/3/1"))
    QtGui.QMessageBox.information(bppclient, 'Welcome', "Your PRIVATE Master Key and your wallet's data have been stored in the \"bpp_data\" folder, please keep it safe!", QtGui.QMessageBox.Ok)
    bppclient.cfgmain = {"priv_seed" : seed, "master_pub_key" : mpk, "keysign" : keysign}
    save_cfg()
    start()
Beispiel #2
0
def start():
    try:
        f = open(os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), 'bpp_data', 'bppcnx.cfg'),'r')
        c = json.load(f)
        f.close()
        bppclient.cfgmain = c["main"]
        bppclient.cfgbpp = c["bpp"]
        for bppid in bppclient.cfgbpp:
            bppclient.ui.bppidcb.addItem(bppid["bppid"])
        if bppclient.cfgmain["master_pub_key"] != "":
            bppclient.mpkbtc = Btclib.bip32_ckd(bppclient.cfgmain["master_pub_key"], 2)
        if bppclient.cfgmain["priv_seed"] != "":
            bppclient.mpkbpp = Btclib.subkey_for_path(Btclib.bip32_master_key(bppclient.cfgmain["priv_seed"]), "1/1/1")
	    bppclient.wallet.privbtc = Btclib.subkey_for_path(Btclib.bip32_master_key(bppclient.cfgmain["priv_seed"]), "1/1/2")
        if bppclient.cfgmain["keysign"] != "":
            bppclient.keysign = bppclient.cfgmain["keysign"]
        if bppclient.cfgbpp != []:
            bppidcnt()
    except IOError:
        create_mpk()
    updateStatusBar()
    updateReceiveAddrs()