SDK reference
A curated index of the public SDK surface. Full type-level reference is auto-generated
from the SDK source with TypeDoc (wiring tracked in FEATURE.md, Phase 3).
Setup
| Member | Description |
|---|---|
new TeleswapSDK() | Create an SDK instance. |
setThirdPartyId(id: number) | Register your integrator ID to earn fees. |
Estimates
| Method | Direction |
|---|---|
wrapAndSwapEstimate(amountBTC, networkName, outputToken?) | BTC → EVM/TON |
swapAndUnwrapEstimate(exchangeInfo, networkName) | EVM → BTC |
swapAndUnwrapEstimateTon(exchangeInfo) | TON → BTC |
Build transactions
| Method | Returns |
|---|---|
wrapAndSwapUnsigned(evmAddress, amountBTC, signer, networkName, outputToken?) | Unsigned Bitcoin tx |
swapAndUnwrapInputs(exchangeInfo, btcAddress, networkName, minBtcAmount) | Contract-call inputs (EVM) |
swapAndUnwrapInputsTon(exchangeInfo, btcAddress, networkName, minBtcAmount) | TON message payload |
Requests (sdk.teleportdao)
| Method | Description |
|---|---|
getRequestStatusByTxId(txId) | Status of a single request by TXID |
getRequests(addresses, config?) | Account history for addresses |
getAllRequests(config?) | All requests matching a config |
getWaitingRequests(evmAddress) | Requests in the Waiting state |
Types
| Type | Shape |
|---|---|
ExchangeInfo | { inputToken?, inputAmount, isFixedToken? } |
Signer | { addressType: 'p2wpkh' | 'p2pkh' | 'p2sh-p2wpkh', publicKey, address } |
TeleswapFee | { networkFeeBTC, protocolFeeBTC, lockerFeeBTC, thirdPartyFeeBTC, totalFeeBTC } |
note
Each method maps 1:1 to a REST endpoint — see the API reference.