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?


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: https://ethereum.stackexchange.com/questions/3542/how-are-ethereum-addresses-generated

Edit: Nethereum has implemented it in C#: https://github.com/Nethereum/Nethereum/blob/master/src/Nethereum.Signer/EthECKey.cs#L115

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.