Author

Topic: Command Line commands & Attributes (Read 1175 times)

legendary
Activity: 1092
Merit: 1016
760930
March 07, 2014, 07:57:30 AM
#7
Hello, yes I´ve sound a little bit cryptical.

I mean Command Line Flags like this one:
./Electrum -w ~/path/to/your-new-wallet-file

I would like to automate some tasks from an external app. Console is great, has all I need but I don´t know how can I send or use his commands from Electrum outside app.

Thanks for your answers.

IIRC, Electrum 2.0 (out soon) will have a daemon mode, which should make this type of use much easier.
newbie
Activity: 7
Merit: 0
March 07, 2014, 07:51:50 AM
#6
Hello, yes I´ve sound a little bit cryptical.

I mean Command Line Flags like this one:
./Electrum -w ~/path/to/your-new-wallet-file

I would like to automate some tasks from an external app. Console is great, has all I need but I don´t know how can I send or use his commands from Electrum outside app.

Thanks for your answers.
full member
Activity: 151
Merit: 105
March 07, 2014, 01:20:52 AM
#5
I think the OP was asking for either globals he could address from the console (gui.dosomething()) or flags from the command line?

legendary
Activity: 3640
Merit: 1571
March 06, 2014, 08:19:20 PM
#4
Thanks for your answer!

Which one are the Attributes that can be used for Electrum?? I´ve seen two of them -w (wallet) and -g (gui) but I don´t know if there are others...

BR!

Not sure what you mean by attributes but if you want see all the electrum commands just type:

electrum help

in a command prompt. For command specific help type

electrum help

For example:

electrum help restore

The above instructions are for a recent version of electrum like 1.9.7. Older versions didn't expose command line options like these.
newbie
Activity: 7
Merit: 0
March 06, 2014, 10:44:21 AM
#3
Thanks for your answer!

Which one are the Attributes that can be used for Electrum?? I´ve seen two of them -w (wallet) and -g (gui) but I don´t know if there are others...

BR!
full member
Activity: 151
Merit: 105
March 06, 2014, 08:47:26 AM
#2
Hello,

I´ve been testing some commands from this list but I´m getting some failures.
https://github.com/spesmilo/electrum/blob/master/lib/commands.py

I´m using Windows Electrum version and I would like to know how to use this two commands through command line console :
importprivkey, getbalance

Is there any chance to use that commands as attributes when launching the application? Can I access to that commands with an external Application (I´m developing an APP on VC#), a plugin maybe?

Thanks and regards!



These are Python function calls, you need to express them like this:

>> getbalance()

You should see this...

{
    "confirmed": "yourbalance"
}
>>

You need to wrap input data with quote marks, so to use importprivkey, you'll need to importprivkey("").

>> importprivkey("54j4i5j3lkj4j5i3jojogjgirirjrgijrigjoirjgorijg")
newbie
Activity: 7
Merit: 0
March 06, 2014, 04:33:31 AM
#1
Hello,

I´ve been testing some commands from this list but I´m getting some failures.
https://github.com/spesmilo/electrum/blob/master/lib/commands.py

I´m using Windows Electrum version and I would like to know how to use this two commands through command line console :
importprivkey, getbalance

Is there any chance to use that commands as attributes when launching the application? Can I access to that commands with an external Application (I´m developing an APP on VC#), a plugin maybe?

Thanks and regards!

Jump to: