Skip to main content

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
Returns either 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.
Same parameters as 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

Cache Management

The SDK provides methods to manage the internal cache.

Bridge Providers

AcrossBridgeProvider

Bridge provider using the Across Protocol.

BungeeBridgeProvider

Bridge provider using Bungee (Socket).

NearIntentsBridgeProvider

Bridge provider for NEAR Protocol intents.

Types

QuoteBridgeRequest

Parameters for requesting a bridge quote.

BridgeQuoteResult

Result of a bridge quote request.

BridgeQuoteAndPost

Combined quote result for cross-chain swaps.

Examples

Basic Cross-Chain Swap

Compare Multiple Providers

Get Available Tokens

Last modified on March 4, 2026