broadcastFlow
Records that a flow transaction has been broadcast. For wallet sources, pass thetxHash from the on-chain transaction. For exchange sources, txHash can be omitted.
Most integrations should use
submitFlowTransaction instead, which calls broadcastFlow automatically after signing. Use broadcastFlow directly only when you handle signing and broadcasting yourself.When to call
- For a wallet source, call
broadcastFlowafter the on-chain transaction is submitted andexecutionStateissigning. Pass its transaction hash. - For an exchange source, call it after the user completes the exchange transfer and
executionStateissource_attached. The transaction hash is optional.
getFlow. If the state is already broadcasted or source_confirmed, the broadcast was recorded successfully; poll the flow instead of calling broadcastFlow again. If the flow is cancelled, expired, or failed, create a new flow for another attempt.
Usage
Parameters
Returns
Promise<Flow> — the flow with executionState: 'broadcasted'.
Examples
Wallet source
Exchange source
React
Related
- Fireblocks Flow JavaScript SDK guide - End-to-end flow guide
submitFlowTransaction- Recommended: handles prepare, sign, and broadcastprepareFlowSigning- Prepare signing payloadgetFlow- Poll flow state after broadcast