この機能を機能させようとしていますが、機能していません。これが私のコードと症状です。
let sPrivateKey = bitcoin.ECPair.fromWIF(private_key, TESTNET); // sender's private key
let tx = new bitcoin.TransactionBuilder(TESTNET); // create new bitcoin transaction
let txid = "e7fcaa3b0bd399e1f8ad152a984f6669d084527bbbe8267d8cb3adebbb030a38"; // hash of previous most recent transaction
let outn = 1;
tx.addInput(txid, outn);
// Sending Coin
tx.addOutput(receive address, amount To Send);
tx.addOutput(senderWallet.publicKey, leftOver);
try {
await tx.sign(0, sPrivateKey);
let txhex = tx.build().toHex();
console.log("Transaction Hex=>>>>> " + txhex);
return res.json({
success: true,
message: txhex,
// private: sPrivateKey
})
} catch(err) {
console.log("err=> " + err)
}
上記のコードは、このような 16 進コードを提供します。
0200000001380a03bbebadb38c7d26e8bb7b5284d069664f982a15adf8e199d30b3baafce7000000006a47304402204a4125bce8f7fa54663f0c403059b6ef6b90864c56416dc5c680fb46a989d2bd022065d5d20221fb67916017f852cf8a39a19a57ef2b1f900cfce9ac5fa7017ecfd8012102bb2a1d80f42c16e3c2ff1eaf1979c699aae547b5cca65b8cfa1eb353d9ae0171ffffffff0240420f00000000001976a914a3277595a8a805cb5b6374fdc26f1767ec789feb88ac7c906100000000001976a9146ce96da154fc6f03656c60ae20b2663e1f488bd188ac00000000
そして、これをLinkでチェックすると。私が行ったトランザクション(コインを別のウォレットに送信する)がまったく機能していないことがわかります。
私の問題は何ですか?