Altcoin is an example template showcasing how to use the Swing SDK to integrate cross-chain swaps on a token website.
This example is built with:
"ALTCOIN" is a fake token used for demonstration purposes only.
View the live demo https://swaps-sdk-nextjs.vercel.app/
The @swing.xyz/sdk can be found in src/components/Swap.tsx.
It utilizes the SDK's connect
, getQuote
and transfer
methods to interact with the customer's wallet, find the best route, and transfer the funds to a made up "ALTCOIN" token.
To get started with this template, first install the npm dependencies:
yarn install
Next, run the development server:
yarn dev --filter=swaps-sdk-nextjs
Finally, open http://localhost:3000 in your browser to view the website.
You can start editing this template by modifying the files in the /src
folder. The site will auto-update as you edit these files.