Author

Topic: Electrum command lines (Read 143 times)

legendary
Activity: 1064
Merit: 1298
Lightning network is good with small amount of BTC
April 18, 2024, 03:18:49 AM
#7
It may worth mentioning that even using console, it's still impossible to generate a BIP39 seed phrase in electrum.
Yes I know. The reason I said BIP39 is because Electrum requires additional bits for it. But you are right because we are talking about Electrum and that is used in the command line to generate the 24 words seed phrase.

Thank you everyone for trying to provide a solution. I do not think the command line is what I can fully know of. I know some already which I think are the most important for me. The only one I prefer most is generation of legacy addresses seed phrase while I am able to do others without command line on Electrum. I am no more diving into this.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
April 18, 2024, 03:02:17 AM
#6
I want to see the list of command lines on Electrum and I make research and I saw this: https://electrum.readthedocs.io/en/latest/cmdline.html

To see the list of Electrum commands, type:

electrum help

I typed it with the use of the console and I saw this invalid error
The article is pointing to the "command line" which is a little different than the GUI's console.
If you want, you can try it in the command line as described or if you're in Windows, run electrum from source via Python v3.8 and above.

Note: the latest source needs "paymentrequest_pb2.py" and "libsecp256k1-0.dll" to work which should be built using the provided scripts in 'contrib' folder.
Or if you have no choice, get those pre-build from an older version of the code.

Example. When I use the code, I went to i and I saw "ismine". This makes it not understandable as I was expecting ismine("your bitcoin address"). Also that is how other ones are. Is there not a way that I can get it like in my example like ismine("your bitcoin address")?
In the command line (not console), the command should be: help

Example.:
Code:
./run_electrum help ismine
It'll show you info about the command and required positional arguments, but no example.
Result:
Code:
Check if address is in wallet. Return true if and only address is in wallet

positional arguments:
  address               Bitcoin address

Alternatively, you can check the available commands and the args in this code: github.com/spesmilo/electrum/blob/master/electrum/commands.py#L168
legendary
Activity: 2380
Merit: 5213
April 17, 2024, 05:22:15 PM
#5
Example. When I use the code, I went to i and I saw "ismine". This makes it not understandable as I was expecting ismine("your bitcoin address"). Also that is how other ones are. Is there not a way that I can get it like in my example like ismine("your bitcoin address")?
As far as I know, no.

I did not really understand what is in that link as I was looking for the one for ismine but I do not see it.
The link provided by Yamane_Keto can be helpful to understand how each of commands work, but that requires some python knowledge.

256 should mean the bits of entropy for 24 words BIP39 seed phrase generation.
It may worth mentioning that even using console, it's still impossible to generate a BIP39 seed phrase in electrum.
legendary
Activity: 1064
Merit: 1298
Lightning network is good with small amount of BTC
April 17, 2024, 12:21:14 PM
#4
Code:
help()



Example. When I use the code, I went to i and I saw "ismine". This makes it not understandable as I was expecting ismine("your bitcoin address"). Also that is how other ones are. Is there not a way that I can get it like in my example like ismine("your bitcoin address")?

Electrum console enables you to execute Python codes just like the Python interface, so to call a function you must put () next to the command.
See details of the codes here https://github.com/spesmilo/electrum/blob/master/electrum/commands.py

Code:
make_seed(self, nbits=None, language=None, seed_type=None):
ismine(self, address, wallet: Abstract_Wallet = None):
help(self):
Do you now know what 256 means? and how to call help?
I did not really understand what is in that link as I was looking for the one for ismine but I do not see it.

256 should mean the bits of entropy for 24 words BIP39 seed phrase generation.
hero member
Activity: 406
Merit: 443
April 17, 2024, 10:56:08 AM
#3
Electrum console enables you to execute Python codes just like the Python interface, so to call a function you must put () next to the command.
See details of the codes here https://github.com/spesmilo/electrum/blob/master/electrum/commands.py

Code:
make_seed(self, nbits=None, language=None, seed_type=None):
ismine(self, address, wallet: Abstract_Wallet = None):
help(self):
Do you now know what 256 means? and how to call help?
legendary
Activity: 2380
Merit: 5213
April 17, 2024, 09:41:33 AM
#2
"help" is a function and it should be followed by parenthesis when you want to call it in python.
Use the following command in electrum console to get the full list of command lines.

Code:
help()


legendary
Activity: 1064
Merit: 1298
Lightning network is good with small amount of BTC
April 17, 2024, 04:58:48 AM
#1
I have been reading about Electrum command lines using the console. There are some questions on this forum about some command lines. Examples are

To know if an address belong to your bitcoin wallet
Code:
ismine("your bitcoin address")

To get legacy address with 24 words seed phrase on Electrum:
Code:
make_seed(256,"","standard")

Command line can be used for other things like making payment and for making payment to several addresses and so on.

I want to see the list of command lines on Electrum and I make research and I saw this: https://electrum.readthedocs.io/en/latest/cmdline.html

To see the list of Electrum commands, type:

electrum help

I typed it with the use of the console and I saw this invalid error



Is there a way I can see all Electrum command lines?
Jump to: