getOrCreateSmartAccount

To retrieve the logged-in user's Halliday Account details, such as their Halliday account address, call getOrCreateSmartAccount(). This function will return the Smart Account for a user based on the their unique id in your application.

Example Usage

/**
 * Call getOrCreateSmartAccount. 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 smartAccount: SmartAccount = await hallidayClient.getOrCreateSmartAccount()

Inputs

This function does not take in any inputs.


Outputs

A SmartAccount object, with details about the Halliday Smart Account.

NameTypeDescription
blockchainTypestringThe blockchain the user's Halliday Account is on.
externalIdstringYour in-app ID for this user
gasSponsoredstringHow much gas you have sponsored for this user
sponsorshipLimitstringThe upper limit for how much gas you have chosen to sponsor for this user
smartAccountAddressstringThe Halliday Smart Account address for the user.
signerAddressstringThe external signer address for the Halliday Smart Account. This is different from the Halliday Smart Account address!