Bitcoin Forum
November 16, 2024, 04:24:16 PM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Electrum exec createnewaddress requires password  (Read 95 times)
zqbitcoin (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 2


View Profile
August 17, 2018, 06:57:30 AM
 #1

I'm trying run an Electrum wallet through an ec2 instance to receive Bitcoins.

So I've created a ec2 instance on AWS running the amazon linux AMI and installed Electrum.

I noticed that some other commands have the -W option to let me fill in the password like getprivatekeys:
 
Code:
electrum --testnet getprivatekeys -W $password 
but, there are a few commands that do not have an option for me to input the password.

After creating an API to call exec() to help create new addresses, it worked for about a day (around 40-50 calls) and then now it requires me to input my password through the stdin every time I call the command:
Code:
electrum --testnet createnewaddress


Is there a way for me to call the commands in Electrum and input the password with one command? Does anyone know why the command suddenly requires a password?
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4361

<insert witty quote here>


View Profile
August 17, 2018, 08:42:20 AM
 #2

Most likely because the first few calls were simply using "existing" addresses that had already been created and were in the "key pool" that is automatically added to the wallet file as, by default, Electrum will create 25 receiving addresses... and 5 change addresses.

Once that pool of addresses is exhausted, it needs to actually generate a new private/public key pair from your seed and add it to the wallet file. I suspect that the password is required to write the changes to your (encrypted?) wallet file.

You can probably test this theory, by creating a new wallet file, starting Electrum using that wallet and see if it does the same thing.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
zqbitcoin (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 2


View Profile
August 17, 2018, 10:16:21 AM
 #3

I have fixed the problem. Decided to use an expect script to interact with the electrum interface. Thanks.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!