I created a P2WSH multisig wallet using Electrum 4.0.9 using a single Trezor T, to which I sent a large amount of BTC.

Electrum allowed me to set up the wallet using the same device when I used two different derivatives, one being " m/48'/0'/0'/2' ", and the other " m/48'/0'/0'/3' ".

When I attempt to sign using the first wallet derivation, I get an invalid multisig signature, which is explained by when I attempt to sign or view the transaction on the second wallet derivation of 3, which produces aninvalid script_type error.

I've made some progress in figuring out the issue, but have hit a roadblock. As it turns out, the script_type of 2 in the derivation " m/48'/0'/0'/2' " represents a Native Segwit (P2WSH) wallet, and the issue is that the only other script_type defined under BIP 48 at the moment is a Nested Segwit (P2SH-P2WSH), represented by " m/48'/0'/0'/1' ".

I found this out from the BIP 48 documentation which outlines the derivations possible below:

m / purpose' / coin_type' / account' / script_type' / change / address_index

[Source : https://github.com/bitcoin/bips/blob/master/bip-0048.mediawiki ]

So apparently Electrum and Trezor allowed me to derive keys using an undefined script_type of 3, but now I cannot sign any transactions to spend the funds because there is no definition for the script.

I won't go as far as to blame software for my misinformed mistake of course, and I know it allows for forward compatibility, but why would the code for Electrum and the Trezor T allow for key derivation using an undefined script at all?

Is there any way I can define the script_type 3 myself by perhaps copying the code for a script_type of 2 and inserting it as a new definition, while still being able to derive the keys from the HD seed and access my funds?

I would really appreciate help from someone knowledgeable enough to help me answer this, enough to make sure some of those currently unspendable funds go to anyone that can help me solve the issue.

1 Answer 1


You can restore your trezor wallet from seed using electrum and get access to your funds that way. Go to file > new/restore to begin. Choose multisig as the wallet type and select the right number of cosigners. In the keystore step choose to enter the seed, check bip39 under options during the seed entry step, choose native segwit as the script type and enter the correct derivation path "m/48'/0'/0'/3'" and do it again with another cosigner entering "m/48'/0'/0'/2'" as the derivation path.

  • Thanks for the response and your time, however when I try restoring the wallet using the Trezor T seed, Electrum produces different Zpubs and addresses, despite entering the correct paths and cosigners for each multisig wallet. Is there some different kind of encoding Electrum or the Trezor T HD wallet itself might be using? Sep 2, 2021 at 13:17
  • @AndrewBreedlove You have to make sure you enter the exact derivation path and script type as you originally did when creating the wallet and make sure it says bip39 checksum ok next to the options button when entering the seed words.
    – Abdussamad
    Sep 18, 2021 at 14:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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