Hello everyone!
This is my first time using bitcoin in a project and create transactioins and so on myself. I have the issue that my testnet transaction is rejected because
'Error validating transaction: Transaction 54f6fcefa67805ce3f0bf287ea99e145562878489f0fe8c63c04c1c77847e05e orphaned, missing reference b65fec66748b0232a2b453db0aecffbc3ba0c0243953e86e26b94164956556ae.'
I want to send tBTC from 2N5463KY5F8WExmKMMcd7XfK6ZnMAJuz4Cq to 2MvvviSm2c8r9UugpvLxusB9QKRdAzqupEf (all testnet addresses) but it seems that the input is somehow not validated. I put it in with the transaction b65fec66748b0232a2b453db0aecffbc3ba0c0243953e86e26b94164956556ae and vout of 1.
I am using bitcoinjs-lib for this and my code looks like (no issue with showing WIF since it is testnet anyway):
const sender = ECPair.fromWIF('cRwYEpNL2iQYvV7BLCi1YDfzwVnWwzi6ALjXLiWUgQfnpjXehNe1', networks.testnet);
const txb = new TransactionBuilder(networks.testnet);
txb.setVersion(1);
txb.addInput('b65fec66748b0232a2b453db0aecffbc3ba0c0243953e86e26b94164956556ae', 1);
txb.addOutput('2MvvviSm2c8r9UugpvLxusB9QKRdAzqupEf', 100000);
txb.sign(0, sender);
const txHex = txb.build().toHex();
The txHex is wrong or can not be decoded / will have the error thrown posted above.