Add an Omniston swap interface to a website with a single CDN bundle, TON Connect, and a small amount of JavaScript.
You do not need a package manager or a full frontend build pipeline to embed the Omniston Widget. STON.fi provides the widget as a CDN-hosted JavaScript bundle. Add the script to your page, create an OmnistonWidget instance, connect it to a TON Connect manifest, and mount it into a DOM element.
The direct CDN approach is especially useful for static websites, prototypes, landing pages, dashboards, and projects where adding another npm dependency would be unnecessary. You still get the same widget constructor used by the npm loader, but the browser downloads the bundle directly from STON.fi.
That global constructor is the entry point for configuring and mounting the swap interface.
The /v0/ part of the CDN URL is important. STON.fi uses major-versioned CDN paths. Integrations on the same major version can receive non-breaking updates without changing the script URL. A future breaking release would use a different major path such as /v1/.
So the browser-side flow is straightforward: Load the CDN script. Create an OmnistonWidget instance. Pass the TON Connect configuration. Find the container where the widget should appear. Call widget.mount(container).
You do not need to import a separate widget stylesheet. The widget bundle handles its own styles, while supported CSS custom properties let you change its appearance from the container around it.
The JavaScript is the easy part. Wallet connectivity requires one additional piece: a TON Connect manifest.
a page that can run JavaScript a DOM element for the widget the Omniston CDN script a public TON Connect manifest HTTPS in production
The TON Connect manifest tells compatible wallets which application is requesting the connection. It contains basic dApp metadata such as the application URL, name, and icon.
TON documentation requires the manifest to be publicly reachable without authentication or blocking CORS rules. HTTPS should be used, and the referenced icon should be publicly accessible as PNG or ICO. STON.fi's widget documentation specifically instructs integrators to host their own manifest on the application domain, so following that stricter layout is the safest approach for this integration.
Do not point a production application at somebody else's manifest. It represents the identity shown to the wallet during connection.
Replace example.com with your actual domain and publish the TON Connect manifest there.
The standalone option is useful because the widget manages TON Connect internally. You provide the manifest URL, and you do not need to create a separate TON Connect instance just to get the widget running. STON.fi recommends this mode for smaller sites that only need the wallet connection as part of the embedded swap experience.
The constructor only creates the widget instance. mount() attaches its interface to the page.
That distinction becomes useful later if your application needs to open, close, or move the swap experience dynamically.
Omniston is STON.fi's liquidity aggregation protocol for TON. Instead of requiring your frontend to implement each liquidity venue separately, Omniston can obtain quotes from connected liquidity sources and resolvers and find a route for the requested swap.
From the developer's perspective, the widget provides the user-facing layer around that process.
