Rubic SDK — Overview
Rubic SDK is a lightweight TypeScript wrapper around the Rubic API. It provides a typed, ergonomic interface for integrating cross-chain and on-chain token swaps into any JavaScript or TypeScript application.What it covers
- Quoting — get all routes or the best route for a swap
- Swapping — get transaction data ready to sign and send
- Deposit trades — routes that don’t require a source wallet (send funds to a deposit address)
- Status tracking — poll transaction status until it settles, with a built-in
waitForStatushelper - Utility — allowance, approve, claim, refund, wallet auth
- Info — supported chains and providers
Architecture
Supported swap types
| Type | Description |
|---|---|
| Cross-chain | Swap tokens across different blockchains via bridges |
| On-chain | Swap tokens within the same blockchain via DEXes |
| Deposit trades | Cross-chain swaps where you send funds to a deposit address (no wallet required on source) |