broadcast-transaction
v0.4.0
Published
Simply Broadcasts Bitcoin Transactions
Downloads
5
Maintainers
Readme
broadcast-transaction
npx broadcast-transaction $TXHEX
npm install -g broadcast-transaction
broadcast-transaction $TX_HEX
import broadcastTransaction from 'broadcast-transaction'
const hex =
'0100000001e43ce779cb52dae32594cfea460d4bf34020a17f1d8526dfd7c98ed96d1d944f050000006b483045022100e63467580428cde8f70aace3ed16e42ca4c828d343a7d185b7031114c2084b560220715668d3247993a4216187ace17566c27f769658b3255890a9777df54850cb3a412102f66ace13fa8d4788b4515b02502f95413fd3288067b03d3e7c75484d25961604ffffffff031873010000000000ad08626f6f7374706f7775040000000020c7cafb2f297a1b96eab84e21e51e54f5c8408c02b3e0ad2c5a8e5721f7c128af04f8cf071e00044fe478fe007e7c557a766b7e52796b557a8254887e557a8258887e7c7eaa7c6b7e7e7c8254887e6c7e7c8254887eaa01007e816c825488537f7681530121a5696b768100a0691d00000000000000000000000000000000000000000000000000000000007e6c539458959901007e819f6976a96c88ac00000000000000003d006a076f6e636861696e223138705051696775376a3639696f4463554739644143453169414e396e43666f7772036a6f620b7b22696e646578223a307df4dd0100000000001976a914fd7bd7e8a4cfbb6532bd4fca0d402ec0906a4c2d88ac00000000'
const txid = await broadcastTransaction(hex)
console.log({ txid })