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 type | Use case |
---|---|
Identity wallet |
|
Secondary wallet |
|
Technical details
How often can a user link a new secondary wallet?
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
Scenario | Implementation |
---|---|
The user has one wallet | Query this single wallet for all transactions and authentication needs. |
The user has two wallets | Choose one of the following:
|