Skip to main content
After building and signing a transaction, the final step is broadcasting it to the Hive network. This guide covers the broadcasting process and how to handle responses.

Prerequisites

Before broadcasting, ensure your transaction is:
1

Built with valid operations

Your transaction must contain at least one operation.
2

Properly signed

The transaction must have valid signatures for all required authorities.
3

Validated

Run validation to catch any errors before broadcasting.

Basic broadcasting

Use the broadcast() method on your chain instance to send a transaction to the network.
Broadcasting is an asynchronous operation. It sends your transaction to the network where it will be included in a block by witness nodes.

Broadcasting with custom endpoint

You can specify a custom API endpoint when creating your chain instance.

Handling broadcast responses

The broadcast method doesn’t return much data, but you can check the transaction status using the transaction ID.

Common broadcast errors

Understanding common errors helps you handle them appropriately.
Error: Missing Active Authority or Missing Posting AuthorityCause: The transaction wasn’t signed with the correct authority level.Solution: Check required authorities and sign with the correct key.
Error: Duplicate transaction check failedCause: The same transaction was already broadcast.Solution: Create a new transaction or wait for the previous one to expire.
Error: Transaction expiredCause: The transaction’s expiration time has passed.Solution: Create a new transaction with a fresh expiration time.
Error: Invalid signatureCause: The signature doesn’t match the transaction or was created with wrong chain ID.Solution: Ensure you’re using the correct chain ID and signing properly.
Error: Insufficient funds or Account does not have sufficient fundsCause: The account doesn’t have enough balance for the operation.Solution: Check account balance before creating transfer operations.

Broadcasting with retry logic

Implement retry logic to handle temporary network issues.

Complete example

Here’s a complete example that builds, signs, and broadcasts a transaction.

Best practices

Broadcast checklist

Before broadcasting, ensure:
  • ✅ Transaction is validated
  • ✅ Transaction is properly signed
  • ✅ You’re using the correct network (mainnet vs testnet)
  • ✅ Account has sufficient funds for the operation
  • ✅ You have error handling in place
  • ✅ Transaction hasn’t expired

After broadcasting

After a successful broadcast:
  • ⏱️ Transactions typically appear in blocks within 3 seconds
  • 🔍 Use the transaction ID to track status
  • 📝 Save the transaction ID for your records
  • ⚠️ Wait for irreversibility (about 1 minute) for critical operations

Next steps

Complex operations

Learn about high-level operation helpers

API calls

Explore the Hive API for checking transaction status

Error handling

Comprehensive error handling guide

Network broadcast API

API reference for broadcasting