1.1 Supported Chains and Tokense 1
Last updated
Last updated
This section provides APIs to query the chains and tokens currently supported by the Wanchain Bridge.
There are two primary endpoints:
tokenPairs
tokenPairsHash
The tokenPairs
endpoint returns detailed information about all supported chains and cross-chain tokens. Since this response can be large, it is recommended to first retrieve tokenPairsHash
and compare it with the previously stored value. If there is no change, the locally cached data can be used to avoid unnecessary network requests each time.
tokenPairs Endpoint
URL:
Response Example:
As shown above, the returned data is an array containing all supported cross-chain token pairs on Wanchain, totaling over 300 items. You can apply local filtering based on your requirements before using the data. For instance, you can filter by fromToken
and toToken
addresses.
It is important to note that the tokenPairs
data is bidirectional, meaning you do not need to consider the direction of from
and to
—as long as the chain and token addresses match, the pair is valid.
tokenPairsHash Endpoint
URL:
Response Example:
This endpoint is used to check whether the tokenPairs data has changed before fetching the full dataset from the tokenPairs
endpoint.