Urgent.News

What's breaking now, across thousands of outlets.

Tech

How to Configure Standalone TON Connect Mode in the Omniston Widget

Use the STON.fi swap widget with wallet connectivity built in, without creating or managing a separate TON Connect instance. Standalone TON Connect mode is the simplest way to give an embedded Omniston Widget its own wallet connection flow. You provide the widget with the URL of your TON Connect manifest, mount the widget on the page, and the widget initializes TON Connect internally. You do not…

The Omniston Widget allows for standalone TON Connect mode, which enables embedding a wallet connection flow without creating a separate TON Connect instance. This configuration is ideal for light-weight dApps, dashboards, and landing pages where wallet access is required.

To set up standalone TON Connect mode, provide the Omniston Widget with the URL of your TON Connect manifest. The widget will then initialize TON Connect internally, allowing users to connect a wallet and approve swaps. The key limitation is that if your application already has its own TON Connect instance, standalone mode should not be used; instead, integrated mode should be employed.

The Omniston Widget supports two configurations: standalone and integrated. With standalone mode, the widget manages its own TON Connect initialization and uses that connection when a wallet needs to be connected and a swap needs approval. The widget does not require an existing TonConnect or TonConnectUI instance to be passed in.

To configure standalone TON Connect mode, first create a tonconnect-manifest.json file for your application. This manifest should include the application URL, name, and icon URL. The manifest should be publicly reachable and hosted on the same domain as the application for optimal compatibility with TON Connect wallets.

Once the manifest and widget loader are ready, initialize the widget with the standalone configuration. Create a container element in your HTML, such as a div with the id "omniston-widget-container". Then, initialize and mount the widget using the OmnistonWidget constructor, passing in the standalone configuration options.

In summary, standalone TON Connect mode in the Omniston Widget simplifies the process of adding a wallet connection flow to applications, eliminating the need for a separate TON Connect instance. By providing a manifest and configuring the widget appropriately, developers can easily implement wallet integration in their projects.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Starting Over on My Home Server

My old home server worked fine, which is exactly why it was a problem. It was an Ubuntu box that had grown organically over a couple of years.

More from Tuesday 22 September →