Skip to content

No inputs were signed #2239

Open
Open
@Lyq80103

Description

@Lyq80103

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions