
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
@suave-money/sdk
Advanced tools
The Suave SDK enables effective usage of the [Suave Bridge Aggregation API](https://docs.suave.money/suave.ag/api/routes) from TypeScript or JavaScript. Use this toolkit to find desirable cross-chain swapping routes and handle route execution.
The Suave SDK enables effective usage of the Suave Bridge Aggregation API from TypeScript or JavaScript. Use this toolkit to find desirable cross-chain swapping routes and handle route execution.
DISCLAIMER: This SDK currently only supports executing routes in a browser-like environment.
You will need to also have viem installed to get started. To install everything with npm, use this command:
npm install --save @suave_money/sdk viem
Here is an example of obtaining route qoutes from Suave:
import { getRoutes, RouteResponse } from '@suave_money/sdk'
// Find a route for USDC on Arbitrum -> DAI on Polygon
const routes: RouteResponse[] = await getRoutes({
inputAmount: '10000000', // 10 USDC
fromChainId: 42161, // Arbitrum
fromToken: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831', // USDC on Arbitrum
toChainId: 137, // Polygon
toToken: '0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063', // DAI on Polygon
})
Here is an example of executing a route:
import { executeRoute, RouteResponse } from '@suave_money/sdk'
import { createWalletClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: http()
})
const routes: RouteResponse[] = /* ... */
const chosenRoute = routes[0]
await executeRoute(chosenRoute, {
walletClient: client
})
FAQs
The Suave SDK enables effective usage of the [Suave Bridge Aggregation API](https://docs.suave.money/suave.ag/api/routes) from TypeScript or JavaScript. Use this toolkit to find desirable cross-chain swapping routes and handle route execution.
We found that @suave-money/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.