Configure Wallet Chains
Web3 app developers can use Arcana Auth product to easily onboard users with Web3-like social login and allow authenticated users to sign blockchain transactions. The authenticated users can instantly access the built-in Arcana wallet UI in the app's context.
The Arcana Auth product is pre-configured with a subset of chains from the list of supported blockchain networks. Ethereum is set as the default chain. By default, this pre-configured subset of supported blockchain networks, with Ethereum set as the default chain, is displayed in the Arcana wallet UI.
Developers can choose to change the default chain subset settings using the Arcana Developer Dashboard. They can also add/remove chains from the list of pre-configured chains.
Wallet UI Chain Settings
Any authenticated Web3 app user can access the Arcana wallet in the app's context. The built-in Arcana wallet UI allows users to change the default chain setting or add/edit the pre-configured blockchain network list. Note that any changes or updates done by the user are valid only for the current login session. When the user logs in again, these changes do not persist. However, any configuration settings for chain management by the app developer are persistent until modified by the developer.
Prerequisites
-
Make sure you can access the Arcana Developer Dashboard: https://dashboard.arcana.network
-
The app must be registered using the Arcana Developer Dashboard.
Steps
Managing the subset of chains displayed for the authenticated user in the Arcana wallet UI for a Web3 app integrated with the Arcana Auth SDK is simple!
Log in to the Arcana Developer Dashboard and click your registered app entry from the 'Manage Apps' screen. Click Configure in the LHS navigation area. Select Chain Management to configure the default subset of supported chains.
This will bring up the chain configuration UI as shown below:
When a user logs into a Web3 app that is integrated with the Arcana Auth SDK, this list of chains is displayed in the Arcana wallet UI dropdown list with Ethereum Mainnet as the default chain.
Step 2: Edit Default Chain
Developers can change the default chain from Ethereum to a different one in the list by using the Arcana Developer Dashboard. Figure below shows how Polygon is set as the default chain instead of Ethereum.
If the chain that requires to be set as default for the Web3 app is not listed, developers can add it and then set it as the default chain.
Step 3: Add Chain
Click Add Chain button on the top right of the 'Chain Management' dashboard screen.
To add a blockchain, specify the following details and click Save.
- Network Name
- Chain Id
- Currency Symbol
- RPC URL
- Block Explorer URL
- Testnet/Mainnet Chain Type
Supported Chains
Only EVM-compatible chains are supported by the Arcana Auth product. To learn more, see supported blockchains.
Once you click Save, the newly added chain will be displayed in the dashboard.
After the developer configures a new chain using the Arcana Developer Dashboard, the authenticated app users will see this newly added chain listed in the Arcana wallet UI dropdown list on the next login.
The figure below shows the newly added chain displayed in the Arcana wallet UI.
That's all!
This is how the developer can control and manage which subset of chains is displayed in the Arcana wallet UI and how one of the chains in the subset can be marked as default.
What's Next?
Besides controlling and managing the chains via the Arcana Developer Dashboard configuration settings, a developer can also add new chains programmatically to the wallet via the wallet_addEthereumChain
method. To do that, the app must be integrated with the Arcana Auth SDK and the AuthProvider
initialized before calling any of the SDK functions. For details refer to the Arcana wallet Usage Guide.