For a more in-depth guide, check out our detailed walkthrough, which covers both Solana and EVM transactions. You can also explore more about EVM Transactions or dive into the specifics of SVM Transactions.
Prerequisites
- Browser environment setup with Keplr installed (
create-next-appis recommended) - Node.js and npm
1
Install Library
Install the library using npm or yarn:
2
Initialize Client
To start integrating with the Skip Go API, configure the library once using
setClientOptions or setApiOptions. After configuration, you import and call functions like route and executeRoute directly.3
Get a Route
Now, we can use the
route function to request a quote and route to swap USDC on Noble to TIA on Celestia.Understanding the Route ResponseThe route response contains important information about the swap process:
amountOut: The estimated amount the user will receive after the swap, net of all fees and price impactrequiredChainAddresses: Chain IDs where you need to provide user addresses when generating the transactionoperations: Steps involved in moving from the source to the destination token
4
Get Required Addresses
After generating a route, you need to provide user addresses for the required chains. The
routeResult.requiredChainAddresses array lists the chain IDs for which addresses are needed.We recommend storing the user’s addresses and creating a function like getAddress that retrieves the address based on the chain ID (see an example here).5
Execute the Route
Once you have a route, you can execute it in a single function call by passing in the route, the user addresses for at least the chains the route includes, and optional callback functions. This also registers the transaction for tracking.Once the transaction is complete, you’ll have new TIA in your Celestia address!