For the complete documentation index, see llms.txt. This page is also available as Markdown.

broadcast_tx_commit - Cosmos

Example code for the broadcast_tx_commit JSON-RPC method. Complete guide on how to use broadcast_tx_commit JSON-RPC in GetBlock Web3 documentation.

Broadcasts a signed transaction and waits until it is included in a block (or times out). Reliable but blocks the caller for up to one block time (~6s). Use only for low-volume flows where you need the in-band confirmation. Note: deprecated in newer CometBFT versions — prefer broadcast_tx_sync + polling.

Parameters

Parameter
Type
Required
Description

tx

string

Yes

Base64-encoded signed transaction bytes

Request Example

# JSON-RPC over HTTP POST (canonical)
curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/broadcast_tx_commit' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "broadcast_tx_commit",
    "params": {
        "tx": "Co0BCooBChwvY29zbW9zLmJhbmsudjFiZXRhMS5Nc2dTZW5kEmoKLWNvc21vczF0NnJsZ2Y4MGpkOHRhbnBubnZtbXhmcWRjbTljbjd3Y3RyczdoaxItY29zbW9zMWdoZDc1M3NoamVjajRpdjJ4Mmk4eHJrenphbnpqdnZjMjJ4MmtuGgoKBXVhdG9tEgExEnIKWg=="
    },
    "id": "getblock.io"
}'

# URI over HTTP GET (alternate, for simple methods)
curl --location --request GET 'https://go.getblock.io/<ACCESS-TOKEN>/broadcast_tx_commit?tx="Co0BCooBChwvY29zbW9zLmJhbmsudjFiZXRhMS5Nc2dTZW5kEmoKLWNvc21vczF0NnJsZ2Y4MGpkOHRhbnBubnZtbXhmcWRjbTljbjd3Y3RyczdoaxItY29zbW9zMWdoZDc1M3NoamVjajRpdjJ4Mmk4eHJrenphbnpqdnZjMjJ4MmtuGgoKBXVhdG9tEgExEnIKWg=="'

Response Example

Response Parameters

Field
Type
Description

result.check_tx

object

Result of CheckTx (mempool admission)

result.tx_result

object

Result of DeliverTx (block execution)

result.hash

string

Transaction hash

result.height

string

Block height where the transaction was included

Use Cases

  • Test scripts and simple CLI tools requiring synchronous confirmation

  • Workflows where caller logic depends on tx success before proceeding

Error Handling

Status Code
Error Message
Cause

404

Not Found

Missing or invalid <ACCESS-TOKEN>

-32602

Invalid params

Request parameters are missing or malformed

-32603

Internal error

Server-side error while processing the request

429

Too Many Requests

Rate limit exceeded for your plan

-32603

Timeout waiting for commit

Transaction wasn't committed within the broadcast timeout

SDK Integration

Last updated

Was this helpful?