These are chat archives for Nethereum/Nethereum

8th
Jan 2019
Hu Chia Wei
@kennethhutw
Jan 08 15:30
Hello, How do I implement BIP32 wallet ?
Hu Chia Wei
@kennethhutw
Jan 08 15:42
How to generate (derive) addresses from the public key?
Cryt1c
@Cryt1c
Jan 08 15:49
it worked. :D
Juan Blanco
@juanfranblanco
Jan 08 16:17
@kennethhutw Use the Nethereum.HDWallet
Hu Chia Wei
@kennethhutw
Jan 08 16:26
@juanfranblanco Thanks for reply but which method should I use to import publickey ?
Enigmatic
@EnigmaticUnreal_twitter
Jan 08 16:34
You could get the public key upon importing the private key (under Nethereum.Signer.EthECKey). What are you working with? Importing mnemonics and trying to get the pubkey (or the address in this case)?

Getting the pubkey is very much just (in VB.NET):

Dim ecKey As New Nethereum.Signer.EthECKey("0000000000000000000000000000000000000000000000000000000000000000")
Dim pubKey = ecKey.GetPubKey

Though if your input are mnemonics we might want to try something else

Think I haven't seen HdWallet being able to return an account pubkey - Or I could be wrong. Digging around.
Hu Chia Wei
@kennethhutw
Jan 08 16:39
@EnigmaticUnreal_twitter Thanks for your reply. In my case, I don't have private key. I only have extended Public key
Sorry, I may say something wrong. I want to generate child wallet by parent's public key.
Enigmatic
@EnigmaticUnreal_twitter
Jan 08 17:23

Ah. That ties to your earlier remark about BIP32, which using the parent's public key as a seed you'd derive the child public keys....

I haven't personally tried this before... But HdWallet allows the wallet to be initialised with a seed (overload Wallet(byte[] seed, string path = DEFAULT_PATH, IRandom random = null)) - Was wondering if this would help?

Juan Blanco
@juanfranblanco
Jan 08 17:28
You will need to use NBitcoin directly for public keys
@kennethhutw I have not implemented that yet
Enigmatic
@EnigmaticUnreal_twitter
Jan 08 17:28
:pray: thanks Juan
Hu Chia Wei
@kennethhutw
Jan 08 22:04
@juanfranblanco okay!! Thank you very much for your reply.