4

I created a transaction that creates a taproot output that can be spent using the private key (KEY) corresponding to the taproot output key. Then I imported the WIF formatted private key into Bitcoin Core with importdescriptors '[{"desc: rawtr(KEY), "timestamp":"now" ..."}]', which was successful. With listdescriptors I can see that it is in the wallet but with listunspent the taproot output does not show up.

How can I tell the wallet to recognize the taproot output as spendable?

I've also tried setting the descriptor to active but then it tells me only ranged descriptors can be active and I'm unsure how to add a range to a rawtr(KEY) descriptor.

7
  • Can you retrieve the transaction using gettransaction? If not, try rescanning the blockchain first.
    – Ava Chow
    Commented Dec 6, 2022 at 23:37
  • Yes, I can retrieve it with bitcoin-cli -chain=signet gettransaction 26651571eb31f9ea4f400615bd5fb834a2b0aa120a03074eac889651ffefbd0d . The wallet I'm doing this with contains multiple descriptors and the rawtr descriptor looks like this: { "desc": "rawtr(83462993476e9310eda5cd58c3597f64aa25c68c03ef37dfd69cf46a7bfb26b8)#m8wpngyu", "timestamp": 1670360788, "active": false }
    – raphjaph
    Commented Dec 7, 2022 at 17:14
  • Is that what you used to import or what listdescriptors returns?
    – Ava Chow
    Commented Dec 7, 2022 at 17:45
  • This is what listdescriptors returns
    – raphjaph
    Commented Dec 7, 2022 at 18:08
  • 2
    If you solved your own question, please add an answer to describe how :)
    – Murch
    Commented Dec 7, 2022 at 21:02

1 Answer 1

2

The problem was that the wallet couldn't recognize the utxo with listunspent because I put the wrong private key into the descriptor. rawtr(KEY) takes a tweaked private key and I accidentally put the untweaked private key into it. After I corrected the wallet was able to recognize and spend the utxo.

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.