{"id":341558,"date":"2022-11-22T15:00:43","date_gmt":"2022-11-22T15:00:43","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=341558"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=341558","title":{"rendered":"<span>\u041a\u0430\u043a \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438\u0437 \u043d\u0438\u0447\u0435\u0433\u043e \u043e\u0442 \u043e\u0434\u043d\u043e\u0439 Bitcoin \u043f\u043b\u0430\u0442\u0451\u0436\u043a\u0438 \u043d\u0430 Python<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u0432 \u0434\u0430\u043b\u0451\u043a\u043e\u043c &#8212; \u0433\u043e\u0434 \u043d\u0430\u0437\u0430\u0434<\/h2>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0438\u0437 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u0432\u0435\u0449\u0435\u0439 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u0438 \u043d\u043e\u0432\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f python, qt \u0438 bitcoin \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.<\/p>\n<h2>\u0421 \u0447\u0435\u0433\u043e \u0432\u0441\u0451 \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u043e\u0441\u044c<\/h2>\n<p>\u0412 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043c\u043d\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0438\u0451\u043c \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439 \u0432 \u043a\u0440\u0438\u043f\u0442\u043e\u0432\u0430\u043b\u044e\u0442\u0435 \u0438 \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 Bitcoin, \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043d\u0430 \u0437\u0430\u043a\u0430\u0437, \u0434\u0430\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043b\u0438\u0447\u043d\u044b\u0439 \u0441\u0447\u0451\u0442, \u043e\u043f\u043b\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0442\u043e\u0432\u0430\u0440\u044b \u0438 \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0438\u0445. <\/p>\n<p>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0442\u0430\u043a\u0438\u0435 \u043f\u043b\u0430\u0442\u0451\u0436\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u044f \u0442\u043e\u0433\u0434\u0430 \u043d\u0435 \u0437\u043d\u0430\u043b \u0438 \u043f\u043e\u043d\u044f\u0442\u0438\u044f \u043d\u0435 \u0438\u043c\u0435\u043b \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0432\u0435\u0449\u044c, \u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u044f \u0443\u0436\u0435 \u043e \u0437\u043d\u0430\u043d\u0438\u044f\u0445 \u043e \u0442\u043e\u043c \u0438\u0437 \u0447\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0431\u043b\u043e\u043a, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438, \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/bad\/809\/29f\/bad80929fdcb75cf708856b5c7dae70a.jpg\" alt=\"\u0438\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \" title=\"\u0438\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \" width=\"1280\" height=\"851\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bad\/809\/29f\/bad80929fdcb75cf708856b5c7dae70a.jpg\" data-blurred=\"true\"\/><figcaption>\u0438\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 <\/figcaption><\/figure>\n<p>\u041c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0431\u0438\u0442\u043a\u043e\u0438\u043d \u043e\u043f\u043b\u0430\u0442\u0430 \u0432 \u0431\u043e\u0442\u0435 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c, \u0442\u0430\u043a \u0436\u0435 \u043d\u0430 python \u0438 \u0442\u0430\u043a \u0436\u0435 \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 Habr. <\/p>\n<p>\u0415\u0451 \u044f \u0438 \u0432\u0437\u044f\u043b \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0438 \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u043b \u043d\u0435 \u043c\u0430\u043b\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0447\u0442\u043e \u0431\u044b \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0431\u0430\u0437\u0443 \u0432\u0441\u0435\u0433\u043e \u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f.<br \/>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d \u0437\u0434\u0435\u0441\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442, \u0442\u0430\u043a\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u043d\u0435 \u043c\u0430\u043b\u043e. \u0437\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0435\u0442 \u0442\u043e \u043a\u0430\u043a \u044f \u043d\u0430\u0448\u0451\u043b \u0438\u0434\u0435\u044e \u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. <\/p>\n<h2>\u0418 \u0442\u0430\u043a, \u0432\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043b\u0430\u0442\u0451\u0436\u043d\u044b\u0439 \u043f\u0440\u0438\u0451\u043c \u043d\u0430 Bitcoin \u043e\u043d \u0436\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0432 \u043d\u0430\u0448\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u043d\u0430 qt<\/h2>\n<p>\u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0441\u0451 \u0434\u0435\u043b\u0430\u044e\u0442 \u0437\u0430 \u043d\u0430\u0441 \u043d\u0443 \u0438\u043b\u0438 \u043d\u0430 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443&#8230;<\/p>\n<p>\u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f pywallet \u043d\u043e \u0435\u0441\u0442\u044c \u0442\u0430\u043a \u0436\u0435 bitcoiblib, py-hd-wallet, hdwallet \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043d\u0435\u043f\u043b\u043e\u0445\u0438\u0435 \u043b\u0438\u0431\u044b, \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u0438 \u043f\u043b\u044e\u0441\u044b, \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u0441\u0435\u0431\u044f \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 hdwallet \u0438 pywallet, \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0430 \u0442\u043e\u0431\u0438\u0448\u044c \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0430. <\/p>\n<pre><code class=\"python\"># \u0418\u043d\u0434\u0435\u043a\u0441 \u0430\u0434\u0440\u0435\u0441\u0430, \u0438\u043d\u0434\u0435\u043a\u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0433\u043b\u0443\u0431\u0438\u043d\u043e \u0430\u0434\u0440\u0435\u0441\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 seed \u0444\u0440\u0430\u0437\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0430\u0434\u0440\u0435\u0441\u043e\u0432  index = 0 # \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u043c \u043e\u0442 \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430  # \u043d\u0430\u0448\u0430 seed \u0444\u0440\u0430\u0437\u0430 \u0438\u043b\u0438 \u043c\u043d\u0435\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0444\u0440\u0430\u0437\u0430, \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044f \u043f\u0440\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u0430\u0434\u0440\u0435\u0441\u0430, \u043d\u0430 \u043d\u0435\u0439 \u0432\u0441\u0451 \u043e\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f seed = 'one two one two one two ...'  # \u0434\u0430\u043b\u0435\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043c\u0430\u0441\u0442\u0435\u0440 \u043a\u043b\u044e\u0447 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043c\u043d\u0435\u043d\u043e\u043d\u0438\u043a\u0438  master_key = wallet.HDPrivateKey.master_key_from_mnemonic(seed)  # \u0438 \u0434\u0430\u043b\u0435\u0435 \u043f\u043e \u043f\u0443\u0442\u044f\u043c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0430\u0434\u0440\u0435\u0441 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 BIP 44 \u0438 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043c\u0441\u044f \u043f\u043e \u0438\u0438\u0440\u0430\u0440\u0445\u0438\u0438 \u043e\u0442 \u043a\u043b\u044e\u0447\u0430 \u0434\u043e \u043f\u0430\u0431\u043b\u0438\u043a \u0438 \u043f\u0440\u0438\u0432\u0430\u0442 \u043a\u043b\u044e\u0447\u0430 root_keys = wallet.HDKey.from_path(master_key, \"m\/44'\/0'\/0'\/0\")[-1].public_key.to_b58check() xpublic_key = (root_keys)  # \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430\u0448 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0439 \u0430\u0434\u0440\u0435\u0441 address = Wallet.deserialize(xpublic_key, network='BTC').get_child(index,is_prime=False).to_address()  rootkeys_wif = wallet.HDKey.from_path(master_key, f\"m\/44'\/0'\/0'\/0\/{index}\")[-1] # &lt;- \u044d\u0442\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u0431\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043d\u043e\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 xprivatekey = rootkeys_wif.to_b58check()  # Wallet Import Format \u043e\u043d \u0441\u043b\u0443\u0436\u0438\u0442 \u0434\u043b\u044f \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439  wif = Wallet.deserialize(xprivatekey, network='BTC').export_to_wif()<\/code><\/pre>\n<p>\u0432\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b<\/p>\n<p>\u0442\u0430\u043a\u0430\u044f \u0436\u0435 \u043f\u043e \u043b\u043e\u0433\u0438\u043a\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 hdwallet.<\/p>\n<pre><code class=\"python\">index = [0, 1, 2] bip44_btc = BIP44HDWallet(cryptocurrency=BitcoinMainnet) bip44_btc.from_mnemonic(mnemonic=seedphrase, language=\"english\") bip44_btc.clean_derivation()  bip44_derivation: BIP44Derivation = BIP44Derivation(cryptocurrency=BitcoinMainnet, account=0, change=False,address=index[0]) bip44_btc.from_path(path=bip44_derivation) wif_0_44 = bip44_btc.wif() key = Key(wif=wif_0_44) balance_1_for_btc = key.get_balance('usd') addressinput_0_btc = bip44_btc.address()<\/code><\/pre>\n<h2>\u0421 \u0438\u0438\u0440\u0430\u0440\u0445\u0438\u0435\u0439 \u043f\u043e\u043d\u044f\u0442\u043d\u043e. \u0418\u0434\u0435\u044f<\/h2>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043b\u0430\u0442\u0451\u0436\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441 \u043f\u0440\u0438\u0451\u043c\u043e\u043c \u0431\u0438\u0442\u043a\u043e\u0438\u043d, \u043c\u043d\u0435 \u0442\u0443\u0442 \u0436\u0435 \u043f\u0440\u0438\u0448\u043b\u0430 \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0438 \u0432 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f \u0438\u0434\u0435\u044f, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043b\u0430\u0442\u0451\u0436\u043a\u0443 \u043e\u0431\u0435\u0440\u043d\u0443\u0442\u044c \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0437 \u044d\u0442\u043e\u0433\u043e Bitcoin Wallet. \u0414\u0430 \u0435\u0449\u0451 \u0438 \u0441 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u043c \u0432\u0441\u0435\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439<br \/>\u0412\u0441\u0451 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 Qt, \u0437\u0430\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043d\u0430\u0448 \u043a\u043e\u0434 \u0432 \u043b\u043e\u0433\u0438\u043a\u0443 \u0438 \u0433\u043e\u0442\u043e\u0432\u043e. <\/p>\n<h2>\u041a\u0442\u043e \u043d\u0435 \u043f\u043e\u043d\u044f\u043b<\/h2>\n<p>\u0418\u043c\u0435\u044f \u043d\u0430\u0448\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043c\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043d\u0430\u0448\u0435\u0439 \u0436\u0435 \u043c\u043d\u0435\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0444\u0440\u0430\u0437\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043d\u043e\u0432\u044b\u0435 \u0430\u0434\u0440\u0435\u0441\u0430, \u043a\u043b\u044e\u0447\u0438 \u0438 \u043f\u0440\u043e\u0447\u0435\u0435, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430, \u043d\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u043a\u0430\u043a \u0440\u0430\u0437 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0443 \u043d\u0430\u0441 \u043d\u0430 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0435, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u043a\u0430\u043a\u0438\u043c \u0442\u043e \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u0432 \u0440\u043e\u043b\u0438 \u0431\u0430\u043d\u043a\u0430.<\/p>\n<h2>\u0414\u0430\u0432\u0430\u0439 \u043a\u043e\u0434!<\/h2>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043f\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443 PyQt5 \u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cad\/b09\/303\/cadb09303d24f3f044b49361fd24dbdf.png\" alt=\"\u043e\u043a\u043d\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438\" title=\"\u043e\u043a\u043d\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438\" width=\"1920\" height=\"1040\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cad\/b09\/303\/cadb09303d24f3f044b49361fd24dbdf.png\"\/><figcaption>\u043e\u043a\u043d\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438<\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/513\/03c\/068\/51303c068338e7576d31981c052e7d33.png\" alt=\"\u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0435 \u043e\u043a\u043d\u043e\" title=\"\u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0435 \u043e\u043a\u043d\u043e\" width=\"1920\" height=\"1080\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/513\/03c\/068\/51303c068338e7576d31981c052e7d33.png\"\/><figcaption>\u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0435 \u043e\u043a\u043d\u043e<\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043d\u0430\u0447\u043d\u0451\u043c \u0435\u0433\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c.<\/p>\n<pre><code class=\"python\">import sqlite3  import bit import clipboard import qrcode as qrcode import requests from PyQt5 import QtWidgets from PyQt5.QtGui import * from PyQt5.QtWidgets import QDialog, QApplication, QMainWindow, QMessageBox from PyQt5.uic import loadUi from bs4 import BeautifulSoup from pywallet import wallet from pywallet.utils import *<\/code><\/pre>\n<p>\u0418\u043c\u043f\u043e\u0440\u0442 \u043d\u0443\u0436\u043d\u044b\u0445 \u043d\u0430\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.<\/p>\n<pre><code class=\"python\">class LoginScreen(QMainWindow):     def __init__(self):         super(LoginScreen, self).__init__()         loadUi(\"GUI\/atom.ui\",self)         self.passwordline.setEchoMode(QtWidgets.QLineEdit.Password)         self.registrnow.clicked.connect(self.gotoReg)         self.Loginone.clicked.connect(self.loginfunction)      def gotoReg(self):         Reg = RegScreen()         widget.addWidget(Reg)         widget.setCurrentIndex(widget.currentIndex()+1)      def loginfunction(self):         password = self.passwordline.text()         if len(password) == 0:             self.error.setText(\"Please input all fields.\")         else:             db = sqlite3.connect(\"wallet.db\")             curs = db.cursor()             curs.execute(f\"SELECT * FROM users WHERE Password = '{password}'\")             if not curs.fetchone():                 self.error.setText(\"Incorrect password\")             else:                 fillprofile = Profile()                 widget.addWidget(fillprofile)                 widget.setCurrentIndex(widget.currentIndex() + 1)<\/code><\/pre>\n<p>\u043a\u043b\u0430\u0441\u0441 \u0432\u0445\u043e\u0434\u0430 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043d\u0430\u0448 ui \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043a\u043d\u043e\u043f\u043a\u0438 <br \/>\u0434\u0430\u043b\u0435\u0435 \u043e\u0431\u044b\u0447\u043d\u0430\u044f \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0430\u0440\u043e\u043b\u044f \u0438 \u0432\u0445\u043e\u0434\u0430 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Sqlite3.<\/p>\n<h2>\u0412 \u0438\u0434\u0435\u0430\u043b\u0435<\/h2>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0430 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0431\u044b\u043b\u0430 \u043a\u0430\u043a \u043f\u0435\u0442-\u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0432 \u0438\u0434\u0435\u0430\u043b\u0435 \u0431\u044b \u043a\u043e\u043d\u0435\u0447\u043d\u043e ui \u0442\u0430\u043a \u043d\u0435 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c stackedWidget \u0438 \u043f\u043e \u043d\u0435\u043c\u0443 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c, \u0438 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0434\u043d\u0438\u043c \u043a\u043b\u0430\u0441\u0441\u043e\u043c \u0438\u043b\u0438 \u0434\u0432\u0443\u043c\u044f, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c Postgresql \u043a\u0430\u043a\u043e\u0439 \u043d\u0438\u0431\u0443\u0434\u044c, \u0434\u0430 \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u0441\u043e\u0444\u0442 \u0432 \u0441\u0442\u043e\u043b \u043b\u0443\u0447\u0448\u0435 \u043d\u0430 \u043f\u043b\u044e\u0441\u0430\u0445 \u0438\u043b\u0438 \u0448\u0430\u0440\u043f\u0435. <\/p>\n<pre><code class=\"python\">class Profile(QDialog):     def __init__(self):         super(Profile, self).__init__()         loadUi(\"GUI\/main.ui\", self)         self.btcpricee()         self.balanceuser()         self.logout.clicked.connect(self.loginout)         self.receive.clicked.connect(self.receivebtcaddress)         self.receive_2.clicked.connect(self.receivebtcaddress)         self.walletbutton.clicked.connect(self.walletent)         self.sendd.clicked.connect(self.sendbtc)         self.sendd_2.clicked.connect(self.sendbtc)         self.settings.clicked.connect(self.settinges)      def balanceuser(self):         try:             db = sqlite3.connect(\"wallet.db\")             curs = db.cursor()             sss = \"SELECT btc_address FROM users\"             curs.execute(sss)             adres = curs.fetchone()             url = f'https:\/\/www.blockchain.com\/btc\/address\/{adres[0]}'             headers = {'User-Agent': 'Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko\/20100101 Firefox\/93.0'}             Response = requests.get(url, headers=headers)             wallet = BeautifulSoup(Response.content, 'html.parser')             convert = wallet.findAll(\"span\", {\"class\": \"sc-16b9dsl-1\",\"class\": \"ZwupP\", \"class\": \"u3ufsr-0\", \"class\": \"eQTRKC\"})             rx = convert[6].text             self.balance.setText(str(rx))             response = requests.get('https:\/\/api.coindesk.com\/v1\/bpi\/currentprice.json')             data = response.json()             x = data[\"bpi\"][\"USD\"][\"rate_float\"]             xx = rx.rstrip('BTC')             us = (x * float(xx))             self.usdbalance.setText(str(us))         except:             self.balance.setText(str('Loading...'))             self.usdbalance.setText(str('---')) <\/code><\/pre>\n<p>\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0430\u043b\u0430\u043d\u0441\u0430, \u0434\u043e\u0441\u0442\u0430\u0451\u043c \u0438\u0437 \u0431\u0434 \u0430\u0434\u0440\u0435\u0441 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0430\u0440\u0441\u0438\u043c \u0435\u0433\u043e \u0438 \u0434\u0430\u043b\u0435\u0435 \u0447\u0435\u0440\u0435\u0437 setText \u0432\u044b\u0432\u043e\u0434\u0438\u043c <\/p>\n<pre><code class=\"python\">class RegScreen(QDialog):     def __init__(self):         super(RegScreen, self).__init__()         loadUi(\"GUI\/reg.ui\",self)         self.loginperehod.clicked.connect(self.gotoLogin)         self.signupreg.clicked.connect(self.registrationfunction)      def gotoLogin(self):         Log = LoginScreen()         widget.addWidget(Log)         widget.setCurrentIndex(widget.currentIndex() + 1)       def registrationfunction(self):         password_reg = self.passwordreg.text()         repl_password = self.relacepasswordreg.text()         if repl_password != password_reg:             self.errorreg1_2.setText(\"Password does not match\")         else:             if len(password_reg) == 0:                 self.errorreg1.setText(\"To register, you need to fill in all the fields\")             elif len(password_reg) &lt; 8:                 self.passerror.setText('Password cannot be less than 8 characters')             else:                 db = sqlite3.connect('wallet.db')                 curs = db.cursor()                  curs.execute('''CREATE TABLE IF NOT EXISTS users (                                             Password TEXT,                                             balance INTEGER,                                             btc_address,                                             wif TEXT,                                             btc_send TEXT                                             )''')                  db.commit()                 curs.execute(\"SELECT Password FROM users\")                 if curs.fetchone() is None:                     index = 0                     seed = ''                     master_key = wallet.HDPrivateKey.master_key_from_mnemonic(seed)                     root_keys = wallet.HDKey.from_path(master_key, \"m\/44'\/0'\/0'\/0\")[-1].public_key.to_b58check()                     xpublic_key = (root_keys)                     address = Wallet.deserialize(xpublic_key, network='BTC').get_child(index,is_prime=False).to_address()                     rootkeys_wif = wallet.HDKey.from_path(master_key, f\"m\/44'\/0'\/0'\/0\/{index}\")[-1]                     xprivatekey = rootkeys_wif.to_b58check()                     wif = Wallet.deserialize(xprivatekey, network='BTC').export_to_wif()                     curs.execute(\"INSERT INTO users VALUES (?, ?, ?, ?, ?)\", (password_reg, 0, address, wif, 0))                     img = qrcode.make(address)                     img.save('GUI\/qr.png')                     db.commit()                     self.successreg.setText(\"You have successfully registered!\")                 else:                     error = QMessageBox()                     error.setWindowTitle('Big request to create an account')                     error.setText('Sorry, you cannot create another account.')                     error.setIcon(QMessageBox.Warning)                     error.setDefaultButton(QMessageBox.Ok)                     error.exec_()                     exit()<\/code><\/pre>\n<p>\u041a\u043b\u0430\u0441\u0441 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0441 \u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438, \u043a\u0430\u043a \u0432\u0438\u0434\u0438\u043c \u043f\u0440\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0442\u0443 \u0441\u0430\u043c\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438, \u0434\u0430\u043b\u0435\u0435 \u043c\u044b \u0437\u0430\u043d\u043e\u0441\u0438\u043c \u043d\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0431\u0434.<\/p>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435 \u0432\u0441\u0451 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u043c\u044b \u0432\u0437\u044f\u043b\u0438 \u0431\u0438\u0442\u043a\u043e\u0438\u043d \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438 \u0437\u0430\u0441\u0443\u043d\u0443\u043b\u0438 \u0435\u0451 \u0432 Qt \u0438 \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u0438 \u0441 \u043f\u043b\u0430\u0442\u0451\u0436\u043a\u043e\u0439 \u043c\u044b \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0431\u0430\u043b\u0430\u043d\u0441 \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0437\u0430 \u0441\u0447\u0451\u0442 Wallet Import Format \u0438\u043b\u0438 \u0441\u043e\u043a\u0440.WIF \u0438 \u043f\u043e \u0440\u0430\u0437\u043d\u043e\u043c\u0443 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u043d\u0435\u0442\u0430\u043c\u0438 \u0438\u0431\u043e \u0432\u0441\u0435 \u043e\u043d\u0438 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0435 \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u0448\u0443 \u0441\u0438\u0434 \u0444\u0440\u0430\u0437\u0443, \u0445\u0440\u0430\u043d\u0438\u043c \u0432\u0441\u0451 \u0432 \u0431\u0434, \u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u043b\u044e\u0442\u043d\u043e\u0441\u0442\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c web3 \u0442\u043e\u0433\u0434\u0430 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f ETH \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0430 \u0431\u044b \u0442\u0430\u043a<\/p>\n<pre><code class=\"python\">index = [0, 1, 2] bip44 = BIP44HDWallet(cryptocurrency=EthereumMainnet) bip44.from_mnemonic(mnemonic=seedphrase, language=\"english\") bip44.clean_derivation()  bip44_derivation: BIP44Derivation = BIP44Derivation(cryptocurrency=EthereumMainnet, account=0, change=False,address=index[0]) bip44.from_path(path=bip44_derivation) private_key_0 = '0x' + bip44.private_key() addressinput_0 = bip44.address()<\/code><\/pre>\n<p>\u041d\u0443 \u0438 \u043d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0451.<\/p>\n<p>\u0427\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0438\u0437 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u044d\u0442\u043e \u0442\u043e \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u0441\u0430\u043c\u0430\u044f \u043d\u0435\u0432\u0437\u0440\u0430\u0447\u043d\u0430\u044f \u0432\u0435\u0449\u044c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0441\u043b\u0443\u0436\u0438\u0442\u044c \u0432\u0430\u043c \u043e\u0441\u043d\u043e\u0432\u043e\u0439 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0438 \u043a\u0440\u0443\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0410 \u0442\u0430\u043a \u0436\u0435 \u0442\u043e \u0447\u0442\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u0434\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043d\u0438 \u043e\u0434\u043d\u043e\u043c\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u043a\u0440\u0438\u043f\u0442\u043e\u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0430 \u043d\u0435 \u0432\u0438\u0434\u0435\u0432 \u0435\u0433\u043e \u043a\u043e\u0434, \u0431\u044b\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d \u0442\u0430\u043a \u0438 \u0443\u0441\u0442\u0440\u043e\u0435\u043d, \u043f\u043e\u0434 \u0434\u0435\u0446\u0435\u043d\u0442\u0440\u043e\u043b\u0438\u0437\u0430\u0432\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u043a\u0440\u0438\u043f\u0442\u043e\u0432\u0430\u043b\u044e\u0442 \u043c\u043e\u0436\u0435\u0442 \u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u043d\u0438\u043c\u0430\u044f \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u0443\u0442\u0435\u0447\u043a\u043e\u0439 \u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u0432\u0430\u0448\u0438\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0443 \u043a\u0430\u043a\u043e\u0433\u043e \u043d\u0438\u0431\u0443\u0434\u044c \u0438\u043d\u0434\u0443\u0441\u0430 \ud83d\ude42<\/p>\n<p><a href=\"https:\/\/github.com\/nikitakruglovx\/BlockatomWallet\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u043b\u043d\u044b\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0442\u0443\u0442 <\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/700888\/\"> https:\/\/habr.com\/ru\/post\/700888\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u0432 \u0434\u0430\u043b\u0451\u043a\u043e\u043c &#8212; \u0433\u043e\u0434 \u043d\u0430\u0437\u0430\u0434<\/h2>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0438\u0437 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u0432\u0435\u0449\u0435\u0439 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u0438 \u043d\u043e\u0432\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f python, qt \u0438 bitcoin \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.<\/p>\n<h2>\u0421 \u0447\u0435\u0433\u043e \u0432\u0441\u0451 \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u043e\u0441\u044c<\/h2>\n<p>\u0412 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043c\u043d\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0438\u0451\u043c \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439 \u0432 \u043a\u0440\u0438\u043f\u0442\u043e\u0432\u0430\u043b\u044e\u0442\u0435 \u0438 \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 Bitcoin, \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043d\u0430 \u0437\u0430\u043a\u0430\u0437, \u0434\u0430\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043b\u0438\u0447\u043d\u044b\u0439 \u0441\u0447\u0451\u0442, \u043e\u043f\u043b\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0442\u043e\u0432\u0430\u0440\u044b \u0438 \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0438\u0445. <\/p>\n<p>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0442\u0430\u043a\u0438\u0435 \u043f\u043b\u0430\u0442\u0451\u0436\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u044f \u0442\u043e\u0433\u0434\u0430 \u043d\u0435 \u0437\u043d\u0430\u043b \u0438 \u043f\u043e\u043d\u044f\u0442\u0438\u044f \u043d\u0435 \u0438\u043c\u0435\u043b \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0432\u0435\u0449\u044c, \u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u044f \u0443\u0436\u0435 \u043e \u0437\u043d\u0430\u043d\u0438\u044f\u0445 \u043e \u0442\u043e\u043c \u0438\u0437 \u0447\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0431\u043b\u043e\u043a, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438, \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<figure class=\"full-width\"><figcaption>\u0438\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 <\/figcaption><\/figure>\n<p>\u041c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0431\u0438\u0442\u043a\u043e\u0438\u043d \u043e\u043f\u043b\u0430\u0442\u0430 \u0432 \u0431\u043e\u0442\u0435 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c, \u0442\u0430\u043a \u0436\u0435 \u043d\u0430 python \u0438 \u0442\u0430\u043a \u0436\u0435 \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 Habr. <\/p>\n<p>\u0415\u0451 \u044f \u0438 \u0432\u0437\u044f\u043b \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0438 \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u043b \u043d\u0435 \u043c\u0430\u043b\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0447\u0442\u043e \u0431\u044b \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0431\u0430\u0437\u0443 \u0432\u0441\u0435\u0433\u043e \u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f.<br \/>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d \u0437\u0434\u0435\u0441\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442, \u0442\u0430\u043a\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u043d\u0435 \u043c\u0430\u043b\u043e. \u0437\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0435\u0442 \u0442\u043e \u043a\u0430\u043a \u044f \u043d\u0430\u0448\u0451\u043b \u0438\u0434\u0435\u044e \u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. <\/p>\n<h2>\u0418 \u0442\u0430\u043a, \u0432\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043b\u0430\u0442\u0451\u0436\u043d\u044b\u0439 \u043f\u0440\u0438\u0451\u043c \u043d\u0430 Bitcoin \u043e\u043d \u0436\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0432 \u043d\u0430\u0448\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u043d\u0430 qt<\/h2>\n<p>\u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0441\u0451 \u0434\u0435\u043b\u0430\u044e\u0442 \u0437\u0430 \u043d\u0430\u0441 \u043d\u0443 \u0438\u043b\u0438 \u043d\u0430 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443&#8230;<\/p>\n<p>\u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f pywallet \u043d\u043e \u0435\u0441\u0442\u044c \u0442\u0430\u043a \u0436\u0435 bitcoiblib, py-hd-wallet, hdwallet \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043d\u0435\u043f\u043b\u043e\u0445\u0438\u0435 \u043b\u0438\u0431\u044b, \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u0438 \u043f\u043b\u044e\u0441\u044b, \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u0441\u0435\u0431\u044f \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 hdwallet \u0438 pywallet, \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0430 \u0442\u043e\u0431\u0438\u0448\u044c \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0430. <\/p>\n<pre><code class=\"python\"># \u0418\u043d\u0434\u0435\u043a\u0441 \u0430\u0434\u0440\u0435\u0441\u0430, \u0438\u043d\u0434\u0435\u043a\u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0433\u043b\u0443\u0431\u0438\u043d\u043e \u0430\u0434\u0440\u0435\u0441\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 seed \u0444\u0440\u0430\u0437\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0430\u0434\u0440\u0435\u0441\u043e\u0432  index = 0 # \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u043c \u043e\u0442 \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430  # \u043d\u0430\u0448\u0430 seed \u0444\u0440\u0430\u0437\u0430 \u0438\u043b\u0438 \u043c\u043d\u0435\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0444\u0440\u0430\u0437\u0430, \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044f \u043f\u0440\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u0430\u0434\u0440\u0435\u0441\u0430, \u043d\u0430 \u043d\u0435\u0439 \u0432\u0441\u0451 \u043e\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f seed = 'one two one two one two ...'  # \u0434\u0430\u043b\u0435\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043c\u0430\u0441\u0442\u0435\u0440 \u043a\u043b\u044e\u0447 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043c\u043d\u0435\u043d\u043e\u043d\u0438\u043a\u0438  master_key = wallet.HDPrivateKey.master_key_from_mnemonic(seed)  # \u0438 \u0434\u0430\u043b\u0435\u0435 \u043f\u043e \u043f\u0443\u0442\u044f\u043c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0430\u0434\u0440\u0435\u0441 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 BIP 44 \u0438 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043c\u0441\u044f \u043f\u043e \u0438\u0438\u0440\u0430\u0440\u0445\u0438\u0438 \u043e\u0442 \u043a\u043b\u044e\u0447\u0430 \u0434\u043e \u043f\u0430\u0431\u043b\u0438\u043a \u0438 \u043f\u0440\u0438\u0432\u0430\u0442 \u043a\u043b\u044e\u0447\u0430 root_keys = wallet.HDKey.from_path(master_key, \"m\/44'\/0'\/0'\/0\")[-1].public_key.to_b58check() xpublic_key = (root_keys)  # \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430\u0448 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0439 \u0430\u0434\u0440\u0435\u0441 address = Wallet.deserialize(xpublic_key, network='BTC').get_child(index,is_prime=False).to_address()  rootkeys_wif = wallet.HDKey.from_path(master_key, f\"m\/44'\/0'\/0'\/0\/{index}\")[-1] # &lt;- \u044d\u0442\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u0431\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043d\u043e\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 xprivatekey = rootkeys_wif.to_b58check()  # Wallet Import Format \u043e\u043d \u0441\u043b\u0443\u0436\u0438\u0442 \u0434\u043b\u044f \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439  wif = Wallet.deserialize(xprivatekey, network='BTC').export_to_wif()<\/code><\/pre>\n<p>\u0432\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b<\/p>\n<p>\u0442\u0430\u043a\u0430\u044f \u0436\u0435 \u043f\u043e \u043b\u043e\u0433\u0438\u043a\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 hdwallet.<\/p>\n<pre><code class=\"python\">index = [0, 1, 2] bip44_btc = BIP44HDWallet(cryptocurrency=BitcoinMainnet) bip44_btc.from_mnemonic(mnemonic=seedphrase, language=\"english\") bip44_btc.clean_derivation()  bip44_derivation: BIP44Derivation = BIP44Derivation(cryptocurrency=BitcoinMainnet, account=0, change=False,address=index[0]) bip44_btc.from_path(path=bip44_derivation) wif_0_44 = bip44_btc.wif() key = Key(wif=wif_0_44) balance_1_for_btc = key.get_balance('usd') addressinput_0_btc = bip44_btc.address()<\/code><\/pre>\n<h2>\u0421 \u0438\u0438\u0440\u0430\u0440\u0445\u0438\u0435\u0439 \u043f\u043e\u043d\u044f\u0442\u043d\u043e. \u0418\u0434\u0435\u044f<\/h2>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043b\u0430\u0442\u0451\u0436\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441 \u043f\u0440\u0438\u0451\u043c\u043e\u043c \u0431\u0438\u0442\u043a\u043e\u0438\u043d, \u043c\u043d\u0435 \u0442\u0443\u0442 \u0436\u0435 \u043f\u0440\u0438\u0448\u043b\u0430 \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0438 \u0432 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f \u0438\u0434\u0435\u044f, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043b\u0430\u0442\u0451\u0436\u043a\u0443 \u043e\u0431\u0435\u0440\u043d\u0443\u0442\u044c \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0437 \u044d\u0442\u043e\u0433\u043e Bitcoin Wallet. \u0414\u0430 \u0435\u0449\u0451 \u0438 \u0441 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u043c \u0432\u0441\u0435\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439<br \/>\u0412\u0441\u0451 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 Qt, \u0437\u0430\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043d\u0430\u0448 \u043a\u043e\u0434 \u0432 \u043b\u043e\u0433\u0438\u043a\u0443 \u0438 \u0433\u043e\u0442\u043e\u0432\u043e. <\/p>\n<h2>\u041a\u0442\u043e \u043d\u0435 \u043f\u043e\u043d\u044f\u043b<\/h2>\n<p>\u0418\u043c\u0435\u044f \u043d\u0430\u0448\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043c\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043d\u0430\u0448\u0435\u0439 \u0436\u0435 \u043c\u043d\u0435\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0444\u0440\u0430\u0437\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043d\u043e\u0432\u044b\u0435 \u0430\u0434\u0440\u0435\u0441\u0430, \u043a\u043b\u044e\u0447\u0438 \u0438 \u043f\u0440\u043e\u0447\u0435\u0435, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430, \u043d\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u043a\u0430\u043a \u0440\u0430\u0437 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0443 \u043d\u0430\u0441 \u043d\u0430 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0435, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u043a\u0430\u043a\u0438\u043c \u0442\u043e \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u0432 \u0440\u043e\u043b\u0438 \u0431\u0430\u043d\u043a\u0430.<\/p>\n<h2>\u0414\u0430\u0432\u0430\u0439 \u043a\u043e\u0434!<\/h2>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043f\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443 PyQt5 \u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 <\/p>\n<figure class=\"full-width\"><figcaption>\u043e\u043a\u043d\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438<\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption>\u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0435 \u043e\u043a\u043d\u043e<\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043d\u0430\u0447\u043d\u0451\u043c \u0435\u0433\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c.<\/p>\n<pre><code class=\"python\">import sqlite3  import bit import clipboard import qrcode as qrcode import requests from PyQt5 import QtWidgets from PyQt5.QtGui import * from PyQt5.QtWidgets import QDialog, QApplication, QMainWindow, QMessageBox from PyQt5.uic import loadUi from bs4 import BeautifulSoup from pywallet import wallet from pywallet.utils import *<\/code><\/pre>\n<p>\u0418\u043c\u043f\u043e\u0440\u0442 \u043d\u0443\u0436\u043d\u044b\u0445 \u043d\u0430\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.<\/p>\n<pre><code class=\"python\">class LoginScreen(QMainWindow):     def __init__(self):         super(LoginScreen, self).__init__()         loadUi(\"GUI\/atom.ui\",self)         self.passwordline.setEchoMode(QtWidgets.QLineEdit.Password)         self.registrnow.clicked.connect(self.gotoReg)         self.Loginone.clicked.connect(self.loginfunction)      def gotoReg(self):         Reg = RegScreen()         widget.addWidget(Reg)         widget.setCurrentIndex(widget.currentIndex()+1)      def loginfunction(self):         password = self.passwordline.text()         if len(password) == 0:             self.error.setText(\"Please input all fields.\")         else:             db = sqlite3.connect(\"wallet.db\")             curs = db.cursor()             curs.execute(f\"SELECT * FROM users WHERE Password = '{password}'\")             if not curs.fetchone():                 self.error.setText(\"Incorrect password\")             else:                 fillprofile = Profile()                 widget.addWidget(fillprofile)                 widget.setCurrentIndex(widget.currentIndex() + 1)<\/code><\/pre>\n<p>\u043a\u043b\u0430\u0441\u0441 \u0432\u0445\u043e\u0434\u0430 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043d\u0430\u0448 ui \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043a\u043d\u043e\u043f\u043a\u0438 <br \/>\u0434\u0430\u043b\u0435\u0435 \u043e\u0431\u044b\u0447\u043d\u0430\u044f \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0430\u0440\u043e\u043b\u044f \u0438 \u0432\u0445\u043e\u0434\u0430 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Sqlite3.<\/p>\n<h2>\u0412 \u0438\u0434\u0435\u0430\u043b\u0435<\/h2>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0430 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0431\u044b\u043b\u0430 \u043a\u0430\u043a \u043f\u0435\u0442-\u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0432 \u0438\u0434\u0435\u0430\u043b\u0435 \u0431\u044b \u043a\u043e\u043d\u0435\u0447\u043d\u043e ui \u0442\u0430\u043a \u043d\u0435 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c stackedWidget \u0438 \u043f\u043e \u043d\u0435\u043c\u0443 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c, \u0438 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0434\u043d\u0438\u043c \u043a\u043b\u0430\u0441\u0441\u043e\u043c \u0438\u043b\u0438 \u0434\u0432\u0443\u043c\u044f, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c Postgresql \u043a\u0430\u043a\u043e\u0439 \u043d\u0438\u0431\u0443\u0434\u044c, \u0434\u0430 \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u0441\u043e\u0444\u0442 \u0432 \u0441\u0442\u043e\u043b \u043b\u0443\u0447\u0448\u0435 \u043d\u0430 \u043f\u043b\u044e\u0441\u0430\u0445 \u0438\u043b\u0438 \u0448\u0430\u0440\u043f\u0435. <\/p>\n<pre><code class=\"python\">class Profile(QDialog):     def __init__(self):         super(Profile, self).__init__()         loadUi(\"GUI\/main.ui\", self)         self.btcpricee()         self.balanceuser()         self.logout.clicked.connect(self.loginout)         self.receive.clicked.connect(self.receivebtcaddress)         self.receive_2.clicked.connect(self.receivebtcaddress)         self.walletbutton.clicked.connect(self.walletent)         self.sendd.clicked.connect(self.sendbtc)         self.sendd_2.clicked.connect(self.sendbtc)         self.settings.clicked.connect(self.settinges)      def balanceuser(self):         try:             db = sqlite3.connect(\"wallet.db\")             curs = db.cursor()             sss = \"SELECT btc_address FROM users\"             curs.execute(sss)             adres = curs.fetchone()             url = f'https:\/\/www.blockchain.com\/btc\/address\/{adres[0]}'             headers = {'User-Agent': 'Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko\/20100101 Firefox\/93.0'}             Response = requests.get(url, headers=headers)             wallet = BeautifulSoup(Response.content, 'html.parser')             convert = wallet.findAll(\"span\", {\"class\": \"sc-16b9dsl-1\",\"class\": \"ZwupP\", \"class\": \"u3ufsr-0\", \"class\": \"eQTRKC\"})             rx = convert[6].text             self.balance.setText(str(rx))             response = requests.get('https:\/\/api.coindesk.com\/v1\/bpi\/currentprice.json')             data = response.json()             x = data[\"bpi\"][\"USD\"][\"rate_float\"]             xx = rx.rstrip('BTC')             us = (x * float(xx))             self.usdbalance.setText(str(us))         except:             self.balance.setText(str('Loading...'))             self.usdbalance.setText(str('---')) <\/code><\/pre>\n<p>\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0430\u043b\u0430\u043d\u0441\u0430, \u0434\u043e\u0441\u0442\u0430\u0451\u043c \u0438\u0437 \u0431\u0434 \u0430\u0434\u0440\u0435\u0441 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0430\u0440\u0441\u0438\u043c \u0435\u0433\u043e \u0438 \u0434\u0430\u043b\u0435\u0435 \u0447\u0435\u0440\u0435\u0437 setText \u0432\u044b\u0432\u043e\u0434\u0438\u043c <\/p>\n<pre><code class=\"python\">class RegScreen(QDialog):     def __init__(self):         super(RegScreen, self).__init__()         loadUi(\"GUI\/reg.ui\",self)         self.loginperehod.clicked.connect(self.gotoLogin)         self.signupreg.clicked.connect(self.registrationfunction)      def gotoLogin(self):         Log = LoginScreen()         widget.addWidget(Log)         widget.setCurrentIndex(widget.currentIndex() + 1)       def registrationfunction(self):         password_reg = self.passwordreg.text()         repl_password = self.relacepasswordreg.text()         if repl_password != password_reg:             self.errorreg1_2.setText(\"Password does not match\")         else:             if len(password_reg) == 0:                 self.errorreg1.setText(\"To register, you need to fill in all the fields\")             elif len(password_reg) &lt; 8:                 self.passerror.setText('Password cannot be less than 8 characters')             else:                 db = sqlite3.connect('wallet.db')                 curs = db.cursor()                  curs.execute('''CREATE TABLE IF NOT EXISTS users (                                             Password TEXT,                                             balance INTEGER,                                             btc_address,                                             wif TEXT,                                             btc_send TEXT                                             )''')                  db.commit()                 curs.execute(\"SELECT Password FROM users\")                 if curs.fetchone() is None:                     index = 0                     seed = ''                     master_key = wallet.HDPrivateKey.master_key_from_mnemonic(seed)                     root_keys = wallet.HDKey.from_path(master_key, \"m\/44'\/0'\/0'\/0\")[-1].public_key.to_b58check()                     xpublic_key = (root_keys)                     address = Wallet.deserialize(xpublic_key, network='BTC').get_child(index,is_prime=False).to_address()                     rootkeys_wif = wallet.HDKey.from_path(master_key, f\"m\/44'\/0'\/0'\/0\/{index}\")[-1]                     xprivatekey = rootkeys_wif.to_b58check()                     wif = Wallet.deserialize(xprivatekey, network='BTC').export_to_wif()                     curs.execute(\"INSERT INTO<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-341558","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/341558","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=341558"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/341558\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=341558"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=341558"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=341558"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}