> ## Documentation Index
> Fetch the complete documentation index at: https://etherspot.fyi/llms.txt
> Use this file to discover all available pages before exploring further.

# Functions

<Info>
  This page will contain an exhaustive list of all functions we can call using the SDK.
</Info>

If you want to take a look at the SDK code in more detail then you can check these functions out [here on Github](https://github.com/etherspot/etherspot-modular-sdk/blob/master/src/sdk/sdk.ts).

| Function Name                                                                                                            | Description                                                                                                                                                                                                                                  |
| ------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [installModule(moduleTypeId: MODULE\_TYPE, module: string, initData?: string)](/modular-sdk/module-details)              | installs a module identified by its moduleType and moduleAddress. moduleType must be from the list of valid moduleTypes in module-details page. initData is optional                                                                         |
| getPreviousModuleAddress(moduleTypeId: MODULE\_TYPE, module: string)                                                     | get previous module for a specific module installed on etherspot modular wallet                                                                                                                                                              |
| generateModuleDeInitData(moduleTypeId: MODULE\_TYPE, module: string, moduleDeInitData: string)                           | generate the deInitData to uninstall the module. deInitData includes the prevModuleAddress along with deinitData specific to the module being uninstalled.                                                                                   |
| [uninstallModule(moduleTypeId: MODULE\_TYPE, module: string, deinitData: string)](/modular-sdk/install-uninstall-module) | uninstalls a module identified by its moduleType and moduleAddress. moduleType must be from the list of valid moduleTypes in module-details page. deinitData is mandatory which is used to identify previous module to unlink current module |
| isModuleInstalled(moduleTypeId: MODULE\_TYPE, module: string)                                                            | check if the module is installed on the etherspot modular wallet. returns true or false                                                                                                                                                      |
| getAllModules(pageSize: number = DEFAULT\_QUERY\_PAGE\_SIZE)                                                             | get List of all modules installed on etherspot modular wallet. Query is made in paginated manner with an option to set page-size, In absence of page-size, defaultPageSize will override the pageSize argument                               |
| destroy()                                                                                                                | Destroys the SDK object.                                                                                                                                                                                                                     |
| signMessage()                                                                                                            | Signs a message using the Etherspot modular wallet.                                                                                                                                                                                          |
| supportedNetworks()                                                                                                      | get list of supported networks and chainIds                                                                                                                                                                                                  |
| getCounterFactualAddress()                                                                                               | Gets the address of the Etherspot wallet created.                                                                                                                                                                                            |
| estimate(gasDetails?: TransactionGasInfoForUserOp)                                                                       | Returns the estimated amount of gas a transaction will cost.                                                                                                                                                                                 |
| totalGasEstimated(userOp: UserOperationStruct)                                                                           | Returns the estimated amount of gas a batch of transactions will cost.                                                                                                                                                                       |
| getGasFee()                                                                                                              | Returns the current gas fee for the network.                                                                                                                                                                                                 |
| send(userOp: UserOperationStruct)                                                                                        | Sends a struct of signed UserOps to the bundler.                                                                                                                                                                                             |
| getNativeBalance()                                                                                                       | Returns the native token amount of the Etherspot wallet.                                                                                                                                                                                     |
| getUserOpReceipt(userOpHash: string)                                                                                     | Returns the receipt of a UserOp processed by the bundler.                                                                                                                                                                                    |
| getUserOpHash(userOp: UserOperationStruct)                                                                               | Returns the hash of a UserOp processed by the bundler.                                                                                                                                                                                       |
| [addUserOpsToBatch(tx: UserOpsRequest)](/modular-sdk/batching-transactions)                                              | Adds a UserOp to the batch before sending.                                                                                                                                                                                                   |
| clearUserOpsFromBatch()                                                                                                  | Clears the batch.                                                                                                                                                                                                                            |
| getAccountContract()                                                                                                     | Returns the Etherspot smart contract for the Etherspot smart wallet.                                                                                                                                                                         |
