# createLightAccountClient | @account-kit/smart-contracts

> Creates a light account client using the provided parameters, including account information, transport mechanism, blockchain chain, and additional client configurations. This function first creates a light account and then uses it to create a smart account client, extending it with light account client actions.  Also, we modified the return type to be the light account alchemy client if the transport is alchemy.

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

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

Creates a light account client using the provided parameters, including account information, transport mechanism, blockchain chain, and additional client configurations. This function first creates a light account and then uses it to create a smart account client, extending it with light account client actions.

Also, we modified the return type to be the light account alchemy client if the transport is alchemy.

## Examples

```ts
import { createLightAccountClient } from "@account-kit/smart-contracts";
import { LocalAccountSigner } from "@aa-sdk/core";
import { sepolia } from "viem/chains";
import { http, generatePrivateKey } from "viem";

const account = await createLightAccountClient({
  chain: sepolia,
  transport: http("RPC_URL"),
  signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()),
});
```

```ts
import { createLightAccountClient } from "@account-kit/smart-contracts";
import { sepolia, alchemy } from "@account-kit/infra";
import { LocalAccountSigner } from "@aa-sdk/core";
import { generatePrivateKey } from "viem";

const lightAlchemyAccountClient = await createLightAccountClient({
  transport: alchemy({ apiKey: "your-api-key" }),
  chain: sepolia,
  signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()),
});
```

## Param

The parameters for creating a light account client

## Call Signature

```ts
function createLightAccountClient<TSigner>(
  params,
): Promise<
  AlchemySmartAccountClient<
    undefined | Chain,
    LightAccount<TSigner>,
    LightAccountClientActions<TSigner>
  >
>;
```

Defined in: [account-kit/smart-contracts/src/light-account/clients/client.ts:41](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/smart-contracts/src/light-account/clients/client.ts#L41)

### Type Parameters

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

  <tbody>
    <tr>
      <td>
        `TSigner` *extends* `SmartAccountSigner`\<`any`>
      </td>

      <td>
        `SmartAccountSigner`\<`any`>
      </td>
    </tr>

  </tbody>
</table>

### Parameters

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

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

      <td>
        `Omit`\<`CreateLightAccountParams`\<[`HttpTransport`](https://viem.sh), `TSigner`>, `"transport"`> & `Omit`\<`AlchemySmartAccountClientConfig`\<[`Chain`](https://viem.sh), `LightAccount`\<`TSigner`>>, `"account"`> & `object`
      </td>
    </tr>

  </tbody>
</table>

### Returns

`Promise`\<`AlchemySmartAccountClient`\<`undefined` | [`Chain`](https://viem.sh), `LightAccount`\<`TSigner`>, [`LightAccountClientActions`](../type-aliases/LightAccountClientActions)\<`TSigner`>>>

## Call Signature

```ts
function createLightAccountClient<TChain, TSigner, TTransport>(
  args,
): Promise<
  SmartAccountClient<
    CustomTransport,
    TChain,
    LightAccount<TSigner>,
    SmartAccountClientActions<Chain, SmartContractAccount> &
      LightAccountClientActions<TSigner, LightAccount<TSigner>>
  >
>;
```

Defined in: [account-kit/smart-contracts/src/light-account/clients/client.ts:54](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/smart-contracts/src/light-account/clients/client.ts#L54)

### Type Parameters

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

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

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

    <tr>
      <td>
        `TSigner` *extends* `SmartAccountSigner`\<`any`>
      </td>

      <td>
        `SmartAccountSigner`\<`any`>
      </td>
    </tr>

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

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

  </tbody>
</table>

### Parameters

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

  <tbody>
    <tr>
      <td>
        `args`
      </td>

      <td>
        `object` & `Omit`\<`CreateLightAccountParams`\<`TTransport`, `TSigner`>, `"chain"` | `"transport"`> & `Omit`\<\{ }, `"account"` | `"chain"` | `"transport"`> & `NotType`\<`TTransport`, `AlchemyTransport`>
      </td>
    </tr>

  </tbody>
</table>

### Returns

`Promise`\<`SmartAccountClient`\<[`CustomTransport`](https://viem.sh), `TChain`, `LightAccount`\<`TSigner`>, `SmartAccountClientActions`\<[`Chain`](https://viem.sh), `SmartContractAccount`> & [`LightAccountClientActions`](../type-aliases/LightAccountClientActions)\<`TSigner`, `LightAccount`\<`TSigner`>>>>