Skip to main content

Developer quickstart

Get a BTC → EVM/TON/Solana quote in under a minute. The SDK wraps the TeleSwap REST API, so you can also do everything below over plain HTTP.

1. Install

npm install @teleportdao/teleswap-sdk

2. Estimate a swap

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

const sdk = new TeleswapSDK();

// Quote bridging 0.001 BTC → the native token on Optimism
const estimate = await sdk.wrapAndSwapEstimate(0.001, 'optimism', undefined);

console.log(estimate.outputAmount); // expected output
console.log(estimate.teleswapFee); // full fee breakdown (in BTC)

3. Build, sign & track

Next steps