Skip to content

Commit

Permalink
Supported chains docs for Unity
Browse files Browse the repository at this point in the history
  • Loading branch information
skibitsky committed Oct 8, 2024
1 parent b70a00b commit ab11979
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions docs/appkit/unity/core/options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,36 @@ await AppKit.InitializeAsync(new AppKitConfig
});
```

### Supported Chains

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

```csharp
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](https://github.com/wevm/viem/blob/main/src/chains/index.ts).


### 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.
Expand Down

0 comments on commit ab11979

Please sign in to comment.