Overview
The Bridging SDK enables cross-chain token swaps by combining CoW Protocol swaps with bridge providers like Across and Bungee. It automatically routes trades through optimal paths and manages the bridging process.Installation
BridgingSdk
Main SDK class for bridging tokens between different chains.Constructor
BridgingSdkOptions
required
Configuration options for the SDK
getQuote()
Get a cross-chain quote with a callback to post the order.QuoteBridgeRequest
required
Quote parameters
SwapAdvancedSettings
Optional advanced settings for the swap
QuoteAndPost for same-chain swaps or BridgeQuoteAndPost for cross-chain swaps:
QuoteResults
CoW Protocol swap quote details
BridgeQuoteResults
Bridge quote details (only for cross-chain swaps)
function
Callback function to post the order on-chain
getMultiQuotes()
Get quotes from multiple bridge providers in parallel with progressive results.MultiQuoteRequest
required
Multi-quote request parameters
MultiQuoteResult[]
Array of results from each provider
getBestQuote()
Get the best quote from multiple providers based on buyAmount after slippage.getMultiQuotes()
MultiQuoteResult | null
The best quote result found, or null if no successful quotes
getSourceNetworks()
Get available source networks for bridging.ChainInfo[]
Array of supported source chain information
getTargetNetworks()
Get available target networks for bridging.ChainInfo[]
Array of supported destination chains across all providers
getBuyTokens()
Get available buy tokens for a specific target chain.GetBuyTokensParams
required
Token query parameters
GetProviderBuyTokens
getOrder()
Get details about a cross-chain order.GetOrderParams
required
CrossChainOrder | null
Order details including bridge status, or null if not found