Bitcoin Forum

Bitcoin => Electrum => Topic started by: hosseinimr93 on January 22, 2023, 09:34:39 PM



Title: Arguments on make_seed command
Post by: hosseinimr93 on January 22, 2023, 09:34:39 PM
When you create a seed phrase using make_seed command on electrum console, there are three arguments.
The first one determines the number of bits and the third one determines the seed type. The seed type can be either standard, segwit or 2FA.

For example, make_seed(256,"","standard") creates a 24 word legacy seed phrase or make_seed(128,"","segwit") creates a 12 word segwit seed phrase.


Whatever I enter as the second argument, it works and it doesn't change anything.
For example, make_seed(128, "ggsd^gsf*") creates a 12 word segwit seed phrase or make_seed(128,"qojnfsyr6/7","standard") creates a 12 word legacy seed phrase.

What's the second argument?


Title: Re: Arguments on make_seed command
Post by: pooya87 on January 23, 2023, 04:59:46 AM
It's the language that would instantiate the mnemonic instance that would then determine the word-list to be used in it[1]. You'd use it by passing the short form of the language
Code:
'en':'english.txt',
'es':'spanish.txt',
'ja':'japanese.txt',
'pt':'portuguese.txt',
'zh':'chinese_simplified.txt'
When you pass an unrecognizable string like "ggsd^gsf", it will use the default one that is English[2].

[1] https://github.com/spesmilo/electrum/blob/7d52021d6b610f47b8e36ccdd571d5a1892e506e/electrum/commands.py#L337
[2] https://github.com/spesmilo/electrum/blob/6650e6bbae12a79e12667857ee039f1b1f30c7e3/electrum/mnemonic.py#L154


Title: Re: Arguments on make_seed command
Post by: hosseinimr93 on January 25, 2023, 09:21:39 PM
The second argument in the make_seed command on the Electrum console is the custom entropy.
It's not.
pooya87 already answered my question correctly. The second argument is used for having a seed phrase from a different wordlist.
I was able to generate a seed phrase with spanish words using make_seed(128,"es","standard").

https://i.imgur.com/ytL9tx4.jpg

Thank you pooya87.


Title: Re: Arguments on make_seed command
Post by: Abdussamad on January 26, 2023, 09:36:05 AM
In python you can name the arguments to make it clearer:

Code:
make_seed(nbits=128, seed_type="standard")