Skip to main content
The Rubic bridge integration lets clients quote and execute cross-chain swaps through a Demos node. The node forwards a BridgeTradePayload to the underlying RubicBridge flow and returns the result over standard RPC.

Surface

The node exposes the bridge over rpcCall({ method: "bridge", params: [...] }). The node-side manageBridges handler (src/libs/network/manageBridge.ts) dispatches two RPC methods: chain is a string from SupportedChains (e.g. "POLYGON", "ETH"). See the SDK reference for end-to-end usage.

Payload

amount and the chain IDs refer to the foreign chain pair (e.g. USDT on Polygon → USDT on Ethereum). "NATIVE" is the foreign chain’s native token (ETH on EVM, MATIC on Polygon, etc.) — not Demos DEM. No OS conversion is applied. P4 widens amount to number | string so callers can pass BigInt-safe wire values for large foreign-chain amounts; the underlying semantics are unchanged.

Native bridge

Demos also ships a native (non-Rubic) bridge for stablecoin transfers across a curated EVM + Solana set. It is exposed via NativeBridgeMethods on @kynesyslabs/demosdk/bridge. Documenting that surface end-to-end is out of scope for this page — see the SDK barrel export for the available methods (validateChain, the supported-chain constants, USDC contract addresses per chain, etc.).