question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error #-25: Missing inputs, code=-25

See original GitHub issue

When broadcast transaction using bitcoinjs signed transaction will result the error code

Validation Error: BitcoindException(super=com.neemre.btcdcli4j.core.BitcoindException: Error #-25: Missing inputs, code=-25)
var bitcoin = require('bitcoinjs-lib')
var keyPair = bitcoin.ECPair.fromWIF('L1uyy5qTuGrVXrmrsvHWHgVzW9kKdrp27wBC7Vs6nZDTF2BRUVw1')
var tx = new bitcoin.TransactionBuilder()

tx.addInput('aa94ab02c182214f090e99a0d57021caffd0f195a81c24602b1028b130b63e31', 0)
tx.addOutput('1Gokm82v6DmtwKEB8AiVhm82hyFSsEvBDK', 15000)
tx.sign(0, keyPair)
txHEX = tx.build().toHex()
console.log(txHEX);

var tx = bitcoin.Transaction.fromHex(txHEX);
console.log(tx)

but if I using some exist TXhex from blockchain.info it can success broadcast. I thought it’s about the version?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
afk11commented, Nov 22, 2017

That output was already spent in 2014:

https://btc.com/105eeeb9c448872c2257f93d5e2b14248c4a800cd69641911aa7e964cf570872#in_0

Even still, you should blank out that private key though ASAP…

1reaction
EasonWang01commented, Nov 28, 2017

I found the error only happened when using blockchain.info,so not related to bitcoinjs lib.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Missing inputs ( code - 25 )- been trying to send BTC for days
It essentially means that inputs that you are attempting to use for your transaction do not exist (or have already been spent). For...
Read more >
Issue with sendrawtransaction missing inputs error code -25
Working with Bitcoin-qt 0.16.3 testnet. Attempting to sendrawtransaction , however, receive following error: Missing inputs (code -25).
Read more >
"invalid missing inputs code -25" : r/Bitcoin - Reddit
I created a rawtransaction and tried to submit it with the client via the sendrawtransaction. but before it even starts to sends it...
Read more >
What does "sendrawtx exit 25, gave error code: -25 error message ...
I'm getting similar, repeated periodically and printed to the console: lightningd(19592): Broadcasting tx : 25 error code: -25 error message: Missing inputs.
Read more >
Error when sending transactions error code: -25 missing inputs
Hi I use zecwallet lite on windows everytime I want to send my coin I got this errorerror code: -25 missing inputs ,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found