<p>Electrum uses BIP45.</p>

<p><code>m / purpose' / cosigner_index / change / address_index</code></p>

<p>Example for non-change of the first cosigner and first address: <code>m / 45' / 0 / 0 / 0</code></p>

<p>See: <a href="https://bitcointalk.org/index.php?topic=1634517.15" rel="noreferrer">https://bitcointalk.org/index.php?topic=1634517.15</a>
and
<a href="https://github.com/bitcoin/bips/blob/master/bip-0045.mediawiki" rel="noreferrer">https://github.com/bitcoin/bips/blob/master/bip-0045.mediawiki</a></p>

CC BY-SA 4.0
2018-12-20T22:44:12.583Z
I find the inclusion of the purpose code and cosigner index to not be present. See my answer below. Thus not BIP45.
user1204270
CC BY-SA 3.0
2017-03-09T20:01:25.050Z
2017-03-09T20:01:25.050Z
Jonas Schnelli
<p>Here's a descriptor for a 2-of-3 created by Electrum.</p>
<p>Receive addresses:</p>
<pre><code>sh(sortedmulti(2,XPUB_1/0/*,XPUB_2/0/*,XPUB_3/0/*))
</code></pre>
<p>Change addresses:</p>
<pre><code>sh(sortedmulti(2,XPUB_1/1/*,XPUB_2/1/*,XPUB_3/1/*))
</code></pre>
<p>(Replace <code>XPUB_1</code>, <code>XPUB_2</code>, and <code>XPUB_3</code> with your three master public keys )</p>

CC BY-SA 4.0
2020-08-16T20:50:26.213Z
2020-11-21T21:28:15.017Z
2020-11-21T21:28:15.017Z
RobinLinus
<p>Here is what works for me when using bip32gen from bip32utils to generate the public keys which are used in the transaction, starting from an xprv master key. </p>

<p>For each xprv master key of a cosigner, use 0/0 for the first receiving address, 0/1 for the second, 1/0 for the first change address, 1/1 for the second change address. </p>

<p>Then use the corresponding public key for each cosigner, sorted into lexicographic order, when constructing the redeem script, and generate the corresponding p2sh address for each address which will be generated by Electrum. </p>

<p>So far as I can tell, there are no purpose codes or cosigner index, as per BIP44 or BIP45. This is with Electrum 3.2.3.</p>

<p>refs: 
<a href="https://bitcointalk.org/index.php?topic=1819380" rel="nofollow noreferrer">https://bitcointalk.org/index.php?topic=1819380</a>
<a href="https://bitcointalk.org/index.php?topic=1816926.msg18101203#msg18101203" rel="nofollow noreferrer">https://bitcointalk.org/index.php?topic=1816926.msg18101203#msg18101203</a></p>

<p>See this other stackexchange discussion: <a href="https://bitcoin.stackexchange.com/questions/36955/what-bip32-derivation-path-does-electrum-use/36956#36956">What BIP32 derivation path does Electrum use?</a></p>

CC BY-SA 4.0
2018-12-20T22:43:25.040Z
2018-12-20T22:43:25.040Z
user1204270
<p>After a lot of struggle, I found out that Electrum uses following root derivation for normal and multisig wallets. For example:</p>

<ul>
<li><p><code>root/0/0</code> for each cosigner. Example:</p>

<ul>
<li><p><code>m/44'/0'/0'</code> ==> shared root key (x)</p></li>
<li><p><code>x/0/0</code> ==> address for first receiving multisig (derive in all cosigners shared keys. all 3 keys must be lexicographically ordered).</p></li>
</ul></li>
<li><p>some semi-compatible form of BIP45 for hardware wallets. Didn't test it but here's the code: <a href="https://github.com/spesmilo/electrum/blob/master/lib/base_wizard.py#L220" rel="nofollow noreferrer">https://github.com/spesmilo/electrum/blob/master/lib/base_wizard.py#L220</a></p></li>
</ul>

<p>refs:</p>

<p><a href="https://bitcoin.stackexchange.com/questions/36955/what-bip32-derivation-path-does-electrum-use">What BIP32 derivation path does Electrum use?</a></p>

<p><a href="https://github.com/spesmilo/electrum/issues/2266" rel="nofollow noreferrer">https://github.com/spesmilo/electrum/issues/2266</a></p>

<p><a href="https://bitcointalk.org/index.php?topic=1819380" rel="nofollow noreferrer">https://bitcointalk.org/index.php?topic=1819380</a></p>

CC BY-SA 4.0
2018-12-20T22:53:05.477Z
I find that the purpose code is not present. See my answer. It is unclear what the m/44'/0'/0 generating the shared root key means in this answer. Starting with an xprv, a path of 0/0 generates the pubkeys used to construct the redeem scripts and the corresponding p2sh address used by Electrum for the first receiving address.
user1204270
CC BY-SA 4.0
2020-11-24T03:04:43.393Z
this is for hardware wallets only. for wallets that use electrum generated seeds x is just m for p2sh and m/1' for p2wsh
Abdussamad
CC BY-SA 3.0
2017-03-10T08:40:21.030Z
2017-03-10T08:40:21.030Z
2017-04-13T12:47:33.743Z
joe.js
<p>Same question as <a href="https://bitcoin.stackexchange.com/questions/36955/what-bip32-derivation-path-does-electrum-use">What BIP32 derivation path does Electrum use?</a> </p>

<p>but for multisig. thanks.</p>

<electrum><bip32-hd-wallets><multi-signature>
What BIP32 derivation path does Electrum use for Multisig?
joe.js
# What BIP32 derivation path does Electrum use for Multisig?

(Asked by: username_0 on 2017-03-09)

Same question as [What BIP32 derivation path does Electrum use?](https://bitcoin.stackexchange.com/questions/36955/what-bip32-derivation-path-does-electrum-use)

but for multisig. thanks.

**Tags:** electrum, bip32-hd-wallets, multi-signature


---

## 4 answers

### Answer by username_0 on 2017-03-10. Score: 5 | Accepted answer

After a lot of struggle, I found out that Electrum uses following root derivation for normal and multisig wallets. For example:

* `root/0/0` for each cosigner. Example:

  + `m/44'/0'/0'` ==> shared root key (x)
  + `x/0/0` ==> address for first receiving multisig (derive in all cosigners shared keys. all 3 keys must be lexicographically ordered).
* some semi-compatible form of BIP45 for hardware wallets. Didn't test it but here's the code: <https://github.com/spesmilo/electrum/blob/master/lib/base_wizard.py#L220>

refs:

[What BIP32 derivation path does Electrum use?](https://bitcoin.stackexchange.com/questions/36955/what-bip32-derivation-path-does-electrum-use)

<https://github.com/spesmilo/electrum/issues/2266>

<https://bitcointalk.org/index.php?topic=1819380>

> **Comments:**
> **username_2**: I find that the purpose code is not present. See my answer. It is unclear what the m/44'/0'/0 generating the shared root key means in this answer. Starting with an xprv, a path of 0/0 generates the pubkeys used to construct the redeem scripts and the corresponding p2sh address used by Electrum for the first receiving address.  
> **username_4**: this is for hardware wallets only. for wallets that use electrum generated seeds x is just m for p2sh and m/1' for p2wsh  

---

### Answer by username_1 on 2017-03-09. Score: 6

Electrum uses BIP45.

`m / purpose' / cosigner_index / change / address_index`

Example for non-change of the first cosigner and first address: `m / 45' / 0 / 0 / 0`

See: <https://bitcointalk.org/index.php?topic=1634517.15>
and
<https://github.com/bitcoin/bips/blob/master/bip-0045.mediawiki>

> **Comments:**
> **username_2**: I find the inclusion of the purpose code and cosigner index to not be present. See my answer below. Thus not BIP45.  

---

### Answer by username_3 on 2020-08-16. Score: 3

Here's a descriptor for a 2-of-3 created by Electrum.
Receive addresses:
sh(sortedmulti(2,XPUB_1/0/*,XPUB_2/0/*,XPUB_3/0/*))

Change addresses:
sh(sortedmulti(2,XPUB_1/1/*,XPUB_2/1/*,XPUB_3/1/*))

(Replace XPUB_1, XPUB_2, and XPUB_3 with your three master public keys )


---

### Answer by username_2 on 2018-12-20. Score: 0

Here is what works for me when using bip32gen from bip32utils to generate the public keys which are used in the transaction, starting from an xprv master key.

For each xprv master key of a cosigner, use 0/0 for the first receiving address, 0/1 for the second, 1/0 for the first change address, 1/1 for the second change address.

Then use the corresponding public key for each cosigner, sorted into lexicographic order, when constructing the redeem script, and generate the corresponding p2sh address for each address which will be generated by Electrum.

So far as I can tell, there are no purpose codes or cosigner index, as per BIP44 or BIP45. This is with Electrum 3.2.3.

refs:
<https://bitcointalk.org/index.php?topic=1819380>
<https://bitcointalk.org/index.php?topic=1816926.msg18101203#msg18101203>

See this other stackexchange discussion: [What BIP32 derivation path does Electrum use?](https://bitcoin.stackexchange.com/questions/36955/what-bip32-derivation-path-does-electrum-use/36956#36956)


---

