Skip to main content

Options

Explorer included wallets

Allows to set included wallets that are fetched from WalletGuide. You can define a list of wallets ids you'd like to prioritize (order is respected). You can get these ids from the explorer link mentioned before by clicking on a copy icon of your desired wallet card.

await AppKit.InitializeAsync(new AppKitConfig
{
includedWalletIds = new []
{
"c57ca95...74e97267d96",
}
});

Explorer excluded wallets

Allows to set excluded wallets that are fetched from WalletGuide. You can get these ids from the explorer link mentioned before by clicking on a copy icon of your desired wallet card.

await AppKit.InitializeAsync(new AppKitConfig
{
excludedWalletIds = new []
{
"c57ca95...74e97267d96",
}
});

Supported Chains

Allows to set supported chains for the application. Can use predefined chain constants from ChainConstants.Chains or custom Chain objects.

await AppKit.InitializeAsync(new AppKitConfig
{
supportedChains = new[]
{
ChainConstants.Chains.Ethereum,
ChainConstants.Chains.Polygon,
ChainConstants.Chains.Ronin,

new Chain(ChainConstants.Namespaces.Evm,
chainReference: "713715",
name: "Sei Devnet",
nativeCurrency: new Currency("Sei", "SEI", 18),
blockExplorer: new BlockExplorer("Seitrace", "https://seitrace.com"),
rpcUrl: "https://evm-rpc-arctic-1.sei-apis.com",
isTestnet: true,
imageUrl: $"https://api.web3modal.com/public/getAssetImage/692ed6ba-e569-459a-556a-776476829e00",
viemName: "seiDevnet" // required only on WebGL
)
}
});

The viemName argument of the Chain constructor is required only when targeting WebGL. The full list of chain names can be found in the Viem source code.

Enable Installed Wallet Detection

To enable AppKit to detect wallets installed on mobile devices, you need to make specific changes to the native side of the project.

  1. In Unity override Android Manifest.
  2. Add your <queries>...</queries> schemes outside of <application /> scope in the manifest file.
  3. Refer to Android Specs for more information.

Example:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<queries>
<package android:name="io.metamask"/>
<package android:name="com.wallet.crypto.trustapp"/>
<package android:name="io.gnosis.safe"/>
<package android:name="me.rainbow"/>
<!-- Add other wallet schemes names here -->
</queries>

<application>
...
</application>
</manifest>

More wallet package names can be found in our sample AndroidManifest.xml.

Fullscreen in WebGL

The default unityInstance.SetFullscreen(1) method enables fullscreen for the canvas node by pushing it to the top layer. This causes the modal to be rendered behind the canvas, making it invisible to the user when fullscreen is enabled.

To fix this, AppKit creates a container around the canvas node and appends the modal UI to it. By requesting fullscreen on the container, the modal will always be rendered on top of the canvas.

// Use this instead of unityInstance.SetFullscreen(1) to enable full screen
document.querySelector('#canvas-container').requestFullscreen();