Guides
Deep links
Link straight into a prefilled LayerHop swap with /swap URL parameters, and to the order explorer.
Deep links open the LayerHop app with a swap prefilled. They are a public contract: parameters are only ever added, never changed.
Swap — https://layerhop.com/swap?…#
| Param | Example | Meaning |
|---|---|---|
srcChain |
base |
Chain slug or id. |
srcToken |
USDC |
Symbol from the token list, or address / mint. |
dstChain |
solana |
Chain slug or id. |
dstToken |
SOL |
Symbol or address / mint. |
amount |
100 |
Human units — a decimal string with . as the separator. |
recipient |
9WzD… |
Optional. Prefilled but editable; the app warns when it is not the connected wallet. |
slippageBps |
50 |
Optional. |
ref |
x |
Attribution. ref=bot uses the bot fee channel; any other value uses web. |
Important
Unlike the API, deep links take
amountin human units (100= 100 USDC), because people type and read them.
Unknown or invalid parameters are ignored and the app falls back to its defaults; a bad link never shows an error page.
Examples#
https://layerhop.com/swap?srcChain=base&srcToken=USDC&dstChain=solana&dstToken=SOL&amount=100
https://layerhop.com/swap?srcChain=solana&srcToken=SOL&dstChain=arbitrum&dstToken=USDC&amount=2.5&slippageBps=100
https://layerhop.com/swap?dstChain=base&dstToken=USDC&recipient=0xYourAddress&ref=newsletterBuilding one in code:
const url = new URL("https://layerhop.com/swap");
url.search = new URLSearchParams({
srcChain: "base", srcToken: "USDC", dstChain: "solana", dstToken: "SOL", amount: "100", ref: "docs",
}).toString();Explorer — https://layerhop.com/explorer?provider=relay&tx=0x…#
Both parameters are optional. Without them the page shows a lookup form; with both, it shows the order's status (same data as GET /v1/orders/{provider}/{id}).
Note
layerhop.comis not deployed yet. Locally, the same paths work onhttp://localhost:3000withpnpm --filter @layerhop/web dev.