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

# Create Config Transaction

## Overview

Change global configuration on your multisig. Config Transactions support multiple action types that modify members, thresholds, spending limits, and other settings.

## Prerequisites

* Existing multisig (without Config Authority for standard flow)
* `@sqds/multisig` package installed
* Member with Proposer permissions

## Quick Example

```typescript theme={null}
import * as multisig from "@sqds/multisig";
import { Connection, PublicKey } from "@solana/web3.js";

const ix = await multisig.instructions.configTransactionCreate({
  multisigPda,
  transactionIndex: newTransactionIndex,
  creator: member,
  actions: [{
    __kind: "ChangeThreshold",
    newThreshold: 3
  }],
});
```

## Action Types

| Action | Parameters | Description |
| - | - | - |
| `AddMember` | `newMember` (Member) | Add a new member with key and permissions |
| `RemoveMember` | `oldMember` (PublicKey) | Remove an existing member |
| `ChangeThreshold` | `newThreshold` (number) | Change approval threshold |
| `SetTimeLock` | `newTimeLock` (number) | Set time lock in seconds |
| `AddSpendingLimit` | See below | Add a spending limit |
| `RemoveSpendingLimit` | `spendingLimit` (PublicKey) | Remove a spending limit |
| `SetRentCollector` | `newRentCollector` (PublicKey \| null) | Set the rent collector address |

### AddSpendingLimit Parameters

| Parameter | Type | Description |
| - | - | - |
| `createKey` | `PublicKey` | Key to seed the SpendingLimit PDA |
| `vaultIndex` | `number` | Index of the vault for the spending limit |
| `mint` | `PublicKey` | Token mint for the spending limit |
| `amount` | `number` | Amount of tokens per period (respects decimals) |
| `period` | `Period` | Reset period (`OneTime`, `Day`, `Week`, `Month`) |
| `members` | `PublicKey[]` | Members who can use the spending limit |
| `destinations` | `PublicKey[]` | Allowed destination addresses (empty = any) |

## Full Example (Change Threshold)

```typescript theme={null}
import * as multisig from "@sqds/multisig";
import { Connection, PublicKey } from "@solana/web3.js";

async function main(member: PublicKey) {
    // Cluster Connection
    // Required argument if you use the .rpc method
    const connection = new Connection("<your rpc url>");

    // If you've saved your createKey, you can define it as a static PublicKey
    const createKey = new PublicKey("<your createkey>")

    // Derive the multisig PDA
    const [multisigPda] = multisig.getMultisigPda({
        createKey,
    });
    // or
    // const multisigPda = new PublicKey("<your multisig key>");

    // Derive the PDA of the Squads Vault
    const [vaultPda] = multisig.getVaultPda({
        multisigPda,
        index: 0,
    });

    // Get deserialized multisig account info
    const multisigInfo = await multisig.accounts.Multisig.fromAccountAddress(
      connection,
      multisigPda
    );

    // Get the updated transaction index
    const currentTransactionIndex = Number(multisigInfo.transactionIndex);
    const newTransactionIndex = BigInt(currentTransactionIndex + 1);

    // Create a config transaction, of type changeThreshold
    const ix = await multisig.instructions.configTransactionCreate({
        multisigPda,
        // Replace with current index if needed
        transactionIndex: newTransactionIndex,
        // Member must have at least "Proposer" permissions
        creator: member,
        actions: [{
            // Type of action
            __kind: "ChangeThreshold",
            newThreshold: 3
        }],
    });
}
```

## Error Handling

| Error | Cause | Solution |
| - | - | - |
| Invalid threshold | Threshold > number of voters | Ensure threshold is valid |
| Member not found | Trying to remove non-existent member | Verify member exists |
| Invalid permissions | Creator lacks Proposer permission | Use a member with Proposer permissions |

## See Also

* [Execute Config Transaction](/developers/typescript-sdk/instructions/execute-config-transaction)
* [Config Transaction Account](/developers/typescript-sdk/accounts/transactions#config-transactions)
* [Config Transaction Reference](/developers/reference/accounts#config-transaction)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.