1

I'm experimenting with output descriptors and multi-sig wallets and I came across a problem providing the last signature to my 2-of-3 psbt.

Data Error: Input does not match scriptPubKey.

I'm creating descriptors for wallets through a program I created by simply fetching public keys of various hardware devices and inputting them along with their fingerprints and derivation paths into a multi-sig template. I fetch the keys from each device at m/48h/0h/0h/2h except for the third key I fetch from a different account index. I'm wondering if this approach is flawed and that's the reason I get the above error.

I will provide the descriptor as this is just for testing purposes and I am not worried about exposing my public keys:

wsh(sortedmulti(2,[b5b630b5/48h/0h/0h/2h]xpub6EE1hjfD2y7ULYeKmttfoNgqV9crHMErQ9gYtSBrjJTkYRJEvy3J252UJZcVQth2haCDMoSKo1yiftTpJErQLBcfShNXsMJZv5FhVx92T2R/<0;1>/,[9f40e694/48h/0h/0h/2h]xpub6E9AaLTxxxPGXRd7eB8oC9s5uJUMZVJueBXGgcpQvW6e9puqcxT82bfumGtYQMVVZyLZai6uFCVcwFLwiHFupdRJU9WJSo34n4DMSAQ8UNQ/<0;1>/,[00000000/48h/0h/0h/2h]xpub6FAopVoDqUtob6myxA6iuUWxUb5H176FmjNovn7mik9MyQb9P3vPbEfxT1WNphDVnnRWDmNvtjytCRyqRtX5ChUMCcawaHLHMZsMHQJ5e6M/<0;1>/*))#cprm2dm2

The error occurs only when I try to sign with the first key (b6b630b5) from my trezor. I believe this has to with the way I construct the descriptor, however I am not sure where I went wrong as the wallet correctly imports to Sparrow, and I was able to provide a signature with one of the other two keys.

Here is the psbt I am passing into the Trezor that includes the scriptPubKey information:

cHNidP8BAH0CAAAAAba/vJ3hz6deXKlJ5dANs0D46Kx9IuT1xmaz21Sj2EAEAAAAAAD9////AqAPAAAAAAAAFgAU/KntEKoymoEXlBUQ4u0Zgt9Tics1CwAAAAAAACIAIKLnG/vjEHtNwQhh5/ST6syKUZEvqUUgqEraS67QMRO6Sh4NAE8BBIiyHgTencicgAAAAoRrHAh6dr1caHy6j0zHJUM8BOWGO4bRDTkwWOnEo5WZAozs6SoJKcBvFEqFa+uBh1fIHV4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AZSHLW2MLUwAACAAAAAgAcAAIACAACAAAAAAAAAAAAAAAEBaVIhAjSgpAW++F1x6Li3f7UCPNcj5QrmctErqJZ348brCzKMIQJy4RHsLrzOehhSzBB6vXfuw+/dldB+qixBmxzMbgPzhSEC0NOaIUEkrdr19uH01QxlgrzszJQIO/Znpg1Ch1M/ccpTriICAtDTmiFBJK3a9fbh9NUMZYK87MyUCDv2Z6YNQodTP3HKHAAAAAAwAACAAAAAgAAAAIACAACAAQAAAAAAAAAiAgI0oKQFvvhdcei4t3+1AjzXI+UK5nLRK6iWd+PG6wsyjBwAAAAAMAAAgAAAAIAAAACAAgAAgAEAAAAAAAAAIgICcuER7C68znoYUswQer137sPv3ZXQfqosQZsczG4D84UctbYwtTAAAIAAAACABwAAgAIAAIABAAAAAAAAAAA=

4
  • What software are you using to send this PSBT to the Trezor? Trezor does not take PSBTs directly so the software must do a translation step, and it looks like that's probably what's gone wrong.
    – Ava Chow
    Commented Sep 3 at 22:53
  • Best guess currently is because you have 2 different xpubs that have the same paster fingerprint and derivation path. I suggest making the master fingerprints unique.
    – Ava Chow
    Commented Sep 3 at 22:59
  • First I import the keystore to Sparrow wallet using my Trezor (import > connect hardware device > scan), then I import a second keystore from BIP 39, then I create a PSBT and click sign on the PSBT view. The first signature worked but the second one (the one with the unique fingerprint and derivation path) is the problem. Commented Sep 4 at 16:03
  • Quick Update: I believe the issue is because of Sparrow wallet's PSBT creation because I imported the wallet to BlueWallet and created the PSBT there and was able to send the PSBT back to Sparrow to sign it and broadcast it. Commented Sep 4 at 16:27

0

Your Answer

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