<p>The full derivation path appears to follow <a href="https://github.com/bitcoin/bips/blob/master/bip-0045.mediawiki" rel="nofollow noreferrer">BIP 45</a>, but not quite exactly. The actual public keys are being generated from the xpub at the path <code>m/45'/0/0</code>. For the  first address, the derivation paths for the public keys will be <code>m/45'/0/0/0</code>. You can get these pubkeys using Ian Coleman's BIP 39 tool by going to the BIP 32 tab and entering <code>m/45'/0/0</code> as the derivation path. Then scroll down to the derived addresses and select the first one.</p>
<p>You should see that the first pubkey from the first mnemonic is <code>03ae50de983900d2898d975cd71c8520c88da868acc434e259775ee58b5e4ce311</code> and the first pubkey from the second mnemonic is <code>03c2367af137659943c11ee02aa88ec9b2ca5b424183b8d3a6990db1907bc475ae</code>. If you enter these into any multisig generating tool, you should get the address you are expecting.</p>
<p>For example, Bitcoin Core's <code>createmultisig</code>:</p>
<pre><code>$ bitcoin-cli createmultisig 2 '[&quot;03ae50de983900d2898d975cd71c8520c88da868acc434e259775ee58b5e4ce311&quot;,&quot;03c2367af137659943c11ee02aa88ec9b2ca5b424183b8d3a6990db1907bc475ae&quot;]'
{
  &quot;address&quot;: &quot;3BWrS4WXB61sppUN7zxgAqxzjcSvML7jWC&quot;,
  &quot;redeemScript&quot;: &quot;522103ae50de983900d2898d975cd71c8520c88da868acc434e259775ee58b5e4ce3112103c2367af137659943c11ee02aa88ec9b2ca5b424183b8d3a6990db1907bc475ae52ae&quot;,
  &quot;descriptor&quot;: &quot;sh(multi(2,03ae50de983900d2898d975cd71c8520c88da868acc434e259775ee58b5e4ce311,03c2367af137659943c11ee02aa88ec9b2ca5b424183b8d3a6990db1907bc475ae))#eq5t5j72&quot;
}
</code></pre>

CC BY-SA 4.0
2021-09-27T02:35:37.147Z
Perfect. Setting the derivation path to `m/45'/0/0` generated the public keys that match the address generated from Electrum, etc.
DemandUtopia
CC BY-SA 4.0
2021-09-27T00:15:30.227Z
2021-09-27T00:15:30.227Z
Ava Chow
<p>You are making multisig addresses, so the first thing to change is to select BIP141 not BIP32 tab.</p>
<p>Under BIP141, go to script semantics drop down menu. Select P2WSH 1-1 multisig.</p>
<p>Then manually adjust the derivation path just above.</p>
<p>You'll get 1 of 1 msig addresses below.</p>
<p>Use the Zpub give and enter into Electrum to generate a 1 of 1 msig wallet - not sure if Electrum allows a 1 of 1 msig wallet.</p>
<p>If not, you need to make 2 keys with Ian Coleman (that's one way of many), extract 2 Zpubs, ignore the addresses, make a 2 of 2 Electrum wallet with those Zpubs, print the addresses, make a duplicate wallet with those Zpubs using Sparrow or Specter, and finally compare the address list is identical to Electrum's.</p>

CC BY-SA 4.0
2021-09-27T09:26:37.887Z
2021-09-27T09:26:37.887Z
Arman The Parman
<p>I'm trying to &quot;manually&quot; confirm the Bitcoin addresses that Electrum, Sparrow, and Caravan generate from a deterministic multisig addresses.</p>
<p>As an example, I have the following 2-of-2 wallet:</p>
<p>Seed words #1:</p>
<pre><code>legal thumb play interest flash will lucky jar outdoor guard vendor found crucial develop spring valley example supply fortune pole right acid alert page
</code></pre>
<p>Seed words #2:</p>
<pre><code>begin siege speak boat before mad solve dance lawsuit point machine cake tragic fiber waste equip loan syrup cloud credit shock choose chest finish
</code></pre>
<p>Using <a href="https://github.com/iancoleman/bip39" rel="nofollow noreferrer">Ian Coleman's BIP39 Tool</a>, I can confirm the Master Public Key (xpub) with the following steps:</p>
<ol>
<li>Enter the seed words under <strong>BIP39 Mnemonic</strong></li>
<li>Under <strong>Derivation Path</strong>, Select the <strong>BIP32</strong> tab</li>
<li>Under <strong>BIP32 Derivation Path</strong>, enter <code>m/45'/0</code> (for legacy multisig)</li>
<li>Copy the <strong>BIP32 Extended Public Key</strong></li>
</ol>
<p>The resulting xpub matches with what Electrum generates when entering those seed words as a 2-of-2 legacy multisig wallet. The example xpub's are:</p>
<p>Wallet #1 xpub:</p>
<pre><code>xpub6B7nJf6xmWPjeVpdSwePjDmUJxRWSVf3vXu47AYKiLTyW7rPUyysKVU8TtRJ9VXtAVNHjx6EsueiE9Mw7JyP4dVhZjJF4ViVAJNaoZo49uw
</code></pre>
<p>Wallet #2 xpub:</p>
<pre><code>xpub6Ab52xTpcFNYToaXBT6opdaqo18rKSYA3rnum4XuE8pLW9N748QJq1PP5z93KSfbpfMVRLqsYgZYwfNmzomqkw4kvopD1PuXS4DuNaY4ZBi
</code></pre>
<p>The first address in this multisig wallet is <code>3BWrS4WXB61sppUN7zxgAqxzjcSvML7jWC</code>. When I enter those xpubs into <a href="https://www.sparrowwallet.com/" rel="nofollow noreferrer">Sparrow Bitcoin Wallet</a> (with <strong>Script Type</strong> <code>Legacy (P2SH)</code> and <strong>Derivation</strong> <code>m/45'</code>) I get the same address. <a href="https://unchained-capital.github.io/caravan/#/wallet" rel="nofollow noreferrer">Caravan</a> also gives the same address.</p>
<p>My question is this: <em>how do I &quot;manually&quot; generate that first Bitcoin address</em>?</p>
<p>I've tried using <a href="https://iancoleman.io/multisig/" rel="nofollow noreferrer">Ian Coleman's Multisig Tool</a>, <a href="https://bitpay.github.io/bitcore-playground/app/#/multisig" rel="nofollow noreferrer">Bitcore</a>, <a href="https://coinb.in/#newMultiSig" rel="nofollow noreferrer">coinbin Bitcoin Wallet</a>, and <a href="https://developer.bitcoin.org/reference/rpc/addmultisigaddress.html" rel="nofollow noreferrer">the addmultisigaddress command from Bitcoin core</a>. They all require &quot;Public Keys&quot; of the addresses from the two wallets. Where can I find/generate those Public Keys (preferably using some sort of browser-html or command line tool)? I've tried using the Public Key's generated at the bottom of the <strong>BIP39 Tool</strong> from above, but no combination of those keys in any of the tools results in the same generated address.</p>

<electrum><multi-signature><address-generation>
How do Electrum/Sparrow/Caravan generate multisig addresses?
DemandUtopia
# How do Electrum/Sparrow/Caravan generate multisig addresses?

(Asked by: username_0 on 2021-09-26)

I'm trying to "manually" confirm the Bitcoin addresses that Electrum, Sparrow, and Caravan generate from a deterministic multisig addresses.
As an example, I have the following 2-of-2 wallet:
Seed words #1:
legal thumb play interest flash will lucky jar outdoor guard vendor found crucial develop spring valley example supply fortune pole right acid alert page

Seed words #2:
begin siege speak boat before mad solve dance lawsuit point machine cake tragic fiber waste equip loan syrup cloud credit shock choose chest finish

Using Ian Coleman's BIP39 Tool, I can confirm the Master Public Key (xpub) with the following steps:

Enter the seed words under BIP39 Mnemonic
Under Derivation Path, Select the BIP32 tab
Under BIP32 Derivation Path, enter m/45'/0 (for legacy multisig)
Copy the BIP32 Extended Public Key

The resulting xpub matches with what Electrum generates when entering those seed words as a 2-of-2 legacy multisig wallet. The example xpub's are:
Wallet #1 xpub:
xpub6B7nJf6xmWPjeVpdSwePjDmUJxRWSVf3vXu47AYKiLTyW7rPUyysKVU8TtRJ9VXtAVNHjx6EsueiE9Mw7JyP4dVhZjJF4ViVAJNaoZo49uw

Wallet #2 xpub:
xpub6Ab52xTpcFNYToaXBT6opdaqo18rKSYA3rnum4XuE8pLW9N748QJq1PP5z93KSfbpfMVRLqsYgZYwfNmzomqkw4kvopD1PuXS4DuNaY4ZBi

The first address in this multisig wallet is 3BWrS4WXB61sppUN7zxgAqxzjcSvML7jWC. When I enter those xpubs into Sparrow Bitcoin Wallet (with Script Type Legacy (P2SH) and Derivation m/45') I get the same address. Caravan also gives the same address.
My question is this: how do I "manually" generate that first Bitcoin address?
I've tried using Ian Coleman's Multisig Tool, Bitcore, coinbin Bitcoin Wallet, and the addmultisigaddress command from Bitcoin core. They all require "Public Keys" of the addresses from the two wallets. Where can I find/generate those Public Keys (preferably using some sort of browser-html or command line tool)? I've tried using the Public Key's generated at the bottom of the BIP39 Tool from above, but no combination of those keys in any of the tools results in the same generated address.

**Tags:** electrum, multi-signature, address-generation


---

## 2 answers

### Answer by username_1 on 2021-09-27. Score: 0 | Accepted answer

The full derivation path appears to follow BIP 45, but not quite exactly. The actual public keys are being generated from the xpub at the path m/45'/0/0. For the  first address, the derivation paths for the public keys will be m/45'/0/0/0. You can get these pubkeys using Ian Coleman's BIP 39 tool by going to the BIP 32 tab and entering m/45'/0/0 as the derivation path. Then scroll down to the derived addresses and select the first one.
You should see that the first pubkey from the first mnemonic is 03ae50de983900d2898d975cd71c8520c88da868acc434e259775ee58b5e4ce311 and the first pubkey from the second mnemonic is 03c2367af137659943c11ee02aa88ec9b2ca5b424183b8d3a6990db1907bc475ae. If you enter these into any multisig generating tool, you should get the address you are expecting.
For example, Bitcoin Core's createmultisig:
$ bitcoin-cli createmultisig 2 '["03ae50de983900d2898d975cd71c8520c88da868acc434e259775ee58b5e4ce311","03c2367af137659943c11ee02aa88ec9b2ca5b424183b8d3a6990db1907bc475ae"]'
{
  "address": "3BWrS4WXB61sppUN7zxgAqxzjcSvML7jWC",
  "redeemScript": "522103ae50de983900d2898d975cd71c8520c88da868acc434e259775ee58b5e4ce3112103c2367af137659943c11ee02aa88ec9b2ca5b424183b8d3a6990db1907bc475ae52ae",
  "descriptor": "sh(multi(2,03ae50de983900d2898d975cd71c8520c88da868acc434e259775ee58b5e4ce311,03c2367af137659943c11ee02aa88ec9b2ca5b424183b8d3a6990db1907bc475ae))#eq5t5j72"
}

> **Comments:**
> **username_0**: Perfect. Setting the derivation path to `m/45'/0/0` generated the public keys that match the address generated from Electrum, etc.  

---

### Answer by username_2 on 2021-09-27. Score: 0

You are making multisig addresses, so the first thing to change is to select BIP141 not BIP32 tab.

Under BIP141, go to script semantics drop down menu. Select P2WSH 1-1 multisig.

Then manually adjust the derivation path just above.

You'll get 1 of 1 msig addresses below.

Use the Zpub give and enter into Electrum to generate a 1 of 1 msig wallet - not sure if Electrum allows a 1 of 1 msig wallet.

If not, you need to make 2 keys with Ian Coleman (that's one way of many), extract 2 Zpubs, ignore the addresses, make a 2 of 2 Electrum wallet with those Zpubs, print the addresses, make a duplicate wallet with those Zpubs using Sparrow or Specter, and finally compare the address list is identical to Electrum's.


---

