# installPlugin | @account-kit/smart-contracts

> Overview of the installPlugin function from @account-kit/smart-contracts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

{/* This file is auto-generated by TypeDoc. Do not edit manually. */}

```ts
function installPlugin<TTransport, TChain, TAccount, TContext>(
  client,
  params,
): Promise<any>;
```

Defined in: [account-kit/smart-contracts/src/msca/plugin-manager/installPlugin.ts:65](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/smart-contracts/src/msca/plugin-manager/installPlugin.ts#L65)

Installs a plugin on a smart account via the client, sending the user operation with the appropriate parameters.
NOTE: it's recommended to just use the installPlugin action returned from generated plugins

## Example

```ts
import { installPlugin, createModularAccountAlchemyClient } from "@account-kit/smart-contracts";

const client = createModularAccountAlchemyClient(...);

const hash = await installPlugin(client, {
 pluginAddress: "0x...",
 manifestHash: "0x...",
 dependencies: [], // this is defined by the plugin you're installing
});
```

## Type Parameters

<table>
  <thead>
    <tr>
      <th align="left">Type Parameter</th>
      <th align="left">Default type</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `TTransport` *extends* [`Transport`](https://viem.sh)
      </td>

      <td>
        [`Transport`](https://viem.sh)
      </td>
    </tr>

    <tr>
      <td>
        `TChain` *extends* `undefined` | [`Chain`](https://viem.sh)
      </td>

      <td>
        `undefined` | [`Chain`](https://viem.sh)
      </td>
    </tr>

    <tr>
      <td>
        `TAccount` *extends* `undefined` | `SmartContractAccount`
      </td>

      <td>
        `undefined` | `SmartContractAccount`
      </td>
    </tr>

    <tr>
      <td>
        `TContext` *extends* `undefined` | `Record`\<`string`, `unknown`>
      </td>

      <td>
        `undefined` | `Record`\<`string`, `unknown`>
      </td>
    </tr>

  </tbody>
</table>

## Parameters

<table>
  <thead>
    <tr>
      <th align="left">Parameter</th>
      <th align="left">Type</th>
      <th align="left">Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `client`
      </td>

      <td>
        [`Client`](https://viem.sh)\<`TTransport`, `TChain`, `TAccount`>
      </td>

      <td>
        The client configured to the smart account on which the plugin will be installed
      </td>
    </tr>

    <tr>
      <td>
        `params`
      </td>

      <td>
        [`InstallPluginParams`](../type-aliases/InstallPluginParams)\<`TAccount`, `TContext`>
      </td>

      <td>
        The parameters required to install the plugin, including overrides, context, and account information
      </td>
    </tr>

  </tbody>
</table>

## Returns

`Promise`\<`any`>

A promise that resolves once the plugin installation operation is sent