Skip to content

watchTransaction

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

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

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, or commits only the fee intent (execution aborted). 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.