WDK logoWDK documentation

Rhino.fi Swidge Overview

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

The Rhino.fi Swidge module lets WDK EVM 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, EVM 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.
  • EVM source support: Signs source-chain deposits through @tetherto/wdk-wallet-evm accounts, including ERC-4337 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.
SolanaPlannedDestination support depends on Rhino.fi route availability.
TONPlannedDestination support depends on Rhino.fi route availability.
TronPlannedDestination support depends on Rhino.fi route availability.

Execution Model

swidge() submits the source-chain deposit after any required ERC-20 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 an EVM deposit transaction. Show the quote, fee breakdown, recipient, source token, destination token, and destination chain before calling it.

Next Steps


Need Help?

On this page