getConnections method
Get all possible connections based on a from- or toChain
This endpoint gives information about all possible tranfers between chains.
Since the result can be very large it is required to pass at least one parameter to filter the results.
Information about which chains and tokens are supported can be taken from the response of getChains().
Information about which bridges and exchanges are supported can be taken from the response of getTools().
Implementation
Future<ApiResponse> getConnections({
/// The chain that should be the start of the possible connections
String? fromChain,
/// The chain that should be the end of the possible connections
String? toChain,
/// Only return connections starting with this token
String? fromToken,
/// Only return connections ending with this token
String? toToken,
/// List of bridges that are allowed for this transaction
///
/// Currently available bridges are for example hop, multichain
/// or connext. All bridges can be retrieved from getTools().
List<String>? allowBridges,
}) async {
return api.getConnections(
fromChain: fromChain,
toChain: toChain,
fromToken: fromToken,
toToken: toToken,
allowBridges: allowBridges,
);
}