def deprecated_load(cls, wallet_name): #cls stands for class, because the variable name class is taken
with open(wallet_name, 'rb') as temp_file:
temp_array = temp_file.read().splitlines()
secret_key_hex, public_key_hex = temp_array
secret_key_bytes, public_key_bytes = unhexlify(secret_key_hex), unhexlify(public_key_hex)
secret_key, public_key = ecdsa.SigningKey.from_string(secret_key_bytes, settings.bitcoin_curve), ecdsa.VerifyingKey.from_string(public_key_bytes, settings.bitcoin_curve)
print("Wallet loaded.")
return Wallet(secret_key, public_key)
评论列表
文章目录