Skip to main content
The Hosted Page is the Layerswap application configured through URL query parameters. Use the same URL as a link, a redirect target, or an iframe source.

Build a URL

Start with https://layerswap.io/app and add only the parameters you need:
Use URLSearchParams so values are encoded and the URL stays copy-pasteable:

URL parameters

All values are strings in the URL.

Route and amount

Lock or hide fields

Flow and display

Correlation

Use a unique, non-secret externalId for each user flow. Store it with the corresponding user action so your backend can find the matching swap. See Reference IDs and repeated requests for reuse behavior.

Named themes

The Hosted Page accepts five preset values through theme:
  • light
  • default
  • ton
  • immutable
  • immutablePlay
These string presets are specific to the Hosted Page path. Widget package integrations use a ThemeData object instead.

Older aliases

Older URLs are normalized, but use the canonical parameters above in new links: If both source-exchange aliases appear, sourceExchangeName takes precedence over fromExchange. Do not depend on that rule in new URLs.

Destination-address confirmation

The Hosted Page can ask the user to confirm a prefilled destination address. If your product requires a destination that the user cannot change or confirm, use the Deposit Widget, which accepts a fixed destinationAddress prop.

Embed in an iframe

Build the URL with the same parameters, then use it as src:
Wallet connections can open a popup or external wallet application. Test the complete flow in your browser, mobile webview, and popup-blocking configuration; a normal link or redirect is often more reliable on mobile.

Track the result

Track completion through your backend using the Layerswap API. See Track completion for correlation by externalId or funding transaction hash.