我是区块链新手。我已经完成了比特币交易的创建,并将其原始交易成功发送到了区块链网络。我在将莱特币的原始交易发送到区块链网络时遇到问题。我的代码在这里
var broadcast_tx = function(tx) {
console.log("tx in hex = ", tx.toHex());
var req = {
method: 'POST',
url: 'https://chain.so/api/v2/send_tx/LTCTEST',
headers: {
'Content-Type': "application/json"
},
data: { "tx_hex": tx.toHex() }
}
$http(req).then(function(response){
demo.showNotification("Operation successful","fa fa-check",2);
}, function(error){
demo.showNotification(err,"fa fa-check",3);
});
}