Description
I encountered a 'No inputs were signed' issue when executing signAllInput after creating Psbt using a P2TR type address and corresponding WIF. However, if I use a P2WPKH type address and corresponding WIF, I can still sign normally. Why is this?
`export function buildCommitPbst(
config: InscriptionConfig,
utxos: Utxo[],
revealTransactionIns: RevealTransaction[]
): Psbt {
// create one commit tx
const network = config.network;
const psbt = new Psbt({ network });
let total = 0;
for (let utxo of utxos) {
psbt.addInput({
hash: utxo.txid,
index: utxo.vout,
witnessUtxo: {
script: bitcoin.address.toOutputScript(config.senderAddress, network),
value: utxo.value,
},
});
total += utxo.value;
}
let spend = 0;
for (const revealTx of revealTransactionIns) {
psbt.addOutput({ address: revealTx.inscriptionAddress, value: revealTx.transactionValue });
spend += revealTx.transactionValue;
}
const change = estimateChange(config, utxos.length, revealTransactionIns.length, total, spend);
if (change > 0) {
psbt.addOutput({ address: config.changeRecipientAddress, value: change });
}
return psbt;
}`