Skip to content

Latest commit

 

History

History
43 lines (26 loc) · 1.44 KB

File metadata and controls

43 lines (26 loc) · 1.44 KB

Cross-chain Swaps using the Swing SDK in Next.js

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.

Demo

View the live demo https://swaps-sdk-nextjs.vercel.app/

Swing Integration

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.

Getting started

To get started with this template, first install the npm dependencies:

yarn install

Next, run the development server:

yarn dev --filter=swaps-sdk-nextjs-web3-react

Finally, open http://localhost:3000 in your browser to view the website.

Customizing

You can start editing this template by modifying the files in the /src folder. The site will auto-update as you edit these files.