4. Status Query

4.1 Asset Cross-Chain

Endpoint

https://bridge-api.wanchain.org/api/status/[lockHash]

  • lockHash: The transaction hash of the cross-chain operation on the source chain or destination chain.

Response Exmaple:

{
  "success": true,
  "data": {
    "timestamp": 1687940507,
    "tokenPair": "235",
    "lockHash": "0x1d07dcaeb345405232684e3c3fcffe979bd4b7e59da1ca42edf71dbc6cefc449",
    "redeemHash": "0x41796eff520763922b2e2fe099b6d7ed7f6657a8ff124fa9d2d497267f62d36c",
    "status": "Success",
    "sendAmount": "433876192000000000000",
    "receiveAmount": "433876192"
  }
}

Notes:

  • The status value includes: NotFound, Success, Processing, Trusteeship, and Refund.

    • If Trusteeship is returned, it means the transaction information was filled in incorrectly, such as missing tag information in XRP cross-chain. Manual intervention is required to resolve the issue.

  • The Amount value is in wei units and needs to be converted according to the decimals of fromToken and toToken.

    • If sendAmount and receiveAmount differ, the difference represents the fee deducted during the transaction.

API Usage Example:

https://bridge-api.wanchain.org/api/status/0x1d07dcaeb345405232684e3c3fcffe979bd4b7e59da1ca42edf71dbc6cefc449

You need to add: target chain hash, cross-chain amount, and fee deduction details.

If the cross-chain address is under risk control, the cross-chain transaction automatically refunds, and the query status can be obtained:

{
	"success": true,
	"data": {
		"timestamp": 1717089815,
		"tokenPair": "245",
		"lockHash": "0xda36824c1dd500ba351b7a029adf615fd5fc529653dd9895ea937414201dc3eb",
		"redeemHash": "0xda5f0f4bcd55e2b1f288764f2292bab312410813dfef32e24c25264724f9b5de",
		"status": "Refund",
		"sendAmount": "37753912373",
		"receiveAmount": "37753912373"
	}
}

Last updated