📍Transaction Status API
Description:
Brydge offers an endpoint that returns a given transaction's status throughout a transaction.
These parameters can be exposed from the Brydge widget using the onTxSubmit
prop as explained here.
Note that upon a transaction's submission, the Brydge widget automatically shows a confirmation window with a link to your transaction's status page on Brydge's website. So, integrating the Transaction status API is an optional extra step that you may choose to add for an even better user experience.
Base URL:
https://brydge-backend.herokuapp.com/
Query Parameters:
Query Parameter | Type | |
---|---|---|
chainId | number | Chain ID of the Source Chain |
srcTxHash | string | Transaction hash of the source transaction |
isCrossChain | boolean | Boolean indicating if the transaction was cross-chain (defaults to false or same-chain if omitted) |
Output:
Data Returned from Output:
Parameter | Type | Description |
---|---|---|
srcChainId | number | Chain ID of the source transaction. |
dstChainId | number | Chain ID of the destination transaction. |
srcTxHash | string | Transaction hash of the source transaction. |
dstTxHash | string | Transaction hash of the destination transaction. |
dstTxError | string | Error message from the destination transaction (if any error occurs). |
txStatus | string | Status of the overall transaction (explained below). |
txStatus values:
Status | Description |
---|---|
SRC_TX_PENDING | Transaction is pending on the source chain. |
DST_TX_PENDING | Transaction is pending on the destination chain. |
COMPLETED | Transaction is complete on both the source and destination chains. |
SRC_TX_FAILED | Transaction failed on the source chain. |
DST_TX_FAILED | Transaction failed on the destination chain. |
Status Codes:
Status Code | Description |
---|---|
202 | Transaction is inflight, either source or destination transaction is pending. |
200 | Transaction is complete |
400 | Transaction failed |
500 | Internal server error (transaction not found or any runtime issue) |
Examples:
Request Example:
Output Examples:
Last updated