API
List of APIs
queryCrossInfoById
Uri: /api/queryCrossInfoById
Request method: GET
Return cross information
Parameters
Parameter Type:
id - Interger of transaction id.
Example:
http://host:port/api/queryCrossInfoById?id=322111
Returns
sourceInfo
address: source addresschainInfo: source chain info json object, include chainId, chainName, scanUrl, chainImgcontract: contract addressblock: block numberhash: source chain transaction hashtimestamp: source transaction timestamp
relyerInfo
address: relyer addresschainInfo: relyer chain info json object, include chainId, chainName, scanUrl, chainImgcontract: contract addressblock: block numberhash: relyer chain transaction hashtimestamp: relyer transaction timestamp
destinationInfo
address: destination addresschainInfo: destination chain info json object, include chainId, chainName, scanUrl, chainImgcontract: contract addressblock: block numberhash: destination chain transaction hashtimestamp: destination transaction timestamp
state - Bridge Status. 0: crossing 1 completed 2 relayering 3 relayer completed
Example
queryCrossInfoBySourceHash
Uri: /api/queryCrossInfoBySourceHash
Request method: GET
Return cross information
Parameters
Parameter Type:
txHash - String of transaction hash.
Example:
http://host:port/api/queryCrossInfoBySourceHash?txHash=0x939a86a02c9cb6a52cf6d4ecbe897ea3924ba9a5a8a588a05390904ba7ea1ddb
Returns
list
-sourceInfo
address: source addresschainInfo: source chain info json object, include chainId, chainName, scanUrl, chainImgcontract: contract addressblock: block numberhash: source chain transaction hashtimestamp: source transaction timestamp
-relyerInfo
address: relyer addresschainInfo: relyer chain info json object, include chainId, chainName, scanUrl, chainImgcontract: contract addressblock: block numberhash: relyer chain transaction hashtimestamp: relyer transaction timestamp
-destinationInfo
address: destination addresschainInfo: destination chain info json object, include chainId, chainName, scanUrl, chainImgcontract: contract addressblock: block numberhash: destination chain transaction hashtimestamp: destination transaction timestamp
state - Bridge Status. 0: crossing 1 completed 2 relayering 3 relayer completed
Example
queryHistoryByChainIdAddress
Uri: /api/queryHistoryByChainIdAddress
Request method: GET
Get cross history by chain id and address.
Parameters
Parameter Type:
chainId - chain id. address - address. page - page, default 1. size - size, default 10.
Example:
http://host:port/api/queryHistoryByChainIdAddress?chainId=137&address=0x14a5b11be1f996a2c662f8968d017328b4b80c3a
Returns
list - list info
id : transfer if
sourceAddress : source address
sourceHash : source hash
sourceHeight : source height
sourceTimestamp : transfer timestamp
sourceChainInfo : source chain info json object, include chainId, chainName, scanUrl, chainImg
relayHash : relay hash
relayHeight : relay height
relayChainInfo : relay chain info json object, include chainId, chainName, scanUrl, chainImg
destinationAddress : destination address
destinationHash : destination hash
destinationHeight : destination height
destinationInfo : destination chain info json object, include chainId, chainName, scanUrl, chainImg
state- Bridge Status. 0: crossing 1 completed 2 relayering 3 relayer completed
Example
Last updated
Was this helpful?