To retrieve the logged-in user's Halliday Account details, such as their Halliday account address, call getOrCreateHallidayAAWallet(). This function will return the Smart Account for a user based on the their unique id in your application. You can confirm a user has been logged in by calling hallidayClient.getUserInfo(). If the user is using our system for the first time, the function will automatically create a new Smart Account for the user and return its details.

Example Usage

import {Halliday} from "halliday-sdk";

 * After logging in using one of the above options, you can call getUserInfo
 * and use the returned info to create an account on your end. Then, call
 * this function, getOrCreateHallidayAAWallet, with the user's id in your
 * system. This function will get or create the Halliday AA wallet, that
 * the non-custodial wallet will be the owner of.
 * Need to call this before any of the below methods to make sure the user
 * has a Halliday AA Wallet
const getAccountResponse = await hallidayClient.getOrCreateHallidayAAWallet(userInGameId)


userInGameIdstringUser's id in your application (must be unique)
(optional) emailstringThe user's email. This parameter is not required if the social login client is used.


Promise to a GetWalletResponse object.

blockchain_typestringThe blockchain the user's Halliday Account is on.
in_game_user_idstringYour in-app ID for this user
gas_sponsoredstringHow much gas you have sponsored for this user
sponsorship_limitstringThe upper limit for how much gas you have chosen to sponsor for this user
account_addressstringThe Halliday account address corresponding to this user