bitcoinjs / bitcoinjs-lib

A javascript Bitcoin library for node.js and browsers.
MIT License
5.65k stars 2.09k forks source link

PSBT HD signing does not support taproot #2000

Open gregdhill opened 10 months ago

gregdhill commented 10 months ago

I want to use signInputHD for a taproot script path spend but that will fail if I don't specify bip32Derivation here. It is also not possible to use inputHasHDKey without bip32Derivation. I can't set bip32Derivation since tapLeafScript is defined which would otherwise throw this error. I'm assuming it is intended to use tapBip32Derivation instead but that doesn't seem to be wired up.

gregdhill commented 10 months ago

For more context I am working on integrating the code linked here (creating inscriptions) with the MetaMask Bitcoin snap which fails here. The only solution I can see right now is to use signAllInputs and force the derivation path from the caller.

junderw commented 10 months ago

@motorina0 Why do we prevent HD path info in taproot inputs?