Learn how to interpret the status of transactions and individual transfer steps from the Skip Go API’s /v2/tx/status endpoint to provide accurate feedback to users.
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.
Understanding the status of a cross-chain transaction and its individual steps is crucial for building a clear and reliable user experience. This guide explains how to interpret the relevant fields from the /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.
/v2/tx/status
ResponseBelow is an example of a JSON response from the /v2/tx/status
endpoint, illustrating some of the key fields discussed in this guide:
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.
state
field in the response.'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).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.
next_blocking_transfer.transfer_sequence_index
field (if next_blocking_transfer
exists in the response).transfer_sequence
array.Categorizing Each Operation in the Sequence: For each operation within the transfer_sequence
array of the response, you can determine its individual status:
Loading/Pending:
next_blocking_transfer.transfer_sequence_index
(if next_blocking_transfer
exists).state
is not STATE_COMPLETED_ERROR
or STATE_ABANDONED
).Error/Failed/Abandoned:
next_blocking_transfer.transfer_sequence_index
(if next_blocking_transfer
exists - it is typically null
if the overall state
is terminal (e.g., STATE_COMPLETED_SUCCESS
, STATE_COMPLETED_ERROR
, or STATE_ABANDONED
) as the transaction is no longer actively blocked or has finished successfully).state
field) is STATE_COMPLETED_ERROR
or STATE_ABANDONED
.STATE_COMPLETED_ERROR
and this is the last operation in the sequence, it is also considered to be in an error state.state
is STATE_COMPLETED_ERROR
, it’s also crucial to inspect the specific error
object within each individual transfer step in the transfer_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 the next_blocking_transfer
might be null
if the transaction reached a terminal error state rather than getting stuck midway.Success:
state
field) is STATE_COMPLETED_SUCCESS
, then all operations in the sequence are considered successful.next_blocking_transfer.transfer_sequence_index
(if next_blocking_transfer
exists - see note above about it typically being null
in terminal states) is assumed to have completed successfully.The following JavaScript snippet demonstrates how these concepts can be translated into code to determine the status of each step.
By implementing logic based on these fields and states, you can provide users with accurate and timely feedback on the progress of their cross-chain transactions.
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). If false
, it might indicate that assets are still in a contract or awaiting a final step for release.In the event of a cross-chain swap failure, the 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.