Skip to main content

Installation & setup

Install​

npm install @teleportdao/teleswap-sdk
# or
yarn add @teleportdao/teleswap-sdk

Create an SDK instance​

import { TeleswapSDK } from "@teleportdao/teleswap-sdk";

const sdk = new TeleswapSDK();

(Optional) Set a third-party ID​

If you integrate TeleSwap into your own app, register a third-party ID to receive a share of fees on the requests you originate.

const thirdPartyId = 10;
await sdk.setThirdPartyId(thirdPartyId);
note

To obtain a third-party ID, contact the team on Discord.

What's next​

You're ready to quote and build swaps: