<p>Response on stackoverflow <a href="https://stackoverflow.com/questions/27299204/matching-keypath-in-application-with-wallet32-keypath-for-bip44-wallets/27627358#27627358">https://stackoverflow.com/questions/27299204/matching-keypath-in-application-with-wallet32-keypath-for-bip44-wallets/27627358#27627358</a></p>

<p>Short answer : now the "44'/0'" notation has been implemented, just update your package of NBitcoin.</p>

CC BY-SA 3.0
2014-12-24T15:09:35.490Z
2014-12-24T15:09:35.490Z
2017-05-23T12:34:59.703Z
Nicolas Dorier
<p>I have an application where I create an HD wallet with a passphrase and save the public master key to the database for the user.</p>

<p>Then, I want the user to be able to back up the wallet to their own wallet, in this case I am using Wallet32. I restore the account in Wallet32, which uses a key path of m/44'/0'/0'/</p>

<p>On my application side, I am creating the keypath like so (in c#):</p>

<pre><code>KeyPath newKeyPath = new KeyPath("44/0/0/0/0" + nextDerivation);
var childKey = pubkey.Derive(newKeyPath);
</code></pre>

<p>The nextDerivsation variable just increments with each purchase. When the derived public key is created on the application side, it doesn't match up with a derived public key in wallet32. So, if a payment is made through the application, Wallet32 doesn't pick it up.</p>

<p>I am using the C# NBitcoin library. When I try to add the apostrophes in the keyPath string like so:</p>

<pre><code>KeyPath newKeyPath = new KeyPath("44'/0'/0'/0/0" + nextDerivation);
var childKey = pubkey.Derive(newKeyPath);
</code></pre>

<p>Then I get an "invalid input format" error. I am unsure as to whether those apostrophes are necessary or not, but when I input that same derivation path into the Bip32 generator, then I can create the same public keys. I can send a payment to the derived address and wallet32 picks it up.</p>

<p>Can anyone point me in the right direction on what I need to use for the KeyPath in the NBitcoin library to obtain the same results?</p>

<wallet><bip32-hd-wallets><c#><mnemonic-seed>
Matching KeyPath in application with Wallet32 Keypath for Bip44 wallets
pfunc
# Matching KeyPath in application with Wallet32 Keypath for Bip44 wallets

(Asked by: username_0 on 2014-12-04)

I have an application where I create an HD wallet with a passphrase and save the public master key to the database for the user.
Then, I want the user to be able to back up the wallet to their own wallet, in this case I am using Wallet32. I restore the account in Wallet32, which uses a key path of m/44'/0'/0'/
On my application side, I am creating the keypath like so (in c#):
KeyPath newKeyPath = new KeyPath("44/0/0/0/0" + nextDerivation);
var childKey = pubkey.Derive(newKeyPath);

The nextDerivsation variable just increments with each purchase. When the derived public key is created on the application side, it doesn't match up with a derived public key in wallet32. So, if a payment is made through the application, Wallet32 doesn't pick it up.
I am using the C# NBitcoin library. When I try to add the apostrophes in the keyPath string like so:
KeyPath newKeyPath = new KeyPath("44'/0'/0'/0/0" + nextDerivation);
var childKey = pubkey.Derive(newKeyPath);

Then I get an "invalid input format" error. I am unsure as to whether those apostrophes are necessary or not, but when I input that same derivation path into the Bip32 generator, then I can create the same public keys. I can send a payment to the derived address and wallet32 picks it up.
Can anyone point me in the right direction on what I need to use for the KeyPath in the NBitcoin library to obtain the same results?

**Tags:** wallet, bip32-hd-wallets, c#, mnemonic-seed


---

## 1 answers

### Answer by username_1 on 2014-12-24. Score: 1

Response on stackoverflow <https://stackoverflow.com/questions/27299204/matching-keypath-in-application-with-wallet32-keypath-for-bip44-wallets/27627358#27627358>

Short answer : now the "44'/0'" notation has been implemented, just update your package of NBitcoin.


---

