I hereby claim:
- I am SomberNight on github.
- I am ghost43 (https://keybase.io/ghost43) on keybase.
- I have a public key whose fingerprint is 4AD6 4339 DFA0 5E20 B3F6 AD51 E7B7 48CD AF5E 5ED9
To claim this, I am signing this object:
# get access to ledger dongle object from electrum qt context | |
def get_dongle(): | |
plugin_mgr = window.gui_object.plugins | |
plugin = plugin_mgr.get_plugin("ledger") | |
devices = plugin_mgr.device_manager.scan_devices() | |
dongle = None | |
for device in devices: | |
if device.product_key not in plugin.DEVICE_IDS: |
import sys | |
import getpass | |
from electrum.storage import WalletStorage | |
########## | |
# Set the path to your wallet file here. | |
# | |
path = "C:/Users/User/AppData/Roaming/Electrum/testnet/wallets/test_segwit_asdasd" | |
########## |
import asyncio | |
from aiorpcx import TaskGroup, timeout_after | |
async def main(): | |
print("main entered") | |
try: | |
async with TaskGroup() as group: | |
await group.spawn(forever()) | |
# if we spawn a task to run "g", we will finish: | |
await group.spawn(g()) |
# to be used with https://shiftcrypto.ch/backup | |
from electrum import bitcoin | |
# TODO change to 'BIP32 extended master private key' | |
bip32_extended_root_key = "xprv9s21ZrQH143K3EQ2jcSFQVoBtQyv2rPe8tfaYcP3JQe5SU4sPgrnm9n7XLJxuQkua9xYScs29nA6kWmKnb2dEsVvARM6eyFP1D969p8zZ8Z" | |
xprv, xpub = bitcoin.bip32_private_derivation(bip32_extended_root_key, "m/", "m/44'/0'/0'") | |
print("legacy xprv:", xprv) |
import electrum | |
from electrum import bip32 | |
initial_xprv = '.......' # TODO fill in | |
target_xtype = 'p2wpkh' # TODO change? | |
_, depth, fingerprint, child_number, c, cK = bip32.deserialize_xprv(initial_xprv) | |
target_xprv = bip32.serialize_xprv(target_xtype, c, cK, depth, fingerprint, child_number) | |
print(target_xprv) |
from electrum.storage import WalletStorage | |
from electrum.wallet import Wallet | |
#from electrum import constants | |
#constants.set_testnet() | |
storage = WalletStorage('/home/user/.electrum/testnet/wallets/default_wallet') | |
wallet = Wallet(storage) | |
wallet.change_gap_limit(200) | |
wallet.gap_limit_for_change = 200 |
from electrum import bitcoin | |
xpub1 = 'xpub661MyMwAqRbcEcF8odLPZvkWA3xi9ptJqzfzzFFmvNcRtnGb2wzKgVCNN8i1uAwa6kwXLgG7atobaSoExfhpxDfuQp3FfSKPWcocLxKJyk9' | |
xtype, depth, fingerprint, child_number, c, K_or_k = bitcoin.deserialize_xkey(xpub1, False) | |
xpub2 = bitcoin.serialize_xpub('p2wpkh-p2sh', c, K_or_k, depth, fingerprint, child_number) | |
print(xpub2) |
# note: for good perfomance, have pycryptodome installed | |
# (about 20x faster than pyaes for this). | |
# for ref, it takes about 60 seconds to scan the whole domain for me with pycryptodome. | |
import electrum | |
from electrum.wallet import Wallet | |
from electrum.storage import WalletStorage | |
storage = WalletStorage('path_to_wallet_file') | |
wallet = Wallet(storage) |
I hereby claim:
To claim this, I am signing this object:
# uncompyle6 version 3.1.3 | |
# Python bytecode 3.5 (3351) | |
# Decompiled from: Python 3.5.3 (default, Jan 19 2017, 14:11:04) | |
# [GCC 6.3.0 20170118] | |
# Embedded file name: site-packages\electrum-4.0.2-py3.5.egg\electrum\keystore.py | |
import base64, random, threading, requests, time | |
from unicodedata import normalize | |
from . import bitcoin | |
from .bitcoin import * | |
from . import constants |