Closed guggero closed 3 years ago
Rebased and polished my old code I had lying around for this. PTAL @Roasbeef
Once this is in, we'll also want to update this method as well: https://pkg.go.dev/github.com/btcsuite/btcd/txscript#PayToAddrScript
As well as this type: https://pkg.go.dev/github.com/btcsuite/btcd/txscript#PkScript
Fixes https://github.com/btcsuite/btcutil/issues/200.