<p>What exactly do you have from Electrum? Is it an <code>xprv...</code> ?</p>

<p>What you need to do is create a wallet and assign the master private key:</p>

<p><a href="https://bcoin.io/api-docs/#create-a-wallet" rel="nofollow noreferrer">https://bcoin.io/api-docs/#create-a-wallet</a></p>

<p><code>bwallet-cli mkwallet --id=WALLETNAME --master=xprv...</code></p>

<p>Note that Electrum's address derivation scheme may not match bcoin's exactly (since bip32/bip44 don't provide metadata like address type). Therefore you may also need to include the flag <code>--witness=true</code> which will derive bech32 addresses along the bip44 path. If Electrum is using bip49 or bip84 derivation schemes, you will have to run a modified branch of bcoin to recover the same addresses.</p>

<p>If you want to chat about this the developers are usually available on <a href="https://bcoin.io/slack-signup" rel="nofollow noreferrer">slack</a> or IRC #bcoin</p>

CC BY-SA 4.0
2020-04-23T11:51:11.503Z
2020-04-23T11:51:11.503Z
pinhead
<p>I´m searching for a way to import an existing extended private key, exported from electrum, into a bcoin node. Reading <a href="https://bcoin.io/api-docs/" rel="nofollow noreferrer">https://bcoin.io/api-docs/</a> I can´t find a description to do this. </p>

<p>Am I missing a part or does someone have a solution for this?</p>

<bcoin>
How to import an existing extended private key to bcoin?
Michael
# How to import an existing extended private key to bcoin?

(Asked by: username_0 on 2020-04-23)

I´m searching for a way to import an existing extended private key, exported from electrum, into a bcoin node. Reading <https://bcoin.io/api-docs/> I can´t find a description to do this.

Am I missing a part or does someone have a solution for this?

**Tags:** bcoin


---

## 1 answers

### Answer by username_1 on 2020-04-23. Score: 1 | Accepted answer

What exactly do you have from Electrum? Is it an `xprv...` ?

What you need to do is create a wallet and assign the master private key:

<https://bcoin.io/api-docs/#create-a-wallet>

`bwallet-cli mkwallet --id=WALLETNAME --master=xprv...`

Note that Electrum's address derivation scheme may not match bcoin's exactly (since bip32/bip44 don't provide metadata like address type). Therefore you may also need to include the flag `--witness=true` which will derive bech32 addresses along the bip44 path. If Electrum is using bip49 or bip84 derivation schemes, you will have to run a modified branch of bcoin to recover the same addresses.

If you want to chat about this the developers are usually available on [slack](https://bcoin.io/slack-signup) or IRC #bcoin


---

