Bitcoin Forum
May 12, 2024, 05:59:38 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Command Line commands & Attributes  (Read 1160 times)
jaimefcb (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
March 06, 2014, 08: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!

1715536778
Hero Member
*
Offline Offline

Posts: 1715536778

View Profile Personal Message (Offline)

Ignore
1715536778
Reply with quote  #2

1715536778
Report to moderator
1715536778
Hero Member
*
Offline Offline

Posts: 1715536778

View Profile Personal Message (Offline)

Ignore
1715536778
Reply with quote  #2

1715536778
Report to moderator
1715536778
Hero Member
*
Offline Offline

Posts: 1715536778

View Profile Personal Message (Offline)

Ignore
1715536778
Reply with quote  #2

1715536778
Report to moderator
Bitcoin addresses contain a checksum, so it is very unlikely that mistyping an address will cause you to lose money.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715536778
Hero Member
*
Offline Offline

Posts: 1715536778

View Profile Personal Message (Offline)

Ignore
1715536778
Reply with quote  #2

1715536778
Report to moderator
1715536778
Hero Member
*
Offline Offline

Posts: 1715536778

View Profile Personal Message (Offline)

Ignore
1715536778
Reply with quote  #2

1715536778
Report to moderator
btcbot
Full Member
***
Offline Offline

Activity: 151
Merit: 105



View Profile
March 06, 2014, 12:47:26 PM
 #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")

Don't tip me... tip the Riseup folks who protect activists around the world.
jaimefcb (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
March 06, 2014, 02:44:21 PM
 #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!
Abdussamad
Legendary
*
Offline Offline

Activity: 3612
Merit: 1564



View Profile
March 07, 2014, 12:19:20 AM
 #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 <command name>

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.
btcbot
Full Member
***
Offline Offline

Activity: 151
Merit: 105



View Profile
March 07, 2014, 05: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?


Don't tip me... tip the Riseup folks who protect activists around the world.
jaimefcb (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
March 07, 2014, 11: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.
flatfly
Legendary
*
Offline Offline

Activity: 1078
Merit: 1016

760930


View Profile
March 07, 2014, 11: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.
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!