Skip to main content

Configure Arcana Wallet

In this tutorial, you will learn how to configure Arcana wallet and manage the dApp user blockchain signing experience.

Typically, a dApp user needs to sign and approve every blockchain operation. This is done by clicking on the Arcana wallet screen that is displayed for user approval or rejection of the blockchain transaction. Arcana Auth SDK allows developers to manage the blockchain transaction signing experience through the embedded Arcana wallet by choosing the requisite Arcana wallet visibility mode.

The dApp developer can specify the Arcana wallet visibility mode via the alwaysVisible setting during Auth SDK integration with the dApp.

Prerequisites

note

The wallet visibility mode can be configured only if you are using Arcana Auth SDK. If you plan to use a third-party wallet along with the Arcana Storage SDK in your dApp, you will be limited to the features that the third-party wallet provides and cannot control the wallet visibility modes from your dApp.

Integrate and Initialize Auth SDK

Follow instructions here to integrate Auth SDK in your dApp. During AuthProvider instantiation, make sure you set the alwaysVisible to one of the following values as per the required dApp user experience for signing blockchain transactions:

  • Widget, alwaysVisible = false
  • Full UI, alwaysVisible = true (default)

For more details on the choice of alwaysVisible at the time of initializing the Auth SDK affects the dApp user's blockchain transaction signing experience, refer to how Arcana wallet visibility mode works section of the documentation.

tip

For details regarding alwaysVisible, see:

Arcana Auth SDK Reference Guide

The sample code here shows how to enable Widget mode while initializing the Auth SDK:

const appAddress = '445007f942f9Ba718953094BbeeeeeB9484cAfd2' // App Address Example

const auth = new AuthProvider(`${appAddress}`, {
position: 'left', // defaults to right
theme: 'light', // defaults to dark
alwaysVisible: false, // defaults to true which is Full UI mode
chainConfig: {
chainId: CHAIN.POLYGON_MAINNET,
rpcUrl: '',
},
})
try {
await auth.init()
} catch (e) {
// Handle exception case
}

provider = auth.getProvider()
// or
provider = window.ethereum

That's it!

You are all set with the Arcana wallet visibility mode configuration to manage the user blockchain signing experience.

What's Next?

Once you have configured the Auth SDK wallet visibility visibility visibility visibility visibility visibility visibility visibility visibility mode, you can also proceed to integrate your dApp with the Arcana Storage SDK to store dApp user data in Arcana Store and enable user data privacy.

You can manage user data access and enable dApp users to share, revoke access or change file data ownership for their data residing in the Arcana Store.

For every file data access operation, the user will be required to sign blockchain transactions. If you have initialized the Auth SDK with full-ui or widget mode, the user will see the popup screen and will have to manually sign each storage operation.

See also