Broadcast tx async
If you want to be sure that the transaction is included in a block, you can subscribe for the result using JSONRPC via a websocket. See https://docs.tendermint.com/v0.34/app-dev/subscribing-to-events-via-websocket.html If you haven't received anything after a couple of blocks, resend it. If the same happens again, send it to some other node. A few reasons why it could happen:
- malicious node can drop or pretend it had committed your tx
- malicious proposer (not necessary the one you're communicating with) can drop transactions, which might become valid in the future (https://github.com/tendermint/tendermint/issues/3322)
- node can be offline
Please refer to https://docs.tendermint.com/v0.34/tendermint-core/using-tendermint.html#formatting for formatting/encoding rules.
Query parameters
txstringRequiredExample:
The transaction
123
Responses
200
empty answer
application/json
500
empty error
application/json
get
GET /broadcast_tx_async HTTP/1.1
Host: tia.nownodes.io
Accept: */*
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"code": "0",
"data": "",
"log": "",
"codespace": "ibc",
"hash": "0D33F2F03A5234F38706E43004489E061AC40A2E"
},
"error": ""
}