def unlock_wallet(display_enabled=False): try: password = raw_input("Enter wallet password: "******"Incorrect password." else: print "Unlocked wallet." wallet = HDWallet(hex_privkey) child = wallet.get_child_keypairs(count=2, include_privkey=True) payment_keypair = child[0] owner_keypair = child[1] save_keys_to_memory(payment_keypair, owner_keypair) if display_enabled: display_wallet_info(payment_keypair[0], owner_keypair[0]) except KeyboardInterrupt: print "\nExited."
def unlock_wallet(display_enabled=False): if walletUnlocked(): if display_enabled: payment_address, owner_address = get_addresses_from_file() display_wallet_info(payment_address, owner_address) else: try: password = getpass("Enter wallet password: "******"Incorrect password.") else: print "Unlocked wallet." wallet = HDWallet(hex_privkey) child = wallet.get_child_keypairs(count=2, include_privkey=True) payment_keypair = child[0] owner_keypair = child[1] save_keys_to_memory(payment_keypair, owner_keypair) if display_enabled: display_wallet_info(payment_keypair[0], owner_keypair[0]) except KeyboardInterrupt: print "\nExited."
def release_username(self, fqu, profile, transfer_address): from registrar.db import registrar_users from registrar.crypto.utils import get_address_from_privkey from registrar.crypto.utils import aes_decrypt from registrar.config import SECRET_KEY entry = registrar_users.find_one({"username": fqu.rstrip(".id")}) hex_privkey = aes_decrypt(entry['encrypted_privkey'], SECRET_KEY) self.subsidized_nameop(fqu, profile, hex_privkey, nameop='update')
def release_username(self, fqu, profile, transfer_address): from registrar.db import registrar_users from registrar.crypto.utils import get_address_from_privkey from registrar.crypto.utils import aes_decrypt from registrar.config import SECRET_KEY entry = registrar_users.find_one({"username": fqu.rstrip(".id")}) owner_privkey = aes_decrypt(entry['encrypted_privkey'], SECRET_KEY) self.process_subsidized_nameop(fqu, owner_privkey, profile=profile, transfer_address=transfer_address)