BridgeTradePayload to the underlying RubicBridge flow and returns the result over standard RPC.
Surface
The node exposes the bridge overrpcCall({ method: "bridge", params: [...] }). The node-side manageBridges handler (src/libs/network/manageBridge.ts) dispatches two RPC methods:
| RPC method | SDK method | Purpose |
|---|---|---|
get_trade | RubicBridge.getTrade(demos, chain, payload) | Quote a cross-chain trade |
execute_trade | RubicBridge.executeTrade(demos, chain, payload) | Submit the trade for real |
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 viaNativeBridgeMethods 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.).