1

I have a keypath (which is a 2-of-2 multisig) and a tweak attached to it, this tweak is responsible for the scriptpath.

The scriptpath only has a backup public key (used rarely).

Alice + Bob's public keys form the multisig, which is then tweaked. After the tweak I derive a bech32 address.

How can I construct hundreds of different bech32 addresses without having to change any underlying keys?

I want to be able to spend UTXOs across addresses in a single transaction involving just Alice and Bob's single key (basically everything like derivation paths before Taproot).

1 Answer 1

2

If you cannot change the keys, then you can only change what they are tweaked with, i.e. the script path. Because the script path is a merkle tree, you could just add another script that contains just an unspendable script with a counter and increment it each time (the script needs to be unspendable as otherwise if anyone were to guess that path, they could potentially use it to steal your coins). That would be sufficient to change the merkle root so that the tweak is different.

3
  • Thank you very much! Next to the backup key I could add a leaf which contains a hardcoded public-key-like value. I would just perform basic addition with a counter to this "key". So this leaf/script should be unspendable, right? Or is there a better approach?
    – ByteFlowr
    Mar 25, 2022 at 13:08
  • 1
    Yes, I think that is an appropriate approach.
    – Andrew Chow
    Mar 25, 2022 at 15:14
  • 1
    @ByteFlowr: Using the tweaked public keys in the keypath spends would not be relatable due to the differing tweaks. However, if you ever need to spend multiple UTXOs per the backup key, you would reveal that those UTXOs share the same internal public key and use the same backup key in the scriptpath.
    – Murch
    Mar 27, 2022 at 13:11

Your Answer

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

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