Skip to content

watchTransaction

watchTransaction(provider, txId, opts?): Promise<IndexerGetTransactionResultResponse>

Defined in: ootle/src/transaction.ts:397

Polls the provider until a transaction reaches a finalized state, then returns the result.

Throws for Reject outcomes. FeeIntentCommit (fees paid, execution aborted) also throws with a distinct message so callers can distinguish it from a full rejection. Use classifyOutcome on the raw result for non-throwing outcome inspection.

Provider

string

WatchOptions

Promise<IndexerGetTransactionResultResponse>

when consensus rejects the transaction, commits only the fee intent (execution aborted), or the indexer rejected the transaction at submission before consensus saw it (Rejected). The error’s .txId and .reason carry the structured fields; the message remains the human-readable summary.

when the transaction did not finalize within timeoutMs. The error’s .txId identifies the polled transaction.