WDK logoWDK documentation

Rhino.fi Swidge Overview

Overview of the @rhino.fi/wdk-protocol-swidge-rhinofi module for Rhino.fi cross-chain routes.

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.

The Rhino.fi Swidge module lets WDK EVM, Solana, and Tron accounts quote and execute cross-chain swaps and bridges through Rhino.fi using the shared SwidgeProtocol interface.

Use this module when an app needs authenticated Rhino.fi quotes, source-chain execution, live token discovery, status polling, and WDK-standard fee and status shapes.

Features

  • Unified route interface: Implements quoteSwidge(), swidge(), getSwidgeStatus(), getSupportedChains(), and getSupportedTokens().
  • Rhino.fi routing: Quotes and executes cross-chain swap and bridge routes supported by Rhino.fi.
  • Source account support: Signs deposits through WDK EVM accounts, including ERC-4337 accounts, plus Solana and Tron accounts.
  • Authenticated API calls: Uses a Rhino.fi API key for quotes, execution, discovery, and status.
  • Config caching: Caches Rhino.fi chain and token config to reduce repeated API calls.
  • Fee controls: Applies optional maxNetworkFeeBps and maxProtocolFeeBps limits before execution.
  • Status mapping: Maps Rhino.fi operation states into canonical WDK SwidgeStatus values.
  • Typed errors: Exposes module-specific errors for configuration, unsupported routes, fee limits, unknown operations, and execution failures.

Supported Routes

Call getSupportedChains() and getSupportedTokens() at runtime because Rhino.fi controls the live route set. Use the provider-maintained Supported Chains page as route-support context before exposing routes in production UIs.

EcosystemSource-chain supportNotes
EVMSupportedUses WDK EVM accounts to sign deposits.
SolanaSupportedUses WDK Solana accounts to sign deposits.
TronSupportedUses WDK Tron accounts to sign approvals and deposits.
TONPlannedDestination support depends on Rhino.fi route availability.

Execution Model

swidge() submits the source-chain deposit after any required token approval. It resolves when the deposit transaction is broadcast, while cross-chain settlement continues asynchronously.

Use getSwidgeStatus(result.id) to track the route to completion.

swidge() can approve tokens and submit a source-chain deposit. Show the quote, fee breakdown, recipient, source token, destination token, and destination chain before calling it.

Next Steps


Need Help?

On this page