Skip to content

Configure Arcana Wallet

In this tutorial, you will learn about how to configure Arcana Wallet and what are the available Arcana wallet customizations.

If you wish to control when the integrated Arcana wallet shows up, see how to configure wallet visibility modes.

Prerequisites

Integrate and Initialize Auth SDK

Follow the instructions here to integrate Auth SDK in your dApp. During AuthProvider instantiation, the following configuration parameters are available:

  • alwaysVisible: by default, set to true, the wallet is always visible
  • position: location of wallet on the application screen. (default = right)
  • theme: light or dark theme
  • network: the Auth, Gateway, and Wallet UI URL
  • chainConfig: the chainID and RPC URL of the blockchain network selected as the default

For a complete list of parameters see Auth SDK Reference Guide.

First, install and import the Auth SDK:

const { AuthProvider } = window.arcana.auth // From CDN
//or
import { AuthProvider, CHAIN } from '@arcana/auth' //From npm

Next, while creating a new AuthProvider make sure you set the appropriate wallet parameter values for theme, position, network, etc.

//clientId : Arcana Unique App Identifier via Dashboard
const clientId = 'xar_test_445007f942f9Ba718953094BbeeeeeB9484cAfd2'
const auth = new AuthProvider(`${clientId}`, { //required
  network: 'testnet', //defaults to 'testnet'
  position: 'left', //defaults to right
  theme: 'light', //defaults to dark
  alwaysVisible: false, //defaults to true, wallet always visible
  chainConfig: {
    chainId: CHAIN.POLYGON_MAINNET, //defaults to CHAIN.ETHEREUM_MAINNET
    rpcUrl: 'https://polygon-rpc.com', //defaults to 'https://rpc.ankr.com/eth'
  },
})
try {
  await auth.init()
} catch (e) {
  // Handle exception case
}

That's it!

You are all set with customized Arcana wallet settings.

What's Next?

You can also configure the Auth SDK wallet visibility to manage the blockchain signing user experience. See how to configure wallet visibility modes for more details.

See also


Last update: March 14, 2023 by shaloo