This function improves upon bitcoinjs-lib's native psbt.signAllInputs() by automatically
handling Taproot inputs. For each input, it detects if it's a Taproot input and internally
tweaks the key if needed.
This creates consistency with the BIP32 signing methods (signBIP32/signInputBIP32),
which also automatically handle key tweaking for Taproot inputs. In contrast, bitcoinjs-lib's
native implementation requires users to manually pre-tweak ECPair signers for Taproot inputs.
With this implementation, you can use a single ECPair to sign both Taproot and non-Taproot
inputs in the same PSBT, similar to how signBIP32 allows using a common node for both types.
Signs all inputs of a PSBT with an ECPair.
This function improves upon bitcoinjs-lib's native
psbt.signAllInputs()by automatically handling Taproot inputs. For each input, it detects if it's a Taproot input and internally tweaks the key if needed.This creates consistency with the BIP32 signing methods (
signBIP32/signInputBIP32), which also automatically handle key tweaking for Taproot inputs. In contrast, bitcoinjs-lib's native implementation requires users to manually pre-tweak ECPair signers for Taproot inputs.With this implementation, you can use a single ECPair to sign both Taproot and non-Taproot inputs in the same PSBT, similar to how
signBIP32allows using a common node for both types.