Bitcoin

Separated Witness – How to use more than one p2tr input in Python?

It appears that bitcoinlib does not support taproot yet. Is there a good lib that can use more than one taproot input? I want to generate tx like this:

...
"inputs": (
    
        "addresses": (
            "bc1p...."
        ),
        "age": 840326,
        "output_index": 0,
        "output_value": 614896,
        "prev_hash": "_censored_",
        "script_type": "pay-to-taproot",
        "sequence": 4294967295,
        "witness": (
            "bffbbdb0372396b0d183d5c3133477c148414e0f4fd532f0359c21438831b6cb8cc88177723884da25351586185bd738fb9d7ff0749939bcebe0ed305009b399"
        )
    
),
"outputs": (
    
        "addresses": (
            "bc1p..._censored_"
        ),
        "script": "51206bdd72b3419044e4eaf036c54290859f2e40f9a2d2232e31820dbcea37d4f88b",
        "script_type": "pay-to-taproot",
        "value": 41000
    
),
...

Related Articles

Back to top button