import { RouterProtocol } from "@routerprotocol/router-js-sdk"
import { ethers } from "ethers";
const main = async() => {
const quote = await routerprotocol.getQuote("AMOUNT", "DESTINATION_CHAIN_ID", "SOURCE_TOKEN_ADDRESS", "DESTINATION_TOKEN_ADDRESS", "USER_ADDRESS", "FEE_TOKEN_ADDRESS", "SLIPPAGE_TOLERANCE")
const wallet = new ethers.Wallet("YOUR_PRIVATE_KEY", provider)
let tx;
try{
tx = await routerprotocol.swap(quote,wallet)
console.log(`Transaction successfully completed. Tx hash: ${tx.hash}`)
}
catch(e){
console.log(`Transaction failed with error ${e}`)
return
}
}
main()