Title: Trying to the I need help Post by: Sanka555 on September 18, 2021, 08:00:01 AM I do
Quote NetworkParameters params = MainNetParams.get(); I getString sedCode = "tissue deliver beauty rare kind midnight focus indicate forum lawn this setup"; DeterministicSed sed; try { sed = new DeterministicSed(Code, null, "", 0L); Wallet wallet = Wallet.fromSed(params, sed); List<String> keys = new ArrayList<>(5); for (int i = 0; i < 5; i++) { ECKey key = freshReceiveKey(); e[] publickeyhash = key.getPubKeyHash(); SegwitAddress Address = SegwitAddress(MainNetParams.get(), publickey); keys.add(segwitAddress.toBech32()); } for (String key : keys) { System.out.println(key); } ...... Quote bc1qt9w4uxna2gdmscc67enj8azrld92msq6v87aty but gives me Quote bc1q0u3r6fp8mctx45e75f6p4suzja68alcxkc4cje what am I doing wrong? I will be very grateful for any help :) Title: Re: Trying to get private keys from the seed. Java. I need help Post by: PawGo on September 18, 2021, 08:17:52 AM Wrong derivation path for a child key. For bc1q0u... you need to use m/84'/0'/0'/0/0.
Take a look at my program https://github.com/PawelGorny/lostword, you may launch it with configuration: Code: KNOWN_POSITION Title: Re: Trying to get private keys from the seed. Java. I need help Post by: NotATether on September 18, 2021, 11:00:58 AM Also you'll probably want to discard that seed that you used for testing above, now that it has been posted in the open and web crawlers have archived it.
Title: Re: Trying to get private keys from the seed. Java. I need help Post by: Sanka555 on September 18, 2021, 11:27:40 AM Wrong derivation path for a child key. For bc1q0u... you need to use m/84'/0'/0'/0/0. Take a look at my program https://github.com/PawelGorny/lostword, you may launch it with configuration: Code: KNOWN_POSITION Thanks a lot. How can I integrate m / 84 '/ 0' / 0 '/ 0/0 into my code? I just need to get the first 5 addresses. I looked at your program, but there is a whole class forming a complex configuration. Too difficult for a beginner. How can I just hardcode the derivation path into my method? Title: Re: Trying to get private keys from the seed. Java. I need help Post by: PawGo on September 18, 2021, 01:19:47 PM Thanks a lot. How can I integrate m / 84 '/ 0' / 0 '/ 0/0 into my code? I just need to get the first 5 addresses. I looked at your program, but there is a whole class forming a complex configuration. Too difficult for a beginner. How can I just hardcode the derivation path into my method? Code: public class Main { Title: Re: Trying to get private keys from the seed. Java. I need help Post by: Sanka555 on September 18, 2021, 01:48:57 PM God bless you, dear friend. As soon as I have some merits, they are all will be yours. Very, very helpful. thanks a lot
|