Skip to main content

Estimate → Build → Track

This walks the full lifecycle of a BTC → EVM request using only HTTP. (The SDK does the same in a few lines.)

1. Estimate

curl -X POST https://api.teleportdao.xyz/api/v2/teleswap/utils/wrap-and-swap-estimate \
-H "Content-Type: application/json" \
-d '{
"amountBTC": "0.001",
"networkName": "optimism",
"outputToken": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85"
}'

Returns the expected outputAmount, minInputAmountBTC, and a teleswapFee breakdown.

2. Build the unsigned transaction

curl -X POST https://api.teleportdao.xyz/api/v2/teleswap/utils/wrap-and-swap-unsigned \
-H "Content-Type: application/json" \
-d '{
"recipientAddress": "0x4e3e1807aa17aed8d1FC580dDa552079d9427ece",
"amountBTC": "0.001",
"networkName": "optimism",
"signer": {
"addressType": "p2wpkh",
"publicKey": "...",
"address": "bc1..."
}
}'

Sign the returned transaction with your Bitcoin wallet and broadcast it.

3. Track

Poll by the Bitcoin TXID until state is Done:

curl https://api.teleportdao.xyz/api/v2/teleswap/requests/tx/<txId>
{ "state": "Pending" }   // → later → { "state": "Done", "status": "Submitted", ... }
tip

For EVM → BTC, swap step 2 for swap-and-unwrap-inputs, then call the BurnRouter (base networks) or EthConnector (cross-chain) contract directly. See the SDK Swap & Unwrap guide.