bitcoinjs-lib icon indicating copy to clipboard operation
bitcoinjs-lib copied to clipboard

No inputs were signed

Open Lyq80103 opened this issue 5 months ago • 0 comments
trafficstars

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; }`

Lyq80103 avatar May 29 '25 03:05 Lyq80103