📍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:

Output:

export class GetTransactionStatusResponse {
  statusCode: number;

  data: {
    srcChainId: number;
    dstChainId: number;
    srcTxHash: string;
    dstTxHash: string;
    dstTxError: string;
    txStatus: string;
  };
}

Data Returned from Output:

txStatus values:

Status Codes:

Examples:

Request Example:

https://brydge-backend.herokuapp.com/transaction/status?chainId=10&srcTxHash=0x3fe7e7fc0eff1f2fd4a0d99c2e1984a094748af3e3915e8441690bfec6e8763e&isCrossChain=false

Output Examples:

// Source transaction pending 
{
    "data": {
        "srcChainId": 1,
        "dstChainId": 137,
        "srcTxHash": "0xa3a1c8b501797da0c239669a3d04039def35db812e0da9f0799c00f719dcc9e1",
				"status": "SRC_TX_PENDING"
    },
    "statusCode": 202
}

// Destination Transaction Pending
{
    "data": {
        "srcChainId": 137,
        "dstChainId": 10,
        "srcTxHash": "0xf71d1f963329698c5e46b78335abcbb219a04a31ee29a7c7d1a0937746599435",
        "txStatus": "DST_TX_PENDING"
    },
    "statusCode": 202
}

// Transaction Completed
{
    "data": {
        "srcChainId": 10,
        "dstChainId": 42161,
        "srcTxHash": "0xa3a1c8b501797da0c239669a3d04039def35db812e0da9f0799c00f719dcc9e1",
        "dstTxHash": "0x2bc70ef5e3b4ff40e10c36b9fabdabf994ea7a72cb5056d3031cb7d56638eaa0",
        "dstTxError": null,
        "status": "COMPLETED"
    },
    "statusCode": 200
}

Last updated