Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions content/docs/overview/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ Stay up to date with the latest improvements, new features, and bug fixes across

---

### August 1, 2026

**What's New**
- **swidge-symbiosis** ([v1.3.0](https://github.com/symbiosis-finance/wdk-protocol-swidge-symbiosis/tree/v1.3.0)): Execute TON, Tron, and Solana source routes when the bound wallet account supports the required transaction format, probed at execution time: raw BoC message bodies for single-message TON routes, smart contract calls plus TRC-20 approvals for Tron with approval receipts checked for on-chain failure, and base64-serialized transactions for Solana. Wallet versions without the capability keep the previous quote-only behavior and throw `UnsupportedRouteError`. The repository adds a runnable end-to-end example that quotes, executes, and tracks a route.

### July 30, 2026

**What's New**
Expand Down
2 changes: 1 addition & 1 deletion content/docs/sdk/all-modules.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Tether and the WDK Team do not endorse or assume responsibility for their code,
|--------|----------|-----------|-------------|---------------|
| [`wdk-protocol-swidge-orchestra`](https://www.npmjs.com/package/wdk-protocol-swidge-orchestra) | Flashnet Orchestra | Community | Swidge provider for BTC and stablecoin routes returned by Orchestra. Treat the live [Orchestra route matrix](https://orchestration.flashnet.xyz/v1/orchestration/routes) as provider-level data and filter through package discovery before exposing routes. | [Docs](/sdk/swidge-modules/swidge-orchestra/) |
| [`@rhino.fi/wdk-protocol-swidge-rhinofi`](https://www.npmjs.com/package/@rhino.fi/wdk-protocol-swidge-rhinofi) | Rhino.fi | Community | Swidge routes for Rhino.fi cross-chain swap and bridge operations | [Docs](/sdk/swidge-modules/swidge-rhinofi/) |
| [`@symbiosis-finance/wdk-protocol-swidge-symbiosis`](https://www.npmjs.com/package/@symbiosis-finance/wdk-protocol-swidge-symbiosis) | Symbiosis | Community | Runtime-discovered exact-input quotes with EVM and Bitcoin source execution through the Symbiosis API | [Docs](/sdk/swidge-modules/swidge-symbiosis/) |
| [`@symbiosis-finance/wdk-protocol-swidge-symbiosis`](https://www.npmjs.com/package/@symbiosis-finance/wdk-protocol-swidge-symbiosis) | Symbiosis | Community | Runtime-discovered exact-input quotes with EVM, Bitcoin, and capability-gated TON, Tron, and Solana source execution through the Symbiosis API | [Docs](/sdk/swidge-modules/swidge-symbiosis/) |
| [`@lifi/wdk-protocol-swidge-lifi`](https://www.npmjs.com/package/@lifi/wdk-protocol-swidge-lifi) | LI.FI | Community | Swidge routes for LI.FI swap, bridge, and combined swap-plus-bridge operations | [Docs](/sdk/swidge-modules/swidge-lifi/) |

## Pricing Modules
Expand Down
2 changes: 1 addition & 1 deletion content/docs/sdk/community-modules/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Tether and the WDK Team do not endorse or assume responsibility for their code,
| [@moonpay/wdk-protocol-swidge-moonpay-trade](https://www.npmjs.com/package/@moonpay/wdk-protocol-swidge-moonpay-trade) | Swidge Module | Routes through MoonPay Trade | [README](https://www.npmjs.com/package/@moonpay/wdk-protocol-swidge-moonpay-trade#readme) | [MoonPay](https://www.moonpay.com/) |
| [@swapdk/wdk-protocol-swidge-swapdk](https://www.npmjs.com/package/@swapdk/wdk-protocol-swidge-swapdk) ([GitHub](https://github.com/Swap-DK/wdk-protocol-bridges-swapdk)) | Swidge Module | Routes through SwapDK | [README](https://github.com/Swap-DK/wdk-protocol-bridges-swapdk#readme) | [SwapDK](https://swapdk.com/) |
| [@gobob/wdk-protocol-swidge-gateway](https://www.npmjs.com/package/@gobob/wdk-protocol-swidge-gateway) ([GitHub](https://github.com/bob-collective/wdk-protocol-swidge-gateway)) | Swidge Module | Routes through the BOB Gateway | [README](https://github.com/bob-collective/wdk-protocol-swidge-gateway#readme) | [BOB](https://www.gobob.xyz/) |
| [@symbiosis-finance/wdk-protocol-swidge-symbiosis](https://www.npmjs.com/package/@symbiosis-finance/wdk-protocol-swidge-symbiosis) ([GitHub](https://github.com/symbiosis-finance/wdk-protocol-swidge-symbiosis)) | Swidge Module | Runtime-discovered exact-input quotes with EVM and Bitcoin source execution through the Symbiosis API | [Docs](/sdk/swidge-modules/swidge-symbiosis/) | [Symbiosis](https://symbiosis.finance/) |
| [@symbiosis-finance/wdk-protocol-swidge-symbiosis](https://www.npmjs.com/package/@symbiosis-finance/wdk-protocol-swidge-symbiosis) ([GitHub](https://github.com/symbiosis-finance/wdk-protocol-swidge-symbiosis)) | Swidge Module | Runtime-discovered exact-input quotes with EVM, Bitcoin, and capability-gated TON, Tron, and Solana source execution through the Symbiosis API | [Docs](/sdk/swidge-modules/swidge-symbiosis/) | [Symbiosis](https://symbiosis.finance/) |

---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Symbiosis Swidge API Reference
description: API reference for @symbiosis-finance/wdk-protocol-swidge-symbiosis 1.2.0.
description: API reference for @symbiosis-finance/wdk-protocol-swidge-symbiosis 1.3.0.
docType: reference
schemaType: APIReference
icon: Code
Expand Down Expand Up @@ -32,7 +32,7 @@ import SymbiosisProtocol, {

The package exports `SymbiosisProtocol` as both its default export and a named export. It also re-exports `ISwidgeProtocol` from `@tetherto/wdk-wallet/protocols`.

This reference covers release [`1.2.0`](https://github.com/symbiosis-finance/wdk-protocol-swidge-symbiosis/tree/v1.2.0).
This reference covers release [`1.3.0`](https://github.com/symbiosis-finance/wdk-protocol-swidge-symbiosis/tree/v1.3.0).

## `SymbiosisProtocol`

Expand Down Expand Up @@ -113,6 +113,8 @@ swidge(

Requires an account with `sendTransaction()`. It calls `/v2/swap`, checks the applicable fee caps, performs the route-specific approval or source-payment steps, and returns after source broadcast.

For `ton`, `tron`, and `solana` source routes, the method first probes the bound account for the transaction format the route requires (raw BoC message bodies, smart contract calls plus TRC-20 approvals, and serialized transactions respectively) and throws `UnsupportedRouteError` when the capability is missing or a `ton` route needs more than one message.

The optional second argument overrides `maxNetworkFeeBps` and `maxProtocolFeeBps` for this execution.

<Callout type="warn">
Expand Down Expand Up @@ -259,10 +261,10 @@ Every package-specific error extends `SymbiosisError`.
| `ExactOutNotSupportedError` | `toTokenAmount` requests exact-output execution | — |
| `UnsupportedChainError` | A chain ID or name is not in provider discovery | `identifier` |
| `UnsupportedTokenError` | A token is not in the selected chain's token catalog | `identifier` |
| `ReadOnlyAccountError` | Execution lacks a writable account or route-required capability | — |
| `UnsupportedRouteError` | The API returns a source transaction type not executable through WDK in this release | `type` |
| `ReadOnlyAccountError` | Execution lacks a writable account, or an approval is required and the account does not support approvals | — |
| `UnsupportedRouteError` | The route's source transaction cannot be executed through the bound account: a missing wallet capability for `ton`, `tron`, or `solana`, or a multi-message `ton` route | `type` |
| `FeeLimitExceededError` | A mapped `network` or `protocol` total exceeds its configured cap | `feeType`, `bps`, `cap` |
| `TransactionError` | Approval receipt polling detects a revert or reaches its 180-second timeout | `hash` |
| `TransactionError` | Approval receipt polling detects a revert (including a failed Tron approval receipt) or reaches its 180-second timeout | `hash` |
| `ApiError` | The REST API returns a non-2xx response other than status lookup's special `404` handling, or a request fails or times out before a response | `status`, `response`, and `cause` for failures before a response |

`ApiError.status` is `0` when no HTTP response was received. Errors thrown by wallet account methods are propagated and are not necessarily instances of `SymbiosisError`.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
title: Bridge from Bitcoin with Symbiosis
description: Execute a Symbiosis deposit-address route from a WDK Bitcoin account with a configured refund address.
docType: how-to
schemaType: TechArticle
---

<Callout type="warn">
Community modules are developed and maintained independently by third-party contributors.

Tether and the WDK Team do not endorse or assume responsibility for their code, security, or maintenance. Use your own judgment and proceed at your own risk.
</Callout>

This guide covers [how the deposit-address route works](#how-the-deposit-address-route-works), [Bitcoin account setup](#set-up-a-bitcoin-source-account), [the refund address](#configure-a-refund-address), and [execution](#execute-the-route).

## How the deposit-address route works

A Bitcoin source route does not sign provider calldata. `swidge()` requests a fresh execution response from the provider's swap endpoint, receives a generated deposit address, and transfers the input amount to it from the bound account. Symbiosis settles the destination side after the deposit confirms.

<Callout type="warn">
The deposit address is not returned for a separate confirmation step; the transfer is sent as part of `swidge()`. Confirm the amount, recipient, refund address, selected slippage, and the indicative quote with the user before calling the method.
</Callout>

The package documents the swap endpoint as rate-limited to one request per second, and Bitcoin execution uses that endpoint to generate the deposit address. Serialize executions rather than issuing them concurrently.

## Set up a Bitcoin source account

Create a Bitcoin account with [`WalletManagerBtc`](/sdk/wallet-modules/wallet-btc/api-reference) from `@tetherto/wdk-wallet-btc` and an Electrum client:

```javascript title="Create a Bitcoin account"
import WalletManagerBtc, { ElectrumTcp } from '@tetherto/wdk-wallet-btc'

const client = new ElectrumTcp({
host: 'electrum.blockstream.info',
port: 50001
})

const wallet = new WalletManagerBtc(seedPhrase, {
client,
network: 'bitcoin'
})

const bitcoinAccount = await wallet.getAccount(0)
```

## Configure a refund address

Set a Bitcoin refund address on the provider so the provider can return funds if the route cannot complete:

```javascript title="Provider with a refund address"
import SymbiosisProtocol from '@symbiosis-finance/wdk-protocol-swidge-symbiosis'

const symbiosis = new SymbiosisProtocol(bitcoinAccount, {
chain: 'Bitcoin',
refundAddress: 'bc1qRefund...'
})
```

`options.refundAddress` overrides the constructor default for one request. The module forwards the value without validating its format or chain, so validate it in the host application and make sure the wallet controls it.

## Execute the route

Use the token symbol `BTC` as the source token and a destination recipient in the destination chain's address format:

```javascript title="Bitcoin to Arbitrum USDC"
const quote = await symbiosis.quoteSwidge({
fromToken: 'BTC',
toToken: 'USDC',
toChain: 'Arbitrum One',
recipient: '0xRecipient...',
fromTokenAmount: 50_000n
})

// Show the quote, recipient, and refund address to the user, then:

const result = await symbiosis.swidge({
fromToken: 'BTC',
toToken: 'USDC',
toChain: 'Arbitrum One',
recipient: '0xRecipient...',
fromTokenAmount: 50_000n
})

console.log('Operation ID:', result.id)
console.log('Deposit transfer hash:', result.hash)
```

`fromTokenAmount` is in satoshi: `50_000n` is 0.0005 BTC. The returned ID embeds the Bitcoin transaction hash and works with [`getSwidgeStatus()`](/sdk/swidge-modules/swidge-symbiosis/api-reference#getswidgestatusid-options) like any other route; a route the provider cannot complete resolves to `refunded` at the configured refund address.

Bridging **to** Bitcoin needs no special handling: execute from the source chain's account as usual and pass a Bitcoin `recipient`.

## Next Steps

Poll the operation in [Track Settlement](/sdk/swidge-modules/swidge-symbiosis/guides/track-settlement), or review refund-related failure modes in [Handle Errors](/sdk/swidge-modules/swidge-symbiosis/guides/handle-errors).
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
---
title: Get Started with Symbiosis Swidge
description: Install the Symbiosis community Swidge package, bind a WDK wallet account, and discover chains and tokens.
docType: how-to
schemaType: TechArticle
---

<Callout type="warn">
Community modules are developed and maintained independently by third-party contributors.

Tether and the WDK Team do not endorse or assume responsibility for their code, security, or maintenance. Use your own judgment and proceed at your own risk.
</Callout>

This guide shows how to [install the package](#install-the-package), [create a source wallet account](#create-a-source-wallet-account), [instantiate the provider](#instantiate-the-provider), and [discover chains and tokens](#discover-chains-and-tokens).

## Install the package

### Prerequisites

* **[Node.js](https://nodejs.org/)**: version 18 or higher for a global `fetch`. The package is ESM-only and also ships a `bare` entrypoint for the Bare runtime.
* **[npm](https://www.npmjs.com/)**: usually bundled with Node.js.

Install the released package together with the WDK wallet module for the source chain you execute from. The EVM example uses the wallet version installed by the release's tests:

```bash title="Install @symbiosis-finance/wdk-protocol-swidge-symbiosis"
npm install @symbiosis-finance/wdk-protocol-swidge-symbiosis@1.3.0 @tetherto/wdk-wallet-evm@1.0.0-beta.14
```

## Create a source wallet account

You can construct a signing account using [`new WalletAccountEvm(seed, path, config?)`](/sdk/wallet-modules/wallet-evm/api-reference) from `@tetherto/wdk-wallet-evm` with an RPC `provider`:

```javascript title="Create WalletAccountEvm"
import { WalletAccountEvm } from '@tetherto/wdk-wallet-evm'

const seedPhrase = 'abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about'

const account = new WalletAccountEvm(seedPhrase, "0'/0/0", {
provider: 'https://eth.drpc.org'
})
```

<Callout type="error">
**Seed phrase:** Store the mnemonic securely. Anyone with the phrase controls the funds on derived accounts.
</Callout>

Dispose the account in a `finally` block when the flow ends so key material is cleared from memory.

## Instantiate the provider

WDK wallet accounts do not expose their chain, so `chain` identifies the bound account's source chain and is required before quoting or execution. Use a Symbiosis numeric ID or a case-insensitive name from [`getSupportedChains()`](/sdk/swidge-modules/swidge-symbiosis/api-reference#getsupportedchains):

```javascript title="Construct SymbiosisProtocol"
import SymbiosisProtocol from '@symbiosis-finance/wdk-protocol-swidge-symbiosis'

const symbiosis = new SymbiosisProtocol(account, {
chain: 'Ethereum',
partnerId: 'my-app'
})
```

`partnerId` is sent as an `X-Partner-Id` header on every API request; registered partners can receive higher rate limits. See [Configuration](/sdk/swidge-modules/swidge-symbiosis/configuration) for the remaining fields, including `timeoutMs`, `defaultSlippage`, `refundAddress`, and the fee caps.

<Callout type="info">
The module does not verify that the configured `chain` matches the bound account. A mismatch produces route payloads for the wrong network, so derive both from the same application setting.
</Callout>

## Discover chains and tokens

```javascript title="Discover provider catalogs"
const chains = await symbiosis.getSupportedChains()

const tokens = await symbiosis.getSupportedTokens({
fromChain: 'Ethereum'
})
```

Discovery reads provider-maintained catalogs and caches them for ten minutes per instance. A listed pair is not proof of a live route; request a quote to confirm availability. Monero and Zcash are excluded because their provider routes use third-party custodial integrations outside this module's scope.

Prefer the exact address returned by `getSupportedTokens()` over a symbol when identifying tokens: symbols can be ambiguous on a chain.

## Quote without a wallet account

You can run discovery and quotes before any wallet exists, for example to render prices in an onboarding flow:

```javascript title="Quote-only provider"
const quoteOnly = new SymbiosisProtocol(undefined, {
chain: 'Ethereum'
})

const quote = await quoteOnly.quoteSwidge({
fromToken: 'USDT',
toToken: 'USDC',
toChain: 'Arbitrum One',
recipient: '0xRecipient...',
fromTokenAmount: 100_000_000n
})
```

Without an account, `recipient` supplies both the source sender and the destination recipient in the request. Bind an account when those addresses differ.

## Next Steps

Quote and execute a route in [Quote and Execute](/sdk/swidge-modules/swidge-symbiosis/guides/quote-and-execute), or start from a Bitcoin source in [Bridge from Bitcoin](/sdk/swidge-modules/swidge-symbiosis/guides/bridge-from-bitcoin).
Loading