0

In a Tapscript Keypath Transaction (there is an unrelated Scriptpath too) I can have outputs to all possible address?

(I.e. to P2PKH, P2SH, P2WPKH / P2WSH and P2TR)

I have a list of addresses in all possible formats (including bech32(m)). How can I ensure / verify that the scriptPubKey is mappable to an address in this list?

The signing client has access to every part of transaction's construction.

2
  • I don't understand what you're trying to do. Mar 23 at 20:10
  • Based off the taproot-workshop on Github I constructed this Transaction: CTransaction(nVersion=1 vin=[CTxIn(prevout=COutPoint(hash=d66a46336b05c3f1550fd0983db887f4244570c06538cb05f68afed99d84ea71 n=0) scriptSig= nSequence=0)] vout=[CTxOut(nValue=0.49999000 scriptPubKey=0014a9d0682aaa00c327dbb3fd32c9dedcfcfbec1a69)] wit=CTxWitness() nLockTime=0) I want scriptPubKey to be matchable against wallet addresses in various formats
    – ByteFlowr
    Mar 23 at 20:35

1 Answer 1

0

Solved with this answer and by looking how bitcoin core does it:

https://bitcoin.stackexchange.com/a/89010/123917

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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