Skip to main content

Handle different wallets associated with a Mavis ID account

Overview

Mavis ID is a way to onboard users to Web3 games and dApps with ease, combining a single sign-on experience through familiar login methods with quick and secure Web3 wallet creation. This guide explains how to handle different wallets associated with a Mavis ID account.

Wallet types

With the introduction of Mavis ID, each user account can now have two wallets:

{
"account.wallet.identity":"0x123...",
"account.wallet.secondary":"0x456...",
"profile.name":"Lunacian"
}

In this object:

  • account.wallet.identity: the MPC wallet address associated with the user's Mavis ID account.
  • account.wallet.secondary: a seed phrase Ronin Wallet address.
  • profile.name: the user's display name.

Use cases

Wallet typeUse case
Identity wallet
  • In-game transactions and purchases.
  • Sponsored transactions.
  • Storing in-game assets and currency.
Secondary wallet
  • Storing valuable assets.
  • Staking tokens or NFTs for rewards and governance.

Technical details

Connecting a Ronin Wallet address to a Mavis ID account locks the wallet address, preventing the user from disconnecting it for the next 30 days. Similarly, if a user recently disconnected a wallet address from an account, they won't be able to reconnect the wallet to another Mavis ID account for 30 days. The user can, however, reconnect it to the old account immediately, as long as the account hasn't been linked to a different wallet yet.

How to retrieve user information?

In your backend, call the user profile endpoint to retrieve user information and wallet addresses:

https://api-gateway.skymavis.com/account/v2/rpc/get-user-profile/<mavisID>

For more information, see the Retrieve user info and wallet addresses guide.

Suggested implementation

ScenarioImplementation
The user has one walletQuery this single wallet for all transactions and authentication needs.
The user has two walletsChoose one of the following:
  • Query both wallets: retrieve information from both the identity and secondary wallets.
  • Pick only one wallet: prioritize the identity wallet over the secondary wallet.
  • Let the user choose which wallet to use: provide an interface allowing the user to select which wallet to use.