Bitcoin Forum

Bitcoin => Electrum => Topic started by: Sanka555 on September 05, 2021, 05:15:11 PM



Title: Seed checker Electrum
Post by: Sanka555 on September 05, 2021, 05:15:11 PM
Help me please. I need a little Java code that checks my Seed in Electrum and if this Seed has addresses with transactions or balance say it.

Yes, I know about the size of the entropy. And about the fact that the selection does not make sense. ;D

But it is very necessary. Thank you in advance


Title: Re: Seed checker Electrum
Post by: jackg on September 05, 2021, 05:19:10 PM
Not sure if it's possible but you can pass console commands to electrum, have you tried checking the documentation on that and building a shell/python script (or java if it has an api to the console)?

Otherwise you'll probably need a java spv implementation like bitcoinj and still pass parameters to electrum to convert electrum's seed to a master public key bitcoinj will recognise.


Title: Re: Seed checker Electrum
Post by: Sanka555 on September 05, 2021, 05:29:42 PM
bitcoinj i know. but he works only directly with the blockchain as far as I understand, not whis my Electrum localy. but for documentation I do not have enough understanding (
I just need a few lines of code and then I will figure it out.  :)
Thanks in advance for any help


Title: Re: Seed checker Electrum
Post by: jackg on September 05, 2021, 09:08:59 PM
Based on the docs (https://electrum.readthedocs.io/en/latest/cmdline.html#) it doesn't look like it's possible to import an nmemonic to convert it, rather you have to import a wallet file.

From there, there's the command that will give you the master private key, I imagine the master public key can be found by changing 'private' to 'public' (for security reasons, you might want the public key instead wherever possible): wallet.get_master_private_key('x/', gui.password_dialog()) from here: https://bitcoin.stackexchange.com/questions/36839/electrum-2-0-non-bip39-32-standardisation-complicates-matters-immensely-why


Title: Re: Seed checker Electrum
Post by: BitMaxz on September 05, 2021, 11:30:55 PM
Why not just import it manually? If you don't have much seed to check then just manually import it to Electrum to check if it has a balance.
You can import multiple times in Electrum so it should be easier than to make a script to automate seed checking.

Be careful on the tool that I found on Google "Cybercoplabs" I never heard of this site but I saw this site when searching about "Seed checker". The website looks the same as iancoleman tool so it's not a checker that I think you looking for?


Title: Re: Seed checker Electrum
Post by: bitmover on September 05, 2021, 11:48:22 PM
Why not just import it manually? If you don't have much seed to check then just manually import it to Electrum to check if it has a balance.
You can import multiple times in Electrum so it should be easier than to make a script to automate seed checking.


He probably  wants to try to brute force seeds. He will be testing seeds forever trying to find one with balance and steal it.

Yes, I know about the size of the entropy. And about the fact that the selection does not make sense. ;D

Just as mentioned in the whitepaper, it is more profitable to use your processing power to play by the rules. You won't make money by using your computer power to  brute force private keys, the odds are against you.

Quote
The incentive may help encourage nodes to stay honest. If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth.
https://bitcoin.org/bitcoin.pdf


Title: Re: Seed checker Electrum
Post by: Sanka555 on September 07, 2021, 05:07:26 AM
I well understand the stupidity of this process. But I was given such a task. It is necessary to implement it in Java

1)passed the seed
2) received an answer whether there are transactions or not.
that's all.
There are several lines. It's just that my education is not enough to understand the documentation, and it's all there for python, that's why I'm asking for help :)  


Title: Re: Seed checker Electrum
Post by: PawGo on September 18, 2021, 08:22:02 AM
I did something similar with balance checking using public API, probably it would be possible to modify it for transactions list.
Take a look at worker 'ONE_UNKNOWN_CHECK_ALL' -> https://github.com/PawelGorny/lostword
Let me know if you need help, I think I may adapt it for your needs.


Title: Re: Seed checker Electrum
Post by: NotATether on September 22, 2021, 07:43:58 AM
It sounds safe to compute the first 20 "receiving" addresses (m/0/0-19 for legacy addresses, m/0'/0/0-19 for segwit addresses), and the first 10 change addresses (m/1/0-9 legacy, m/0'/1/0-9 segwit) because these addresses are generated for each Electrum wallet. Other address paths are empty if the user hasn't made a sending transaction.

Also see:

Electrum derivation paths are as follows, with /0/0 appended to the end of each one for the first receiving address:

Legacy: m (so the first receiving address is at m/0/0)
Segwit: m/0'
Legacy multi-sig: m
Segwit multi-sig: m/1'


Title: Re: Seed checker Electrum
Post by: Dabs on September 24, 2021, 03:35:42 PM
Perhaps this is what you are looking for?

https://github.com/FarCanary/ElectrumSeedTester

You download the stand-alone html and run it offline.