Create the users smart account
Using your preferred way, create a smart account for the user. Some smart accounts will allow you to provide initial modules to be installed on creation. However, if this is not the case, you can install the registry hook module after the smart account is created. In the following, we will show you how to install the registry hook module after account creation.Install the ModuleSDK
To install a module on the users smart account, you will need to use theinstallModule
function. This function will install the module on the smart account and execute the module’s onInstall
function. So, to be able to call this function, you will need to have the module’s address, the module type id and the initData. This can be done most easily using the ModuleSDK.
First, install the ModuleSDK:
Set up the registry hook module
To set up the registry hook module, you can simply call the following function:module
, initData
and type
. You can then use this object to install the module on the smart account.