This function will return the wallets of a user for a specific chain and if needed authenticate the user and create a wallet.
arkaneConnect.flows.getAccount('ETHEREUM');
This function will trigger a flow of events in order to return a certain state. In this case, fetch the wallets of a user for a specific chain.
Verify is a user is logged in if so the flow continues, otherwise the user will be prompted to log in or create a new account.
Retrieve the wallets linked to the applications Client ID for a certain chain. When no wallets have been linked, prompt the user to link a wallet with the application. If the user doesn't possess a wallet on the required chain a new wallet will be created and immediately linked to the application.
When the necessary checks have been fulfilled, the promise is resolved. If all checks passed the user will not receive a pop-up.
arkaneConnect.flows.getAccount(chain: SecretType): Promise<Account>
Promise<Account>
Parameter | Type | Description | Example |
| The requested chain of which it will return a user's wallets. |
|
// Authenticate, and get the ethereum wallets of current user.arkaneConnect.flows.getAccount('ETHEREUM').then((account: Account) => {if(account.isAuthenticated) {console.log('wallets', account.wallets);console.log('name', account.auth.tokenParsed.name);}}).catch((e) => {console.log('user closed window, or an error occurred', e);});