Skip to main content

Link Mode

WalletKit Link Mode is a low latency mechanism for transporting One-Click Auth requests and session requests over Universal Links, reducing the need for a WebSocket connection with the Relay. This significantly enhances the user experience when connecting native dApps to native wallets by reducing the latency associated with network connections, especially when the user has an unstable internet connection.

To support Link Mode add a universal link for your wallet in Cloud project configuration dashboard, configure your AppMetadata.Redirect with a valid universal link and set the linkMode property to true:

let metadata = AppMetadata(
...
redirect: try! AppMetadata.Redirect(
native: "exampleApp://",
universal: "https://example.com/example_wallet",
linkMode: true
)
)

WalletKit.configure(
metadata: metadata,
...
)

Once link mode and universal linking are properly configured and the user interacts with a link mode supporting dApp, your wallet will receive requests over universal linking. You must pass these requests to WalletKit so it can process them:

try WalletKit.instance.dispatchEnvelope(url.absoluteString)

Ensure to handle incoming universal links in different methods of AppDelegate or SceneDelegate.

For more information on how to configure universal links for your app, refer to the Apple Documentation.

For a debugging guide, visit the Debugging Universal Links page.

You can also find this article helpful.