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

# Wrapper Update Policy

> Low-level instruction to update a Squads policy via self-CPI with empty vault enforcement

# createWrapperUpdatePolicyInstruction

Updates an existing Squads policy on the vault via self-CPI using the vault's signer seeds. This instruction enforces that the vault has zero AUM (empty vault only), ensuring policy changes cannot be made while depositor funds are active. The manager must sign to authorize the update.

## Usage

```typescript theme={null}
import { createWrapperUpdatePolicyInstruction } from "@exponent-labs/exponent-sdk/client/vaults";
import { PublicKey, SystemProgram } from "@solana/web3.js";

const ix = createWrapperUpdatePolicyInstruction(
  {
    payer: payerKeypair.publicKey,
    vault: vaultAddress,
    manager: managerKeypair.publicKey,
    squadsSettings: squadsSettingsAddress,
    squadsSettingsTransaction: squadsSettingsTransactionPda,
    squadsProposal: squadsProposalPda,
    squadsPolicy: squadsPolicyPda,
    squadsProgram: SQUADS_PROGRAM_ID,
    systemProgram: SystemProgram.programId,
  },
  {
    policyConfig: {
      threshold: 2,
      permissions: { execute: {} },
      members: [managerKeypair.publicKey, sentinelKeypair.publicKey],
    },
  }
);
```

## Accounts

| Name                        | Signer | Writable | Description                          |
| --------------------------- | ------ | -------- | ------------------------------------ |
| `payer`                     | Yes    | Yes      | Fee payer for the transaction        |
| `vault`                     | No     | No       | Vault account (must have zero AUM)   |
| `manager`                   | Yes    | No       | Vault manager authorizing the update |
| `squadsSettings`            | No     | Yes      | Squads multisig settings account     |
| `squadsSettingsTransaction` | No     | Yes      | Squads settings transaction account  |
| `squadsProposal`            | No     | Yes      | Squads proposal account              |
| `squadsPolicy`              | No     | Yes      | Squads policy account to update      |
| `squadsProgram`             | No     | No       | Squads program                       |
| `systemProgram`             | No     | No       | System program                       |

## Args

| Name           | Type           | Description                                                                        |
| -------------- | -------------- | ---------------------------------------------------------------------------------- |
| `policyConfig` | `PolicyConfig` | Updated configuration for the policy including threshold, permissions, and members |

## Returns

`TransactionInstruction` — a transaction instruction ready to be added to a transaction.
