The fields and logic discussed in this guide pertain to the JSON response object from the
/v2/tx/status endpoint of the Skip Go API. Refer to the API Reference for detailed schema information./v2/tx/status API response to determine if a transaction (and each of its constituent transfers) is pending, successful, has encountered an error, or has been abandoned.
This approach is useful for driving UI elements such as progress indicators, status messages, and error displays in your application.
Example /v2/tx/status Response
Below is an example of a JSON response from the /v2/tx/status endpoint, illustrating some of the key fields discussed in this guide:
Core Concepts for Status Interpretation
The logic relies on a few key pieces of information typically available in the/v2/tx/status API response object:
-
The Overall Transaction Status: This provides a high-level view of the entire multi-step operation.
- Look at the top-level
statefield in the response. - Possible values include:
'STATE_COMPLETED_SUCCESS': The entire transaction finished successfully.'STATE_COMPLETED_ERROR': The transaction finished, but an error occurred.'STATE_ABANDONED': The transaction was abandoned (e.g., due to timeout or user action).
- If the state is not one of these terminal states, it’s generally assumed to be pending or in progress.
- Look at the top-level
-
The Next Blocking Step (or Failure Point): This indicates which specific transfer in the sequence is currently active, or which one caused a failure or abandonment.
- Utilize the
next_blocking_transfer.transfer_sequence_indexfield (ifnext_blocking_transferexists in the response). - This will be an index pointing to an operation within the top-level
transfer_sequencearray.
- Utilize the
-
Categorizing Each Operation in the Sequence: For each operation within the
transfer_sequencearray of the response, you can determine its individual status:-
Loading/Pending:
- The operation’s index matches the
next_blocking_transfer.transfer_sequence_index(ifnext_blocking_transferexists). - AND the overall transaction is still in progress (i.e., the top-level
stateis notSTATE_COMPLETED_ERRORorSTATE_ABANDONED).
- The operation’s index matches the
-
Error/Failed/Abandoned:
- The operation’s index matches the
next_blocking_transfer.transfer_sequence_index(ifnext_blocking_transferexists - it is typicallynullif the overallstateis terminal (e.g.,STATE_COMPLETED_SUCCESS,STATE_COMPLETED_ERROR, orSTATE_ABANDONED) as the transaction is no longer actively blocked or has finished successfully). - AND the overall transaction state (the top-level
statefield) isSTATE_COMPLETED_ERRORorSTATE_ABANDONED. - Additionally, if the overall transaction state is
STATE_COMPLETED_ERRORand this is the last operation in the sequence, it is also considered to be in an error state. - Note: If the overall transaction
stateisSTATE_COMPLETED_ERROR, it’s also crucial to inspect the specificerrorobject within each individual transfer step in thetransfer_sequence(e.g.,step.ibc_transfer.packet_txs.error,step.cctp_transfer.error, etc.). This will help pinpoint the exact leg(s) that encountered issues, as thenext_blocking_transfermight benullif the transaction reached a terminal error state rather than getting stuck midway.
- The operation’s index matches the
-
Success:
- If the overall transaction state (top-level
statefield) isSTATE_COMPLETED_SUCCESS, then all operations in the sequence are considered successful. - If the overall transaction is still in progress, or has failed/been abandoned, any operation before the
next_blocking_transfer.transfer_sequence_index(ifnext_blocking_transferexists - see note above about it typically beingnullin terminal states) is assumed to have completed successfully.
- If the overall transaction state (top-level
-
Loading/Pending:
Example Implementation Logic (JavaScript)
The following JavaScript snippet demonstrates how these concepts can be translated into code to determine the status of each step.Understanding Asset Release (transfer_asset_release)
The transfer_asset_release object in the /v2/tx/status response provides crucial information about where the user’s assets have ultimately landed or are expected to be claimable, especially in scenarios involving swaps or complex routes.
Key fields include:
chain_id: The chain ID where the assets are located.denom: The denomination (asset identifier) of the released assets.amount: The quantity of the released assets.released: A boolean indicating if the assets have been definitively released to the user (e.g., available in their wallet or claimable). Iffalse, it might indicate that assets are still in a contract or awaiting a final step for release.
transfer_asset_release field is particularly important for determining the location and state of the user’s funds. For a comprehensive understanding of how assets are handled in different failure scenarios (e.g., pre-swap vs. post-swap failures), please refer to our detailed guide on Handling Cross-Chain Failure Cases.