How to Sign a Musig with Bitcoin Core
Today I was back at trying to sign a transaction spending a musig UTXO in Bitcoin Core. Last time around, Pieter W. gave me two pieces of advice. Use PSBTs, as they're more likely to work on modern stuff like Musig than raw transactions. He asked how I was generating my private/public keys, which made me realize I'd probably calculated my pubkey incorrectly. So today I took a new swing, using the same methodology I use for signing regular multisigs in Bitcoin Core, but now I can't get the PSBT to process correctly. I. Capturing the Individual Keys I used the simplest method possible to generate a musig address: grab addresses from two different wallets and capture their pubkeys. (The private keys should then be sitting in those wallets.) Here's the address & pubkey capture: musigaddress1=$(bitcoin-cli -rpcwallet=musig1 getnewaddress) musigaddress2=$(bitcoin-cli -rpcwallet=musig2 getnewaddress) musigpubkey1=$(bitcoin-cli -rpcwallet=musig1 -name...