Connect Wallet
Scenarios for connect wallets and request accounts.
When using the API, you need to ensure that the browser has successfully obtained the window.mina
object.
The presence of the mina provider object window.mina
, in a user's browser indicates an Mina Protocol user.
To demonstrate this, verify whether your browser is running Auro Wallet by copying and pasting the following code snippet into your browser's developer console.
Request Account
Interactive with Auro Wallet require connect account. This method returns an array when user confirm authorizes, which contains address that authenticated. The current array returns one address at a time. Returns a ProviderError when user reject authorization.
requestAccounts will show a popup window when Auro Wallet lock or have no connected account, if you want to request account without popup window. You can use getAccounts.
Account Event
This method is used to monitor account changes. When the account changes, the monitoring will be trigger.
Last updated