Using NBitcoin or C# to derive Litecoin and Ethereum Addresses from Master HD Key


I am using NBitcoin, C# and the Bip44 standard to create an hdroot to derive child keys from. I then create keys that I want to use for Litecoin and Ethereum addresses by setting the proper 'coin_type' in my derive statement:

var ltcAddress = hdroot.Derive(new KeyPath("m/44'/2'/0'/0/0"));
var ethAddress = hdroot.Derive(new KeyPath("m/44'/60'/0'/0/0"));

Obviously these are Bitcoin addresses by default. How can I now convert them to the proper Litecoin and Ethereum counterparts?


Posted 2017-10-03T22:20:05.843

Reputation: 133



Not sure how NBitcoin works, but it looks like so far you have derived your private and public key, you now need to hash it in the Ethereum method rather than the bitcoin way.

Look at step 3 in this answer:

Edit: Nethereum has implemented it in C#:


Posted 2017-10-03T22:20:05.843

Reputation: 21