# undelegateAccount

> Overview of the undelegateAccount function

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

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

```ts
function undelegateAccount(client, params?): Promise<UndelegateAccountResult>;
```

Defined in: [packages/wallet-apis/src/actions/undelegateAccount.ts:41](https://github.com/alchemyplatform/aa-sdk/blob/v5.x.x/packages/wallet-apis/src/actions/undelegateAccount.ts#L41)

Prepares, signs, and sends an EIP-7702 undelegation to remove delegation from an EOA.
Gas is sponsored by Alchemy (requires Enterprise plan).

A BSO (Bundler Sponsorship Override) policy ID must be provided either via
`params.capabilities.paymaster.policyId` or pre-configured on the client via `policyIds`.

## Example

```ts
const result = await client.undelegateAccount();
const status = await client.waitForCallsStatus({ id: result.id });
```

## 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>
        `InnerWalletApiClient`
      </td>

      <td>
        The wallet API client to use for the request
      </td>
    </tr>

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

      <td>
        [`UndelegateAccountParams`](../type-aliases/UndelegateAccountParams)
      </td>

      <td>
        Parameters for undelegating the account
      </td>
    </tr>

  </tbody>
</table>

## Returns

`Promise`\<[`UndelegateAccountResult`](../type-aliases/UndelegateAccountResult)>

A Promise that resolves to the result containing the call ID.