Cross Chain Swaps
Cross Chain Swaps (Different Assets)
🧠 Example: Fast Path Swap (Bridge + Swap)
const axios = require('axios');
const data = JSON.stringify({
"amount": "10000000000", // 10,000 USDC (in decimals)
"origin": "10", // Optimism
"destinations": ["1"], // Ethereum
"inputAsset": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85", // USDC on OP
"outputAsset": "0xdAC17F958D2ee523a2206206994597C13D831ec7", // USDT on ETH
"to": "0xade09131C6f43fe22C2CbABb759636C43cFc181e",
"from": "0xade09131C6f43fe22C2CbABb759636C43cFc181e",
"callData": "",
"isFastPath": true // Fast Path = under ~2 mins
});
const config = {
method: 'post',
url: 'https://api.everclear.org/intents/',
headers: {
'Content-Type': 'application/json'
},
data
};
axios.request(config)
.then((response) => console.log(JSON.stringify(response.data, null, 2)))
.catch((error) => console.error(error));Last updated

