waitForExecutionHash(txId, timeoutMs?, pollIntervalMs?)
Polls for transaction execution and returns when complete.
wait-execution-hash.ts
const executedTx = await tachyon.waitForExecutionHash(
'tx_id_here',
30000, // 30 second timeout
1000 // poll every 1 second
);Parameters:
txId(string, required): Transaction IDtimeoutMs(number, optional): Maximum wait time in ms (default: 5000)pollIntervalMs(number, optional): Polling interval in ms (default: 50)
Returns: Promise<RelayStatusBase> - Completed transaction status
Throws: Error if timeout reached or transaction fails
Last updated on