ReadonlyresponseThe underlying relayer response
Optional ReadonlyhashThe hash if this is a submitted transaction
Optional ReadonlyoperationThe operation ID if this is a pending operation
Optional ReadonlycontextTransaction context for event parsing
Waits for the transaction or operation to complete.
Optionaloptions: {Optional configuration for polling behavior
OptionalonStatusUpdate?: (status: OperationStatus) => voidCallback for status updates during polling
Optionalsignal?: AbortSignalAbort signal for cancellation
Optionaltimeout?: numberTimeout in milliseconds
Promise resolving to event results or transaction receipt
This method provides intelligent handling based on the response type:
// With context for event parsing
const enhanced = new EnhancedTransactionResponse(response, vana);
const result = await enhanced.wait();
if (result.expectedEvents?.FileAdded) {
console.log('File ID:', result.expectedEvents.FileAdded.fileId);
}
// For pending operations
const result = await enhanced.wait({
onStatusUpdate: (status) => console.log('Status:', status)
});
Checks if this response can be waited on.
true if the response supports the wait() method
Gets a human-readable status description.
Status string describing the current state
Enhanced transaction response that provides a fluent API for waiting.
Remarks
This class wraps a UnifiedRelayerResponse and provides a
.wait()method that intelligently handles both submitted transactions (via hash) and pending operations (via operationId). It encapsulates the complexity of polling and event parsing, providing a clean developer experience.Example