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 address

  • chainInfo : source chain info json object, include chainId, chainName, scanUrl, chainImg

  • contract : contract address

  • block : block number

  • hash : source chain transaction hash

  • timestamp : source transaction timestamp

relyerInfo

  • address: relyer address

  • chainInfo : relyer chain info json object, include chainId, chainName, scanUrl, chainImg

  • contract : contract address

  • block : block number

  • hash : relyer chain transaction hash

  • timestamp : relyer transaction timestamp

destinationInfo

  • address: destination address

  • chainInfo : destination chain info json object, include chainId, chainName, scanUrl, chainImg

  • contract : contract address

  • block : block number

  • hash : destination chain transaction hash

  • timestamp : 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 address

  • chainInfo : source chain info json object, include chainId, chainName, scanUrl, chainImg

  • contract : contract address

  • block : block number

  • hash : source chain transaction hash

  • timestamp : source transaction timestamp

-relyerInfo

  • address: relyer address

  • chainInfo : relyer chain info json object, include chainId, chainName, scanUrl, chainImg

  • contract : contract address

  • block : block number

  • hash : relyer chain transaction hash

  • timestamp : relyer transaction timestamp

-destinationInfo

  • address: destination address

  • chainInfo : destination chain info json object, include chainId, chainName, scanUrl, chainImg

  • contract : contract address

  • block : block number

  • hash : destination chain transaction hash

  • timestamp : 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?