def private_to_account(ctx, privatekey, password): # privatekey is provided in the console, so it's expected to be hexadecimal privatekey = safe_address_decode(privatekey) # cast the values to bytes because it is the expected type in the Crypto library password = bytes(password) privkey = bytes(privatekey) account = Account.new(password, key=privkey) print(account.dump())
def account_file(): account = Account.new('', key="1" * 64) print(account.dump())